summaryrefslogtreecommitdiff
path: root/theories/ZArith/Zdiv.v
diff options
context:
space:
mode:
Diffstat (limited to 'theories/ZArith/Zdiv.v')
-rw-r--r--theories/ZArith/Zdiv.v35
1 files changed, 22 insertions, 13 deletions
diff --git a/theories/ZArith/Zdiv.v b/theories/ZArith/Zdiv.v
index 2ba865bd..15d0e487 100644
--- a/theories/ZArith/Zdiv.v
+++ b/theories/ZArith/Zdiv.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) *)
(************************************************************************)
(** * Euclidean Division *)
@@ -18,16 +20,16 @@ Local Open Scope Z_scope.
(** The definition of the division is now in [BinIntDef], the initial
specifications and properties are in [BinInt]. *)
-Notation Zdiv_eucl_POS := Z.pos_div_eucl (compat "8.3").
-Notation Zdiv_eucl := Z.div_eucl (compat "8.3").
-Notation Zdiv := Z.div (compat "8.3").
-Notation Zmod := Z.modulo (compat "8.3").
+Notation Zdiv_eucl_POS := Z.pos_div_eucl (only parsing).
+Notation Zdiv_eucl := Z.div_eucl (compat "8.6").
+Notation Zdiv := Z.div (compat "8.6").
+Notation Zmod := Z.modulo (only parsing).
-Notation Zdiv_eucl_eq := Z.div_eucl_eq (compat "8.3").
-Notation Z_div_mod_eq_full := Z.div_mod (compat "8.3").
-Notation Zmod_POS_bound := Z.pos_div_eucl_bound (compat "8.3").
-Notation Zmod_pos_bound := Z.mod_pos_bound (compat "8.3").
-Notation Zmod_neg_bound := Z.mod_neg_bound (compat "8.3").
+Notation Zdiv_eucl_eq := Z.div_eucl_eq (compat "8.6").
+Notation Z_div_mod_eq_full := Z.div_mod (only parsing).
+Notation Zmod_POS_bound := Z.pos_div_eucl_bound (only parsing).
+Notation Zmod_pos_bound := Z.mod_pos_bound (only parsing).
+Notation Zmod_neg_bound := Z.mod_neg_bound (only parsing).
(** * Main division theorems *)
@@ -508,6 +510,13 @@ Qed.
(** Unfortunately, the previous result isn't always true on negative numbers.
For instance: 3/(-2)/(-2) = 1 <> 0 = 3 / (-2*-2) *)
+Lemma Zmod_div : forall a b, a mod b / b = 0.
+Proof.
+ intros a b.
+ zero_or_not b.
+ auto using Z.mod_div.
+Qed.
+
(** A last inequality: *)
Theorem Zdiv_mult_le: