Book VII · Proposition 31
Any composite number is measured by some prime number.Heath, 1908
Needs: nothing earlier.
Rests on: Def.VII.3
Depth: 0 steps of argument above the first principles. Parallel postulate: not needed.
Nothing. It draws no intersections and reads nothing off the picture.
@proposition(
"VII.31",
THEOREM,
sample=lambda rng: (rng.randint(4, 500) | 1 if rng.random() < 0.3 else 2 * rng.randint(2, 250),),
)
def prop_VII_31(n: int) -> Out:
hypothesis("the number is composite", n > 3 and not is_prime(n))
factors = prime_factors(n)
claim("a prime factor was found", "VII.31", bool(factors) and is_prime(factors[0]))
claim("and it measures the number", "Def.VII.3", n % factors[0] == 0)
return Out(prime=factors[0])