coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: t x <txrev319 AT gmail.com>
- To: Dmitry Grebeniuk <gdsfh1 AT gmail.com>
- Cc: t x <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Using tactics to build Existentials
- Date: Sun, 18 Aug 2013 05:14:01 +0000
(2) Very cool. Thanks for the trick.
(1) I apologize for this. This was a meant to be a comment, not a question, referring to my excitement that "refine (eq_rect .. )" was basically a "refine-rewrite"On Sat, Aug 17, 2013 at 7:52 PM, Dmitry Grebeniuk <gdsfh1 AT gmail.com> wrote:
Hello.
What do you mean? Give an example of building a term with "refine"
> (1) This is really cool. I was hoping there was a way to extend refine's
> ability to "fill in the missing parts"
first, so people can help you.
You can do it.
> (2) This also only works on _goals_ right? Since "refine" is a generalized
> apply, I can't use this technique to rewrite an existing hypothesis (rather
> than a goal).
Goal forall A (P : A -> Prop) (a : A) (H : P a) b (E : a = b), P b.
intros.
refine (let H0 := eq_ind _ _ H _ E in _).
exact H0.
(note that last two lines can be replaced with
refine (let H0 := eq_ind _ _ H _ E in H0).
)
Generally, "refine (let H ...)" adds hypothesis H.
You can fill the body of H with "let H := thebody in ..." or leave it
empty just specifying the type with "let H : thetype := _ in ...",
then you will be prompted to build a value of thetype and the value
will be available as "H" later.
- [Coq-Club] Using tactics to build Existentials, t x, 08/17/2013
- Re: [Coq-Club] Using tactics to build Existentials, Pierre-Marie Pédrot, 08/17/2013
- Re: [Coq-Club] Using tactics to build Existentials, t x, 08/17/2013
- Re: [Coq-Club] Using tactics to build Existentials, Dmitry Grebeniuk, 08/17/2013
- Re: [Coq-Club] Using tactics to build Existentials, t x, 08/18/2013
- Re: [Coq-Club] Using tactics to build Existentials, Dmitry Grebeniuk, 08/17/2013
- Re: [Coq-Club] Using tactics to build Existentials, t x, 08/17/2013
- Re: [Coq-Club] Using tactics to build Existentials, Jason Gross, 08/17/2013
- Re: [Coq-Club] Using tactics to build Existentials, Pierre-Marie Pédrot, 08/17/2013
Archive powered by MHonArc 2.6.18.