diff options
author | Chantal Keller <Chantal.Keller@lri.fr> | 2020-01-16 12:10:52 +0100 |
---|---|---|
committer | Chantal Keller <Chantal.Keller@lri.fr> | 2020-01-16 12:10:52 +0100 |
commit | 378d660b82e409a1832b20815c3482be6e753ef8 (patch) | |
tree | c450666c75d1f965688a993c92b9a767f658937d /README.md | |
parent | 5f3e9424e42b9679214a3e3d4d333a15675e7963 (diff) | |
download | smtcoq-378d660b82e409a1832b20815c3482be6e753ef8.tar.gz smtcoq-378d660b82e409a1832b20815c3482be6e753ef8.zip |
Corrected the example on the webpage (fixes #56)
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -16,28 +16,32 @@ SMTCoq is distributed under the CeCILL-C license. Here is a very small example of the possibilities of SMTCoq: automatic proofs in group theory. ```coq -Require Import SMTCoq. +Require Import SMTCoq ZArith. + +Local Open Scope Z_scope. Section group. - Variable e : Z, inv : Z -> Z, op : Z -> Z -> Z. + Variable e : Z. + Variable inv : Z -> Z. + Variable op : Z -> Z -> Z. Hypothesis associative : - forall a b c, op a (op b c) = op (op a b) c. - Hypothesis identity : forall a, (op e a = a). - Hypothesis inverse : forall a, (op (inv a) a = e). + forall a b c, op a (op b c) =? op (op a b) c. + Hypothesis identity : forall a, (op e a =? a). + Hypothesis inverse : forall a, (op (inv a) a =? e). Add_lemmas associative identity inverse. - Lemma identity' : - forall a, (op a e = a). - Proof. smt. Qed. - Lemma inverse' : - forall a, (op a (inv a) = e). + forall a : Z, (op a (inv a) =? e). Proof. smt. Qed. + Lemma identity' : + forall a : Z, (op a e =? a). + Proof. smt inverse'. Qed. + Lemma unique_identity e': - (forall z, op e' z = z) -> e' = e. + (forall z, op e' z =? z) -> e' =? e. Proof. intros pe'; smt pe'. Qed. Clear_lemmas. |