You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Santiago Zanella-Beguelin edited this page Feb 22, 2017
·
28 revisions
Use SMTPat and pattern for fine control over SMT proof.
Example
assume typet
assume val(+):t ->t ->t
assume valplus_associative:x:t ->y:t ->z:t ->Lemma(requires True)(ensures ((x + y)+ z == x +(y + z)))[SMTPat ((x + y)+ z)]
irreducible lettrigger(x:t)(y:t)= True
valtest:x:t ->y:t ->z:t ->Lemma(requires (forall (a:t)(b:t).{:pattern (trigger a b)} trigger a b /\ a + b == b + a))(ensures ((x + y)+ z ==(z + y)+ x))lettest x y z = cut (trigger z y); cut (trigger x (z + y))