Debian Codegraph @

src/Util/Logic.v

raw
1 Require Import Crypto.Util.FixCoqMistakes.
2
3 (* WHY does this solve goals that [intuition] does not solve? *)
4 Ltac logic :=
5 repeat match goal with
6 | |- _ => intro
7 | H:exists _, _ |- _ => destruct H
8 | H:_ /\ _ |- _ => destruct H
9 | |- _ => solve [eauto]
10 | |- _ => split
11 end.
12
13 Lemma exists_and_indep_l {A B} P Q :
14 (exists a b, P a /\ Q a b) <-> (exists a:A, P a /\ exists b:B, Q a b).
15 Proof. logic. Qed.
16
17 Lemma exists_and_indep_r {A B} P Q :
18 (exists a b, Q a b /\ P a) <-> (exists a:A, P a /\ exists b:B, Q a b).
19 Proof. logic. Qed.