]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/library/nat/primes.ma
Complete proof of Bertrand for n >= 256.
[helm.git] / helm / software / matita / library / nat / primes.ma
index ec7118980e1a82a53609a14bd76c0371e6a83585..dcf7abeea1372e0635817fb3a75554bd77b4bb0a 100644 (file)
@@ -12,8 +12,6 @@
 (*                                                                        *)
 (**************************************************************************)
 
-set "baseuri" "cic:/matita/nat/primes".
-
 include "nat/div_and_mod.ma".
 include "nat/minimization.ma".
 include "nat/sigma_and_pi.ma".
@@ -286,6 +284,28 @@ cut(O \lt c)
 ]
 qed.
 
+theorem eq_div_plus: \forall n,m,d. O < d \to
+divides d n \to divides d m \to
+(n + m ) / d = n/d + m/d.
+intros.
+elim H1.
+elim H2.
+rewrite > H3.rewrite > H4.
+rewrite < distr_times_plus.
+rewrite > sym_times.
+rewrite > sym_times in ⊢ (? ? ? (? (? % ?) ?)).
+rewrite > sym_times in ⊢ (? ? ? (? ? (? % ?))).
+rewrite > lt_O_to_div_times
+  [rewrite > lt_O_to_div_times
+    [rewrite > lt_O_to_div_times
+      [reflexivity
+      |assumption
+      ]
+    |assumption
+    ]
+  |assumption
+  ]
+qed.
 
 (* boolean divides *)
 definition divides_b : nat \to nat \to bool \def