X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Flibrary%2Fnat%2Fprimes1.ma;h=3ec61ee4aff75630b221cff00e359420065f6781;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=55d643262e15b4d4201359a0a6f0c01d515c9871;hpb=4efbd5e75ff51c4104be8c5f35dbabb65f51461f;p=helm.git diff --git a/helm/matita/library/nat/primes1.ma b/helm/matita/library/nat/primes1.ma index 55d643262..3ec61ee4a 100644 --- a/helm/matita/library/nat/primes1.ma +++ b/helm/matita/library/nat/primes1.ma @@ -16,15 +16,14 @@ set "baseuri" "cic:/matita/nat/primes1". include "datatypes/constructors.ma". include "nat/primes.ma". -include "nat/exp.ma". (* p is just an upper bound, acc is an accumulator *) let rec n_divides_aux p n m acc \def - match (mod n m) with + match n \mod m with [ O \Rightarrow match p with [ O \Rightarrow pair nat nat acc n - | (S p) \Rightarrow n_divides_aux p (div n m) m (S acc)] + | (S p) \Rightarrow n_divides_aux p (n / m) m (S acc)] | (S a) \Rightarrow pair nat nat acc n]. (* n_divides n m = if m divides n q times, with remainder r *) @@ -33,7 +32,7 @@ definition n_divides \def \lambda n,m:nat.n_divides_aux n n m O. (* theorem n_divides_to_Prop: \forall n,m,p,a. match n_divides_aux p n m a with - [ (pair q r) \Rightarrow n = (exp m a)*r]. + [ (pair q r) \Rightarrow n = m \sup a *r]. intros. -apply nat_case (mod n m). *) +apply nat_case (n \mod m). *)