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] using the tactical do in a Ltac definition
- Date: Fri, 9 Feb 2018 12:13:34 +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-oi0-f47.google.com
- Ironport-phdr: 9a23:nLYGbhfY5MF6cTK784i0UdD4lGMj4u6mDksu8pMizoh2WeGdxcu9bR7h7PlgxGXEQZ/co6odzbaO6ua4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahfL9+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v9LlgRgP2hygbNj456GDXhdJ2jKJHuxKquhhzz5fJbI2JKPZye6XQds4YS2VcRMZcTy5OAo28YYUBDOQPIPhWoJXyqVYVsRu+HBOhCP/zxjNUhHL727Ax3eQ7EQHB2QwtB8gAsHXKo9XvLqcdT/2+wbfPzTXedfNWxTb955bVchs8pvyMRbNwftTLyUk1CQzJlEmfqYv4PzOPyuQNsnaU7/d7WOKgjm4osQBxojy1ysgwjYnJg5sYx1bZ/it62IY4PcO0RFJ/bNK+E5ZdtzuWO5VrTs4hWW1ltyQ3x7sbspChZicK0o4oxxvHZvyHbYeI5hXjWf6UIThihXJlfKuzhxGz8US80+H8WMa53VRQoipKldnMsX8N1xjN5cSdVvR9+UKh1S6O1wDV9O5EPVg5mbTHJ5Ml2LI9lZoevV7dEiPrm0j6lqCbe0c89uit8evnY7HmppGGN49zjwHzKrwums2hDuQiKAgBQXKX9vi71L3+5035XLRKgeMrkqTCv5DaIN4Upq+9AwNPzokj7BO/Ay+80NsEhXkHME5FeBWfgof1PFHOOen0Auu7g1Sxizhm3OvGP73kApXVNHfPirbhfbBn605d0gU/195f54gHQo0Gddn0QwfasMHSRksyNBXxyOL6Av180JkfUCSBGPnKHrnVtAqw5+81OeTET4gIoir8JuVts+bvgGUjlBkWerSzwZoadVi3G/1nJwOSZn+60YRJKnsDogdrFL+is1aFSzMGIi/qB/tttAF+M5qvCML4fq7ohbWA2CmhGZgPPzJJD1mNFTHjcIDWAq5QOhLXGddol3k/bZbkU5UojEj8uwrzyr4hJe3RqHVB6MDTkeNt7uiWrikcsDx5C8PHjjOIRmBw22QJH3o4gP85rkt6xVOOl6N/hq4AGA==
Hi Nicolas,
notice that this works:
t ltac:(2).
you may define a tactic notation instead, because you can force the
type of arguments:
Tactic Notation "t" int(x) := (do x intro; idtac "stop").
It is not completely satisfying because t is not bound to a ltac
function, but to my knowledge there is no way to force the type of the
arguments of a tactic.
Hope this helps,
Pierre
2018-02-09 11:55 GMT+01:00 Nicolas Magaud
<magaud AT unistra.fr>:
> Below are 2 tactics t and u which I expect to behave in the same way.
>
> They perform (if possible) x times the tactic “intro”.
>
> However I do not manage to run “t”. Writing "t 2. "leads to an error
> message.
> I can still achieve my goal by writing a recursive tactic, but using the
> “do” construct would be more straightforward.
>
> Am I missing a constr: , ltac: or something similar somewhere ?
>
> Thanks in advance
>
> Nicolas Magaud
>
>
> --------------------------------------------
> Ltac t x := do x intro; idtac "stop".
> Ltac u x := match x with O => idtac "stop" | (S ?p) => intro; u p end.
>
> Lemma f : forall x y z:nat, x= y -> z= y.
> Proof.
> t 2. (* Error: Ltac variable x is bound to a term which cannot be coerced
> to an integer.*)
> u 2.
- [Coq-Club] using the tactical do in a Ltac definition, Nicolas Magaud, 02/09/2018
- Re: [Coq-Club] using the tactical do in a Ltac definition, Pierre Courtieu, 02/09/2018
Archive powered by MHonArc 2.6.18.