diff options
author | Quentin Garchery <garchery.quentin@gmail.com> | 2018-10-27 20:08:44 +0200 |
---|---|---|
committer | Valentin Blot <24938579+vblot@users.noreply.github.com> | 2018-10-28 00:39:25 +0200 |
commit | faaa2848c37444f8f37ac432c25f9f813e1df39b (patch) | |
tree | 2672d165fd13b5262005406d1496bc6a14e8b521 /examples/one_equality_switch.v | |
parent | 7940ef63c654be26b41ce20162207f3c67d0b10a (diff) | |
download | smtcoq-faaa2848c37444f8f37ac432c25f9f813e1df39b.tar.gz smtcoq-faaa2848c37444f8f37ac432c25f9f813e1df39b.zip |
Adding support for lemmas in the command verit
Diffstat (limited to 'examples/one_equality_switch.v')
-rw-r--r-- | examples/one_equality_switch.v | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/one_equality_switch.v b/examples/one_equality_switch.v new file mode 100644 index 0000000..3473d08 --- /dev/null +++ b/examples/one_equality_switch.v @@ -0,0 +1,25 @@ +Require Import SMTCoq. +Require Import Bool. +Local Open Scope int63_scope. + +Parameter f : Z -> Z. + +Lemma sym_zeq_bool x y : + Zeq_bool x y = Zeq_bool y x. + +Proof. + case_eq (Zeq_bool x y). + rewrite <- Zeq_is_eq_bool. intro H. symmetry. now rewrite <- Zeq_is_eq_bool. + symmetry. apply not_true_is_false. + intro H1. rewrite <- Zeq_is_eq_bool in H1. + symmetry in H1. rewrite Zeq_is_eq_bool in H1. + rewrite H in H1. discriminate H1. +Qed. + +Axiom f_spec : forall x, (f (x+1) =? f x + 1) && (f 0 =? 0). + +Lemma f_1 : f 1 =? 1. + +Proof. + verit_base f_spec; vauto; rewrite Z.eqb_sym; auto. +Qed. |