coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jeremy Dawson <Jeremy.Dawson AT anu.edu.au>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] "Sequence is associative." (?)
- Date: Mon, 28 Jan 2019 11:11:48 +0000
- Accept-language: en-US
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=Jeremy.Dawson AT anu.edu.au; spf=Pass smtp.mailfrom=Jeremy.Dawson AT anu.edu.au; spf=Pass smtp.helo=postmaster AT AUS01-SY3-obe.outbound.protection.outlook.com
- Ironport-phdr: 9a23:gbmhMhI32P2pJOiUJ9mcpTZWNBhigK39O0sv0rFitYgfKvTxwZ3uMQTl6Ol3ixeRBMOHs6IC07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffwZFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhicZOTAk7GHZhM9+jKxZrxKguxNxzIHbbZqJNPVlZK7RYc8WSXZDU8tXSidPApm8b4wKD+cZOehXsZP9qEULrRq+GAKiCvngyzFThn/x260xzuMsHwXY0ww6Ad0OtXTVoM/7OqgIX+G1167IzTPYYvxM3zf99ZLEfQ48rvGRR75/a9fRxFApGgjYgFuQronlMCmU1uQLq2Wb7uxgVfiui2E9sQ1xrCKvy8ExgYfKnoIY0l/J+TljzIooOdG1SlR3bcOqHZZSrS2WKpZ6T806T2xnvCs20KAKtJq7cSQQ1Zgr2QLTZ+aaf4WG4R/vTOiRLil7iX55fb+yghK//Eu7xeDzU8S4zVhHoTRYndTJuHACyR/e5tSCR/dj5Uih1zmC2gbO4e9eO080j7DUK5s5z74wiJUTtUPDEzfqlUr4kaGaalgo9vG15evlbLjqv5icOJRqhQ3kNaQuh9C/Dv8/MggTWWiU5P6w1KX5/U3+XLVFkOE5krXYsJDdI8QXvKm5AxJJ0oYn7Ba/CDSm3M4EknkAKVJJYBOHj473NFHSOP31Auuzj06xnDt3xf3KJKDtD5vPI3TZjbvtYLhw51ZZyAUpzNBf45xUCqsGIPL2QkL/sMLXDgUnPAyxw+frEttz2ZkQWGKUBa+ZNrjfvkWO5uIyOeWDepIauCvnJ/c/+v7ilWU5lkMFfam1wZsXb2i1EehhI0WAeHbjntMBEXoRsQclV+zriFiCUSZJaHqoXqI84Cs7CIO8AovZSICtmu/J4CDuVJZRfyVNDk2GOXbubYSNHfkWImrGKch41zcASLKJSok71BjouhWsmJR9Ke+B2CACuJfynPR8+PbUk1lm1zFuAsGMlU2EUHpzmEsBQSJw0axi50VgnATQmZNkiuBVQIQAr8hCVR03YMaFnr5KTuvqUweERe+nDVOvQ9GoGzY0F4hjytkTJUtxBpOrk0Kahnb4M/ouj7WOQacM3OfExXGofZR0zWuA2aU8yVA7EJMWaD+Ww5Vn/g2WPLbn1kWUk6H2KvY14RWVrSK4/DHLu0tVFgltTa/CQHYTIFPMqsj07V/DSLnoDqk7NgxGyoiJLa4YM9A=
Thanks but I don't understand what you are saying about
Set Default Selected Goal "all". and
the "natural" (understand: monadic) mode of ltac.
Could I ask
(1) what does tac1 ; tac2 do, where tac1 and tac2 are tactics?
(2) what does tac1 ; [> tac2 ..] do, where tac1 and tac2 are tactics?
For example, the answer to one of these questions might be, where, for
example, tac1 produces 2 resulting subgoals, that tac2 is then applied
to the first of those subgoals, then to the second (or vice versa). And
the answer to the other question I expect should be something different.
And yes, I've read what seems to be the relevant bit of the
documentation several times, and I don't understand what it is saying.
And another question, is (prgt 22 ; prgt 33) a tactic?
Thanks,
Jeremy
On 01/28/2019 09:25 PM, Pierre Courtieu wrote:
> Le lun. 28 janv. 2019 à 11:08, Jeremy Dawson
> <Jeremy.Dawson AT anu.edu.au>
> a écrit :
>>
>> Thanks, but in fact it works the opposite of what I would have expected,
>> just as
>> split ; (prgt 22 ; prgt 33).
>> does.
>>
>> As I said, I'm trying to understand what these constructions do.
>>
>> Why do you expect your macro to work as it does?
>
> Sorry I did not understand your question. I think you should consider that
>
> Set Default Selected Goal "all".
>
> is the "natural" (understand: monadic) mode of ltac.
>
> Set Default Goal Selector "all".
> Variable P : Prop.
> Variable Q : Prop.
> Goal P /\ Q.
> split.
> prgt 22.
> prgt 33.
>
> In this mode doing "t;u." is like doing "t. u.".
> If you want a "depth first" aplication of tactics you need to do:
>
> split; [> prgt 22; prgt 33 .. ].
>
> https://coq.inria.fr/distrib/current/refman/proof-engine/ltac.html#local-application-of-tactics
>
> Hope this helps,
> Pierre
>
>>
>> Jeremy
>>
>>
>> On 01/28/2019 08:29 PM, Pierre Courtieu wrote:
>>> Hi,
>>> I guess Ltac functions are not macros, they define new tactics
>>> considered as one single step by tacticals.
>>>
>>> If you define a macro:
>>>
>>> Tactic Notation "prgt3" int(t1) int(t2) := prgt t1 ; prgt t2.
>>>
>>> then it works as expected.
>>>
>>> P.
>>>
>>> Le lun. 28 janv. 2019 à 09:40, Jeremy Dawson
>>> <Jeremy.Dawson AT anu.edu.au>
>>> a écrit :
>>>>
>>>> Yes, it seems that this is the case in the example below. I'm trying to
>>>> understand why.
>>>>
>>>> In the example below I would have expected that
>>>> split ; (prgt 22 ; prgt 33).
>>>> and
>>>> split ; (prgt2 22 33).
>>>> would have the same result, but they don't.
>>>>
>>>> Why is this?
>>>>
>>>> Thanks
>>>>
>>>> Jeremy
>>>>
>>>> On 01/23/2019 09:18 PM, Théo Zimmermann wrote:
>>>>>
>>>>> In https://coq.inria.fr/refman/proof-engine/ltac.html
>>>>> under Semantics then under Sequence it says
>>>>> Sequence is associative.
>>>>>
>>>>> I would take that to mean that
>>>>> (tac1 ; tac2) ; tac3
>>>>> is the same as
>>>>> tac1 ; (tac2 ; tac3)
>>>>>
>>>>> But is this so?
>>>>>
>>>>>
>>>>> The order would be the same in both cases.
>>>>
>>>> Yes, it seems that this is the case in the example below. I'm trying to
>>>> understand why.
>>>>
>>>> In the example below I would have expected that
>>>> split ; (prgt 22 ; prgt 33).
>>>> and
>>>> split ; (prgt2 22 33).
>>>> would have the same result, but they don't.
>>>>
>>>> Why is this?
>>>>
>>>> Thanks
>>>>
>>>> Jeremy
>>>>
>>>> Ltac prgt t :=
>>>> match goal with
>>>> | [ |- ?P ] => idtac t P
>>>> end.
>>>>
>>>> Ltac prgt2 t1 t2 := prgt t1 ; prgt t2.
>>>>
>>>> Variable P : Prop.
>>>> Variable Q : Prop.
>>>> Goal P /\ Q.
>>>>
>>>> (split ; prgt 22) ; prgt 33.
>>>> Undo.
>>>> split ; (prgt 22 ; prgt 33).
>>>> Undo.
>>>> split ; (prgt2 22 33).
- Re: [Coq-Club] "Sequence is associative." (?), (continued)
- Re: [Coq-Club] "Sequence is associative." (?), Jeremy Dawson, 01/23/2019
- Re: [Coq-Club] "Sequence is associative." (?), Jean-Christophe Léchenet, 01/23/2019
- Re: [Coq-Club] "Sequence is associative." (?), Théo Zimmermann, 01/23/2019
- Re: [Coq-Club] "Sequence is associative." (?), Théo Zimmermann, 01/23/2019
- Re: [Coq-Club] "Sequence is associative." (?), Jeremy Dawson, 01/24/2019
- Re: [Coq-Club] "Sequence is associative." (?), Jeremy Dawson, 01/24/2019
- Re: [Coq-Club] "Sequence is associative." (?), Théo Zimmermann, 01/23/2019
- Re: [Coq-Club] "Sequence is associative." (?), Théo Zimmermann, 01/23/2019
- Re: [Coq-Club] "Sequence is associative." (?), Jeremy Dawson, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Pierre Courtieu, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Jeremy Dawson, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Pierre Courtieu, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Jeremy Dawson, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Pierre Courtieu, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Jeremy Dawson, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Pierre Courtieu, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Jeremy Dawson, 01/28/2019
- Re: [Coq-Club] [SUSPECTED SPAM] Re: "Sequence is associative." (?), COURTIEU Pierre, 01/28/2019
- Re: [Coq-Club] [SUSPECTED SPAM] Re: "Sequence is associative." (?), Pierre Courtieu, 01/28/2019
- Re: [Coq-Club] [SUSPECTED SPAM] Re: "Sequence is associative." (?), Jeremy Dawson, 01/31/2019
- Re: [Coq-Club] "Sequence is associative." (?), Théo Zimmermann, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Jeremy Dawson, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Pierre Courtieu, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Jeremy Dawson, 01/28/2019
- Re: [Coq-Club] "Sequence is associative." (?), Pierre Courtieu, 01/28/2019
Archive powered by MHonArc 2.6.18.