Demonstrates function counter-examples
f x z == f (y+2) z whenever
x == y+2. Naturally correct.
f is commutative; which is not necessarily true!
Indeed, the SMT solver (Yices in this case) returns a counter-example
function that is not commutative. We have:
ghci> prove thmBad Falsifiable. Counter-example: s0 = 0 :: SWord8 s1 = 128 :: SWord8 -- uninterpreted: f f 128 0 = 32768 f _ _ = 0
Note how the counterexample function
f returned by Yices violates commutativity;
thus providing evidence that the asserted theorem is not valid.