Mathlib theorem · Existing formal mathematics

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.

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 d

The 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.

For the cospherical order encoded by the two straight-angle hypotheses at p, the two opposite-side products add to the diagonal product. Explanatory diagram.
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

Statement map for Ptolemy’s TheoremFour cospherical points ordered by two crossing straight-angle hypotheses satisfy Ptolemy's exact distance-product identity. Claim boundary: 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 pinned upstream declaration is EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cospherical. The complete formal statement is available in the Exact Mathlib statement section.Mathematical readingFour cospherical pointsordered by two crossingstraight-anglehypotheses satisfyPtolemy's exactdistance-productidentity.Claim boundaryThis page indexesMathlib's cosphericalfour-point distanceidentity in a realinner-product affinemetric space. It assumesan auxiliary point pwith ∠ a p c = π and ∠ bp d = π, which encodesthe crossing orderthrough p, and concludesdist a b * dist c d +dist b c * dist d a =dist a c * dist b d. Itdoes not separatelyassume an ordered planarpolygon, convexity,pairwise-distinctvertices, ornondegeneracy, and itdoes not assert theequality for anarbitrary ordering offour cospherical points.Pinned declarationmathlib ·EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cosphericalStatement map for Ptolemy’s TheoremFour cospherical points ordered by two crossing straight-angle hypotheses satisfy Ptolemy's exact distance-product identity. Claim boundary: 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 pinned upstream declaration is EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cospherical. The complete formal statement is available in the Exact Mathlib statement section.Mathematical readingFour cospherical pointsordered by two crossingstraight-anglehypotheses satisfyPtolemy's exactdistance-productidentity.Claim boundaryThis page indexesMathlib's cosphericalfour-point distanceidentity in a realinner-product affinemetric space. It assumesan auxiliary point pwith ∠ a p c = π and ∠ bp d = π, which encodesthe crossing orderthrough p, and concludesdist a b * dist c d +dist b c * dist d a =dist a c * dist b d. Itdoes not separatelyassume an ordered planarpolygon, convexity,pairwise-distinctvertices, ornondegeneracy, and itdoes not assert theequality for anarbitrary ordering offour cospherical points.Pinned declarationmathlib ·EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cospherical

Read the exact Mathlib declaration

This map summarizes the statement's structure; the exact Mathlib declaration remains authoritative.

Two visually paired opposite-side products combine into the product represented by the crossing diagonals. Explanatory scientific diagram.
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

Upstream indexedPinned source bytes verified locally
Locally reproducedExact upstream declaration replayed
Reviewed pageCurrent public presentation reviewed
Accepted Atlas resultNot recorded for the preferred artifact

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.

Source and local evidence

Where the theorem comes from

Existing declaration
EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cospherical in mathlib
Relationship
The checked artifact is the upstream declaration itself
Local Lean evidence
artifact.library.mathlib.ptolemy-theorem.v001
Source
Open the pinned upstream reference