aboutsummaryrefslogtreecommitdiff
path: root/theories/Init
diff options
context:
space:
mode:
authorherbelin2010-07-22 21:06:23 +0000
committerherbelin2010-07-22 21:06:23 +0000
commitf11fc1871babffd64e9d3be99197f91a0dfc8b69 (patch)
tree1e8f380abd19c027844d0291bdaa443a9aaf5f52 /theories/Init
parentfc06cb87286e2b114c7f92500511d5914b8f7f48 (diff)
Made notations for exists, exists! and notations of Utf8.v recursive notations
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13317 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Init')
-rw-r--r--theories/Init/Logic.v20
1 files changed, 8 insertions, 12 deletions
diff --git a/theories/Init/Logic.v b/theories/Init/Logic.v
index 14832e0b72..97f3b126cc 100644
--- a/theories/Init/Logic.v
+++ b/theories/Init/Logic.v
@@ -216,11 +216,9 @@ Definition all (A:Type) (P:A -> Prop) := forall x:A, P x.
(* Rule order is important to give printing priority to fully typed exists *)
-Notation "'exists' x , p" := (ex (fun x => p))
- (at level 200, x ident, right associativity) : type_scope.
-Notation "'exists' x : t , p" := (ex (fun x:t => p))
- (at level 200, x ident, right associativity,
- format "'[' 'exists' '/ ' x : t , '/ ' p ']'")
+Notation "'exists' x .. y , p" := (ex (fun x => .. (ex (fun y => p)) ..))
+ (at level 200, x binder, right associativity,
+ format "'[' 'exists' '/ ' x .. y , '/ ' p ']'")
: type_scope.
Notation "'exists2' x , p & q" := (ex2 (fun x => p) (fun x => q))
@@ -390,13 +388,11 @@ Definition uniqueness (A:Type) (P:A->Prop) := forall x y, P x -> P y -> x = y.
(** Unique existence *)
-Notation "'exists' ! x , P" := (ex (unique (fun x => P)))
- (at level 200, x ident, right associativity,
- format "'[' 'exists' ! '/ ' x , '/ ' P ']'") : type_scope.
-Notation "'exists' ! x : A , P" :=
- (ex (unique (fun x:A => P)))
- (at level 200, x ident, right associativity,
- format "'[' 'exists' ! '/ ' x : A , '/ ' P ']'") : type_scope.
+Notation "'exists' ! x .. y , p" :=
+ (ex (unique (fun x => .. (ex (unique (fun y => p))) ..)))
+ (at level 200, x binder, right associativity,
+ format "'[' 'exists' ! '/ ' x .. y , '/ ' p ']'")
+ : type_scope.
Lemma unique_existence : forall (A:Type) (P:A->Prop),
((exists x, P x) /\ uniqueness P) <-> (exists! x, P x).