Next:
If-rules
Up:
Concatenation (Composition) Rule
Previous:
Proof of Soundness
Contents
Example
Prove the following is correct:
(assume
are Real-valued)
Proof
. Work backwards: ``feed'' the postcondition back through the code. Thus, by assignment rule,
But so is:
by Assignment. We can now use the
Concatenation Rule
:
Typically we would set out such a proof ``Vertically'':
The method easily extends to arbitrary long concatenations.
David Goodwin 2008-09-20