Expected Cost | +- [f] | 0 | +- [Program] | 0:While(l ≥ 8) | Choice | 95/100: l :~ {1 : -8 + l} | 5/100: Skip | Tick(8) | 1:While(l ≥ 1) | l :~ {1 : -1 + l} | Tick(1) | +- Expected Cost | | | +- [f] | | 0 | | | +- [Program] | | 0:While(l ≥ 8) | | Choice | | 95/100: l :~ {1 : -8 + l} | | 5/100: Skip | | Tick(8) | | | +- While.step | | | | | +- [Problem] | | | 0:While(l ≥ 8) | | | Choice | | | 95/100: l :~ {1 : -8 + l} | | | 5/100: Skip | | | Tick(8) | | | | | +- [f] | | | 0 | | | | | +- Expected Cost Body | | | | | | | `- 8 | | | | | +- linear-template | | | | | | | `- 1 + [-7 + l | -7 + l ≥ 0] | | | | | +- [Norms] | | | [[1 | ⊤],[-7 + l | -7 + l ≥ 0]] | | | | | +- [Invariant] | | | l ≥ 8 ==> 8 + h([1 | ⊤],19/20·[-15 + l | -15 + l ≥ 0] + 1/20·[-7 + l | -7 + l ≥ 0]) ≼ h([1 | ⊤],[-7 + l | -7 + l ≥ 0]) | | | 8 ≥ 1 + l ==> 0 ≼ h([1 | ⊤],[-7 + l | -7 + l ≥ 0]) | | | | | `- 160/19·[-7 + l | -7 + l ≥ 0] | | | `- 160/19·[-7 + l | -7 + l ≥ 0] | +- Expected Cost | | | +- [f] | | 0 | | | +- [Program] | | 1:While(l ≥ 1) | | l :~ {1 : -1 + l} | | Tick(1) | | | +- While.step | | | | | +- [Problem] | | | 1:While(l ≥ 1) | | | l :~ {1 : -1 + l} | | | Tick(1) | | | | | +- [f] | | | 0 | | | | | +- Expected Cost Body | | | | | | | `- [1 | ⊤] | | | | | +- linear-template | | | | | | | `- 1 + [l | l ≥ 0] | | | | | +- [Norms] | | | [[1 | ⊤],[l | l ≥ 0]] | | | | | +- [Invariant] | | | l ≥ 1 ==> [1 | ⊤] + h([1 | ⊤],[-1 + l | -1 + l ≥ 0]) ≼ h([1 | ⊤],[l | l ≥ 0]) | | | 1 ≥ 1 + l ==> 0 ≼ h([1 | ⊤],[l | l ≥ 0]) | | | | | `- [l | l ≥ 0] | | | `- [l | l ≥ 0] | +- Expected Cost | | | +- [f] | | [l | l ≥ 0] | | | +- [Program] | | 0:While(l ≥ 8) | | Choice | | 95/100: l :~ {1 : -8 + l} | | 5/100: Skip | | Tick(8) | | | +- While.step | | | | | +- [Problem] | | | 0:While(l ≥ 8) | | | Choice | | | 95/100: l :~ {1 : -8 + l} | | | 5/100: Skip | | | Tick(8) | | | | | +- [f] | | | [l | l ≥ 0] | | | | | +- linear-template | | | | | | | `- 1 + 2·([-7 + l | -7 + l ≥ 0]) + [l | l ≥ 0] | | | | | +- [Norms] | | | [[1 | ⊤],[-7 + l | -7 + l ≥ 0],[l | l ≥ 0]] | | | | | +- [Invariant] | | | l ≥ 8 ==> 0 + h([1 | ⊤],19/20·[-15 + l | -15 + l ≥ 0] + 1/20·[-7 + l | -7 + l ≥ 0],19/20·[-8 + l | -8 + l ≥ 0] + 1/20·[l | l ≥ 0]) ≼ h([1 | ⊤],[-7 + l | -7 + l ≥ 0],[l | l ≥ 0]) | | | 8 ≥ 1 + l ==> [l | l ≥ 0] ≼ h([1 | ⊤],[-7 + l | -7 + l ≥ 0],[l | l ≥ 0]) | | | | | `- 7 | | | `- 7 | `- 160/19·[-7 + l | -7 + l ≥ 0] + 7