Book IX · Proposition 24

IX.24

If from an even number an even number be subtracted, the remainder will be even.Heath, 1908

Every step, checked

What it needs, and what needs it

Needs: IX.21

Rests on: Def.VII.6

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("IX.24", THEOREM,
             sample=lambda rng: _pair_by_parity(rng, True, True))
def prop_IX_24(a: int, b: int) -> Out:
    hypothesis("an even number has an even subtracted", measures(2, a) and measures(2, b))
    hypothesis("the subtraction is a proper one", a > b, guard=True)
    because(prop_IX_21, [a, b]) if all(measures(2, n) for n in (a, b)) else None

    claim("the remainder is even", "IX.21", measures(2, a - b))
    return Out(remainder=a - b)