File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22(* Run easycrypt via the commandline with a `-boot` flag instead *)
33
44(* -------------------------------------------------------------------- *)
5- require import Tactics.
5+ require import Tactics Pervasive .
66
77(* -------------------------------------------------------------------- *)
88abbrev [-printing] fst (p : ' a * ' b): ' a = p.`1.
@@ -365,12 +365,22 @@ lemma contraNneq (b : bool) (x y : 'a):
365365 (x = y => b) => !b => x <> y
366366by smt().
367367
368+ lemma contra_congr [' a ' b] (f : ' a -> ' b) (x y : ' a) :
369+ f x <> f y => x <> y.
370+ proof. by rewrite &(contra) &(congr1). qed.
371+
372+ (* -------------------------------------------------------------------- *)
373+ lemma case_elim p q: ((p => q) /\ (!p => q)) <=> q.
374+ proof. by smt(). qed.
375+
368376(* -------------------------------------------------------------------- *)
369377lemma iffLR (a b : bool ) : (a <=> b) => a => b by [].
370378lemma iffRL (a b : bool ) : (a <=> b) => b => a by [].
371379
372380lemma iff_negb : forall b1 b2, (!b1 <=> !b2) <=> (b1 <=> b2) by [].
373381
382+ lemma iff_trans : transitive (<=>) by smt().
383+
374384(* -------------------------------------------------------------------- *)
375385lemma if_congr ['a] (e e' : bool) (c1 c2 c1' c2' : ' a) :
376386 e = e' => c1 = c1' => c2 = c2'
You can’t perform that action at this time.
0 commit comments