Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.1, p. 794 — in a 3-regular n-node graph at most n/2 nodes lie within distance ⌊log n⌋ − 3 of any node

Proved
LeightonRao.BadExample.ball_card_le

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

expander-graphgraph-distancep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1regular-graph

Let GGG be a 3-regular graph on n≥8n\ge 8n≥8 nodes and write log⁡\loglog for log⁡2\log_2log2​. For every node vvv, the number of nodes uuu whose graph distance from vvv is at most ⌊log⁡n⌋−3\lfloor\log n\rfloor-3⌊logn⌋−3 satisfies

∣{u∈V: dG(v,u)≤⌊log⁡n⌋−3}∣ ≤ n2.\bigl|\{u\in V:\ d_G(v,u)\le\lfloor\log n\rfloor-3\}\bigr|\ \le\ \frac n2 .​{u∈V: dG​(v,u)≤⌊logn⌋−3}​ ≤ 2n​.

In the gap example this says that most nodes are far from any given node.

Formalization Note The paper writes log⁡n−3\log n-3logn−3; the radius is the integer ⌊log⁡n⌋−3\lfloor\log n\rfloor-3⌊logn⌋−3 (for non-integer log⁡n\log nlogn a graph distance is an integer anyway, so the ball is the same set as for radius log⁡n−3\log n-3logn−3 rounded down). The hypothesis n≥8n\ge 8n≥8 makes ⌊log⁡n⌋≥3\lfloor\log n\rfloor\ge 3⌊logn⌋≥3, so the natural-number subtraction is exact. The distance is the extended graph distance (SimpleGraph.edist), which is ∞\infty∞ between nodes in different components, so unreachable nodes are never counted as close.

Preamble
import Mathlib
import Definitions.Def_LeightonRao_BadExample_Setting

set_option autoImplicit false
open scoped BigOperators
Formal statement
namespace LeightonRao.BadExample

/-- §2.1, p. 794: in a 3-regular graph on `n ≥ 8` nodes, at most `n/2` nodes lie within
graph distance `⌊log₂ n⌋ − 3` of any node `v`. -/
theorem ball_card_le {V : Type} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (h3 : G.IsRegularOfDegree 3)
    (hn : 8 ≤ Fintype.card V) (v : V) :
    2 * ((Finset.univ.filter (fun u =>
        G.edist v u ≤ ((Nat.log 2 (Fintype.card V) - 3 : ℕ) : ℕ∞))).card : ℝ)
      ≤ (Fintype.card V : ℝ) := by sorry

end LeightonRao.BadExample
Source
Leighton and Rao, Multicommodity max-flow min-cut theorems and their use in designing approximation algorithms, J. ACM 46 (1999), p. 794, §2.1, second paragraph after the min-cut display
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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