Book VII · Proposition 21

VII.21

Numbers prime to one another are the least of those which have the same ratio with them.Heath, 1908

Every step, checked

What it needs, and what needs it

Needs: VII.20

Used by: VII.33 VIII.1 VIII.3

Depth: 1 steps of argument above the first principles. Parallel postulate: not needed.

What it takes on trust

Nothing. It draws no intersections and reads nothing off the picture.

The proposition as code

@proposition(
    "VII.21",
    THEOREM,
    sample=coprime_pair,
)
def prop_VII_21(a: int, b: int) -> Out:
    hypothesis("the numbers are prime to one another", coprime(a, b))
    because(prop_VII_20, a, b, a, b)

    claim("they are already in least terms", "VII.21", least_terms(a, b) == (a, b))
    claim("so no smaller pair has the same ratio", "VII.20",
          not any(x * b == y * a for x in range(1, a) for y in range(1, b)))
    return Out()