X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Flib%2Farithmetics%2Fprimes.ma;h=62c0a0081af5ecadfade0e7b0bbaa1ff4a3b216a;hb=9c0398174ebfa6b483dbdd5c10e8b15e39067329;hp=c8b2a25bf4e5f9d05ac3fffc2b0305c9a23ae66a;hpb=da5cf21f33e7303bf9b1fc60470de1f6101714dd;p=helm.git diff --git a/matita/matita/lib/arithmetics/primes.ma b/matita/matita/lib/arithmetics/primes.ma index c8b2a25bf..62c0a0081 100644 --- a/matita/matita/lib/arithmetics/primes.ma +++ b/matita/matita/lib/arithmetics/primes.ma @@ -247,8 +247,7 @@ qed. (* smallest factor *) definition smallest_factor : nat → nat ≝ -λn:nat. if_then_else ? (leb n 1) n - (min n 2 (λm.(eqb (n \mod m) O))). +λn:nat. if leb n 1 then n else min n 2 (λm.(eqb (n \mod m) O)). theorem smallest_factor_to_min : ∀n. 1 < n → smallest_factor n = (min n 2 (λm.(eqb (n \mod m) O))). @@ -311,7 +310,7 @@ qed. theorem prime_smallest_factor_n : ∀n. 1 < n → prime (smallest_factor n). -#n #lt1n (cut (0smallest_factor_to_min // @true_to_le_min //