coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Beta Ziliani <bziliani AT famaf.unc.edu.ar>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Bug or feature?
- Date: Fri, 3 Feb 2017 10:31:24 -0300
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=bziliani AT famaf.unc.edu.ar; spf=None smtp.mailfrom=bziliani AT famaf.unc.edu.ar; spf=None smtp.helo=postmaster AT famaf.unc.edu.ar
- Ironport-phdr: 9a23:uqGUgBR7EWuoGtj/lJ95dclTONpsv+yvbD5Q0YIujvd0So/mwa69bReN2/xhgRfzUJnB7Loc0qyN4vymBjVLvcfJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanb75/KBq7oR/Tu8ULjodvJaI8wQbVr3VVfOhb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnYUAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhSwaLDMy7n3ZhdJsg6JauBKhpgJww4jIYIGOKfFyerrRcc4GSWZdW8pcUTFKDIGhYIsVF+cOP+hYoYnzqVUNsBWwGxWjCfj1xTNUnHL7x7E23/gjHAzAwQcuH8gOsHPRrNjtKaodT/y1w7PVxjrAbvNW3Tb955LOchAgvPqBWql/cMvQyUkrFgPKlFOQqY3+MjObzOsNtnKU7+R6WeKyjW4otxt9rSayyccxkIXGnJgVx0nC+C5kw4g1PcW1RFBnbdK4CpdcqiCXO5FrTs4gWW1kpTo2x70etZKlYCQHzI4ryh3fZvCdboSF4w/vWPyMLTp6hX9ofq+0iQyo/ki60OL8U9G50FZUoSpBldnBrn4N2AbW6sedRPtx5Fqh2TCT2AzJ9O5LPF00mbDBJJ472rIwl5wTvlrfHiLuhkn6kLOael859uWp8ejrf7frqoWBO4NoigzyKqEulda+AeQ8PAgORW+b+eGk2bL4/Ez5QbFKjvwsnanfsZDXPsobqbS8AwBP3IYv8Qu/DzG639gCg3YIMU9FdAidgIjzI13OOuz3De+jg1Swlzdm3+zJPrr4ApnUMnfDlKrhcq1m5k5HyAszyMhf6IhOBrEAJvLzQE7xu8bCAh83KQzni9rgXf56z8s1XX+FSvuSN7qXuluV7MouJfONbckbomCuBeIi4qvEgGMw0W0ceaig25pfPHqqH/BnKkOYSXTlh94PV3oMtUwzQPGsgUfUAm0bXGq7Q69pvmJzM4mhF4qWA9n12LE=
Thanks Bruno and Maxime.
It is a bug then, although a tough one to fix, I suppose.
FWIW, In MetaCoq we used to have the de Bruijn context. Recently we decided to drop it and only use the named context; same as Ltac. But unlike Ltac, when we introduce the de Bruijn variables in the named context, we also rename the code, therefore changing x to x0 *inside the exact*, as should be done.On Fri, Feb 3, 2017 at 10:18 AM, Maxime Dénès <mail AT maximedenes.fr> wrote:
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
>
>
- [Coq-Club] Bug or feature?, Beta Ziliani, 02/03/2017
- Re: [Coq-Club] Bug or feature?, Bruno Barras, 02/03/2017
- Re: [Coq-Club] Bug or feature?, Ralf Jung, 02/03/2017
- Re: [Coq-Club] Bug or feature?, Maxime Dénès, 02/03/2017
- Re: [Coq-Club] Bug or feature?, Beta Ziliani, 02/03/2017
- Re: [Coq-Club] Bug or feature?, Beta Ziliani, 02/03/2017
- Re: [Coq-Club] Bug or feature?, Andreas Abel, 02/05/2017
- Re: [Coq-Club] Bug or feature?, Beta Ziliani, 02/06/2017
- Re: [Coq-Club] Bug or feature?, Andreas Abel, 02/05/2017
- Re: [Coq-Club] Bug or feature?, Bruno Barras, 02/03/2017
Archive powered by MHonArc 2.6.18.