coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Marko Doko <mdoko AT mpi-sws.org>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] using a hypothesis
- Date: Tue, 8 Jan 2019 15:40:41 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mdoko AT mpi-sws.org; spf=Pass smtp.mailfrom=mdoko AT mpi-sws.org; spf=None smtp.helo=postmaster AT jupiter.mpi-klsb.mpg.de
- Ironport-phdr: 9a23:fr8eJxCE3/v3DlPAy0qsUyQJP3N1i/DPJgcQr6AfoPdwSPv4r8bcNUDSrc9gkEXOFd2Cra4c26yO6+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglUhzexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfOpWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnMVhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Xymp4aV2Rx/ykCoJKiA38G/XhMJzgqxUrh2uqB5jzIDbe4yVKPhzc7nBcd8GS2dMXMBcXDFBDIOmaIsPCvIMM+FCoInnpFsOqga1CwerBOPszT9Dm3j73agn3OQmEgHG2xctH9cWsHTVtdn1L6kTUfuvwKnP1zXDYOpb1DHg44bGdRAhpOuDXbN2ccfJxkkvFh/FjlWNqYP+JT+ayuMNs22d4uF9Vuyvk3Yqpxx/rzWr3Msgl43EipgWx13F7yl13YY4KcWlREN1ZdOoCoZcuiWAO4drQM4vQntktSg0x7AApJW1ZjIFyI49yB7ac/GHc5aH4hbkVOuJIzd4mWpleLOjhxms60is0Oj8VtG10FpTrSpFlsLMuWsX2xzW8siHReFx8Vq/1jqX1gDT7P9LIVwsmKbGJZMsxqQ8mocXvEjZHSL7mV/6gLKWe0k8/+in8eXnYrHopp+GMI90jxnzMqEzlcy4AuQ4NRMDX22D+eS9zbHj5kP4QK5Qgv0xiKnZv4jWJd4Hqa6hHw9VzoEj5g6jADehydQUhGUILFZYeB2clIXpIFHPIPXgDfilmViskTFrx+rHPrL7GJnNIGLDw//deuN27FcZww4ux/he4YhVA/cPOqHdQEj04fnRFBw+eyCzwOGvXNBx0YAZcWeXA+qCL7iUtkWHsLF8a9KQbZMY7W6uY8Mu4OTj2CdgyA0tOJKx1J5SU0iWW/FvIkGXe33p24xTFH8L+xEhV6rtklLQCGcPNUb3ZLo143QAMKzjFZ3KH9v/haSAmTykBdtRfG8UUgnRQ0etTJ2NXrI3UAzXIsJllWZZB7q8U4492AvosRf7jrljNeCS/zUX857uhoB4
On 2019-01-08 07:17 UTC+0100 Jeremy Dawson wrote:
>
> given a hypothesis, such as
> H : A -> B
> how do I get this to two subgoals, one with B as a hypothesis,
> and the other with A as the conclusion
> (where either A and B are too long to type in, or where I want to do
> this inside an Ltac tactic, where A and B may vary)
>
Here a tactic from Hahn library (https://github.com/vafeiadis/hahn) that
achieves the above (and a bit more):
Tactic Notation "specialize_full" ident(H) :=
let foo := fresh in
evar (foo : Prop); cut (foo); subst foo; cycle 1;
[eapply H|try clear H; intro H].
If you call
specialize_full H
you will get two goals. The first one will require you to prove A, and the
second one will contain hupothesis H: B.
--
Marko
- [Coq-Club] using a hypothesis, Jeremy Dawson, 01/08/2019
- Re: [Coq-Club] using a hypothesis, Li-yao Xia, 01/08/2019
- Re: [Coq-Club] using a hypothesis, Jeremy Dawson, 01/10/2019
- Re: [Coq-Club] using a hypothesis, Pierre Courtieu, 01/10/2019
- Re: [Coq-Club] using a hypothesis, Théo Zimmermann, 01/11/2019
- Re: [Coq-Club] using a hypothesis, Pierre Courtieu, 01/10/2019
- Re: [Coq-Club] using a hypothesis, Jeremy Dawson, 01/10/2019
- Re: [Coq-Club] using a hypothesis, Lily Chung, 01/08/2019
- Re: [Coq-Club] using a hypothesis, Marko Doko, 01/08/2019
- Re: [Coq-Club] using a hypothesis, Théo Zimmermann, 01/08/2019
- Re: [Coq-Club] using a hypothesis, Li-yao Xia, 01/08/2019
Archive powered by MHonArc 2.6.18.