X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2Fnat%2Fdiv_and_mod.ma;h=538515a8cc806003287340ef9d1299b4625a17a0;hb=54551ce5acf37f04972291e774d14371a671a8c7;hp=0323b18fb17849949b5ce4a49e3b33476f14fcec;hpb=6db38e3d8e4083765f2fce40c7845c9827b9afd0;p=helm.git diff --git a/helm/software/matita/library/nat/div_and_mod.ma b/helm/software/matita/library/nat/div_and_mod.ma index 0323b18fb..538515a8c 100644 --- a/helm/software/matita/library/nat/div_and_mod.ma +++ b/helm/software/matita/library/nat/div_and_mod.ma @@ -12,12 +12,9 @@ (* *) (**************************************************************************) -set "baseuri" "cic:/matita/nat/div_and_mod". - include "datatypes/constructors.ma". include "nat/minus.ma". - let rec mod_aux p m n: nat \def match (leb m n) with [ true \Rightarrow m @@ -223,6 +220,7 @@ apply (div_mod_spec_to_eq2 (q*m+r) m ((q*m+r)/ m) ((q*m+r) \mod m) q r) |apply div_mod_spec_intro[assumption|reflexivity] ] qed. + (* some properties of div and mod *) theorem div_times: \forall n,m:nat. ((S n)*m) / (S n) = m. intros. @@ -312,19 +310,6 @@ rewrite > (div_mod ? (S O)) in \vdash (? ? ? %) ] qed. -theorem le_div: \forall n,m. O < n \to m/n \le m. -intros. -rewrite > (div_mod m n) in \vdash (? ? %) - [apply (trans_le ? (m/n*n)) - [rewrite > times_n_SO in \vdash (? % ?). - apply le_times - [apply le_n|assumption] - |apply le_plus_n_r - ] - |assumption - ] -qed. - theorem or_div_mod: \forall n,q. O < q \to ((S (n \mod q)=q) \land S n = (S (div n q)) * q \lor ((S (n \mod q)