Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Notations

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Notations


chronological Thread 
  • From: Hugo Herbelin <herbelin AT pauillac.inria.fr>
  • To: Assia.Mahboubi AT sophia.inria.fr (Assia Mahboubi)
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] Notations
  • Date: Mon, 21 Nov 2005 10:54:41 +0100 (MET)
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Hi,

> I have been a bit disturbed by the following behaviour of Notation :
> a name used as a Notation does not become reserved even for the time
> the current section being opened.

Notations of the form

  Notation id := ...

define a qualified identifier (they correspond to "Syntactic
Definition" of the pre-V8 syntax). As such, they can be referred to
using a long name as shown in the following session.

  (...)
  
  Coq < Notation a0 := (X0 myelem).
  
  Coq < Locate a0.
  Notation Top.a0
  
  Coq < Check Top.a0.
  a0
       : A

so that the notation a0 should'nt clash in any context with the
variable a0.

However, while checking your example, I found a bug. For instance, in
the following modified example

 Set Implicit Arguments.
 Record elem(X:Set) : Set := mk_elem{X0 : X}.
 Variables (A:Set) (myelem : elem A).
 Inductive eq : A -> A -> Prop :=
   |refl : forall a:A, eq a a.

 Notation a0 := (X0 myelem).
 
 Lemma test : forall a:A, eq a a0.
   Proof.
     intro a0.

you should see 

  1 subgoal
  
    a0 : A
    ============================
    eq a0 Top.a0

what you won't if you don't use the today update of Coq 8.0 (cvs
tag V8-0-bugfix)...

Regards,
  
Hugo Herbelin




Archive powered by MhonArc 2.6.16.

Top of Page