coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Pierre Courtieu <pierre.courtieu AT gmail.com>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] "Sequence is associative." (?)
- Date: Mon, 28 Jan 2019 10:29:04 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=pierre.courtieu AT gmail.com; spf=Pass smtp.mailfrom=pierre.courtieu AT gmail.com; spf=None smtp.helo=postmaster AT mail-io1-f43.google.com
- Ironport-phdr: 9a23:6yK2QhBxDvz9SKRyLzNKUyQJP3N1i/DPJgcQr6AfoPdwSPT6osbcNUDSrc9gkEXOFd2Cra4c26yO6+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglUhzexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfOpWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnMVhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Qiqp4bt1RxD0iScHLz85/3/Risxsl6JQvRatqwViz4LIfI2ZMfxzdb7fc9wHX2pMRsleVyJDDY28YYUBDPcPM/hEoIfyvFYOsQK+CBOwCO/z1jNFhHn71rA63eQ7FgHG2RQtEcgPsHvKttX1LrkdWv2rwanP0DXDde9W2Tbj54jVbxsspumMXbNufsrL00kgCRnJgUmXqYz4JTOVyuUNvHaG7+d7WuKvjnQoqwB1ojS12sgsjYzJi5sTx1vZ+yt5x4M1Kse5SE59edOkEZ1QtzubN4RsWM8iTXtotSAnwbMFoZ62ZDYGxIgjyhLFaPGKc5KE7g/iWeuQOzt1i3xodbSijBio60eg0PfzVsys3VZKsCVFlt7Mu2gI1xPJ68iHTuJx/kam2TqSzgzT5O5JLE4umarULJ4hxbEwlp4NvkjZAiD2n0D2gLeXdkUi5Oeo9/zqbqv6qpKYLYN5iQHzPr4zlsG+AOk0KAcDUmaD9eS5zrLj/En5QLtQjv0xl6nUqIjaJcUFqa6jGQ9azJwv5Aq4Dze7ytQYgXgHI0xYeB+cgIjpPkvBIPH8Dfuln1uslzJry+jcPrL9GpXNMmTDkLD5cLlh7E5c0RM/wsxb55JJEb4MO+nzW0/0tNzAFBA1KQ20w+D9CNV8zIwSQ2yPArXKeJ/V5HSP/6oEJ/SGLNsevy+4IPw47dbvi2U4kBkTZ//684EQbSWAH/l8OUjRSn3xmMsAHHpC6hI/QfbwhRuJViNJe3e/Qooz4zg6DMStCoKVFdPlu6CIwCruRs4eXWtBEF3ZVC6wL9zVCcdJUzqbJ4paqhJBULGgT4E70hT37V31zrNmKqzf/ShK7Mu/hugw3PXakFQJzRIxF96UijjfQGR9n2dOTDgzjvgm/B5Nj2yb2K09uMR2UNxe4/QTD1U/PJ/Yiu19UpX8BlmHcdCOR1KrBN6hBGNpQw==
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." (?), Cao Qinxiang, 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/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." (?), 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." (?), 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." (?), Cao Qinxiang, 01/23/2019
Archive powered by MHonArc 2.6.18.