Book VI · Proposition 28
To a given straight line to apply a parallelogram equal to a given rectilineal figure and deficient by a parallelogrammic figure similar to a given one : thus the given rectilineal figure must not be greater than the parallelogram described on the half of the straight line and similar to the defect.Heath, 1908
The geometric solution of a quadratic. Euclid's proviso is exactly the condition for the discriminant not to be negative.
Rests on: C.N.1, C.N.2, C.N.3, C.N.4, C.N.5, Def.10, Def.15, Def.22, Def.4, Post.5, V.Def.5
Depth: 17 steps of argument above the first principles. Parallel postulate: needed.
@proposition(
"VI.28",
CONSTRUCTION,
sample=_deficient_application,
note="The geometric solution of a quadratic. Euclid's proviso is exactly the "
"condition for the discriminant not to be negative.",
)
def prop_VI_28(a: Point, b: Point, part) -> Out:
"""Apply to AB a parallelogram equal to a given area, deficient by a square."""
hypothesis("A and B are distinct", a != b)
hypothesis("the application is a proper one", sign(part) > 0 and sign(1 - part) > 0, guard=True)
line(a, b, "the given line AB")
middle = posit(prop_I_10(a, b).midpoint, "C")
whole = length(a, b)
wanted = whole * whole * part * (1 - part) # never more than the square on the half
hypothesis("the given area does not exceed that on the half (VI.27)",
sign(whole * whole / 4 - wanted) >= 0)
# x(whole - x) = wanted has the root x = whole/2 - sqrt(whole^2/4 - wanted),
# which is II.5 read as a formula: the half, less the piece between sections.
gap = sqrt(whole * whole / 4 - wanted)
cut = posit(_along(a, b, (whole / 2 - gap) / whole), "S")
across = (-(b.y - a.y), b.x - a.x)
applied = _parallelogram_on(a, cut, Point(a.x + across[0], a.y + across[1]))
outline(*applied)
because(prop_VI_27, a, b, part)
because(prop_II_5, a, cut, b)
claim("the point falls on AB, between A and the midpoint", "VI.27",
on_line(cut, Line.through(a, b)) and sign(length(a, cut)) >= 0
and sign(length(a, middle) - length(a, cut)) >= 0)
claim("the rectangle applied equals the given area", "II.5",
length(a, cut) * length(cut, b) == wanted)
return Out(section=cut)