Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?


Chronological Thread 
  • From: John Grosen <jmgrosen AT mit.edu>
  • To: coq-club AT inria.fr
  • Cc:
  • Subject: [Coq-Club] Is it possible to perform tactics in an existential's context from Ltac?
  • Date: Wed, 27 Jun 2018 15:58:10 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jmgrosen AT mit.edu; spf=Pass smtp.mailfrom=jmgrosen AT mit.edu; spf=None smtp.helo=postmaster AT dmz-mailsec-scanner-6.mit.edu
  • Ironport-phdr: 9a23:uSbRzBY7LYXLskkvh5CK7kf/LSx+4OfEezUN459isYplN5qZocW8bnLW6fgltlLVR4KTs6sC17KI9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCa8bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjA57m/Zl8J+gqFUrx29vBF/35LYbZuJOPZiYq/RYdUXTndBUMZLUCxBB5uxYY8ID+oBO+ZTsojzp0EJrRulGwasAv7kxzhKhn/z0q06yeMhERrY0wwmBN8OtXXUrMnvOKgMTO+10bDFwDPeZP1VwTfw8JXEfxM7rfyOR759cMncxVMhGg7FllmctI/oMymI2ugRrWSX9fRsWf+ghmI9tQ19vDyiy8ExgYfTnI0V0ErL9SBhzYY1O9K4TEl7bMa5H5tVtiCWLo52TdkjQ2FsoyY11KEJtYegfCcW0psnwRjfZOKdc4SR4x/vTuORITZkhH5/Zr2wmguy/VChyu36SMa0zE5HojdGn9XWtH0BzR3e58udRvZz/kqtwTOP2BrS6uFAL0A0j63bK5s5z74yk5oTvl7DHijtmEroiq+bbUAk+um06+j9fLrpu4KcO5duig7iKqQuhtC/AeMgPwcSWGib4P2w26Hn/U3kW7pHleY2k6ncsJDCP8sXvK+5AwlP0oYi8RmzFTmm0M5L1UUAeVlCYVeMi5XjE1DIOvHxS/ml0Hq2lzI+5ffGOPXOGJLWI36LxLXkcqx68ENa4A8y0ZZS648CWeJJG+76RkKk7I+QNRQ+KQHhm7+2WuU47ZsXXCe0OoHcNarTtVGS4ed+ceyNeMkYtCuvcqF5tc6rtmcwnBomRYfsxYEeOSK9H+ggLkmEMyK134UxVFwStw97d9TEzV2PVTkIPiS+WrB54zg6DJmrBsLYTYmrhrGbmXn9G5xKIG1KFwLUHA==

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



Archive powered by MHonArc 2.6.18.

Top of Page