diff options
author | Andres Erbsen <andreser@mit.edu> | 2016-09-16 13:31:40 -0400 |
---|---|---|
committer | Andres Erbsen <andreser@mit.edu> | 2016-09-16 19:00:06 -0400 |
commit | 1ea69cd53ff8472bb23c338d0e3fcac0a1f9ada5 (patch) | |
tree | 14379b1df13a789daf454f29324661ebb85c9f0c /src/Util/Logic.v | |
parent | 7d139ded819549c587b169e6ef54d411bc543cd4 (diff) |
Derive EdDSA.verify from equational specification
Experiments/SpecEd25519 will come back soon
Diffstat (limited to 'src/Util/Logic.v')
-rw-r--r-- | src/Util/Logic.v | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Util/Logic.v b/src/Util/Logic.v new file mode 100644 index 000000000..d518069a9 --- /dev/null +++ b/src/Util/Logic.v @@ -0,0 +1,19 @@ +Require Import Crypto.Util.FixCoqMistakes. + +(* WHY does this solve goals that [intuition] does not solve? *) +Ltac logic := + repeat match goal with + | |- _ => intro + | H:exists _, _ |- _ => destruct H + | H:_ /\ _ |- _ => destruct H + | |- _ => solve [eauto] + | |- _ => split + end. + +Lemma exists_and_indep_l {A B} P Q : + (exists a b, P a /\ Q a b) <-> (exists a:A, P a /\ exists b:B, Q a b). +Proof. logic. Qed. + +Lemma exists_and_indep_r {A B} P Q : + (exists a b, Q a b /\ P a) <-> (exists a:A, P a /\ exists b:B, Q a b). +Proof. logic. Qed. |