Book X · Proposition 40

X.40

If two straight lines incommensurable in square which make the sum of the squares on them medial, but the rectangle contained by them rational, be added together, the whole straight line is irrational; and let it be called the side of a rational plus a medial area.Heath, 1908

Every step, checked

What it needs, and what needs it

Needs: nothing earlier.

Depth: 0 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.40", THEOREM, sample=_kind_sample("rational plus medial"))
def prop_X_40(a, b) -> Out:
    hypothesis("the two are incommensurable in square", not commensurable_in_square(a, b))
    hypothesis("the sum of the squares is medial", is_medial_area(a * a + b * b))
    hypothesis("the rectangle they contain is rational", is_rational_area(a * b))
    whole = a + b
    claim("the whole is irrational", "X.40", not isinstance(whole, Fraction))
    claim("and it is the side of a rational plus a medial area", "X.40",
          classify(whole).name == "the side of a rational plus a medial area")
    return Out(side=whole)