Book I · Proposition 45

I.45

To construct, in a given rectilineal angle, a parallelogram equal to a given rectilineal figure.Heath, 1908
ABCDEFGL
241 lines and circles drawn, of which 94 helper constructions drew the fainter ones

Every step, checked

What it needs, and what needs it

Needs: I.42 I.44

Rests on: C.N.1, C.N.2, C.N.3, C.N.4, C.N.5, Def.10, Def.15, Def.4, Post.5

Depth: 16 steps of argument above the first principles. Parallel postulate: needed.

What it takes on trust

The proposition as code

@proposition(
    "I.45",
    CONSTRUCTION,
    sample=_figure_and_angle,
)
def prop_I_45(a: Point, b: Point, c: Point, d: Point, p: Point, q: Point, r: Point) -> Out:
    """The quadrilateral is cut into two triangles; the first gets a
    parallelogram by I.42, the second is applied to its side by I.44."""
    hypothesis("PQR is a genuine angle", not collinear(p, q, r), guard=True)
    outline(p, q, r, close=False)  # the arms of the given angle
    hypothesis("ABCD is a genuine quadrilateral",
               not collinear(a, b, c) and not collinear(a, c, d), guard=True)
    diameter = line(a, c, "the diameter AC dividing the figure")

    first = prop_I_42(a, b, c, p, q, r)
    corner_f, corner_e, corner_c, corner_g = first.parallelogram
    second = prop_I_44(corner_f, corner_g, a, c, d, p, q, r, away_from=corner_e)
    l, applied_a, applied_b, m = second.parallelogram

    total = _area(corner_f, corner_e, corner_c, corner_g) + _area(l, applied_a, applied_b, m)
    claim("the first parallelogram equals the triangle ABC", "I.42",
          _area(corner_f, corner_e, corner_c, corner_g) == _area(a, b, c))
    claim("the second, applied to its side, equals the triangle ACD", "I.44",
          _area(l, applied_a, applied_b, m) == _area(a, c, d))
    claim("together they equal the whole figure", "C.N.2",
          total == _area(a, b, c) + _area(a, c, d))
    claim("and each is in the given angle", "I.44", eq_angle(applied_a, applied_b, m, p, q, r))

    # The given figure, the diameter that halves it, and the two parallelograms
    # that together equal it -- everything the enunciation names, and nothing
    # of the three levels of helper construction underneath.
    outline_result(a, b, c, d)
    result(diameter)
    outline_result(corner_f, corner_e, corner_c, corner_g)
    outline_result(l, applied_a, applied_b, m)
    return Out(pieces=((corner_f, corner_e, corner_c, corner_g), (l, applied_a, applied_b, m)))