@@ -38,10 +38,10 @@ Once ported to mathlib4, this file will be a great golfing ground for Heather's
38
38
39
39
open Finset Fintype SimpleGraph SzemerediRegularity
40
40
41
- open scoped BigOperators Classical SzemerediRegularity.Positivity
41
+ open scoped BigOperators SzemerediRegularity.Positivity
42
42
43
- variable {α : Type *} [Fintype α] {P : Finpartition (univ : Finset α)} (hP : P.IsEquipartition)
44
- (G : SimpleGraph α) (ε : ℝ)
43
+ variable {α : Type *} [Fintype α] [DecidableEq α] {P : Finpartition (univ : Finset α)}
44
+ (hP : P.IsEquipartition) ( G : SimpleGraph α) [DecidableRel G.Adj] (ε : ℝ)
45
45
46
46
local notation3 "m" => (card α / stepBound P.parts.card : ℕ)
47
47
@@ -77,8 +77,9 @@ theorem card_increment (hPα : P.parts.card * 16 ^ P.parts.card ≤ card α) (hP
77
77
rw [filter_card_add_filter_neg_card_eq_card, card_attach]
78
78
#align szemeredi_regularity.card_increment SzemerediRegularity.card_increment
79
79
80
- theorem increment_isEquipartition (hP : P.IsEquipartition) (G : SimpleGraph α) (ε : ℝ) :
81
- (increment hP G ε).IsEquipartition := by
80
+ variable (hP G ε)
81
+
82
+ theorem increment_isEquipartition : (increment hP G ε).IsEquipartition := by
82
83
simp_rw [IsEquipartition, Set.equitableOn_iff_exists_eq_eq_add_one]
83
84
refine' ⟨m, fun A hA => _⟩
84
85
rw [mem_coe, increment, mem_bind] at hA
@@ -87,12 +88,14 @@ theorem increment_isEquipartition (hP : P.IsEquipartition) (G : SimpleGraph α)
87
88
#align szemeredi_regularity.increment_is_equipartition SzemerediRegularity.increment_isEquipartition
88
89
89
90
/-- The contribution to `Finpartition.energy` of a pair of distinct parts of a `Finpartition`. -/
90
- private noncomputable def distinctPairs (G : SimpleGraph α) (ε : ℝ) (hP : P.IsEquipartition)
91
- (x : {x // x ∈ P.parts.offDiag}) : Finset (Finset α × Finset α) :=
91
+ private noncomputable def distinctPairs (x : {x // x ∈ P.parts.offDiag}) :
92
+ Finset (Finset α × Finset α) :=
92
93
(chunk hP G ε (mem_offDiag.1 x.2 ).1 ).parts ×ˢ (chunk hP G ε (mem_offDiag.1 x.2 ).2 .1 ).parts
93
94
95
+ variable {hP G ε}
96
+
94
97
private theorem distinctPairs_increment :
95
- P.parts.offDiag.attach.biUnion (distinctPairs G ε hP ) ⊆ (increment hP G ε).parts.offDiag := by
98
+ P.parts.offDiag.attach.biUnion (distinctPairs hP G ε) ⊆ (increment hP G ε).parts.offDiag := by
96
99
rintro ⟨Ui, Vj⟩
97
100
simp only [distinctPairs, increment, mem_offDiag, bind_parts, mem_biUnion, Prod.exists,
98
101
exists_and_left, exists_prop, mem_product, mem_attach, true_and_iff, Subtype.exists, and_imp,
@@ -105,7 +108,7 @@ private theorem distinctPairs_increment :
105
108
106
109
private lemma pairwiseDisjoint_distinctPairs :
107
110
(P.parts.offDiag.attach : Set {x // x ∈ P.parts.offDiag}).PairwiseDisjoint
108
- (distinctPairs G ε hP ) := by
111
+ (distinctPairs hP G ε) := by
109
112
simp (config := { unfoldPartialApp := true }) only [distinctPairs, Set.PairwiseDisjoint,
110
113
Function.onFun, disjoint_left, inf_eq_inter, mem_inter, mem_product]
111
114
rintro ⟨⟨s₁, s₂⟩, hs⟩ _ ⟨⟨t₁, t₂⟩, ht⟩ _ hst ⟨u, v⟩ huv₁ huv₂
@@ -124,7 +127,7 @@ lemma le_sum_distinctPairs_edgeDensity_sq (x : {i // i ∈ P.parts.offDiag}) (h
124
127
(hPα : P.parts.card * 16 ^ P.parts.card ≤ card α) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5 ) :
125
128
(G.edgeDensity x.1 .1 x.1 .2 : ℝ) ^ 2 +
126
129
((if G.IsUniform ε x.1 .1 x.1 .2 then 0 else ε ^ 4 / 3 ) - ε ^ 5 / 25 ) ≤
127
- (∑ i in distinctPairs G ε hP x, G.edgeDensity i.1 i.2 ^ 2 : ℝ) / 16 ^ P.parts.card := by
130
+ (∑ i in distinctPairs hP G ε x, G.edgeDensity i.1 i.2 ^ 2 : ℝ) / 16 ^ P.parts.card := by
128
131
rw [distinctPairs, ← add_sub_assoc, add_sub_right_comm]
129
132
split_ifs with h
130
133
· rw [add_zero]
@@ -144,9 +147,9 @@ theorem energy_increment (hP : P.IsEquipartition) (hP₇ : 7 ≤ P.parts.card)
144
147
_ = (∑ x in P.parts.offDiag, (G.edgeDensity x.1 x.2 : ℝ) ^ 2 +
145
148
P.parts.card ^ 2 * (ε ^ 5 / 4 ) : ℝ) / P.parts.card ^ 2 := by
146
149
rw [coe_energy, add_div, mul_div_cancel_left₀]; positivity
147
- _ ≤ (∑ x in P.parts.offDiag.attach, (∑ i in distinctPairs G ε hP x,
150
+ _ ≤ (∑ x in P.parts.offDiag.attach, (∑ i in distinctPairs hP G ε x,
148
151
G.edgeDensity i.1 i.2 ^ 2 : ℝ) / 16 ^ P.parts.card) / P.parts.card ^ 2 := ?_
149
- _ = (∑ x in P.parts.offDiag.attach, ∑ i in distinctPairs G ε hP x,
152
+ _ = (∑ x in P.parts.offDiag.attach, ∑ i in distinctPairs hP G ε x,
150
153
G.edgeDensity i.1 i.2 ^ 2 : ℝ) / (increment hP G ε).parts.card ^ 2 := by
151
154
rw [card_increment hPα hPG, coe_stepBound, mul_pow, pow_right_comm,
152
155
div_mul_eq_div_div_swap, ← sum_div]; norm_num
0 commit comments