]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/library/nat/div_and_mod.ma
New version of the library. nth_prime, gcd, log.
[helm.git] / helm / matita / library / nat / div_and_mod.ma
index 8c1e0e95317be691c9d9b78b03ec8ba4c72c747e..e4645c3071a78903a14039be49d0ff504e7c62e7 100644 (file)
@@ -227,6 +227,12 @@ apply div_mod.
 assumption.
 qed.
 
+theorem mod_O_n: \forall n:nat.mod O n = O.
+intro.elim n.simplify.reflexivity.
+simplify.reflexivity.
+qed.
+
+
 (* injectivity *)
 theorem injective_times_r: \forall n:nat.injective nat nat (\lambda m:nat.(S n)*m).
 change with \forall n,p,q:nat.(S n)*p = (S n)*q \to p=q.
@@ -240,6 +246,16 @@ qed.
 variant inj_times_r : \forall n,p,q:nat.(S n)*p = (S n)*q \to p=q \def
 injective_times_r.
 
+theorem lt_O_to_injective_times_r: \forall n:nat. O < n \to injective nat nat (\lambda m:nat.n*m).
+change with \forall n. O < n \to \forall p,q:nat.n*p = n*q \to p=q.
+intros 4.
+apply lt_O_n_elim n H.intros.
+apply inj_times_r m.assumption.
+qed.
+
+variant inj_times_r1:\forall n. O < n \to \forall p,q:nat.n*p = n*q \to p=q
+\def lt_O_to_injective_times_r.
+
 theorem injective_times_l: \forall n:nat.injective nat nat (\lambda m:nat.m*(S n)).
 change with \forall n,p,q:nat.p*(S n) = q*(S n) \to p=q.
 intros.
@@ -251,3 +267,13 @@ qed.
 
 variant inj_times_l : \forall n,p,q:nat. p*(S n) = q*(S n) \to p=q \def
 injective_times_l.
+
+theorem lt_O_to_injective_times_l: \forall n:nat. O < n \to injective nat nat (\lambda m:nat.m*n).
+change with \forall n. O < n \to \forall p,q:nat.p*n = q*n \to p=q.
+intros 4.
+apply lt_O_n_elim n H.intros.
+apply inj_times_l m.assumption.
+qed.
+
+variant inj_times_l1:\forall n. O < n \to \forall p,q:nat.p*n = q*n \to p=q
+\def lt_O_to_injective_times_l.
\ No newline at end of file