Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Bug or feature?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Bug or feature?


Chronological Thread 
  • From: Maxime Dénès <mail AT maximedenes.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Bug or feature?
  • Date: Fri, 3 Feb 2017 14:18:17 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mail AT maximedenes.fr; spf=Pass smtp.mailfrom=mail AT maximedenes.fr; spf=None smtp.helo=postmaster AT 2.mo173.mail-out.ovh.net
  • Ironport-phdr: 9a23:S4eVXRfM9/F0Bte1GMcyQxk2lGMj4u6mDksu8pMizoh2WeGdxc29ZB7h7PlgxGXEQZ/co6odzbGH7+a/ACdcv97B6ClEK8McEUddyI0/pE8JPo2sMQXDNvnkbig3ToxpdWRO2DWFC3VTA9v0fFbIo3e/vnY4ExT7MhdpdKyuQtaBx5f/6+fn8JrKJg5MmTCVYLVoLRzwox+CmNMRhN5HI7YwzxaBjvpO+/8ekWZhJFa7mh/s58K98JNl/j8Wteh3pJ0IarnzY6ltFe8QNz8hKW1gvMA=

Hi Beta,

I can't answer your question, since I'm not sure how much of Ltac's
binding is documented, but I can try to explain the symptom.

Since your binder clashes with the section variable name, the rooster
renames it on the fly. But then of course "x" designates the section
variable.

The following script should illustrate what goes on under the hood:

Section test.
Variable x : nat.
Definition ex := fun x y:nat=>ltac:(exact (x0 + y)).
Print ex.

Maxime.

On 02/03/17 13:56, Beta Ziliani wrote:
> Hi list,
>
> I stumble across what I think is an odd behavior when mixing named and
> dB contexts, and I’m going to file it as a bug unless someone convinces
> me that this is a feature:
>
> |Section test. Variable x : nat. Definition ex := fun x
> y:nat=>ltac:(exact (x + y)). Print ex. |
>
> outputs
>
> |ex = fun _ y : nat => x + y : nat -> nat -> nat |
>
> I am expecting, of course,
>
> |ex = fun x y : nat => x + y : nat -> nat -> nat |
>
> Note that defining `x` in a |Section| is important; if I make |x| a top
> level variable, the example is constructed as expected.
>
> Best,
> Beta
>
>



Archive powered by MHonArc 2.6.18.

Top of Page