coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Bruno Barras <bruno.barras AT inria.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Bug or feature?
- Date: Fri, 3 Feb 2017 14:17:39 +0100 (CET)
Hi Beta,
I haven't investigated in detail but my guess is that the dB context is turned into a named context (because Ltac does not handle dB) and appended to the section context, so the x is renamed as x0. There cannot be two vars with the same name in a named context. If you do not open a section, x is declared as a global constant (Top.x) so the renaming is not necessary.
This is of course surprising, but hard to avoid, unless Ltac is deeply reworked.
Bruno.
De: "Beta Ziliani" <beta AT mpi-sws.org>
À: "Coq Club" <coq-club AT inria.fr>
Envoyé: Vendredi 3 Février 2017 13:56:49
Objet: [Coq-Club] Bug or feature?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 makex
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.