Book VIII · Proposition 22

VIII.22

If three numbers be in continued proportion, and the first be square, the third will also be square.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(
    "VIII.22",
    THEOREM,
    sample=lambda rng: (rng.randint(2, 12), rng.randint(2, 12)),
)
def prop_VIII_22(a: int, b: int) -> Out:
    hypothesis("the sides are genuine numbers", a > 1 and b > 1, guard=True)
    terms = [a * a, a * b, b * b]
    hypothesis("the three are in continued proportion", in_continued_proportion(terms))
    hypothesis("the first is square", is_square(terms[0]))
    claim("the third is square also", "VIII.22", is_square(terms[2]))
    return Out()