Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Is there a tactic to do this in a convenient way?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Is there a tactic to do this in a convenient way?


Chronological Thread 
  • From: Jonathan Leivent <jonikelee AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Is there a tactic to do this in a convenient way?
  • Date: Sat, 12 Nov 2016 11:05:40 -0500
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f173.google.com
  • Ironport-phdr: 9a23:sIoptxOOONqqVsdhul4l6mtUPXoX/o7sNwtQ0KIMzox0LfjyrarrMEGX3/hxlliBBdydsKMfzbKJ+PC6EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQtFiT6zbL9oMBm7rwrdu8oIjYB/Nqs/1xzFr2dSde9L321oP1WTnxj95se04pFu9jlbtuwi+cBdT6j0Zrw0QrNEAjsoNWA1/9DrugLYTQST/HscU34ZnQRODgPY8Rz1RJbxsi/9tupgxCmXOND9QL4oVTi+6apgVRnlgzoFOTEk6mHaktF+grxVoByhpBJxzYDbb46XO/Vica3QZs8aSGhbU8pNSyBMDIGxYo0SBOQBJ+ZYqIz9qkMKoxu5AwmjHv/vyj9SiX/wwKY01fouEQDY3AM+GdIOrGnfodL3NKcVV+C1zarIwivHb/xIxzjw84fIchU7rvGNWbJ8a9beyU4qFw7ciFibtI/rPyuN2+gTr2SW6/BsWOGvhmI9tQ19vCSjyt0xhoTLiI8Z0lLJ+ThjzIorK9C1R1R3bcOqHZdMrS2WKYV7T8EkTmp1oig10KcGtoS+fCUSyJQo2Rrfa/uffoiN+B3jVeKRLS5hhHJmZL6znhiy/VWix+DyTMW031FKri1KktnIqH8BzQDc6s+CSvdl/0eh3yiA1xzL5+1aPUw5kbDXJp0hz7IqiJYfr1jPEjXrlEj0gqKabkAk9fKp6+TjbLXmvJicN4pshwH8NaQunM2/AecmPQgKQWeU5/+x1LLm/ULjQbVKiuc6nbXesJDfPcgbvLK2AxdJ0oY/7BayFyup0NMBnXUeMF1FfA+HgJPyNlHVIPH4CO+/jE62nDdqwfDGJLzhDY/XInjNireyNYp6vkVb0U84yc1Vz5NSELAIZvzpCWHrs9mNLBg/OhC0yuCvLNh8yI4YRSrbAKifMaDftVKFzu0qKuiIIoQSvWCueLAe+/fygCphyhcmdq6z0M5PZQ==

Hi Chris,

In Coq.Program.Tactics, there is the rapply tactic. This doesn't generate a new hypothesis for the term, but it can be easily modified to do so by changing the "(p _ ... _)"'s to "(let H := p _ .. _)" where H becomes an addtional arg to the tactic. If you want the subgoals to not be shelved, you can either use simple refine instead of refine, or unshelve.

By the way, note that rapply has a maximum number of args it can handle. I have a way to make it handle any number of args if you need that.

-- Jonathan

On 11/12/2016 10:42 AM, Chris Dams wrote:
Dear all,

In a proof I have a long and complicated term (let us call it
long_and_complicated_term) that is of a type that is of the form A -> B ->
C where all of A, B, and C are also long and complicated. Because these
terms are long and complicated I do not want to cut and paste them into my
proof script. I don't mind having long_and_complicated_term in my proof
script because it cannot really be avoided but I do want to have it only
once. I would like to have a tactic that adds C as hypothesis and generates
A and B as goals of the proof and then allows me to continue with the proof
of the actual goal with C now a hypothesis that can be used. If A, B, and C
were not so long and complicated I would have done 'assert (H: C)' and
'apply long_and_complicated_term' and be happily on my way. If C actually
were of the form (D /\ E) it would also have been pretty simple. I would
have done 'destruct long_and_complicated_term as [H1 H2]' because that
actually generates A and B as proof obligations. I am not aware of a tactic
that makes this convenient. What I am looking for is kind of a combination
of pose and refine. Is it possible?

Many thanks!
Chris





Archive powered by MHonArc 2.6.18.

Top of Page