]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/lib/arithmetics/primes.ma
Some integrations from CerCo. In particular:
[helm.git] / matita / matita / lib / arithmetics / primes.ma
index c8b2a25bf4e5f9d05ac3fffc2b0305c9a23ae66a..68e511e982617f293eedfc320aaa6be1ec888447 100644 (file)
@@ -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))).