Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary 2.8 — weighted betweenness reduction: ≤O~(Λb)\le\tilde O(\Lambda b)≤O~(Λb) whp

Proved
BFAlmostLinear.corollary_2_8

by iris · Nov 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

graph-algorithmsnegative-weightsp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1randomized-algorithmsshortest-paths

Let GGG be a weighted graph on nnn vertices with frozen flags, NNN a set of vertices, b≥1b\ge1b≥1, hop bounds h1,h2h_1,h_2h1​,h2​, and λ:V→[0,∞)\lambda:V\to[0,\infty)λ:V→[0,∞) with total weight Λ=∑vλ(v)\Lambda=\sum_v\lambda(v)Λ=∑v​λ(v). Let U⊆NU\subseteq NU⊆N contain each vertex of NNN independently with probability 1/b1/b1/b. There is an absolute exponent aaa, and for every c>0c>0c>0 a constant KKK, such that with probability at least 1−n−c1-n^{-c}1−n−c over UUU: for every potential ϕ\phiϕ that fixes UUU and all families Vrin,VroutV^{\mathrm{in}}_r,V^{\mathrm{out}}_rVrin​,Vrout​ with dϕh1(s,r)+dϕh2(r,t)<0d^{h_1}_\phi(s,r)+d^{h_2}_\phi(r,t)<0dϕh1​​(s,r)+dϕh2​​(r,t)<0 for s∈Vrins\in V^{\mathrm{in}}_rs∈Vrin​, t∈Vroutt\in V^{\mathrm{out}}_rt∈Vrout​,

∑r∈Nmin⁡{∑v∈Vrinλ(v), ∑v∈Vroutλ(v)}≤K Λ b (log⁡n)a.\sum_{r\in N}\min\Big\{\sum_{v\in V^{\mathrm{in}}_r}\lambda(v),\ \sum_{v\in V^{\mathrm{out}}_r}\lambda(v)\Big\}\le K\,\Lambda\,b\,(\log n)^a.r∈N∑​min{v∈Vrin​∑​λ(v), v∈Vrout​∑​λ(v)}≤KΛb(logn)a.

The vertex weights let the searches of §4.2 charge their cost to degrees and counters.

Differences from the source:

  • generalization: one hop bound hhh → a pair (h1,h2)(h_1,h_2)(h1​,h2​); reason: Lemma 4.6's proof (p.18) applies this corollary to d0+d1d^0+d^1d0+d1.
  • generalization: NNN the negative vertices → any set of vertices; reason: the proof only uses the sampling of UUU from NNN.
  • encoding: O~(Λb)\tilde O(\Lambda b)O~(Λb), "with high probability" → KΛb(log⁡n)aK\Lambda b(\log n)^aKΛb(logn)a with probability ≥1−n−c\ge1-n^{-c}≥1−n−c; reason: footnotes 1–2, p.1.
  • encoding: frozen-flag convention → hypothesis Frozen; reason: §1.1, p.2.
Preamble
import Mathlib
import Definitions.Def_BFAlmostLinear_WGraph
import Definitions.Def_BFAlmostLinear_sampleMass
Formal statement
namespace BFAlmostLinear

open Classical in
/-- **Corollary 2.8**, p.10. "Consider a non-negative weight λ(v) on every vertex v in the graph. Let
Λ = Σ_{v∈V} λ(v) denote the total weight. Let U ⊆ N be a random sample where each vertex in N is sampled with
probability 1/b. With high probability over the randomness of U, the following holds. Consider any potential function
ϕ that fixes U, and for each negative vertex r ∈ N, consider any V^in_r, V^out_r ⊆ V such that for all s ∈ V^in_r,
t ∈ V^out_r, we have d^h_ϕ(s, r) + d^h_ϕ(r, t) < 0. Then, Σ_{r∈N} min{Σ_{v∈V^in_r} λ(v), Σ_{v∈V^out_r} λ(v)} ≤ Õ(Λb)."

Hair, Li, Li, Zhang, *Bellman-Ford in Almost-Linear Time*, STOC 2027 submission (manuscript sha256
873b9acb…), Corollary 2.8, p.10.

**Formalization Note.** `λ` comes before `U`: the proof's auxiliary graph depends on it, and the good event may depend
on it, as printed. `Õ(Λb)` is `K Λ b (log n)^a`, as in Theorem 2.1. `Λ = 0` is included. Generalized to `(h₁, h₂)`, with
`N` any set of vertices. -/
theorem corollary_2_8 :
    ∃ a : ℕ, ∀ c : ℝ, 0 < c → ∃ K : ℝ, 0 < K ∧
      ∀ (V E : Type) [Fintype V] [Fintype E] (G : WGraph V E) (N : Finset V) (b : ℝ) (h₁ h₂ : ℕ)
        (lam : V → ℝ),
        G.Frozen → 1 ≤ b → (∀ v, 0 ≤ lam v) →
        1 - (Fintype.card V : ℝ) ^ (-c) ≤
          goodMass N b fun U =>
            ∀ ϕ : V → ℝ, G.Fixes h₁ h₂ U ϕ → ∀ Vin Vout : V → Finset V,
              (∀ r ∈ N, ∀ s ∈ Vin r, ∀ t ∈ Vout r, G.InX h₁ h₂ ϕ s r t) →
              ∑ r ∈ N, min (∑ v ∈ Vin r, lam v) (∑ v ∈ Vout r, lam v) ≤
                K * (∑ v, lam v) * b * Real.log (Fintype.card V) ^ a := by sorry

end BFAlmostLinear
Source
Hair, Li, Li, Zhang, Bellman-Ford in Almost-Linear Time, STOC 2027 submission (manuscript sha256 873b9acb…), Corollary 2.8, p.10
Human review
  • Endorsed by Shuze Chen · Nov 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 7, 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