End Zpower.
Section Div_Mod.

(* Specifications: *)
Theorem Zmod_mod_mult :
forall n a b, (0 < a)%Z -> (0 <= b)%Z ->
Zmod (Zmod n (a * b)) b = Zmod n b.
Theorem ZOmod_eq :
forall a b,
Z.rem a b = (a - Z.quot a b * b)%Z.
Theorem ZOmod_mod_mult :
forall n a b,
Z.rem (Z.rem n (a * b)) b = Z.rem n b.
Theorem Zdiv_mod_mult :
forall n a b, (0 <= a)%Z -> (0 <= b)%Z ->
(Zdiv (Zmod n (a * b)) a) = Zmod (Zdiv n a) b.
Theorem ZOdiv_mod_mult :
forall n a b,
(Z.quot (Z.rem n (a * b)) a) = Z.rem (Z.quot n a) b.
Theorem ZOdiv_small_abs :
forall a b,
(Zabs a < b)%Z -> Z.quot a b = Z0.
Theorem ZOmod_small_abs :
forall a b,
(Zabs a < b)%Z -> Z.rem a b = a.
Theorem ZOdiv_plus :
forall a b c, (0 <= a * b)%Z ->
(Z.quot (a + b) c = Z.quot a c + Z.quot b c + Z.quot (Z.rem a c + Z.rem b c) c)%Z.
Theorem Zmod_mod_mult :
forall n a b, (0 < a)%Z -> (0 <= b)%Z ->
Zmod (Zmod n (a * b)) b = Zmod n b.
Theorem ZOmod_eq :
forall a b,
Z.rem a b = (a - Z.quot a b * b)%Z.
Theorem ZOmod_mod_mult :
forall n a b,
Z.rem (Z.rem n (a * b)) b = Z.rem n b.
Theorem Zdiv_mod_mult :
forall n a b, (0 <= a)%Z -> (0 <= b)%Z ->
(Zdiv (Zmod n (a * b)) a) = Zmod (Zdiv n a) b.
Theorem ZOdiv_mod_mult :
forall n a b,
(Z.quot (Z.rem n (a * b)) a) = Z.rem (Z.quot n a) b.
Theorem ZOdiv_small_abs :
forall a b,
(Zabs a < b)%Z -> Z.quot a b = Z0.
Theorem ZOmod_small_abs :
forall a b,
(Zabs a < b)%Z -> Z.rem a b = a.
Theorem ZOdiv_plus :
forall a b c, (0 <= a * b)%Z ->
(Z.quot (a + b) c = Z.quot a c + Z.quot b c + Z.quot (Z.rem a c + Z.rem b c) c)%Z.