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 lists in Tactic Notations
- Date: Wed, 21 Aug 2019 12:16:41 +0200
- 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-f46.google.com
- Ironport-phdr: 9a23:JAcOvBZqgrUJ0o6AHCEuhW//LSx+4OfEezUN459isYplN5qZoMW5bnLW6fgltlLVR4KTs6sC17OM9fm8Aidav96oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vMhm6txjdu8YYjIdtNKo8ywbCr2dVdehR2W5mP0+YkQzm5se38p5j8iBQtOwk+sVdT6j0fLk2QKJBAjg+PG87+MPktR/YTQuS/XQcSXkZkgBJAwfe8h73WIr6vzbguep83CmaOtD2TawxVD+/4apnVAPkhSEaPDMi7mrZltJ/g75aoBK5phxw3YjUYJ2ONPFjeq/RZM4WSXZdUspUUSFKH4GyYJYVD+cZMulYoYvyqVsAoxW9GAeiGv/gxDBTi3/qxK03yfgtHR3a0AEiGd8FrXTarM/yNKcXSe271qjIwivZb/NMxzj29ZbFchc8ofGWQbJwcNTeyVQyHA7CllWQqJLqPymP1usTqWSU8+1gVf+1i247qgF+vCWvy9wjionMnI0Vy1TE+T9lz4YyIN21UUh2asOnHptIryyWKZd6T8c4T2xruCs20KAKtJ+6cSQQx5kqxhjSYOGdfYeS+BLsTuORLC94hH17fLK/gA6/8U26xe39Usm4yVdKri1YntXVuHAA2B3e5tKISvt6+Ueh1jKP2B7J5u5YJkA0kLLXK58nwrEuipoeqVrPEjPylUnsj6Kbdl8o9vWp5unmeLnrqZ6RO5dxig7kM6QunsK/Af4/MggLR2Wb4eW826P5/U3jXrpGlOE5kq7EsJDAOcQbp7C2AxJO34Ys7hawFTam0NACkXYbK1JFfQqLj5L1NFHWPPD4EfC/jkywnzds3vDKJ6HuApHQLnfYi7rhZrZ860tEyAUp19xf5pRUCqsAIP3pQEPxusbYXVcFNFmfxP+vI9Fg3MtKUmWWR6SdLan6sFmS5+tpLfPaN6EPvzOoE/ko/eTjxVQ+hEUBfKS0lc8PaX2iBPkgKEKEe2btj8opHmIDvw54R+vv3g7RGQVPbmq/CvpvrgowD5irWMKaHtj00e6xmRyjF5gTXVhoT1WFEHPmbYKBAq5eZyebI8snmTsBB+H4F90RkCq2vQq/8IJJa/LO83RB553m3dlxoebUkENqrGEmP4Gmy2iIClpMsCYISjsxhv0tpEV8zhKC1vE9jaAGU9NU4PxNX0ExMpuOl+E=
Hi,
It seems reference_list is not what delta takes as argument. If this
is the case (experts will tell) this may deserve a feature wish/bug
report.
Meanwhile you can program something in ltac that is probably much less
efficient on big terms:
Require Import List.
Import List.ListNotations.
Ltac unf wl :=
repeat progress (match wl with
| nil => idtac
| cons ?id ?wl' => cbv delta [id];unf wl'
end).
Goal forall x, x + x = 2 * x.
Proof.
unf [Nat.add ; Nat.mul].
Hope this helps
Pierre
Le mer. 21 août 2019 à 07:54, Jay Kruer
<jay.kruer AT sifive.com>
a écrit :
>
> Hi coq-club,
>
> I am trying to use the *_list feature of Tactic Notation to parameterize
> my tactic over a list of identifiers to be unfolded before the meat of
> the tactic is executed. I am unable to get the feature working and I've
> minimized my problem with it to a small example:
>
> Tactic Notation (at level 0) "myUnfold" "[" reference_list(wl) "]" :=
> cbv delta [wl].
>
> If I try using this tactic as follows on a goal containing some
> references to definitions d1 and d2:
>
> myUnfold [d1 d2].
>
> I get the following error:
>
> In nested Ltac calls to "myUnfold [ (ref_list) ]" and "cbv delta
> [wl]", last call failed.
> Ltac variable wl is bound to d1 d2 which cannot be coerced to an
> evaluable reference.
>
> Any ideas as to what I've done wrong here?
> -j
- [Coq-Club] Using lists in Tactic Notations, Jay Kruer, 08/20/2019
- Re: [Coq-Club] Using lists in Tactic Notations, Pierre Courtieu, 08/21/2019
Archive powered by MHonArc 2.6.18.