coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Li-yao Xia <lysxia AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] using a hypothesis
- Date: Tue, 8 Jan 2019 07:44:21 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=lysxia AT gmail.com; spf=Pass smtp.mailfrom=lysxia AT gmail.com; spf=None smtp.helo=postmaster AT mail-ed1-f44.google.com
- Ironport-phdr: 9a23:ccS7rxJ/YjEiGqCd6dmcpTZWNBhigK39O0sv0rFitYgQI/nxwZ3uMQTl6Ol3ixeRBMOHs6IC07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffwZFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhjoZOT438G/ZicJ+g6xUrx2juxNxzJXZYJ2XOfdkYq/RYd0XSGhHU81MVyJBGIS8b44XAuQHPOZUton8qEEJrRCjBAasBfngwSJPi3/y3aw6yOsgEQDc0wE7ENIOtW7brNTxNKsITe+1y6zIwCzFYvhL2jn98JDFfg49rfyIR759csrcxVMxGw/ZjVics4PoMjyN2ukOrWSX9ettWO21h2MopAx9uDmiy8gqh4LUnIwa0ErE+j98wIstJd23Vkp7Ydm8HZtVrS6aNo92Tto8TG51pSo207MGtJG0cSQQx5QnwBnfa/ODc4eW+B7sSOGRITJgiHJkfrKwmQqy/FC+xuHgUsS4ylVHoypfntXSqnwA1Abf58eIR/dl+0euwzeP1wTd6uFeJkA0kLLWK5ohw74rmZsTsF7MEzT5mEXzlqCWd0Ek9vK05OTgZ7XqvoWcOJNsigHiLqQundSyDvg/MggXRmSU5eC81KD48kDiW7VLjvg2krHDv5zAJMQboLS5Aw5P3Yo55Ra/FWTu7NNNln4eaVlBZRivjo7zOliILuqrI+24hgGIkXJ6zveODrzoSsHJP2PTkb7JcrN06koaww02m4MMr6lIA60MdaqgEnT6s8bVW0dgYl6Eht3/AdA47bswHGeGA6uXKqTX6Aba6ecmIu3Kb4gQ6m+kd6oVosX2hHp8omczOLGz1MJOOn+9F/ViZU6eZCi024pTISIxpgM7CdfSphiCXDpUPSvgWqs94nQ2BNvjA9ufAI+qh7OF0WGwGZgEPm0=
Hi Jeremy,
On 1/8/19 7:17 AM, Jeremy Dawson wrote:
Hi coq-club,
two questions:
(1) given a hypothesis, such as
H : forall x : A x -> B x
how do I get it into the form
A ?x -> B ?x
where ?x is to be instantiated later
evar (z : nat). specialize (H z).
is one way. There may be a more idiomatic one.
(2) 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)
You can use "match" to extract big terms from your context/goal to use in other tactics:
match type of H with
| ?A -> _ =>
assert (I : A); [| apply H in I ]
end.
or you can encode the underlying propositional reasoning as an explicit term:
apply (fun G2 G1 => G1 (H G2)).
Li-yao
- [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.