coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Z <zell08v AT orange.fr>
- To: Adam Chlipala <adam AT chlipala.net>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] How does the simpl. tactics behave?
- Date: Tue, 7 Sep 2010 18:43:26 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=FBE0dvWqpte8PBwnQwoo81uZjp/sqjQ72obxQV55jUksUbCCx1+MxwN18dky78YLFg 0QD7rAJechZlCdpNhQE4ZtEhRByDxFO7zC3ZnRIGAdH+isVc9r8WAGVICZeW9qRKXFAJ 9qsqQ7ajv7jb2OtzLMohf9mucTCW35vMfMhso=
Great answers! Thanks a lot for that insight!
For your 2nd point
"we don't need unfold explicitely..."
which I take leave to doubt however:
For the following theorem, is there another way to
get around? (without unfold)
*****************
Definition gxx(x: nat) := match x with |_ =>0 end.
Theorem test000bis: gxx 0 = 0.
Proof. unfold gxx. Qed.
*******************
Here, the issue is that Coq programs that you type are elaborated into a simpler internal language. For your example, that elaboration includes replacing the [match] with its body, since you have just one pattern that binds no variables. You can see this by running [Print gx.].
********************
Definition gx(x: nat) := match x with |_ =>0 end.
Eval simpl gx in gx 0.
********************
In many contexts, there is no need for unfolding. For instance:
Then, in this case, which tactic to do the unfolding work?
Goal forall x, gx x = 0.
reflexivity.
Qed.
This works because at the lowest level of Coq's logic, equality is defined modulo unfolding. For more complicated cases where you need to massage the form of a goal to get other tactics to apply, you can always run [unfold gx] to unfold [gx] in the conclusion.
- [Coq-Club] How does the simpl. tactics behave?, Z
- Re: [Coq-Club] How does the simpl. tactics behave?,
Adam Chlipala
- Re: [Coq-Club] How does the simpl. tactics behave?,
Z
- Re: [Coq-Club] How does the simpl. tactics behave?,
Christine Paulin
- Message not available
- Re: [Coq-Club] How does the simpl. tactics behave?,
Z
- Re: [Coq-Club] How does the simpl. tactics behave?,
Adam Chlipala
- Re: [Coq-Club] How does the simpl. tactics behave?, Z
- Re: [Coq-Club] How does the simpl. tactics behave?, Adam Chlipala
- Re: [Coq-Club] How does the simpl. tactics behave?, Taral
- Re: [Coq-Club] How does the simpl. tactics behave?,
Adam Chlipala
- Re: [Coq-Club] How does the simpl. tactics behave?,
Z
- Message not available
- Re: [Coq-Club] How does the simpl. tactics behave?,
Christine Paulin
- Re: [Coq-Club] How does the simpl. tactics behave?, Adam Chlipala
- Re: [Coq-Club] How does the simpl. tactics behave?,
Z
- Re: [Coq-Club] How does the simpl. tactics behave?,
Adam Chlipala
Archive powered by MhonArc 2.6.16.