Expected Cost | +- [f] | 0 | +- [Program] | b :~ {1 : 0} | 0:While(b ≥ 1) | Choice | 1/2: c :~ {1 : 1} | b :~ {1 : 0} | Tick(1) | 1/2: c :~ {1 : 0} | Tick(1) | Tick(2) | Tick(1) | +- Expected Cost | | | +- [f] | | 0 | | | +- [Program] | | 0:While(b ≥ 1) | | Choice | | 1/2: c :~ {1 : 1} | | b :~ {1 : 0} | | Tick(1) | | 1/2: c :~ {1 : 0} | | Tick(1) | | Tick(2) | | | +- While.step | | | | | +- [Problem] | | | 0:While(b ≥ 1) | | | Choice | | | 1/2: c :~ {1 : 1} | | | b :~ {1 : 0} | | | Tick(1) | | | 1/2: c :~ {1 : 0} | | | Tick(1) | | | Tick(2) | | | | | +- [f] | | | 0 | | | | | +- Expected Cost Body | | | | | | | `- 3 | | | | | +- linear-template | | | | | | | `- 1 + [b | b ≥ 0] | | | | | +- [Norms] | | | [[1 | ⊤],[b | b ≥ 0]] | | | | | +- [Invariant] | | | b ≥ 1 ==> 3 + h([1 | ⊤],1/2·[b | b ≥ 0]) ≼ h([1 | ⊤],[b | b ≥ 0]) | | | 1 ≥ 1 + b ==> 0 ≼ h([1 | ⊤],[b | b ≥ 0]) | | | | | `- 6·[b | b ≥ 0] | | | `- 6·[b | b ≥ 0] | +- Expected Cost | | | +- [f] | | 0 | | | +- [Program] | | Tick(1) | | | `- [1 | ⊤] | +- Expected Cost | | | +- [f] | | [1 | ⊤] | | | +- [Program] | | 0:While(b ≥ 1) | | Choice | | 1/2: c :~ {1 : 1} | | b :~ {1 : 0} | | Tick(1) | | 1/2: c :~ {1 : 0} | | Tick(1) | | Tick(2) | | | `- [1 | ⊤] | `- [1 | ⊤]