Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Pair and triple gaps of a size functional, and the Hlawka-constant property

Definition
HlawkaSchatten_GapComparison

by savarin · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

gap-comparisonhlawka-inequalityhlawka-schattenpair-deficittriple-deficit

Fix a type EEE with only an addition operation (Lean: [Add E]) — no norm, group, or other structure is assumed. Let N:E→RN:E\to\mathbb{R}N:E→R be any real-valued "size" functional (Lean argument name size); it need not be a norm.

  • pairGap N x y :=N(x)+N(y)−N(x+y):= N(x)+N(y)-N(x+y):=N(x)+N(y)−N(x+y) — the pair deficit of NNN at x,yx,yx,y: how far NNN falls short of additivity on the pair.
  • tripleGap N x y z :=N(x)+N(y)+N(z)−N(x+y+z):= N(x)+N(y)+N(z)-N(x+y+z):=N(x)+N(y)+N(z)−N(x+y+z) — the triple deficit at x,y,zx,y,zx,y,z.
  • pairGapSum N x y z :=:=:= pairGap N x y + pairGap N x z + pairGap N y z — the sum of the three pair deficits of the triple.
  • HasHlawkaConstant N C (a Prop) :=:=:= for all x,y,z∈Ex,y,z\in Ex,y,z∈E,   tripleGap N x y z  ≤  C⋅pairGapSum N x y z\;\mathrm{tripleGap}\,N\,x\,y\,z \;\le\; C\cdot \mathrm{pairGapSum}\,N\,x\,y\,ztripleGapNxyz≤C⋅pairGapSumNxyz. This says NNN satisfies a Hlawka-type inequality with constant CCC.

The source module goes on to prove (not part of this bundle) three short ordered-algebraic lemmas that transfer a Hlawka constant from one functional to another: if for some m>0m>0m>0 and M≥0M\ge0M≥0 the triple deficit of NNN is at most 2M2M2M times the triple deficit of a "model" functional, each pair deficit of NNN is at least 2m2m2m times the corresponding pair deficit of the model, and the model itself has Hlawka constant 111, then NNN has Hlawka constant M/mM/mM/m (tripleGap_le_ratio_mul_pairGapSum, hasHlawkaConstant_of_gapComparison); and a strictly positive triple deficit together with a vanishing pair-deficit sum rules out every constant whatsoever (no_hlawkaConstant_of_pairGapSum_eq_zero).

Definition code
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.Analysis.InnerProductSpace.Dual

/-
Copyright (c) 2026 Ezzeri Esa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ezzeri Esa
-/

/-!
# Transferring Hlawka inequalities through gap comparisons

This file isolates the last, purely ordered-algebraic step in the
Bregman--Mazur proof of the dimension-independent Schatten Hlawka bound.
If the three-body gap for one size functional is bounded above by the gap
for a model functional, while every two-body gap is bounded below by the
corresponding model gap, then a Hlawka inequality for the model transfers.
-/

namespace HlawkaSchatten

variable {E : Type*} [Add E]

/-- The triangle-inequality deficit of a size functional at two vectors. -/
def pairGap (size : E → ℝ) (x y : E) : ℝ :=
  size x + size y - size (x + y)

/-- The triangle-inequality deficit of a size functional at three vectors. -/
def tripleGap (size : E → ℝ) (x y z : E) : ℝ :=
  size x + size y + size z - size (x + y + z)

/-- The sum of all three pair deficits associated to a triple. -/
def pairGapSum (size : E → ℝ) (x y z : E) : ℝ :=
  pairGap size x y + pairGap size x z + pairGap size y z

/-- A size functional satisfies the three-vector Hlawka inequality with constant `C`. -/
def HasHlawkaConstant (size : E → ℝ) (C : ℝ) : Prop :=
  ∀ x y z, tripleGap size x y z ≤ C * pairGapSum size x y z







end HlawkaSchatten
Source
https://github.com/savarin/hlawka-schatten/blob/79aa498bfcf7b22bd91d771fb32ec278e2d4704b/HlawkaSchatten/GapComparison.lean#L20-L36
Human review
  • Endorsed by Shuze Chen · Sep 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by savarin · Sep 29, 2026

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

  • Endorsed by marwahaha · Sep 30, 2026

  • Endorsed by moona3k · Oct 6, 2026

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

  • Endorsed by @bwdaugherty · Oct 16, 2026

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

  • Endorsed by Yuxuan Xu · Oct 18, 2026

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

  • Endorsed by shivm · Oct 27, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me