coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gyesik Lee <gslee AT ropas.snu.ac.kr>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Writing tactics with dependent destruction
- Date: Sun, 20 Jun 2010 01:02:29 +0900
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=mGapRveAYTdd6NXMaC087WgOf0gU9KTqV05Gk75OqzkYIgdPy5DhP90iWNbGQ8KbZW k+DgORgwn+jy6eJ/SmypYX2gRFhsnM9Apl82oOJospfubzZt13xAOawGEO4xwH4G3a2q pf/0UCV7X9iMRdk9rRGGjJyxzn63Jk47OMhmU=
Hi,
I would like to write some tactics using dependent destruction.
(I'm using Coq8.2pl1)
1) Writing a tactic using dependent destruction is not possible?
Let me first introduce an example:
================
Parameter A B : Type.
Inductive P : A -> B -> Prop :=
| All : forall a b, P a b.
Ltac toto :=
match goal with
| H : P _ _ |- _ => dependent destruction H
end.
Ltac toto1 := intros; toto.
Lemma titi : forall a b c d,
P a b -> P c d.
Proof.
intros. toto.
=================
Applying the tactic "toto" triggers the following error message:
Error: No matching clauses for match goal
(use "Set Ltac Debug" for more info).
However, if you replace "dependent destruction H" with "assert False",
for example,
in the definition of toto, then it behaves as expected.
I am wondering why.
2) Is there a way to use "dependent destruction" with "as" like
"inversion H as ..." or "destruct H as ... "?
3) (not relevant to dependent destruction)
Suppose, during a proof, you have assumptions as follows
H : forall (x : A), Q x -> P x x
a : A
H0 : Q a
How would you write a tactic which generates a new assumption (H1 : P a a)?
Gyesik
- [Coq-Club] Writing tactics with dependent destruction, Gyesik Lee
- Re: [Coq-Club] Writing tactics with dependent destruction, Matthieu Sozeau
Archive powered by MhonArc 2.6.16.