Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3.2 — the two-swap bound under (EXCloc_{\mathrm{loc}}loc​)

Proved
SteinitzExchange.Extension.two_swap_bound

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

exchange-propertym-concavep2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let B⊆ZVB\subseteq\mathbb Z^VB⊆ZV be a finite integral base set and let ω:B→R\omega:B\to\mathbb Rω:B→R satisfy the local exchange property (EXCloc_{\mathrm{loc}}loc​). Let x∈Bx\in Bx∈B and u0,u1,v0,v1∈Vu_0,u_1,v_0,v_1\in Vu0​,u1​,v0​,v1​∈V with {u0,u1}∩{v0,v1}=∅\{u_0,u_1\}\cap\{v_0,v_1\}=\emptyset{u0​,u1​}∩{v0​,v1​}=∅ be such that

y:=x−χu0−χu1+χv0+χv1∈B,y:=x-\chi_{u_0}-\chi_{u_1}+\chi_{v_0}+\chi_{v_1}\in B,y:=x−χu0​​−χu1​​+χv0​​+χv1​​∈B,

and let p:V→Rp:V\to\mathbb Rp:V→R. Write ωp=ω[p]\omega_p=\omega[p]ωp​=ω[p] and πij=ωp(x−χui+χvj)−ωp(x)\pi_{ij}=\omega_p(x-\chi_{u_i}+\chi_{v_j})-\omega_p(x)πij​=ωp​(x−χui​​+χvj​​)−ωp​(x), with πij=−∞\pi_{ij}=-\inftyπij​=−∞ when x−χui+χvj∉Bx-\chi_{u_i}+\chi_{v_j}\notin Bx−χui​​+χvj​​∈/B. Then

ωp(y)−ωp(x)≤max⁡(π00+π11, π01+π10).(3.3)\omega_p(y)-\omega_p(x)\le\max(\pi_{00}+\pi_{11},\ \pi_{01}+\pi_{10}).\qquad(3.3)ωp​(y)−ωp​(x)≤max(π00​+π11​, π01​+π10​).(3.3)

The cases u0=u1u_0=u_1u0​=u1​ or v0=v1v_0=v_1v0​=v1​ are allowed.

This bound is the local step behind Theorem 3.1 (local exchange implies global exchange).

Formalization Note. With the −∞-\infty−∞ convention, (3.3) says exactly: either x−χu0+χv0x-\chi_{u_0}+\chi_{v_0}x−χu0​​+χv0​​ and x−χu1+χv1x-\chi_{u_1}+\chi_{v_1}x−χu1​​+χv1​​ both lie in BBB and ωp(y)−ωp(x)≤π00+π11\omega_p(y)-\omega_p(x)\le\pi_{00}+\pi_{11}ωp​(y)−ωp​(x)≤π00​+π11​, or x−χu0+χv1x-\chi_{u_0}+\chi_{v_1}x−χu0​​+χv1​​ and x−χu1+χv0x-\chi_{u_1}+\chi_{v_0}x−χu1​​+χv0​​ both lie in BBB and ωp(y)−ωp(x)≤π01+π10\omega_p(y)-\omega_p(x)\le\pi_{01}+\pi_{10}ωp​(y)−ωp​(x)≤π01​+π10​. The Lean statement is this disjunction. The hypothesis (EXCloc_{\mathrm{loc}}loc​) is on ω\omegaω, not on ωp\omega_pωp​.

Preamble
import Mathlib
import Definitions.Def_SteinitzExchange_Extension_IntegralBaseSet
import Definitions.Def_SteinitzExchange_Extension_Exchange
Formal statement
namespace SteinitzExchange.Extension

/-- Murota 1996, p. 282, Lemma 3.2. With the paper's convention `ω_p(x, u, v) = −∞` when
`x − χ_u + χ_v ∉ B`, the bound `ω_p(y) − ω_p(x) ≤ max(π₀₀ + π₁₁, π₀₁ + π₁₀)` says: for one of the
two pairings, both exchanged points lie in `B` and the bound holds with that pairing. -/
theorem two_swap_bound {V : Type*} [Fintype V] [DecidableEq V] [Nonempty V]
    (B : Finset (V → ℤ)) (hB : IsIntegralBaseSet B) (ω : (V → ℤ) → ℝ)
    (hloc : SatisfiesEXCLoc B ω) (x : V → ℤ) (hx : x ∈ B) (u₀ u₁ v₀ v₁ : V)
    (hy : x - chi u₀ - chi u₁ + chi v₀ + chi v₁ ∈ B)
    (h00 : u₀ ≠ v₀) (h01 : u₀ ≠ v₁) (h10 : u₁ ≠ v₀) (h11 : u₁ ≠ v₁) (p : V → ℝ) :
    let y := x - chi u₀ - chi u₁ + chi v₀ + chi v₁
    let π : V → V → ℝ := fun u v => perturb ω p (x - chi u + chi v) - perturb ω p x
    (x - chi u₀ + chi v₀ ∈ B ∧ x - chi u₁ + chi v₁ ∈ B ∧
        perturb ω p y - perturb ω p x ≤ π u₀ v₀ + π u₁ v₁) ∨
      (x - chi u₀ + chi v₁ ∈ B ∧ x - chi u₁ + chi v₀ ∈ B ∧
        perturb ω p y - perturb ω p x ≤ π u₀ v₁ + π u₁ v₀) := by sorry

end SteinitzExchange.Extension
Source
Murota, Convexity and Steinitz's Exchange Property, Adv. Math. 124 (1996), p. 282, Lemma 3.2, Eq. (3.3)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Setting. VVV is a finite, nonempty type with decidable equality. The symbols used are:

  • χu∈ZV\chi_u \in \mathbb{Z}^Vχu​∈ZV is the indicator vector of u∈Vu \in Vu∈V.
  • ι\iotaι reads integer vectors in RV\mathbb{R}^VRV.
  • ⟨p,b⟩=∑vp(v)b(v)\langle p, b\rangle = \sum_{v} p(v) b(v)⟨p,b⟩=∑v​p(v)b(v).

Hypotheses.

  • B⊆ZVB \subseteq \mathbb{Z}^VB⊆ZV is a finite integral base set. That is, BBB is nonempty, and for all x,y∈Bx, y \in Bx,y∈B and every uuu with (x−y)(u)>0(x-y)(u) > 0(x−y)(u)>0 there is some vvv with (x−y)(v)<0(x-y)(v) < 0(x−y)(v)<0 and x−χu+χv∈Bx - \chi_u + \chi_v \in Bx−χu​+χv​∈B.
  • ω:ZV→R\omega : \mathbb{Z}^V \to \mathbb{R}ω:ZV→R is defined on all of ZV\mathbb{Z}^VZV and satisfies (EXCloc_\mathrm{loc}loc​) on BBB. That is, for all x′,y′∈Bx', y' \in Bx′,y′∈B with ∑w∣x′(w)−y′(w)∣=4\sum_w |x'(w) - y'(w)| = 4∑w​∣x′(w)−y′(w)∣=4, there exist u,vu, vu,v with (x′−y′)(u)>0(x'-y')(u) > 0(x′−y′)(u)>0, (x′−y′)(v)<0(x'-y')(v) < 0(x′−y′)(v)<0, x′−χu+χv∈Bx' - \chi_u + \chi_v \in Bx′−χu​+χv​∈B, y′+χu−χv∈By' + \chi_u - \chi_v \in By′+χu​−χv​∈B and
ω(x′)+ω(y′)≤ω(x′−χu+χv)+ω(y′+χu−χv).\omega(x') + \omega(y') \le \omega(x' - \chi_u + \chi_v) + \omega(y' + \chi_u - \chi_v).ω(x′)+ω(y′)≤ω(x′−χu​+χv​)+ω(y′+χu​−χv​).
  • x∈Bx \in Bx∈B.
  • u0,u1,v0,v1∈Vu_0, u_1, v_0, v_1 \in Vu0​,u1​,v0​,v1​∈V satisfy u0≠v0u_0 \ne v_0u0​=v0​, u0≠v1u_0 \ne v_1u0​=v1​, u1≠v0u_1 \ne v_0u1​=v0​ and u1≠v1u_1 \ne v_1u1​=v1​. However, u0=u1u_0 = u_1u0​=u1​ and v0=v1v_0 = v_1v0​=v1​ are allowed.
  • The point
y=x−χu0−χu1+χv0+χv1y = x - \chi_{u_0} - \chi_{u_1} + \chi_{v_0} + \chi_{v_1}y=x−χu0​​−χu1​​+χv0​​+χv1​​

lies in BBB.

  • p∈RVp \in \mathbb{R}^Vp∈RV is arbitrary.

Write ωp(z)=ω(z)+⟨p,ι(z)⟩\omega_p(z) = \omega(z) + \langle p, \iota(z)\rangleωp​(z)=ω(z)+⟨p,ι(z)⟩ for all z∈ZVz \in \mathbb{Z}^Vz∈ZV. Define

π(u,v)=ωp(x−χu+χv)−ωp(x),\pi(u,v) = \omega_p(x - \chi_u + \chi_v) - \omega_p(x),π(u,v)=ωp​(x−χu​+χv​)−ωp​(x),

which is evaluated even at points outside BBB.

Conclusion. At least one of the following holds:

  1. x−χu0+χv0∈Bx - \chi_{u_0} + \chi_{v_0} \in Bx−χu0​​+χv0​​∈B and x−χu1+χv1∈Bx - \chi_{u_1} + \chi_{v_1} \in Bx−χu1​​+χv1​​∈B, and
ωp(y)−ωp(x)≤π(u0,v0)+π(u1,v1);\omega_p(y) - \omega_p(x) \le \pi(u_0,v_0) + \pi(u_1,v_1);ωp​(y)−ωp​(x)≤π(u0​,v0​)+π(u1​,v1​);
  1. x−χu0+χv1∈Bx - \chi_{u_0} + \chi_{v_1} \in Bx−χu0​​+χv1​​∈B and x−χu1+χv0∈Bx - \chi_{u_1} + \chi_{v_0} \in Bx−χu1​​+χv0​​∈B, and
ωp(y)−ωp(x)≤π(u0,v1)+π(u1,v0).\omega_p(y) - \omega_p(x) \le \pi(u_0,v_1) + \pi(u_1,v_0).ωp​(y)−ωp​(x)≤π(u0​,v1​)+π(u1​,v0​).

In whichever alternative holds, all points where ω\omegaω is evaluated lie in BBB.

Degenerate cases.

  • If VVV has exactly one element, then u0=v0u_0 = v_0u0​=v0​ is forced, so the hypotheses cannot be satisfied and the statement is vacuous.
  • If u0=u1u_0 = u_1u0​=u1​ and v0=v1v_0 = v_1v0​=v1​, the two alternatives are identical. The claim is then that x−χu0+χv0∈Bx - \chi_{u_0} + \chi_{v_0} \in Bx−χu0​​+χv0​​∈B and ωp(y)−ωp(x)≤2π(u0,v0)\omega_p(y) - \omega_p(x) \le 2\pi(u_0,v_0)ωp​(y)−ωp​(x)≤2π(u0​,v0​).
  • p=0p = 0p=0 is allowed, in which case ωp=ω\omega_p = \omegaωp​=ω.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 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