Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] question about ltac semantics

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] question about ltac semantics


Chronological Thread 
  • From: Andrew Harris <andrew.unit AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] question about ltac semantics
  • Date: Wed, 1 Feb 2017 09:56:11 -0800
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=andrew.unit AT gmail.com; spf=Pass smtp.mailfrom=andrew.unit AT gmail.com; spf=None smtp.helo=postmaster AT mail-it0-f45.google.com
  • Ironport-phdr: 9a23:7pR06xc6ga4ZqJP4iAihFwvXlGMj4u6mDksu8pMizoh2WeGdxc29YB7h7PlgxGXEQZ/co6odzbGH7+a+BidZuc3J8ChbNscTB1ld0YRetjdjKfDGIHWzFOTtYS0+EZYKf35e1Fb/D3JoHt3jbUbZuHy44G1aMBz+MQ1oOra9QdaK3Izkn9y1rpbUekBDgCe3SbJ0NhS/6wvL5ecMho43A6A90BbW6ltBYf5X3is8LFSfhRvjoNq2/YJL/CFZuvZn/MlFB/apN58kRKBVWWx1e1s+49fm4EHO

Hi,

   I'm having some trouble understanding the ltac semantics of the Ltac invocation below (in the first email I sent (accidentally) below).  I've been reading Chapter 9 of the Coq book on Ltac, but what puzzles me is the square brackets around the rule in the "match goal with" section.  In chapter 9 of the book, there is a good section on "Pattern matching on goals", but it does not show square brackets in the _expression_ and I am not able to figure out how the square brackets affect the _expression_.  It seems that when I see Ltac invocations with "match goal with" I always see the patterns surrounded by square brackets, and I'm not sure why.

thanks,
-andrew


On Wed, Feb 1, 2017 at 9:50 AM, Andrew Harris <andrew.unit AT gmail.com> wrote:
Hi,



    Ltac t :=
    repeat (match goal with
              | [ |- context[match ?E with NConst _ => _ | _ => _ end] ] =>
                dep_destruct E
            end; crush).





Archive powered by MHonArc 2.6.18.

Top of Page