Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Mixed correlations for edge-by-edge simplex replacement

Definition
GreenTaoPort_Wikipedia_SzemeredisTheorem_Transference_SimplexTelescoping

by kmehltretter82 · Nov 14, 2026 · Mathlib c5ea003 (Lean v4.30.0)

arithmetic-progressionscombinatoricsgreen-tao-port-8822

Let HHH and GGG be real-weighted partite simplex systems with kkk edge colours. For a full vertex assignment xxx, the mixed term at colour jjj is

(Hj−Gj)(x−j)∏i<jHi(x−i)∏i>jGi(x−i),(H_j-G_j)(x_{-j}) \prod_{i<j}H_i(x_{-i}) \prod_{i>j}G_i(x_{-i}),(Hj​−Gj​)(x−j​)i<j∏​Hi​(x−i​)i>j∏​Gi​(x−i​),

where x−ix_{-i}x−i​ deletes coordinate iii. Thus earlier colours use HHH, later colours use GGG, and colour jjj contributes their difference. For finite vertex types, the mixed correlation is the normalized mean of this term. The correlation-bound predicate requires the absolute value of every mixed correlation to be at most a real parameter ε\varepsilonε. These definitions impose no positivity or boundedness on the edge weights.

Definition code
import Mathlib.Algebra.BigOperators.Ring.Finset
import Definitions.Def_GreenTaoPort_Wikipedia_SzemeredisTheorem_Finite_Mean
import Definitions.Def_GreenTaoPort_Wikipedia_SzemeredisTheorem_Hypergraph_Simplex
import Lean
import Mathlib.Algebra.BigOperators.Expect
import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset
import Mathlib.Data.Fintype.Card
import Mathlib.Data.ZMod.Basic
import Mathlib.Tactic

set_option autoImplicit true
set_option relaxedAutoImplicit false
set_option maxSynthPendingDepth 3


/-!
# Edge-by-edge telescoping for weighted simplex counts

The relative counting lemma compares two products by replacing one edge at a
time.  This file isolates that exact finite algebra.  No boundedness is
required: all analytic work is reduced to bounding one mixed correlation for
each edge colour.
-/

namespace Wikipedia.SzemeredisTheorem

open scoped BigOperators



/-- The mixed term produced while replacing edge colour `j`: earlier
colours come from `H`, later colours from `G`, and colour `j` contributes
their difference. -/
def mixedSimplexTerm {k : ℕ} {V : Fin k → Type*}
    (H G : WeightedSimplexSystem V) (j : Fin k)
    (x : (i : Fin k) → V i) : ℝ :=
  (H.edgeWeight j (deleteCoordinate x j) -
      G.edgeWeight j (deleteCoordinate x j)) *
    (∏ i ∈ (Finset.univ : Finset (Fin k)) with i < j,
      H.edgeWeight i (deleteCoordinate x i)) *
    ∏ i ∈ (Finset.univ : Finset (Fin k)) with j < i,
      G.edgeWeight i (deleteCoordinate x i)



/-- The normalized mixed correlation attached to one edge replacement. -/
noncomputable def mixedSimplexCorrelation
    {k : ℕ} {V : Fin k → Type*}
    [∀ i, Fintype (V i)]
    (H G : WeightedSimplexSystem V) (j : Fin k) : ℝ :=
  mean (mixedSimplexTerm H G j)





/-- Every mixed edge-replacement correlation is at most `ε`. -/
def MixedSimplexCorrelationLe
    {k : ℕ} {V : Fin k → Type*}
    [∀ i, Fintype (V i)]
    (H G : WeightedSimplexSystem V) (ε : ℝ) : Prop :=
  ∀ j, |mixedSimplexCorrelation H G j| ≤ ε



end Wikipedia.SzemeredisTheorem


/- Materialize compiler-generated declarations promised by this bundle. -/
run_meta do
  for requiredName in #[
    `Wikipedia.SzemeredisTheorem.mixedSimplexTerm.eq_1
  ] do
    let actualName ← Lean.realizeGlobalConstNoOverloadCore requiredName
    unless actualName == requiredName do
      throwError "Generated companion resolved to an unexpected name"
Source
https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/Wikipedia/SzemeredisTheorem/Transference/SimplexTelescoping.lean#L47-L125

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