diff options
Diffstat (limited to 'theories/Numbers/Integer/Abstract')
| -rw-r--r-- | theories/Numbers/Integer/Abstract/ZDivEucl.v | 12 | ||||
| -rw-r--r-- | theories/Numbers/Integer/Abstract/ZDivFloor.v | 12 | ||||
| -rw-r--r-- | theories/Numbers/Integer/Abstract/ZDivTrunc.v | 2 |
3 files changed, 17 insertions, 9 deletions
diff --git a/theories/Numbers/Integer/Abstract/ZDivEucl.v b/theories/Numbers/Integer/Abstract/ZDivEucl.v index d0f530fef9..bcd16fec6c 100644 --- a/theories/Numbers/Integer/Abstract/ZDivEucl.v +++ b/theories/Numbers/Integer/Abstract/ZDivEucl.v @@ -37,15 +37,19 @@ Module ZDivPropFunct (Import Z : ZDivSig')(Import ZP : ZPropSig Z). (** We benefit from what already exists for NZ *) - Module Z' <: NZDivSig. - Include Z. + Module ZD <: NZDiv Z. + Definition div := div. + Definition modulo := modulo. + Definition div_wd := div_wd. + Definition mod_wd := mod_wd. + Definition div_mod := div_mod. Lemma mod_bound : forall a b, 0<=a -> 0<b -> 0 <= a mod b < b. Proof. intros. rewrite <- (abs_eq b) at 3 by now apply lt_le_incl. apply mod_always_pos. Qed. - End Z'. - Module Import NZDivP := NZDivPropFunct Z' ZP. + End ZD. + Module Import NZDivP := NZDivPropFunct Z ZP ZD. (** Another formulation of the main equation *) diff --git a/theories/Numbers/Integer/Abstract/ZDivFloor.v b/theories/Numbers/Integer/Abstract/ZDivFloor.v index b94affd798..1e7624ba64 100644 --- a/theories/Numbers/Integer/Abstract/ZDivFloor.v +++ b/theories/Numbers/Integer/Abstract/ZDivFloor.v @@ -41,12 +41,16 @@ Module ZDivPropFunct (Import Z : ZDivSig')(Import ZP : ZPropSig Z). (** We benefit from what already exists for NZ *) - Module Z' <: NZDivSig. - Include Z. + Module ZD <: NZDiv Z. + Definition div := div. + Definition modulo := modulo. + Definition div_wd := div_wd. + Definition mod_wd := mod_wd. + Definition div_mod := div_mod. Lemma mod_bound : forall a b, 0<=a -> 0<b -> 0 <= a mod b < b. Proof. intros. now apply mod_pos_bound. Qed. - End Z'. - Module Import NZDivP := NZDivPropFunct Z' ZP. + End ZD. + Module Import NZDivP := NZDivPropFunct Z ZP ZD. (** Another formulation of the main equation *) diff --git a/theories/Numbers/Integer/Abstract/ZDivTrunc.v b/theories/Numbers/Integer/Abstract/ZDivTrunc.v index 6b6b717035..3200ba2af3 100644 --- a/theories/Numbers/Integer/Abstract/ZDivTrunc.v +++ b/theories/Numbers/Integer/Abstract/ZDivTrunc.v @@ -42,7 +42,7 @@ Module ZDivPropFunct (Import Z : ZDivSig')(Import ZP : ZPropSig Z). (** We benefit from what already exists for NZ *) - Module Import NZDivP := NZDivPropFunct Z ZP. + Module Import NZDivP := NZDivPropFunct Z ZP Z. Ltac pos_or_neg a := let LT := fresh "LT" in |
