coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: троль <vuvupik AT gmail.com>
- To: Christopher Ernest Sally <christopherernestsally AT gmail.com>
- Cc: Jason Gross <jasongross9 AT gmail.com>, coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] using the left conjunct (already proved) to solve the right
- Date: Wed, 25 Dec 2013 04:25:27 +0300
Theorem conj_assoc : forall P Q R : Prop,
P /\ Q /\ R -> (P /\ Q) /\ R.
Proof. intuition. Qed.
Theorem prove_first_init : forall P Q : Prop,
Q -> (Q -> P) -> P.
Proof. intuition. Qed.
Theorem remove_first : forall P Q : Prop,
(Q -> P) -> (Q -> Q /\ P).
Proof. intuition. Qed.
Theorem remove_middle : forall P1 P2 Q : Prop,
(Q -> P1 /\ P2) -> (Q -> P1 /\ Q /\ P2).
Proof. intuition. Qed.
Theorem remove_last : forall P Q : Prop,
(Q -> P) -> (Q -> P /\ Q).
Proof. intuition. Qed.
Theorem move_to_next_conj : forall P1 P2 P3 Q : Prop,
(Q -> (P1 /\ P2) /\ P3) -> (Q -> P1 /\ P2 /\ P3).
Proof. intuition. Qed.
Tactic Notation "prove_first" ident(P) :=
apply (prove_first_init P); [|
try (apply remove_first); repeat (apply move_to_next_conj; try
(apply remove_middle));
try (apply remove_last); intro; repeat (apply conj_assoc)
].
Example example : forall Hyp1 Hyp2 P1 P2 P3 P4,
Hyp1 -> Hyp2 -> P1 /\ P2 /\ P3 /\ P4.
Proof.
intros. prove_first P3. (* goal : P1 /\ P2 /\ P3 /\ P4
*)
admit. (* goal : P3
*)
prove_first P1. (* context : P3; goal : P1 /\ P2 /\ P4
*)
admit. (* context : P3; goal : P1
*)
prove_first P4. (* context : P3, P1; goal : P2 /\ P4
*)
admit. (* context : P3, P1; goal : P4
*)
admit. (* context : P3, P1, P4; goal : P2
*)
Qed.
- [Coq-Club] using the left conjunct (already proved) to solve the right, Christopher Ernest Sally, 12/24/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, Jason Gross, 12/24/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, Christopher Ernest Sally, 12/24/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, Christopher Ernest Sally, 12/24/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, троль, 12/25/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, троль, 12/25/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, Terrell, Jeffrey, 12/25/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, троль, 12/25/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, Jason Gross, 12/24/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, Christopher Ernest Sally, 12/24/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, Christopher Ernest Sally, 12/24/2013
- Re: [Coq-Club] using the left conjunct (already proved) to solve the right, Jason Gross, 12/24/2013
Archive powered by MHonArc 2.6.18.