summaryrefslogtreecommitdiff
path: root/theories/ZArith/Zorder.v
diff options
context:
space:
mode:
Diffstat (limited to 'theories/ZArith/Zorder.v')
-rw-r--r--theories/ZArith/Zorder.v102
1 files changed, 52 insertions, 50 deletions
diff --git a/theories/ZArith/Zorder.v b/theories/ZArith/Zorder.v
index 73dee0cf..a1ec4b35 100644
--- a/theories/ZArith/Zorder.v
+++ b/theories/ZArith/Zorder.v
@@ -1,10 +1,12 @@
(* -*- coding: utf-8 -*- *)
(************************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2016 *)
+(* * The Coq Proof Assistant / The Coq Development Team *)
+(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *)
+(* <O___,, * (see CREDITS file for the list of authors) *)
(* \VV/ **************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(* * (see LICENSE file for the text of the license) *)
(************************************************************************)
(** Binary Integers : results about order predicates *)
@@ -38,9 +40,9 @@ Qed.
(**********************************************************************)
(** * Decidability of equality and order on Z *)
-Notation dec_eq := Z.eq_decidable (compat "8.3").
-Notation dec_Zle := Z.le_decidable (compat "8.3").
-Notation dec_Zlt := Z.lt_decidable (compat "8.3").
+Notation dec_eq := Z.eq_decidable (only parsing).
+Notation dec_Zle := Z.le_decidable (only parsing).
+Notation dec_Zlt := Z.lt_decidable (only parsing).
Theorem dec_Zne n m : decidable (Zne n m).
Proof.
@@ -64,12 +66,12 @@ Qed.
(** * Relating strict and large orders *)
-Notation Zgt_lt := Z.gt_lt (compat "8.3").
-Notation Zlt_gt := Z.lt_gt (compat "8.3").
-Notation Zge_le := Z.ge_le (compat "8.3").
-Notation Zle_ge := Z.le_ge (compat "8.3").
-Notation Zgt_iff_lt := Z.gt_lt_iff (compat "8.3").
-Notation Zge_iff_le := Z.ge_le_iff (compat "8.3").
+Notation Zgt_lt := Z.gt_lt (compat "8.6").
+Notation Zlt_gt := Z.lt_gt (compat "8.6").
+Notation Zge_le := Z.ge_le (compat "8.6").
+Notation Zle_ge := Z.le_ge (compat "8.6").
+Notation Zgt_iff_lt := Z.gt_lt_iff (only parsing).
+Notation Zge_iff_le := Z.ge_le_iff (only parsing).
Lemma Zle_not_lt n m : n <= m -> ~ m < n.
Proof.
@@ -121,18 +123,18 @@ Qed.
(** Reflexivity *)
-Notation Zle_refl := Z.le_refl (compat "8.3").
-Notation Zeq_le := Z.eq_le_incl (compat "8.3").
+Notation Zle_refl := Z.le_refl (compat "8.6").
+Notation Zeq_le := Z.eq_le_incl (only parsing).
Hint Resolve Z.le_refl: zarith.
(** Antisymmetry *)
-Notation Zle_antisym := Z.le_antisymm (compat "8.3").
+Notation Zle_antisym := Z.le_antisymm (only parsing).
(** Asymmetry *)
-Notation Zlt_asym := Z.lt_asymm (compat "8.3").
+Notation Zlt_asym := Z.lt_asymm (only parsing).
Lemma Zgt_asym n m : n > m -> ~ m > n.
Proof.
@@ -141,8 +143,8 @@ Qed.
(** Irreflexivity *)
-Notation Zlt_irrefl := Z.lt_irrefl (compat "8.3").
-Notation Zlt_not_eq := Z.lt_neq (compat "8.3").
+Notation Zlt_irrefl := Z.lt_irrefl (compat "8.6").
+Notation Zlt_not_eq := Z.lt_neq (only parsing).
Lemma Zgt_irrefl n : ~ n > n.
Proof.
@@ -151,8 +153,8 @@ Qed.
(** Large = strict or equal *)
-Notation Zlt_le_weak := Z.lt_le_incl (compat "8.3").
-Notation Zle_lt_or_eq_iff := Z.lt_eq_cases (compat "8.3").
+Notation Zlt_le_weak := Z.lt_le_incl (only parsing).
+Notation Zle_lt_or_eq_iff := Z.lt_eq_cases (only parsing).
Lemma Zle_lt_or_eq n m : n <= m -> n < m \/ n = m.
Proof.
@@ -161,11 +163,11 @@ Qed.
(** Dichotomy *)
-Notation Zle_or_lt := Z.le_gt_cases (compat "8.3").
+Notation Zle_or_lt := Z.le_gt_cases (only parsing).
(** Transitivity of strict orders *)
-Notation Zlt_trans := Z.lt_trans (compat "8.3").
+Notation Zlt_trans := Z.lt_trans (compat "8.6").
Lemma Zgt_trans n m p : n > m -> m > p -> n > p.
Proof.
@@ -174,8 +176,8 @@ Qed.
(** Mixed transitivity *)
-Notation Zlt_le_trans := Z.lt_le_trans (compat "8.3").
-Notation Zle_lt_trans := Z.le_lt_trans (compat "8.3").
+Notation Zlt_le_trans := Z.lt_le_trans (compat "8.6").
+Notation Zle_lt_trans := Z.le_lt_trans (compat "8.6").
Lemma Zle_gt_trans n m p : m <= n -> m > p -> n > p.
Proof.
@@ -189,7 +191,7 @@ Qed.
(** Transitivity of large orders *)
-Notation Zle_trans := Z.le_trans (compat "8.3").
+Notation Zle_trans := Z.le_trans (compat "8.6").
Lemma Zge_trans n m p : n >= m -> m >= p -> n >= p.
Proof.
@@ -240,8 +242,8 @@ Qed.
(** Special base instances of order *)
-Notation Zlt_succ := Z.lt_succ_diag_r (compat "8.3").
-Notation Zlt_pred := Z.lt_pred_l (compat "8.3").
+Notation Zlt_succ := Z.lt_succ_diag_r (only parsing).
+Notation Zlt_pred := Z.lt_pred_l (only parsing).
Lemma Zgt_succ n : Z.succ n > n.
Proof.
@@ -255,8 +257,8 @@ Qed.
(** Relating strict and large order using successor or predecessor *)
-Notation Zlt_succ_r := Z.lt_succ_r (compat "8.3").
-Notation Zle_succ_l := Z.le_succ_l (compat "8.3").
+Notation Zlt_succ_r := Z.lt_succ_r (compat "8.6").
+Notation Zle_succ_l := Z.le_succ_l (compat "8.6").
Lemma Zgt_le_succ n m : m > n -> Z.succ n <= m.
Proof.
@@ -295,10 +297,10 @@ Qed.
(** Weakening order *)
-Notation Zle_succ := Z.le_succ_diag_r (compat "8.3").
-Notation Zle_pred := Z.le_pred_l (compat "8.3").
-Notation Zlt_lt_succ := Z.lt_lt_succ_r (compat "8.3").
-Notation Zle_le_succ := Z.le_le_succ_r (compat "8.3").
+Notation Zle_succ := Z.le_succ_diag_r (only parsing).
+Notation Zle_pred := Z.le_pred_l (only parsing).
+Notation Zlt_lt_succ := Z.lt_lt_succ_r (only parsing).
+Notation Zle_le_succ := Z.le_le_succ_r (only parsing).
Lemma Zle_succ_le n m : Z.succ n <= m -> n <= m.
Proof.
@@ -334,12 +336,12 @@ Qed.
(** Special cases of ordered integers *)
-Notation Zlt_0_1 := Z.lt_0_1 (compat "8.3").
-Notation Zle_0_1 := Z.le_0_1 (compat "8.3").
+Notation Zlt_0_1 := Z.lt_0_1 (compat "8.6").
+Notation Zle_0_1 := Z.le_0_1 (compat "8.6").
Lemma Zle_neg_pos : forall p q:positive, Zneg p <= Zpos q.
Proof.
- easy.
+ exact Pos2Z.neg_le_pos.
Qed.
Lemma Zgt_pos_0 : forall p:positive, Zpos p > 0.
@@ -350,12 +352,12 @@ Qed.
(* weaker but useful (in [Z.pow] for instance) *)
Lemma Zle_0_pos : forall p:positive, 0 <= Zpos p.
Proof.
- easy.
+ exact Pos2Z.pos_is_nonneg.
Qed.
Lemma Zlt_neg_0 : forall p:positive, Zneg p < 0.
Proof.
- easy.
+ exact Pos2Z.neg_is_neg.
Qed.
Lemma Zle_0_nat : forall n:nat, 0 <= Z.of_nat n.
@@ -375,10 +377,10 @@ Qed.
(** ** Addition *)
(** Compatibility of addition wrt to order *)
-Notation Zplus_lt_le_compat := Z.add_lt_le_mono (compat "8.3").
-Notation Zplus_le_lt_compat := Z.add_le_lt_mono (compat "8.3").
-Notation Zplus_le_compat := Z.add_le_mono (compat "8.3").
-Notation Zplus_lt_compat := Z.add_lt_mono (compat "8.3").
+Notation Zplus_lt_le_compat := Z.add_lt_le_mono (only parsing).
+Notation Zplus_le_lt_compat := Z.add_le_lt_mono (only parsing).
+Notation Zplus_le_compat := Z.add_le_mono (only parsing).
+Notation Zplus_lt_compat := Z.add_lt_mono (only parsing).
Lemma Zplus_gt_compat_l n m p : n > m -> p + n > p + m.
Proof.
@@ -412,7 +414,7 @@ Qed.
(** Compatibility of addition wrt to being positive *)
-Notation Zplus_le_0_compat := Z.add_nonneg_nonneg (compat "8.3").
+Notation Zplus_le_0_compat := Z.add_nonneg_nonneg (only parsing).
(** Simplification of addition wrt to order *)
@@ -570,9 +572,9 @@ Qed.
(** Compatibility of multiplication by a positive wrt to being positive *)
-Notation Zmult_le_0_compat := Z.mul_nonneg_nonneg (compat "8.3").
-Notation Zmult_lt_0_compat := Z.mul_pos_pos (compat "8.3").
-Notation Zmult_lt_O_compat := Z.mul_pos_pos (compat "8.3").
+Notation Zmult_le_0_compat := Z.mul_nonneg_nonneg (only parsing).
+Notation Zmult_lt_0_compat := Z.mul_pos_pos (only parsing).
+Notation Zmult_lt_O_compat := Z.mul_pos_pos (only parsing).
Lemma Zmult_gt_0_compat n m : n > 0 -> m > 0 -> n * m > 0.
Proof.
@@ -624,9 +626,9 @@ Qed.
(** * Equivalence between inequalities *)
-Notation Zle_plus_swap := Z.le_add_le_sub_r (compat "8.3").
-Notation Zlt_plus_swap := Z.lt_add_lt_sub_r (compat "8.3").
-Notation Zlt_minus_simpl_swap := Z.lt_sub_pos (compat "8.3").
+Notation Zle_plus_swap := Z.le_add_le_sub_r (only parsing).
+Notation Zlt_plus_swap := Z.lt_add_lt_sub_r (only parsing).
+Notation Zlt_minus_simpl_swap := Z.lt_sub_pos (only parsing).
Lemma Zeq_plus_swap n m p : n + p = m <-> n = m - p.
Proof.