coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Fabian Kunze <kunze AT ps.uni-saarland.de>
- To: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] how to combine tactics
- Date: Mon, 5 Aug 2019 17:43:05 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=kunze AT ps.uni-saarland.de; spf=Pass smtp.mailfrom=kunze AT ps.uni-saarland.de; spf=None smtp.helo=postmaster AT thyone.hiz-saarland.de
- Ironport-phdr: 9a23:YUe6KxYK6KFFZbP/pu2wP6b/LSx+4OfEezUN459isYplN5qZr8+5bnLW6fgltlLVR4KTs6sC17OM9fm4BidQsd6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vMhm6txjdutUUjIdtKas8yQbCr2dVdehR2W5mP0+YkQzm5se38p5j8iBQtOwk+sVdT6j0fLk2QKJBAjg+PG87+MPktR/YTQuS/XQcSXkZkgBJAwfe8h73WIr6vzbguep83CmaOtD2TawxVD+/4apnVAPkhSEaPDE+7W/Xl9dwjLpFrx29uxxxzYnUYISPO/p/eKPWYNcWSGVFU8pUUSFKH4GyYJYVD+cZMulYoYvyqVsAoxW9GAeiGv/gxyRSiXPqx6A3yfgtHR3E0QEmAtkAsG7UrNLwNKoKUe661rLHzTTZYPNQxDzz7ZXIchYgoP6SQLl9dsnRyVQpFwLEkFqdspTlPyiP2uQQtWib7vNsVfm1hGE9sQFxpiKgxsExhYXTm40a1EnJ+CNky4g7It24TVR0Yd+iEJZIuCGaNpd2QsM/Q25zoio6y7oGtJimdyYJ0JQq3wPTZvKIfoSS5h/uVfydLDViiH57dr+zmQ6+/Va8xuD4TMW501ZHojBYntTNt30BzRze58eBR/Bg5EmuwyyP2BrW6uxcIUA7i67bK5k5z74slpoSsUPDHinol0nsjK+Wd0Ql9vGz6+v9eLrmvJucOJVyig7jKKghh9KwDfw5MggIQWeb5fyx2KDt8ED2WrlHivw7nrPbvZzAO8gWqLC1DxdQ0ok56ha/Czmm0M4fnXkCNF9Few+Hj47oOl7QO/34Fey/j06xkDdtxvDKJ6bhDY/XIXjZlLfuZ7B95FNGxAUu099T/4hUBa0ZIPLvRk/xs8TVAQM+Mwyt2uroFNF91p4FVm+UGa+YMKbSsUeS6e41IumMYpUVuDfnJPQ/6f7ulyxxpVhIdq6wmJATdXrwSv9hOgCSZWfmqtYHC2YD+AQkGr/EklqHBBBabXe7Weof+zcpBcryDprFVI2FmKfHwSG6W4Zfb3pCA1aAV3vlIdbXE8wQYT6fd5cy2gcPUqKsHtNwjED8hErB07Nia9Hs1GgdvJPn2sJy4reLxwkpsyFyDoGG2miXS2hykiUESm1vhfwtkQlG0l6GlJNArblAD9UJv6FRSUEnM5+Z1OVzEdT7XA6HctrbEA/7EOXjOik4S5cK+/FLY0t5HI/+3AzDzi2sDvkVlq7OH5U96KbV2XS3K8svk3s=
Hi,
; is associative, but you are using a different operator, namely the combinator "t;[ ...]" (There is no primitive "[...]"). It works only when giving a tactic for each goal opened by t, and therefore "t1;t2;[...]", which is parsed as "(t1;t2);[...]", behaves differently then t1;(t2;[...]).
Best,
Fabian
On Mon, 5 Aug 2019, 17:34 Jason -Zhong Sheng- Hu, <fdhzs2010 AT hotmail.com> wrote:
this is surprising. I've been using [...|...] and I experienced nothing like this. if my memory did not fail me, I read somewhere that ; is associative. what's your coq version?
From: coq-club-request AT inria.fr <coq-club-request AT inria.fr> on behalf of Jeremy Dawson <Jeremy.Dawson AT anu.edu.au>
Sent: August 5, 2019 9:44 AM
To: coq-club AT inria.fr <coq-club AT inria.fr>
Subject: Re: [Coq-Club] how to combine tacticsFurther to my previous messages I have experimented some more, and find that
induction H ; (eapply derI ; [ NLrule_I | idtac]).
does work. Ie the parentheses are needed, and make a difference, in
this case.
(contrast tac1 ; tac2 ; tac3 where parentheses don't make any
difference, though I would have expected them to).
Cheers,
Jeremy
On 8/5/19 11:27 PM, Jeremy Dawson wrote:
> Hi Laurent,
>
> I'm guessing you mean something like this (but not exactly)
>
> induction H ; (eapply derI; [apply: NLrule_I | idtact]).
>
> but not exactly, since it gives this error
> > ^
> Error:
> Syntax error: '<-' or '->' or [constr_with_bindings_arg] expected after
> 'apply' (in [tactic:simple_tactic]).
>
> I've never seen the "apply:" construct, can you clarify?
>
> Thanks
>
> Jeremy
>
>
> On 8/5/19 3:22 AM, Laurent Thery wrote:
>>
>> If you are sure that eapply derI always generates 2 subgoals,
>>
>> you can of course do (eapply derI; [apply: NLrule_I | idtact]).
>>
>>
>> On 8/4/19 3:57 PM, Jeremy Dawson wrote:
>>> Hi,
>>>
>>> I have a tactic eapply derI
>>> which when applied to a goal produces two resulting goals.
>>> Of these two I want to apply the tactic NLrule_I to the first one.
>>> The tactic induction H results in 7 goals.
>>>
>>> So when I try
>>> Proof. intros. induction H ; eapply derI ; [> NLrule_I | ].
>>> I get the error (not unexpected)
>>> Error: Incorrect number of goals (expected 14 tactics, was given 2).
>>>
>>> When I try
>>> Proof. intros. induction H ; (eapply derI ; [> NLrule_I | ]).
>>> I get the same error, which I don't understand at all
>>> (though the fact that putting in parentheses doesn't have the
>>> expected result has been discussed on this list previously).
>>>
>>> When I try
>>> Ltac derI_NLr := eapply derI ; [> NLrule_I | ].
>>> Proof. intros. induction H ; derI_NLr.
>>> although sometimes defining a tactic using Ltac
>>> has previously given me what I want and expect,
>>> in this case again I get the error
>>> Ltac call to "derI_NLr" failed.
>>> Incorrect number of goals (expected 14 tactics, was given 2).
>>>
>>> How do I apply eapply derI to all goals, then NLrule_I to
>>> the first subgoal resulting from each instance of eapply derI?
>>>
>>> Thanks,
>>>
>>> Jeremy
>>>
- [Coq-Club] how to combine tactics, Jeremy Dawson, 08/04/2019
- Re: [Coq-Club] how to combine tactics, Laurent Thery, 08/04/2019
- Re: [Coq-Club] how to combine tactics, Jason -Zhong Sheng- Hu, 08/04/2019
- Re: [Coq-Club] how to combine tactics, Jeremy Dawson, 08/05/2019
- Re: [Coq-Club] how to combine tactics, Jason -Zhong Sheng- Hu, 08/04/2019
- Message not available
- Re: [Coq-Club] how to combine tactics, Jeremy Dawson, 08/05/2019
- Re: [Coq-Club] how to combine tactics, Jeremy Dawson, 08/05/2019
- Re: [Coq-Club] how to combine tactics, Jason -Zhong Sheng- Hu, 08/05/2019
- Re: [Coq-Club] how to combine tactics, Fabian Kunze, 08/05/2019
- Re: [Coq-Club] how to combine tactics, Li-yao Xia, 08/05/2019
- Re: [Coq-Club] how to combine tactics, Jeremy Dawson, 08/06/2019
- Re: [Coq-Club] how to combine tactics, David Holland, 08/15/2019
- Re: [Coq-Club] how to combine tactics, Pierre Courtieu, 08/20/2019
- Re: [Coq-Club] how to combine tactics, Jason -Zhong Sheng- Hu, 08/05/2019
- Re: [Coq-Club] how to combine tactics, Jeremy Dawson, 08/05/2019
- Re: [Coq-Club] how to combine tactics, Jeremy Dawson, 08/05/2019
- Re: [Coq-Club] how to combine tactics, Laurent Thery, 08/04/2019
Archive powered by MHonArc 2.6.18.