coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Rui Baptista <rpgcbaptista AT gmail.com>
- To: Leonardo Rodriguez <leonardomatiasrodriguez AT gmail.com>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] ltac to unfold every local definition
- Date: Wed, 2 Oct 2013 23:10:08 +0100
The tactic you're looking for is either of these:
repeat
match goal with
| x : _ |- _ => progress unfold x
end.
repeat
match goal with
| x := _ : A |- _ => progress unfold x
end.
The match-with tactic only moves from one hypothesis to the next if a tactic fails. Examples:
Goal True -> let n1 := 0 in let n2 := 0 in True -> n1 = n2.
intros H1 ? ? H2.
match goal with
| x : _ |- _ => idtac x
end.
try
match goal with
| x : _ |- _ => progress idtac x
end.
unfold doesn't fail if there's nothing to unfold. progress t fails if t fails or if t succeeds but without making progress. try t always succeeds.
On Wed, Oct 2, 2013 at 7:48 PM, Leonardo Rodriguez <leonardomatiasrodriguez AT gmail.com> wrote:
I have just tried with
repeat match goal with
[H := _ : A |- _] =>unfold Hend
but doesn't work either.2013/10/2 Leonardo Rodriguez <leonardomatiasrodriguez AT gmail.com>
unfold t3 in *unfold t2I want to clean every [t_i] and replace the conclusionmy_type t1 t2 = t4t2 := second_term : At1 := first_term : AH1 : QH0 : PHi Coq Club,Suppose you have some goal like this
t3 := third_term : At4 := fourth_term t3 : A
==============
withmy_type (first_term) (second_term) = fourth_term third_termI'm trying to avoid doing:
unfold t1unfold t4I don't know too much Ltac, but I tried to dorepeat match goal with
[H : _ |- _] =>try unfold Hendand it seems not to match with local variables.Thank you!
- [Coq-Club] ltac to unfold every local definition, Leonardo Rodriguez, 10/02/2013
- Re: [Coq-Club] ltac to unfold every local definition, Leonardo Rodriguez, 10/02/2013
- Re: [Coq-Club] ltac to unfold every local definition, Rui Baptista, 10/03/2013
- Re: [Coq-Club] ltac to unfold every local definition, Leonardo Rodriguez, 10/03/2013
- Re: [Coq-Club] ltac to unfold every local definition, Jason Gross, 10/03/2013
- Re: [Coq-Club] ltac to unfold every local definition, Leonardo Rodriguez, 10/03/2013
- Re: [Coq-Club] ltac to unfold every local definition, Rui Baptista, 10/03/2013
- Re: [Coq-Club] ltac to unfold every local definition, Leonardo Rodriguez, 10/02/2013
Archive powered by MHonArc 2.6.18.