Expected Cost | +- [f] | 0 | +- [Program] | x :~ {1 : 0} | 0:While(n ≥ 1 + x) | Tick(1) | NonDet | {x :~ {1 : 1 + x}} | {x :~ {1 : 1 + x}} | +- While.step | | | +- [Problem] | | 0:While(n ≥ 1 + x) | | Tick(1) | | NonDet | | {x :~ {1 : 1 + x}} | | {x :~ {1 : 1 + x}} | | | +- [f] | | 0 | | | +- Expected Cost Body | | | | | `- [1 | ⊤] | | | +- linear-template | | | | | `- 1 + [n + -x | n + -x ≥ 0] | | | +- [Norms] | | [[1 | ⊤],[n + -x | n + -x ≥ 0]] | | | +- [Invariant] | | n ≥ 1 + x ==> [1 | ⊤] + h([1 | ⊤],[-1 + n + -x | -1 + n + -x ≥ 0]) ≼ h([1 | ⊤],[n + -x | n + -x ≥ 0]) | | 1 + x ≥ 1 + n ==> 0 ≼ h([1 | ⊤],[n + -x | n + -x ≥ 0]) | | | `- [n + -x | n + -x ≥ 0] | `- [n | n ≥ 0]