aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/ZArith/Zabs.v
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-07-05 16:55:59 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-07-05 16:55:59 +0000
commitf93f073df630bb46ddd07802026c0326dc72dafd (patch)
tree35035375b5c6260ce6f89ccfbbf95a140e562005 /theories/ZArith/Zabs.v
parentd655986bc6d54c320a6ddd642cefde4a7f3088a9 (diff)
Notation: a new annotation "compat 8.x" extending "only parsing"
Suppose we declare : Notation foo := bar (compat "8.3"). Then each time foo is used in a script : - By default nothing particular happens (for the moment) - But we could get a warning explaining that "foo is bar since coq > 8.3". For that, either use the command-line option -verb-compat-notations or the interactive command "Set Verbose Compat Notations". - There is also a strict mode, where foo is forbidden : the previous warning is now an error. For that, either use the command-line option -no-compat-notations or the interactive command "Unset Compat Notations". When Coq is launched in compatibility mode (via -compat 8.x), using a notation tagged "8.x" will never trigger a warning or error. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15514 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/ZArith/Zabs.v')
-rw-r--r--theories/ZArith/Zabs.v46
1 files changed, 23 insertions, 23 deletions
diff --git a/theories/ZArith/Zabs.v b/theories/ZArith/Zabs.v
index 23473e932..2e43b3554 100644
--- a/theories/ZArith/Zabs.v
+++ b/theories/ZArith/Zabs.v
@@ -27,17 +27,17 @@ Local Open Scope Z_scope.
(**********************************************************************)
(** * Properties of absolute value *)
-Notation Zabs_eq := Z.abs_eq (only parsing).
-Notation Zabs_non_eq := Z.abs_neq (only parsing).
-Notation Zabs_Zopp := Z.abs_opp (only parsing).
-Notation Zabs_pos := Z.abs_nonneg (only parsing).
-Notation Zabs_involutive := Z.abs_involutive (only parsing).
-Notation Zabs_eq_case := Z.abs_eq_cases (only parsing).
-Notation Zabs_triangle := Z.abs_triangle (only parsing).
-Notation Zsgn_Zabs := Z.sgn_abs (only parsing).
-Notation Zabs_Zsgn := Z.abs_sgn (only parsing).
-Notation Zabs_Zmult := Z.abs_mul (only parsing).
-Notation Zabs_square := Z.abs_square (only parsing).
+Notation Zabs_eq := Z.abs_eq (compat "8.3").
+Notation Zabs_non_eq := Z.abs_neq (compat "8.3").
+Notation Zabs_Zopp := Z.abs_opp (compat "8.3").
+Notation Zabs_pos := Z.abs_nonneg (compat "8.3").
+Notation Zabs_involutive := Z.abs_involutive (compat "8.3").
+Notation Zabs_eq_case := Z.abs_eq_cases (compat "8.3").
+Notation Zabs_triangle := Z.abs_triangle (compat "8.3").
+Notation Zsgn_Zabs := Z.sgn_abs (compat "8.3").
+Notation Zabs_Zsgn := Z.abs_sgn (compat "8.3").
+Notation Zabs_Zmult := Z.abs_mul (compat "8.3").
+Notation Zabs_square := Z.abs_square (compat "8.3").
(** * Proving a property of the absolute value by cases *)
@@ -68,11 +68,11 @@ Qed.
(** * Some results about the sign function. *)
-Notation Zsgn_Zmult := Z.sgn_mul (only parsing).
-Notation Zsgn_Zopp := Z.sgn_opp (only parsing).
-Notation Zsgn_pos := Z.sgn_pos_iff (only parsing).
-Notation Zsgn_neg := Z.sgn_neg_iff (only parsing).
-Notation Zsgn_null := Z.sgn_null_iff (only parsing).
+Notation Zsgn_Zmult := Z.sgn_mul (compat "8.3").
+Notation Zsgn_Zopp := Z.sgn_opp (compat "8.3").
+Notation Zsgn_pos := Z.sgn_pos_iff (compat "8.3").
+Notation Zsgn_neg := Z.sgn_neg_iff (compat "8.3").
+Notation Zsgn_null := Z.sgn_null_iff (compat "8.3").
(** A characterization of the sign function: *)
@@ -86,13 +86,13 @@ Qed.
(** Compatibility *)
-Notation inj_Zabs_nat := Zabs2Nat.id_abs (only parsing).
-Notation Zabs_nat_Z_of_nat := Zabs2Nat.id (only parsing).
-Notation Zabs_nat_mult := Zabs2Nat.inj_mul (only parsing).
-Notation Zabs_nat_Zsucc := Zabs2Nat.inj_succ (only parsing).
-Notation Zabs_nat_Zplus := Zabs2Nat.inj_add (only parsing).
-Notation Zabs_nat_Zminus := (fun n m => Zabs2Nat.inj_sub m n) (only parsing).
-Notation Zabs_nat_compare := Zabs2Nat.inj_compare (only parsing).
+Notation inj_Zabs_nat := Zabs2Nat.id_abs (compat "8.3").
+Notation Zabs_nat_Z_of_nat := Zabs2Nat.id (compat "8.3").
+Notation Zabs_nat_mult := Zabs2Nat.inj_mul (compat "8.3").
+Notation Zabs_nat_Zsucc := Zabs2Nat.inj_succ (compat "8.3").
+Notation Zabs_nat_Zplus := Zabs2Nat.inj_add (compat "8.3").
+Notation Zabs_nat_Zminus := (fun n m => Zabs2Nat.inj_sub m n) (compat "8.3").
+Notation Zabs_nat_compare := Zabs2Nat.inj_compare (compat "8.3").
Lemma Zabs_nat_le n m : 0 <= n <= m -> (Z.abs_nat n <= Z.abs_nat m)%nat.
Proof.