An Intermediate Assertion Between Assignments
An intermediate assertion can connect the promised result of one step to the starting requirement of the next.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace a two-step calculation
If x=3, doubling it produces six before adding five. The intermediate claim x=6 lets the second step establish x=11. See assignment transitions.
Generalize the proof
Starting from arbitrary a, after the first step x is \(2a\), and after the second it's \(2a+5\). Hoare triples describe composing claims about those two program fragments.[1]