Book X · Proposition 5

X.5

Commensurable magnitudes have to one another the ratio which a number has to a number.Heath, 1908

Every step, checked

What it needs, and what needs it

Needs: VII.33

Used by: X.7 X.29

Depth: 3 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(
    "X.5",
    THEOREM,
    sample=_commensurable_pair,
)
def prop_X_5(a, b) -> Out:
    hypothesis("the magnitudes are positive", sign(a) > 0 and sign(b) > 0, guard=True)
    hypothesis("they are commensurable", commensurable(a, b))
    ratio = a / b
    because(prop_VII_33, 2, 3)

    claim("the ratio is that of a number to a number", "X.5",
          isinstance(ratio, Fraction))
    claim("and the two numbers can be exhibited", "VII.33",
          a * ratio.denominator == b * ratio.numerator)
    return Out(numbers=(ratio.numerator, ratio.denominator))