The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V22. Affine, Euclidean and convex geometry

Mathlib.Geometry.Euclidean.EulerQuadrilateral

2 declarations. Mathlib docs · Source

Euler's quadrilateral theorem

This file proves Euler's quadrilateral theorem: for any four points a, b, c and d, the sum of the squares of the four sides of the quadrilateral a b c d equals the sum of the squares of the two diagonals, plus four times the square of the distance between the midpoints of the diagonals. The theorem is usually stated for a convex quadrilateral, but no hypothesis is needed here: the quadrilateral may be degenerate and its vertices need not be coplanar.

The correction term is four times a squared distance, so it vanishes exactly when the two diagonals have the same midpoint, that is, when a b c d is a parallelogram. This gives the parallelogram law in point form, together with its converse.

Main results

  • dist_sq_add_dist_sq_add_dist_sq_add_dist_sq_eq_dist_sq_add_dist_sq_add_four_mul_dist_sq: Euler's quadrilateral theorem.
  • dist_sq_add_dist_sq_add_dist_sq_add_dist_sq_eq_dist_sq_add_dist_sq_iff_midpoint_eq: the parallelogram law, together with its converse.

References

  • https://en.wikipedia.org/wiki/Euler%27s_quadrilateral_theorem

theorem EuclideanGeometry.dist_sq_add_dist_sq_add_dist_sq_add_dist_sq_eq_dist_sq_add_dist_sq_add_four_mul_dist_sq E3 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (a b c d : P),
  dist a b ^ 2 + dist b c ^ 2 + dist c d ^ 2 + dist d a ^ 2 =
    dist a c ^ 2 + dist b d ^ 2 + 4 * dist (midpoint ℝ a c) (midpoint ℝ b d) ^ 2

Euler's quadrilateral theorem: for any four points, the sum of the squares of the four sides of the quadrilateral a b c d equals the sum of the squares of the two diagonals, plus four times the square of the distance between the midpoints of the diagonals.

theorem EuclideanGeometry.dist_sq_add_dist_sq_add_dist_sq_add_dist_sq_eq_dist_sq_add_dist_sq_iff_midpoint_eq E3 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (a b c d : P),
  dist a b ^ 2 + dist b c ^ 2 + dist c d ^ 2 + dist d a ^ 2 = dist a c ^ 2 + dist b d ^ 2 ↔
    midpoint ℝ a c = midpoint ℝ b d

The sum of the squares of the four sides of the quadrilateral a b c d equals the sum of the squares of the two diagonals if and only if the two diagonals have the same midpoint. The direction that assumes the shared midpoint is the parallelogram law, written with distances between points.