Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Re: Ltac & open terms

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Re: Ltac & open terms


Chronological Thread 
  • From: Gregory Malecha <gmalecha AT eecs.harvard.edu>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Re: Ltac & open terms
  • Date: Tue, 19 Jun 2012 18:21:15 -0400

Sorry, this was called to my attention, the second example that works should read:

Goal (fun x => 0) = (fun x => x).
  match goal with
   | [ |- ?L = ?R ] =>
     match R with
       | (fun _ => ?R) => idtac R
     end
  end.

On Tue, Jun 19, 2012 at 4:23 PM, Gregory Malecha <gmalecha AT eecs.harvard.edu> wrote:
Hello --

I am wondering what the semantics of Ltac should be with respect to constructing open terms. I feel like when I started using Coq Ltac was only supposed to be able to generate closed terms, but I've been trying some things out on 8.4b2 and it seems like that may have changed. Here's what I wrote:

Goal (fun x => 0) = (fun x => x).
  match goal with
   | [ |- ?L = ?R ] =>
     match R with
       | (fun x => ?R) => idtac R
     end
  end.

This prints "x", I was under the impression that it would fail. This, on the other hand, will fail.

Goal (fun x => 0) = (fun x => x).
  match goal with
   | [ |- ?L = ?R ] =>
     match R with
       | (fun x => ?R) => idtac R
     end
  end.

Is this the desired behavior? It doesn't seem like [x] is a binder here. I'm wondering if I should report this as a bug.

Thanks.

--
gregory malecha




--
gregory malecha
http://www.people.fas.harvard.edu/~gmalecha/




Archive powered by MHonArc 2.6.18.

Top of Page