X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2Fnat%2Fprimes.ma;h=dcf7abeea1372e0635817fb3a75554bd77b4bb0a;hb=c445ba5534cccde19016c92660ab52777af221c0;hp=ec7118980e1a82a53609a14bd76c0371e6a83585;hpb=6db38e3d8e4083765f2fce40c7845c9827b9afd0;p=helm.git diff --git a/helm/software/matita/library/nat/primes.ma b/helm/software/matita/library/nat/primes.ma index ec7118980..dcf7abeea 100644 --- a/helm/software/matita/library/nat/primes.ma +++ b/helm/software/matita/library/nat/primes.ma @@ -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