Existing in Mathlib · Euclidean geometry
Ptolemy’s Theorem
Put four points on one sphere and order them so the two diagonals pass straight through a common point p. Then the product of one pair of opposite side lengths plus the product of the other pair equals the product of the diagonal lengths.
- Ptolemy's theorem
- cospherical points
- Euclidean distance
- cyclic quadrilaterals
- crossing diagonals
- inner-product spaces
Exact theorem
Exact Mathlib statement
theorem EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cospherical {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] {P : Type*} [MetricSpace P] [NormedAddTorsor V P] {a b c d p : P} (h : Cospherical ({a, b, c, d} : Set P)) (hapc : ∠ a p c = π) (hbpd : ∠ b p d = π) : dist a b * dist c d + dist b c * dist d a = dist a c * dist b dThe theorem at a glance
Ptolemy’s Theorem at a glance
A visual guide to the theorem's hypotheses, structure, and conclusion; the exact statement gives the formal detail.
Ptolemy’s Theorem at a glance

Detailed visual description
The poster uses a cyclic cross-section as a representative view of the cospherical points. Patterned side pairs feed the exact distance identity, while the scope footer preserves the source's angle-based ordering and avoids adding planar-polygon, convexity, or nondegeneracy assumptions.
Statement structure
Statement and scope
Read the exact Mathlib declaration
This map summarizes the statement's structure; the exact Mathlib declaration remains authoritative.
A cospherical quadrilateral and its paired distances

Detailed visual description
A faint sphere surrounds one circular cross-section carrying exactly four black-ringed perimeter points in cyclic order. Cobalt double lines join the top and bottom pairs, emerald dashed-inlay lines join the left and right pairs, and two woven antique-gold diagonals cross at one central point. Beneath the sphere, a separate cobalt tile sits at lower left. An emerald tile at lower center narrows through a small green neck into a wider gold tile at lower right, whose weave repeats the crossing diagonals. The three unlabeled tiles echo the side and diagonal pairings without a visible equation.
Why it matters
A mathematical landmark
Ptolemy's theorem is one of classical Euclidean geometry's best-known metric identities, linking all six distances of a cyclic quadrilateral. Mathlib's formulation exposes the exact source-level ordering through a shared crossing point and works in a general real inner-product affine metric space.
ProofAtlas record
What has been checked
Mathlib is the source of the theorem; the local Lean replay and page review are separate.
Claim boundary
No new theorem is claimed
This page indexes Mathlib's cospherical four-point distance identity in a real inner-product affine metric space. It assumes an auxiliary point p with ∠ a p c = π and ∠ b p d = π, which encodes the crossing order through p, and concludes dist a b * dist c d + dist b c * dist d a = dist a c * dist b d. It does not separately assume an ordered planar polygon, convexity, pairwise-distinct vertices, or nondegeneracy, and it does not assert the equality for an arbitrary ordering of four cospherical points.
- The selected declaration does not state Ptolemy's inequality or its converse.
- The two angle-at-p hypotheses are essential to the selected ordering; the equality is not presented for an arbitrary ordering of four cospherical points.
- The familiar cyclic-quadrilateral picture is a representative visualization, not an extra formal planar or convexity hypothesis.
- The declaration adds no pairwise-distinctness or nondegeneracy hypothesis and makes no uniqueness, area, circumradius, or construction claim.
- Proof Atlas is indexing an existing Mathlib theorem, and the generated explanation and visuals are not proof evidence.
Source and local evidence
Where the theorem comes from
- Existing declaration
EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cosphericalin mathlib- Relationship
- The checked artifact is the upstream declaration itself
- Local Lean evidence
artifact.library.mathlib.ptolemy-theorem.v001