1

I have the following example that I have to prove

{a>7 ^ b>=0} n=a-b {n<a ^ a+b>=0}

Using the Consequence Rule I assumed that the P is true

{true} n=a-b {n<a ^ a+b>=0}

so logically, the Q should be true, but I'm not sure if that'd be enough.

A. muffin
  • 11
  • 1
  • Be aware that your statement is not true unless you replace `n < a` with `n <= a`. For instance, for `a = 8` and `b = 0` your precondition is true but `n = a - b = 8 - 0 = 8`, which is not `< 8`. – Leandro Caniglia Nov 21 '17 at 12:15

0 Answers0