From bc69d8fe0d3585036b1de6d4b43ad80fe49af028 Mon Sep 17 00:00:00 2001 From: letouzey Date: Thu, 17 Apr 2008 16:29:49 +0000 Subject: Prevent the apparition of &&& when printing a (if ... then ... else false) and idem for |||, thanks to a specific scope lazy_bool_scope. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10811 85f007b7-540e-0410-9357-904b9bb8a0f7 --- theories/Bool/Bool.v | 6 ++++-- theories/FSets/FMapAVL.v | 1 + theories/FSets/FSetAVL.v | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'theories') diff --git a/theories/Bool/Bool.v b/theories/Bool/Bool.v index 9db151e32..bae2e14ab 100644 --- a/theories/Bool/Bool.v +++ b/theories/Bool/Bool.v @@ -706,9 +706,11 @@ Qed. (*****************************************) Notation "a &&& b" := (if a then b else false) - (at level 40, left associativity) : bool_scope. + (at level 40, left associativity) : lazy_bool_scope. Notation "a ||| b" := (if a then true else b) - (at level 50, left associativity) : bool_scope. + (at level 50, left associativity) : lazy_bool_scope. + +Open Local Scope lazy_bool_scope. Lemma andb_lazy_alt : forall a b : bool, a && b = a &&& b. Proof. diff --git a/theories/FSets/FMapAVL.v b/theories/FSets/FMapAVL.v index 521fd13d8..2a2960f19 100644 --- a/theories/FSets/FMapAVL.v +++ b/theories/FSets/FMapAVL.v @@ -36,6 +36,7 @@ Notation "s #2" := (snd s) (at level 9, format "s '#2'") : pair_scope. Module Raw (Import I:Int)(X: OrderedType). Open Local Scope pair_scope. +Open Local Scope lazy_bool_scope. Open Local Scope Int_scope. Definition key := X.t. diff --git a/theories/FSets/FSetAVL.v b/theories/FSets/FSetAVL.v index faf12cea7..6a1e07185 100644 --- a/theories/FSets/FSetAVL.v +++ b/theories/FSets/FSetAVL.v @@ -54,6 +54,7 @@ Notation "s #2" := (snd s) (at level 9, format "s '#2'") : pair_scope. Module Raw (Import I:Int)(X:OrderedType). Open Local Scope pair_scope. +Open Local Scope lazy_bool_scope. Open Local Scope Int_scope. Definition elt := X.t. -- cgit v1.2.3