coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?
Chronological Thread
- From: Robbert Krebbers <mailinglists AT robbertkrebbers.nl>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?
- Date: Thu, 28 Jun 2018 10:57:24 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mailinglists AT robbertkrebbers.nl; spf=None smtp.mailfrom=mailinglists AT robbertkrebbers.nl; spf=None smtp.helo=postmaster AT smtp2.science.ru.nl
- Ironport-phdr: 9a23:IkcjIR2KDAnBTv3BsmDT+DRfVm0co7zxezQtwd8Zse0fKvad9pjvdHbS+e9qxAeQG9mDtbQc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q99pHPYghEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7S60/Vza/4KdxUBLmlTkJNzA5/m/UhMJ/gq1UrxC9qBJw2IPUfIOYOeBicq/Bc94XR2xMVdtRWSxbBYO8apMCAfYGPelDtIbyuUEOrQejDgepHuPg1CRHiWTo0q0gyOQqDAbL3Ak6ENIPtHTUrdP1NKgWUeC016nI0S7DYuhM2Tf684fHaQ4uoeuQXbJza8re11IgGBjbgVWKsozpJTWV1uAUvmWd8uFuVvqvhnY6pwx/vzSj3Nogh4vGi44P11zJ9D91zJs6KNC4UEJ3fNGpHZtKuyyeOIZ6WN4uT39qtSog17ELupG2cS4Xw5o93RHfceaIc42Q7xLjSumRJTB4iWp+eLK6mxay6VasxvfnVsao0VZFsCxFncXSuXwXzRzT99KLSv15/ku52DaP0R7c6v1cLEwpm6fXNoQtzqMym5ccq0jPAy77lF/rgKKZdkgo4u2o5P7mYrXiqJ+cLYh0igTmP6QrgMO/AOA4MgkIX2iU/eS81abj/VHiQLhRlP02lbLWv4vEKsQBuq65ABVV3Zg45BmkETimys8YkWMBLFJBYB6HlZTmO0nSIPDkCveym0ijkDByx/zfIrLhBojNIWPYnbf6fbd97lZcxxApwdBe4ZJUELABL+jpVk//rtyLRiM+Zgez2qPsDMh3/oIYQ2OGRKGDY43Itlrd3OUlKeSWeMc2ojv3IfU//La6iHY4nV4bcq2oxocMQGq/FP5rOVmae3fmiNobCiEMulxtH6TRlFSeXGsLND6JVKUm62RjUdP0PcL4XomoxYe58mK+F5xSaHpBDwrUQ23vfY+JQesPci+YKMJ7iXoCUer5EtNz5VSVrAb/joFfAK/M4CRC7cD509J/6vfPlgs//zZ5Fd/b1WXfFzgpzFNNfCc/2eVEmWI4ylqH1vIh0eddCcQJoehCUwo8PpOa1fE8DdSgAg8=
I am not sure if this is what you are looking for, but just in case:
Goal exists (n : nat), n = 2.
unshelve eexists; [refine (S _); shelve|].
On 06/27/2018 09:58 PM, John Grosen wrote:
I am currently dealing with a problem in which I have an existential
variable in the goal and want to apply a lemma to the goal, but Coq's
unifier is not powerful enough to automatically unify the relevant part
of the lemma with the evar. However, in this particular case, it is
programatically obvious how to unify them, so I would like to write some
Ltac to do so. Imagine this (greatly simplified) example:
Goal exists (n : nat), n = 2.
evar (n : nat).
exists n.
only [n]: refine (S _).
This works, but I usually don't have a name for the existential
variables I'm dealing with and the automation certainly doesn't know
about any. So what I'd like to do is this:
Goal exists (n : nat), n = 2.
eexists.
match goal with
| [ |- ?x = _ ] =>
only [x]: refine (S _)
end.
However, Coq complains with "No such goal." As far as I can tell, this
is because the argument in "only [_]" is a syntactic identifier.
Then, is there any way to select a goal with a non-syntactic identifier,
like I have in this situation?
Thanks,
John
- RE: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, (continued)
- RE: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, John M Grosen, 06/27/2018
- Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Ralf Jung, 06/28/2018
- Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Yannick Forster, 06/28/2018
- Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Ralf Jung, 06/28/2018
- RE: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Soegtrop, Michael, 06/28/2018
- Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Ralf Jung, 06/28/2018
- RE: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, John M Grosen, 06/29/2018
- RE: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Soegtrop, Michael, 06/30/2018
- Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Armaël Guéneau, 06/30/2018
- RE: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, John M Grosen, 06/29/2018
- Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Ralf Jung, 06/28/2018
- RE: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Soegtrop, Michael, 06/28/2018
- Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Gaëtan Gilbert, 06/28/2018
- Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Ralf Jung, 06/28/2018
- Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Yannick Forster, 06/28/2018
- Re: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?, Robbert Krebbers, 06/28/2018
Archive powered by MHonArc 2.6.18.