Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

§4.6, p. 63 — Heron's formula: a_uvq = √(s(s − ℓ_uv)(s − ℓ_vq)(s − ℓ_uq)) with s = ½(ℓ_uv + ℓ_uq + ℓ_vq)

Proved
GeomDL.Cotangent.heron_formula

by mikedeng1 · Oct 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

geometric-deep-learningheron-formulap2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1triangle-area

Let xu,xv,xq\mathbf x_u, \mathbf x_v, \mathbf x_qxu​,xv​,xq​ be three points of a Euclidean space, with side lengths ℓuv,ℓvq,ℓuq\ell_{uv}, \ell_{vq}, \ell_{uq}ℓuv​,ℓvq​,ℓuq​, and let auvq=12ℓuqℓvqsin⁡∠uqva_{uvq} = \frac12 \ell_{uq}\ell_{vq}\sin\angle uqvauvq​=21​ℓuq​ℓvq​sin∠uqv be the area of the triangle they span. With the semiperimeter suvq=12(ℓuv+ℓuq+ℓvq)s_{uvq} = \frac12(\ell_{uv} + \ell_{uq} + \ell_{vq})suvq​=21​(ℓuv​+ℓuq​+ℓvq​),

auvq=suvq(suvq−ℓuv)(suvq−ℓvq)(suvq−ℓuq).a_{uvq} = \sqrt{s_{uvq}(s_{uvq} - \ell_{uv})(s_{uvq} - \ell_{vq})(s_{uvq} - \ell_{uq})}.auvq​=suvq​(suvq​−ℓuv​)(suvq​−ℓvq​)(suvq​−ℓuq​)​.

The identity holds for every triple of points; for a degenerate triangle both sides are 000.

Heron's formula expresses the area of each face through the metric ℓ\ellℓ alone, which is one half of the intrinsic description of the cotangent weights.

Formalization Note The left-hand side is the geometric area 12ℓuqℓvqsin⁡∠uqv\frac12\ell_{uq}\ell_{vq}\sin\angle uqv21​ℓuq​ℓvq​sin∠uqv, so the formula is a theorem, not a definition. Mathlib has Heron's formula only in its Archive, which cannot be imported.

Preamble
import Mathlib
import Definitions.Def_GeomDL_Cotangent_Defs

open EuclideanGeometry
Formal statement
namespace GeomDL.Cotangent

variable {V P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P]
  [NormedAddTorsor V P]

/-- §4.6, p. 63, Heron's formula: the area `a_uvq = ½ ℓ_uq ℓ_vq sin ∠uqv` of the triangle
`(u, v, q)` equals `√(s(s − ℓ_uv)(s − ℓ_vq)(s − ℓ_uq))` with `s = ½(ℓ_uv + ℓ_uq + ℓ_vq)`.
Holds for every triple of nodes (degenerate triangles: both sides are `0`). -/
theorem heron_formula {ι : Type*} (x : ι → P) (u v q : ι) :
    triArea (x u) (x v) (x q) =
      heron (edgeLength x u v) (edgeLength x v q) (edgeLength x u q) := by sorry

end GeomDL.Cotangent
Source
Bronstein et al., Geometric Deep Learning (arXiv:2104.13478v2), §4.6, p. 63, "where the area of the triangles a_ijk is given as … using Heron's semiperimeter formula"
Human review
  • Endorsed by Shuze Chen · Oct 21, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 21, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me