coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Xavier Leroy <Xavier.Leroy AT inria.fr>
- 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 17:04:57 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=xavier.leroy AT gmail.com; spf=Pass smtp.mailfrom=xavier.leroy AT gmail.com; spf=None smtp.helo=postmaster AT mail-wm0-f47.google.com
- Ironport-phdr: 9a23:avAdlxe4FKQq7ULBA58VJz5BlGMj4u6mDksu8pMizoh2WeGdxcS6YB7h7PlgxGXEQZ/co6odzbGH6Oa4BidQu96oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCzbL52Ihi6txndu8sZjYZhNKo61wfErGZPd+lK321jOEidnwz75se+/Z5j9zpftvc8/MNeUqv0Yro1Q6VAADspL2466svrtQLeTQSU/XsTTn8WkhtTDAfb6hzxQ4r8vTH7tup53ymaINH2QLUpUjms86tnVBnlgzoAODMl/mzaiMJ9gLtHrB+uuhdzx47ZbJ2QOPd4Y6jTf84VRXBZU8ZKSiJPHI28YYsMAeQPM+lXoIvyqEcBoxalGQmhBvnixiNUinL436A31fkqHwHc3AwnGtIDqHXbo8/rNKcTT++11rTDwzPdYPNM3jf86JXDfxcgrv6WQ7JwcNTeyVM1Gw3DkFqQs4vlPjOO2+QMtWib9etgWvi1h24psQF8uz6izdoihInOg4Ia0FHE9SNhzYY6JN24VE57YcO/H5dKqy6aMI52T8U/SG9roCY30r8LtJGhcCQX1pgqxwTTZv+Zf4SS7R/uVv6dLDRmiH5/Zr6yiRS//VKix+HhTMW4zVJHojdDn9LRrH4CzQbT5dKCSvZl/keuxzKP1wfL5+FBO080lK7bJ4cvw741ipYfqErDEyD0lUnsg6+WcUIk+ues6+v5eLnpupicN4pshgH/NKQhhNC/DPw6PwUBRWSX5Pqw2b358UD6XrlGlPI7n6vBvJDfP8sbp6q5AwFP0oYk7hayFzin384GnXkGMl1FYgiLj4z3NFHUJ/D5Deyyg1upkDhxxvDGOqftDYnKLnjGiLvhZ6py61ZAyAovytBS/45bCrYYIP7qRkDxsMHYAQQiPgyvw+fnDc192ZkEVWKOBK+ZKqLSvkWS6uIhOenfLLMS7T36Mr0u4+PkpX4/g14UO6ezjrUNb3XtLv14IkiDKV7hmNAQWTM6txQ/QfasrFCYVi97ZnCoXqt66CttW9HuNpvKWo342O/J5yy8BJADOzhL
On 11/12/2016 04:42 PM, 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.
There is an "exploit" tactic in CompCert that does pretty much what
you want, I think:
https://github.com/AbsInt/CompCert/blob/master/lib/Coqlib.v#L56
Its Ltac implementation is awful, though. Don't sue me.
Usage: if "G" is your current goal,
exploit long_and_complicated_term.
will leave you with 3 goals:
Goal 1: A
Goal 2: B
Goal 3: C -> G
Hope this helps,
- Xavier Leroy
- [Coq-Club] Is there a tactic to do this in a convenient way?, Chris Dams, 11/12/2016
- Re: [Coq-Club] Is there a tactic to do this in a convenient way?, Xavier Leroy, 11/12/2016
- Re: [Coq-Club] Is there a tactic to do this in a convenient way?, Jonathan Leivent, 11/12/2016
- Re: [Coq-Club] Is there a tactic to do this in a convenient way?, Jonathan Leivent, 11/12/2016
- Re: [Coq-Club] Is there a tactic to do this in a convenient way?, Gabriel Scherer, 11/12/2016
- Re: [Coq-Club] Is there a tactic to do this in a convenient way?, Dominique Larchey-Wendling, 11/12/2016
- Re: [Coq-Club] Is there a tactic to do this in a convenient way?, Laurent Thery, 11/12/2016
- Re: [Coq-Club] Is there a tactic to do this in a convenient way?, Gabriel Scherer, 11/12/2016
- Re: [Coq-Club] Is there a tactic to do this in a convenient way?, Chris Dams, 11/13/2016
- Re: [Coq-Club] Is there a tactic to do this in a convenient way?, Gaetan Gilbert, 11/12/2016
Archive powered by MHonArc 2.6.18.