coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Turning an evar into a goal?
- Date: Mon, 03 Apr 2017 00:29:59 +0000
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-qt0-f174.google.com
- Ironport-phdr: 9a23:uuQHhh/FnDs3DP9uRHKM819IXTAuvvDOBiVQ1KB40O8cTK2v8tzYMVDF4r011RmSDNmds6oMotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2e2//5Lebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTFUACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMMvrRr42RDui9b9mRxDmiCgFNzA3/mLZhNFugq1Hux+uvQBzzpTObY2JKPZzfKXQds4aS2pbWcZRUjRMDIemYIsUCOoBO/tToYjnp1sJthu+HhSnCeTtyjBSnX/22qs60+s7EQHBxwwgBNYDvW/brNXwLqgSUOS1wLPUwjXEavNbwDHw45XGfBAmpPGDR7NwcczJxEkuEQPFlFSQppb/MzObzOQAtXWQ4el4Ve+3lWIrtwV8riKsy8oskIXFmJ8Zx1He+Slkwos4Ktu1Q1Nhb9G+CptfrSSaOpN2Qsw8R2Fovz43yrgctp66eCgG0Y0nxwLDZ/CefYiE/xDuWemLLTd3g3Jlf72/hxKs/kS61uL8Ucy03E5LripDjNbMqmgA2wLP5sWDUPdw/Ues1SyR2wzO6+xIO104mKjUJpI5x74/jJsTsUDNHi/sn0X2ibebdkc+9eiz7OTnZLrmpoWbN49vkQHzNr8jmsO6AesiMwgOW3KX9vi71L3m5UH5WqlFjuUqkqnFt5DXPdgUpqmgAwNMzokj7wu/ACy93dQDnXgHKUpFdwidg4joPVHOOvH4Au2lj1Siijc4j8zBa7bmG9DGKmXJuLbnZ7d0rUBGmyQpytUKxZtPDbdJD+j0QVS54N7RFRg/PBaz2P22INp434IaH2mIB/nKY+vprVaU67d3cKG3b4gPtWOlJg==
I can't seem to get it to work, even if they are skolemized. Here's a toy example that works, but when I do the same thing in my actual example, [Defined] takes over 30 hours and over 10 GB of RAM after the refine:
Axioms A B : Prop.
Goal exists a : A, B.
clear; intros; evar (a:A); exists a.
(*
a := ?a : A
============================
B
*)
revert a.
refine (let pf : A /\ B := _ in (proj2 pf : let f' := proj1 pf in B)).
(*
============================
A /\ B
*)
Here are my failed attempts using the strategy I think you're proposing:
Axioms A B : Prop.
Goal exists a : A, B.
clear; intros; evar (a:A); exists a.
revert a.
instantiate (1:=ltac:(refine (proj1 ?[a']))).
simple refine (let pf : A /\ B := ?[pf] in _); cycle 1.
intro a.
Fail unify a (proj1 pf).
Fail unify (proj1 pf) a.
Fail all: [ > unify ?pf ?a' | ]; [ | ].
Fail all: [ > unify ?a' ?pf | ]; [ | ].
Do you have any ideas?
If you want to play with the actual example, see https://coq.inria.fr/bugs/show_bug.cgi?id=5437.
On Sat, Apr 1, 2017 at 2:48 PM Jonathan Leivent <jonikelee AT gmail.com> wrote:
You first need to skolemize x before doing that unification, so that it
has no hyps. You can also then set up the new goal with no hyps as well
- so they will then both have no hyps at the point of the unification.
To skolemize, do something like "instantiate (1 := ltac:(revert_all))",
where revert_all is the obvious:
Ltac revert_all := repeat lazymatch goal with H : _ |- _ => revert H end.
-- Jonathan
On 04/01/2017 02:20 PM, Jason Gross wrote:
> Say I have an Ltac variable x such that [is_evar x] succeeds. How do I get
> a goal corresponding to x, in an Ltac script (without vernaculars)? I
> tried making a new goal and unifying the evar of that goal with x, but that
> fails with a "not well typed in the context of x" message, because I have
> different hypotheses.
>
> Thanks,
> Jason
>
- [Coq-Club] Turning an evar into a goal?, Jason Gross, 04/01/2017
- Re: [Coq-Club] Turning an evar into a goal?, Jonathan Leivent, 04/01/2017
- Re: [Coq-Club] Turning an evar into a goal?, Jason Gross, 04/03/2017
- Re: [Coq-Club] Turning an evar into a goal?, Jonathan Leivent, 04/03/2017
- Re: [Coq-Club] Turning an evar into a goal?, Jason Gross, 04/03/2017
- Re: [Coq-Club] Turning an evar into a goal?, Jonathan Leivent, 04/03/2017
- Re: [Coq-Club] Turning an evar into a goal?, Jason Gross, 04/03/2017
- Re: [Coq-Club] Turning an evar into a goal?, Jonathan Leivent, 04/03/2017
- Re: [Coq-Club] Turning an evar into a goal?, Jason Gross, 04/03/2017
- Re: [Coq-Club] Turning an evar into a goal?, Jonathan Leivent, 04/01/2017
Archive powered by MHonArc 2.6.18.