diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-11-05 23:40:26 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-11-05 23:40:26 +0000 |
commit | 5dd845375974b2bb2d937f6c05427a92976fa7f1 (patch) | |
tree | a664fae5ea36d313af626ebd1c3f4df5d17457b7 | |
parent | 3e91ea8c34f86318176ec51935035ca71ad1fe81 (diff) |
Notations
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4816 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | theories/NArith/BinNat.v | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/theories/NArith/BinNat.v b/theories/NArith/BinNat.v index 222f6de2f..4d3d30f21 100644 --- a/theories/NArith/BinNat.v +++ b/theories/NArith/BinNat.v @@ -15,6 +15,17 @@ Require BinPos. Inductive entier: Set := Nul : entier | Pos : positive -> entier. +(** Declare binding key for scope positive_scope *) + +Delimits Scope N_scope with N. + +(** Automatically open scope N_scope for the constructors of N *) + +Bind Scope N_scope with entier. +Arguments Scope Pos [ N_scope ]. + +Open Local Scope N_scope. + (** Operation x -> 2*x+1 *) Definition Un_suivi_de := [x] @@ -39,6 +50,8 @@ Definition Nplus := [n,m] | (Pos p) (Pos q) => (Pos (add p q)) end. +V8Infix "+" Nplus : N_scope. + (** Multiplication *) Definition Nmult := [n,m] @@ -48,6 +61,8 @@ Definition Nmult := [n,m] | (Pos p) (Pos q) => (Pos (times p q)) end. +V8Infix "*" Nmult : N_scope. + (** Order *) Definition Ncompare := [n,m] @@ -58,6 +73,8 @@ Definition Ncompare := [n,m] | (Pos n') (Pos m') => (compare n' m' EGAL) end. +V8Infix "?=" Ncompare (at level 70, no associativity) : N_scope. + (** Peano induction on binary natural numbers *) Theorem Nind : (P:(entier ->Prop)) |