# Documentation

Mathlib.Combinatorics.SimpleGraph.Regularity.Increment

# Increment partition for Szemerédi Regularity Lemma #

In the proof of Szemerédi Regularity Lemma, we need to partition each part of a starting partition to increase the energy. This file defines the partition obtained by gluing the parts partitions together (the increment partition) and shows that the energy globally increases.

This entire file is internal to the proof of Szemerédi Regularity Lemma.

## Main declarations #

• SzemerediRegularity.increment: The increment partition.
• SzemerediRegularity.card_increment: The increment partition is much bigger than the original, but by a controlled amount.
• SzemerediRegularity.energy_increment: The increment partition has energy greater than the original by a known (small) fixed amount.

## TODO #

Once ported to mathlib4, this file will be a great golfing ground for Heather's new tactic gcongr.

## References #

[Yaël Dillies, Bhavik Mehta, Formalising Szemerédi’s Regularity Lemma in Lean][srl_itp]

noncomputable def SzemerediRegularity.increment {α : Type u_1} [] {P : Finpartition Finset.univ} (hP : ) (G : ) (ε : ) :
Finpartition Finset.univ

The increment partition in Szemerédi's Regularity Lemma.

If an equipartition is not uniform, then the increment partition is a (much bigger) equipartition with a slightly higher energy. This is helpful since the energy is bounded by a constant (see Finpartition.energy_le_one), so this process eventually terminates and yields a not-too-big uniform equipartition.

Instances For
theorem SzemerediRegularity.card_increment {α : Type u_1} [] {P : Finpartition Finset.univ} {hP : } {G : } {ε : } (hPα : Finset.card P.parts * 16 ^ Finset.card P.parts ) (hPG : ¬) :

The increment partition has a prescribed (very big) size in terms of the original partition.

theorem SzemerediRegularity.increment_isEquipartition {α : Type u_1} [] {P : Finpartition Finset.univ} (hP : ) (G : ) (ε : ) :
theorem SzemerediRegularity.offDiag_pairs_le_increment_energy {α : Type u_1} [] {P : Finpartition Finset.univ} {hP : } {G : } {ε : } :
(Finset.sum (Finset.attach (Finset.offDiag P.parts)) fun x => / ↑(Finset.card ().parts) ^ 2)
theorem SzemerediRegularity.pairContrib_lower_bound {α : Type u_1} [] {P : Finpartition Finset.univ} {hP : } {G : } {ε : } [] (x : { i // i Finset.offDiag P.parts }) (hε₁ : ε 1) (hPα : Finset.card P.parts * 16 ^ Finset.card P.parts ) (hPε : 100 4 ^ Finset.card P.parts * ε ^ 5) :
(↑(SimpleGraph.edgeDensity G (x).fst (x).snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε (x).fst (x).snd then 0 else ε ^ 4 / 3) ↑() / 16 ^ Finset.card P.parts
theorem SzemerediRegularity.uniform_add_nonuniform_eq_offDiag_pairs {α : Type u_1} [] {P : Finpartition Finset.univ} {hP : } {G : } {ε : } [] (hε₁ : ε 1) (hP₇ : 7 Finset.card P.parts) (hPα : Finset.card P.parts * 16 ^ Finset.card P.parts ) (hPε : 100 4 ^ Finset.card P.parts * ε ^ 5) (hPG : ¬) :
((Finset.sum (Finset.offDiag P.parts) fun x => ↑(SimpleGraph.edgeDensity G x.fst x.snd) ^ 2) + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4)) / ↑(Finset.card P.parts) ^ 2 Finset.sum (Finset.attach (Finset.offDiag P.parts)) fun x => ↑() / ↑(Finset.card ().parts) ^ 2
theorem SzemerediRegularity.energy_increment {α : Type u_1} [] {P : Finpartition Finset.univ} {G : } {ε : } [] (hP : ) (hP₇ : 7 Finset.card P.parts) (hε : 100 < 4 ^ Finset.card P.parts * ε ^ 5) (hPα : Finset.card P.parts * 16 ^ Finset.card P.parts ) (hPG : ¬) (hε₁ : ε 1) :
↑() + ε ^ 5 / 4 ↑()

The increment partition has energy greater than the original one by a known fixed amount.