coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Michael Shulman <mshulman AT ucsd.edu>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] metavariable binding in Ltac
- Date: Mon, 25 Apr 2011 20:25:11 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=XZTOsgauIcaOEHcSe/PwTtwRInva8ZQEYF1SEwuVtdSCG8PXBdtFjsT28eMNOUH9Oz dY2RzBn8RYULFQVgb40wYF7G0QS2zDyzE8kI4A/L1T3rfSsOYpAbCwke8MCXyFzPBGqF ycQIcxef3GiwoN9mOmmUy9imQKPPLm+D37s6s=
I am confused by some behavior of metavariable binding in Ltac. This
works as I would expect:
Lemma test {A B} (f : forall x:A, B x) (a : A) : B a.
Proof.
match goal with
| |- B ?y => apply f with (x := y)
end.
Qed.
But this doesn't (just replace both y's with x):
Lemma test {A B} (f : forall x:A, B x) (a : A) : B a.
Proof.
match goal with
| |- B ?x => apply f with (x := x)
end.
Qed.
It seems to me that there should be no difference; isn't the latter
just an alpha-conversion of the first? Surely the 'x' on the
left-hand side of the := exists in a different scope (the dependent
arguments of f) and shouldn't be affected by the name of a local
metavariable? Or is there some other subtlety I'm missing?
Thanks!
Mike
- [Coq-Club] metavariable binding in Ltac, Michael Shulman
- Re: [Coq-Club] metavariable binding in Ltac,
Hugo Herbelin
- [Coq-Club] PxTP, Extended Deadline, Laurent Théry
- Re: [Coq-Club] metavariable binding in Ltac,
Hugo Herbelin
Archive powered by MhonArc 2.6.16.