Skip to content

Commit 4d9ac12

Browse files
authored
bump mathlib (#238)
In leanprover-community/mathlib4#22644, I've removed useless explicit arguments in `iIndepFun`, motivated by PFR where this was just cluttering things. In this PR for PFR, I do the corresponding cleanup.
1 parent 2763ad9 commit 4d9ac12

19 files changed

+125
-123
lines changed

PFR/BoundingMutual.lean

+9-5
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ $$ {\mathcal I} := \bbI[ \bigl(\sum_{i=1}^m X_{i,j}\bigr)_{j =1}^{m}
2525
$$
2626
Then ${\mathcal I} \leq 4 m^2 \eta k.$
2727
-/
28-
lemma mutual_information_le {G Ωₒ : Type u} [MeasureableFinGroup G] [MeasureSpace Ωₒ] (p : multiRefPackage G Ωₒ) (Ω : Type u) [hΩ: MeasureSpace Ω] (X : ∀ i, Ω → G) (h_indep:
29-
iIndepFun (fun _ ↦ by infer_instance) X)
30-
(h_min : multiTauMinimizes p (fun _ ↦ Ω) (fun _ ↦ hΩ) X) (Ω' : Type*) [MeasureSpace Ω'] (X': Fin p.m × Fin p.m → Ω' → G) (h_indep': iIndepFun (fun _ ↦ by infer_instance) X') (hperm:
31-
∀ j, ∃ e : Fin p.m ≃ Fin p.m, IdentDistrib (fun ω ↦ (fun i ↦ X' (i, j) ω) ) (fun ω ↦ (fun i ↦ X (e i) ω))) :
32-
I[ fun ω ↦ ( fun j ↦ ∑ i, X' (i, j) ω) : fun ω ↦ ( fun i ↦ ∑ j, X' (i, j) ω) | fun ω ↦ ∑ i, ∑ j, X' (i, j) ω ] ≤ 4 * p.m^2 * p.η * D[ X; (fun _ ↦ hΩ)] := sorry
28+
lemma mutual_information_le {G Ωₒ : Type u} [MeasureableFinGroup G] [MeasureSpace Ωₒ]
29+
(p : multiRefPackage G Ωₒ) (Ω : Type u) [hΩ: MeasureSpace Ω] (X : ∀ i, Ω → G)
30+
(h_indep : iIndepFun X)
31+
(h_min : multiTauMinimizes p (fun _ ↦ Ω) (fun _ ↦ hΩ) X) (Ω' : Type*) [MeasureSpace Ω']
32+
(X' : Fin p.m × Fin p.m → Ω' → G) (h_indep': iIndepFun X')
33+
(hperm : ∀ j, ∃ e : Fin p.m ≃ Fin p.m, IdentDistrib (fun ω ↦ (fun i ↦ X' (i, j) ω))
34+
(fun ω ↦ (fun i ↦ X (e i) ω))) :
35+
I[ fun ω ↦ ( fun j ↦ ∑ i, X' (i, j) ω) : fun ω ↦ ( fun i ↦ ∑ j, X' (i, j) ω) |
36+
fun ω ↦ ∑ i, ∑ j, X' (i, j) ω ] ≤ 4 * p.m^2 * p.η * D[ X; (fun _ ↦ hΩ)] := sorry

PFR/Endgame.lean

+10-10
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ variable (X₁ X₂ X₁' X₂' : Ω → G)
4545

4646
variable (h₁ : IdentDistrib X₁ X₁') (h₂ : IdentDistrib X₂ X₂')
4747

48-
variable (h_indep : iIndepFun (fun _i => hG) ![X₁, X₂, X₁', X₂'])
48+
variable (h_indep : iIndepFun ![X₁, X₂, X₁', X₂'])
4949

5050
variable (h_min : tau_minimizes p X₁ X₂)
5151

@@ -81,7 +81,7 @@ private lemma hmeas2 {G : Type*} [AddCommGroup G] [Fintype G] [hG : MeasurableSp
8181
include h_indep hX₁ hX₂ hX₁' hX₂' h₁ in
8282
/-- The quantity `I_3 = I[V:W|S]` is equal to `I_2`. -/
8383
lemma I₃_eq [IsProbabilityMeasure (ℙ : Measure Ω)] : I[V : W | S] = I₂ := by
84-
have h_indep2 : iIndepFun (fun _ ↦ hG) ![X₁', X₂, X₁, X₂'] := by
84+
have h_indep2 : iIndepFun ![X₁', X₂, X₁, X₂'] := by
8585
exact h_indep.reindex_four_cbad
8686
have hident : IdentDistrib (fun a (i : Fin 4) => ![X₁, X₂, X₁', X₂'] i a)
8787
(fun a (j : Fin 4) => ![X₁', X₂, X₁, X₂'] j a) := by
@@ -160,7 +160,7 @@ lemma hU [IsProbabilityMeasure (ℙ : Measure Ω)] : H[U] = H[X₁' + X₂'] :=
160160
variable {X₁ X₂ X₁' X₂'} in
161161
include h_indep hX₁ hX₂ hX₁' hX₂' in
162162
lemma independenceCondition1 :
163-
iIndepFun (fun _ ↦ hG) ![X₁, X₂, X₁' + X₂'] :=
163+
iIndepFun ![X₁, X₂, X₁' + X₂'] :=
164164
h_indep.apply_two_last hX₁ hX₂ hX₁' hX₂' measurable_add
165165

166166
include h₁ h₂ h_indep in
@@ -172,31 +172,31 @@ lemma hV [IsProbabilityMeasure (ℙ : Measure Ω)] : H[V] = H[X₁ + X₂'] :=
172172
include h_indep hX₁ hX₂ hX₁' hX₂' in
173173
variable {X₁ X₂ X₁' X₂'} in
174174
lemma independenceCondition2 :
175-
iIndepFun (fun _ ↦ hG) ![X₂, X₁, X₁' + X₂'] :=
175+
iIndepFun ![X₂, X₁, X₁' + X₂'] :=
176176
independenceCondition1 hX₂ hX₁ hX₁' hX₂' h_indep.reindex_four_bacd
177177

178178
include h_indep hX₁ hX₂ hX₁' hX₂' in
179179
variable {X₁ X₂ X₁' X₂'} in
180180
lemma independenceCondition3 :
181-
iIndepFun (fun _ ↦ hG) ![X₁', X₂, X₁ + X₂'] :=
181+
iIndepFun ![X₁', X₂, X₁ + X₂'] :=
182182
independenceCondition1 hX₁' hX₂ hX₁ hX₂' h_indep.reindex_four_cbad
183183

184184
include h_indep hX₁ hX₂ hX₁' hX₂' in
185185
variable {X₁ X₂ X₁' X₂'} in
186186
lemma independenceCondition4 :
187-
iIndepFun (fun _ ↦ hG) ![X₂, X₁', X₁ + X₂'] :=
187+
iIndepFun ![X₂, X₁', X₁ + X₂'] :=
188188
independenceCondition1 hX₂ hX₁' hX₁ hX₂' h_indep.reindex_four_bcad
189189

190190
include h_indep hX₁ hX₂ hX₁' hX₂' in
191191
variable {X₁ X₂ X₁' X₂'} in
192192
lemma independenceCondition5 :
193-
iIndepFun (fun _ ↦ hG) ![X₁, X₁', X₂ + X₂'] :=
193+
iIndepFun ![X₁, X₁', X₂ + X₂'] :=
194194
independenceCondition1 hX₁ hX₁' hX₂ hX₂' h_indep.reindex_four_acbd
195195

196196
include h_indep hX₁ hX₂ hX₁' hX₂' in
197197
variable {X₁ X₂ X₁' X₂'} in
198198
lemma independenceCondition6 :
199-
iIndepFun (fun _ ↦ hG) ![X₂, X₂', X₁' + X₁] :=
199+
iIndepFun ![X₂, X₂', X₁' + X₁] :=
200200
independenceCondition1 hX₂ hX₂' hX₁' hX₁ h_indep.reindex_four_bdca
201201

202202
set_option maxHeartbeats 400000 in
@@ -303,7 +303,7 @@ lemma sum_dist_diff_le [IsProbabilityMeasure (ℙ : Measure Ω)] [Module (ZMod 2
303303
add_le_add (add_le_add step₁ step₂) step₃
304304
_ = 3 * H[S ; ℙ] - 3/2 * H[X₁ ; ℙ] -3/2 * H[X₂ ; ℙ] := by ring
305305

306-
have h_indep' : iIndepFun (fun _i => hG) ![X₁, X₂, X₂', X₁'] := by
306+
have h_indep' : iIndepFun ![X₁, X₂, X₂', X₁'] := by
307307
refine .of_precomp (Equiv.swap (2 : Fin 4) 3).surjective ?_
308308
convert h_indep using 1
309309
ext x
@@ -500,7 +500,7 @@ theorem tau_strictly_decreases_aux
500500
(show Measurable W by fun_prop) (show Measurable S by fun_prop)
501501
have h1 := sum_condMutual_le p X₁ X₂ X₁' X₂' hX₁ hX₂ hX₁' hX₂' h₁ h₂ h_indep h_min
502502
have h2 := sum_dist_diff_le p X₁ X₂ X₁' X₂' hX₁ hX₂ hX₁' hX₂' h₁ h₂ h_indep h_min
503-
have h_indep' : iIndepFun (fun _i => hG) ![X₁, X₂, X₂', X₁'] := by
503+
have h_indep' : iIndepFun ![X₁, X₂, X₂', X₁'] := by
504504
let σ : Fin 4 ≃ Fin 4 :=
505505
{ toFun := ![0, 1, 3, 2]
506506
invFun := ![0, 1, 3, 2]

PFR/Examples.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ example (h1 : IdentDistrib X X') (h2 : IdentDistrib Y Y') : d[X # Y] = d[X' # Y'
173173
example : d[X # Z] ≤ d[X # Y] + d[Y # Z] := rdist_triangle hX hY hZ
174174

175175
/-- The Kaimanovich-Vershik-Madiman inequality -/
176-
example (h : iIndepFun (fun _ ↦ hG) ![X, Y, Z]) : H[X + Y + Z] - H[X + Y] ≤ H[Y + Z] - H[Y] :=
176+
example (h : iIndepFun ![X, Y, Z]) : H[X + Y + Z] - H[X + Y] ≤ H[Y + Z] - H[Y] :=
177177
kaimanovich_vershik h hX hY hZ
178178

179179
/-- The entropic Balog--Szemeredi--Gowers inequality -/

PFR/Fibring.lean

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ variable {G : Type*} [AddCommGroup G] [Fintype G] [hG : MeasurableSpace G]
8787
variable {Ω : Type*} [mΩ : MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ]
8888

8989
/-- The conditional Ruzsa Distance step of `sum_of_rdist_eq` -/
90-
lemma sum_of_rdist_eq_step_condRuzsaDist {Y : Fin 4 → Ω → G} (h_indep : iIndepFun (fun _ : Fin 4 ↦ hG) Y μ)
90+
lemma sum_of_rdist_eq_step_condRuzsaDist {Y : Fin 4 → Ω → G} (h_indep : iIndepFun Y μ)
9191
(h_meas : ∀ i, Measurable (Y i)) :
9292
d[⟨Y 0, Y 2⟩ | Y 0 - Y 2 ; μ # ⟨Y 1, Y 3⟩ | Y 1 - Y 3 ; μ] = d[Y 0 | Y 0 - Y 2 ; μ # Y 1 | Y 1 - Y 3 ; μ] := by
9393
let Y' : Fin 4 → Ω → G
@@ -149,7 +149,7 @@ lemma sum_of_rdist_eq_step_condMutualInfo {Y : Fin 4 → Ω → G}
149149
$$d[Y_1-Y_3; Y_2-Y_4] + d[Y_1|Y_1-Y_3; Y_2|Y_2-Y_4] $$
150150
$$ + I[Y_1-Y_2 : Y_2 - Y_4 | Y_1-Y_2-Y_3+Y_4] = d[Y_1; Y_2] + d[Y_3; Y_4].$$
151151
-/
152-
lemma sum_of_rdist_eq (Y : Fin 4 → Ω → G) (h_indep : iIndepFun (fun _ : Fin 4 ↦ hG) Y μ)
152+
lemma sum_of_rdist_eq (Y : Fin 4 → Ω → G) (h_indep : iIndepFun Y μ)
153153
(h_meas : ∀ i, Measurable (Y i)) :
154154
d[Y 0; μ # Y 1; μ] + d[Y 2; μ # Y 3; μ]
155155
= d[(Y 0) - (Y 2); μ # (Y 1) - (Y 3); μ]
@@ -187,7 +187,7 @@ $$d[Y_1+Y_3; Y_2+Y_4] + d[Y_1|Y_1+Y_3; Y_2|Y_2+Y_4] $$
187187
$$ + I[Y_1+Y_2 : Y_2 + Y_4 | Y_1+Y_2+Y_3+Y_4] = d[Y_1; Y_2] + d[Y_3; Y_4].$$
188188
-/
189189
lemma sum_of_rdist_eq_char_2
190-
[Module (ZMod 2) G] (Y : Fin 4 → Ω → G) (h_indep : iIndepFun (fun _ : Fin 4 ↦ hG) Y μ)
190+
[Module (ZMod 2) G] (Y : Fin 4 → Ω → G) (h_indep : iIndepFun Y μ)
191191
(h_meas : ∀ i, Measurable (Y i)) :
192192
d[Y 0; μ # Y 1; μ] + d[Y 2; μ # Y 3; μ]
193193
= d[(Y 0) + (Y 2); μ # (Y 1) + (Y 3); μ]
@@ -196,7 +196,7 @@ lemma sum_of_rdist_eq_char_2
196196
simpa [ZModModule.sub_eq_add] using sum_of_rdist_eq Y h_indep h_meas
197197

198198
lemma sum_of_rdist_eq_char_2' [Module (ZMod 2) G] (X Y X' Y' : Ω → G)
199-
(h_indep : iIndepFun (fun _ : Fin 4 ↦ hG) ![X, Y, X', Y'] μ)
199+
(h_indep : iIndepFun ![X, Y, X', Y'] μ)
200200
(hX : Measurable X) (hY : Measurable Y) (hX' : Measurable X') (hY' : Measurable Y') :
201201
d[X ; μ # Y ; μ] + d[X' ; μ # Y' ; μ]
202202
= d[X + X' ; μ # Y + Y' ; μ] + d[X | X + X' ; μ # Y | Y + Y' ; μ]

PFR/FirstEstimate.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ variable (X₁ X₂ X₁' X₂' : Ω → G)
3434
(hX₁ : Measurable X₁) (hX₂ : Measurable X₂) (hX₁' : Measurable X₁') (hX₂' : Measurable X₂')
3535

3636
variable (h₁ : IdentDistrib X₁ X₁') (h₂ : IdentDistrib X₂ X₂')
37-
variable (h_indep : iIndepFun (fun _i => hG) ![X₁, X₂, X₂', X₁'])
37+
variable (h_indep : iIndepFun ![X₁, X₂, X₂', X₁'])
3838
variable (h_min : tau_minimizes p X₁ X₂)
3939

4040
/-- `k := d[X₁ # X₂]`, the Ruzsa distance `rdist` between X₁ and X₂. -/

PFR/ForMathlib/Entropy/Group.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ lemma max_entropy_le_entropy_div (hX : Measurable X) (hY : Measurable Y) (h : In
243243
lemma max_entropy_le_entropy_prod {G : Type*} [Countable G] [hG : MeasurableSpace G]
244244
[MeasurableSingletonClass G] [CommGroup G] [MeasurableMul₂ G]
245245
{I : Type*} {s : Finset I} {i₀ : I} (hi₀ : i₀ ∈ s) {X : I → Ω → G} [∀ i, FiniteRange (X i)]
246-
(hX : (i : I) → Measurable (X i)) (h_indep : iIndepFun (fun (_ : I) => hG) X μ) :
246+
(hX : (i : I) → Measurable (X i)) (h_indep : iIndepFun X μ) :
247247
H[X i₀ ; μ] ≤ H[∏ i ∈ s, X i ; μ] := by
248248
have hs : s.Nonempty := ⟨i₀, hi₀⟩
249249
induction' hs using Finset.Nonempty.cons_induction with i j s Hnot _ Hind

PFR/ForMathlib/Entropy/RuzsaDist.lean

+5-5
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ lemma ProbabilityTheory.IndepFun.rdist_eq [IsFiniteMeasure μ]
172172
/-- `d[X ; Y] ≤ H[X]/2 + H[Y]/2`. -/
173173
lemma rdist_le_avg_ent {X : Ω → G} {Y : Ω' → G} [FiniteRange X] [FiniteRange Y] (hX : Measurable X)
174174
(hY : Measurable Y) (μ : Measure Ω := by volume_tac) (μ' : Measure Ω' := by volume_tac)
175-
[IsProbabilityMeasure μ] [IsProbabilityMeasure μ'] :
175+
[IsProbabilityMeasure μ] [IsProbabilityMeasure μ'] :
176176
d[X ; μ # Y ; μ'] ≤ (H[X ; μ] + H[Y ; μ'])/2 := by
177177
rcases ProbabilityTheory.independent_copies_finiteRange hX hY μ μ'
178178
with ⟨ν, X', Y', hprob, hX', hY', h_indep, hidentX, hidentY, hfinX, hfinY⟩
@@ -186,7 +186,7 @@ lemma rdist_le_avg_ent {X : Ω → G} {Y : Ω' → G} [FiniteRange X] [FiniteRan
186186
/-- Applying an injective homomorphism does not affect Ruzsa distance. -/
187187
lemma rdist_of_inj {H : Type*} [hH : MeasurableSpace H] [MeasurableSingletonClass H]
188188
[AddCommGroup H] [Countable H] (hX : Measurable X) (hY : Measurable Y)
189-
(φ : G →+ H) (hφ : Injective φ) [IsProbabilityMeasure μ] [IsProbabilityMeasure μ' ]:
189+
(φ : G →+ H) (hφ : Injective φ) [IsProbabilityMeasure μ] [IsProbabilityMeasure μ'] :
190190
d[φ ∘ X ; μ # φ ∘ Y ; μ'] = d[X ; μ # Y ; μ'] := by
191191
rw [rdist_def, rdist_def]
192192
congr 2
@@ -1109,7 +1109,7 @@ lemma condRuzsaDist'_of_inj_map' [Module (ZMod 2) G] [IsProbabilityMeasure μ]
11091109
simp [μ']
11101110

11111111
/-- The **Kaimanovich-Vershik inequality**. `H[X + Y + Z] - H[X + Y] ≤ H[Y + Z] - H[Y]`. -/
1112-
lemma kaimanovich_vershik {X Y Z : Ω → G} (h : iIndepFun (fun _ ↦ hG) ![X, Y, Z] μ)
1112+
lemma kaimanovich_vershik {X Y Z : Ω → G} (h : iIndepFun ![X, Y, Z] μ)
11131113
(hX : Measurable X) (hY : Measurable Y) (hZ : Measurable Z)
11141114
[FiniteRange X] [FiniteRange Z] [FiniteRange Y] :
11151115
H[X + Y + Z ; μ] - H[X + Y ; μ] ≤ H[Y + Z ; μ] - H[Y ; μ] := by
@@ -1141,7 +1141,7 @@ lemma kaimanovich_vershik {X Y Z : Ω → G} (h : iIndepFun (fun _ ↦ hG) ![X,
11411141
exact h.indepFun_add_right this 2 0 1 (by decide) (by decide)
11421142

11431143
/-- A version of the **Kaimanovich-Vershik inequality** with some variables negated. -/
1144-
lemma kaimanovich_vershik' {X Y Z : Ω → G} (h : iIndepFun (fun _ ↦ hG) ![X, Y, Z] μ)
1144+
lemma kaimanovich_vershik' {X Y Z : Ω → G} (h : iIndepFun ![X, Y, Z] μ)
11451145
(hX : Measurable X) (hY : Measurable Y) (hZ : Measurable Z)
11461146
[FiniteRange X] [FiniteRange Z] [FiniteRange Y] :
11471147
H[X - (Y + Z) ; μ] - H[X - Y ; μ] ≤ H[Y + Z ; μ] - H[Y ; μ] := by
@@ -1429,7 +1429,7 @@ variable (μ) in
14291429
lemma condRuzsaDist_diff_ofsum_le [IsProbabilityMeasure μ] [IsProbabilityMeasure μ']
14301430
{X : Ω → G} {Y Z Z' : Ω' → G}
14311431
(hX : Measurable X) (hY : Measurable Y) (hZ : Measurable Z) (hZ' : Measurable Z')
1432-
(h : iIndepFun (fun _ ↦ hG) ![Y, Z, Z'] μ')
1432+
(h : iIndepFun ![Y, Z, Z'] μ')
14331433
[FiniteRange X] [FiniteRange Z] [FiniteRange Y] [FiniteRange Z'] :
14341434
d[X ; μ # Y + Z | Y + Z + Z'; μ'] - d[X ; μ # Y; μ'] ≤
14351435
(H[Y + Z + Z'; μ'] + H[Y + Z; μ'] - H[Y ; μ'] - H[Z' ; μ'])/2 := by

PFR/ForMathlib/FiniteRange/IdentDistrib.lean

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ lemma independent_copies3_nondep_finiteRange {α : Type u}
8484
∃ (A : Type (max u_1 u_2 u_3)) (_ : MeasurableSpace A) (μA : Measure A)
8585
(X₁' X₂' X₃' : A → α),
8686
IsProbabilityMeasure μA ∧
87-
iIndepFun (fun _ ↦ mS) ![X₁', X₂', X₃'] μA ∧
87+
iIndepFun ![X₁', X₂', X₃'] μA ∧
8888
Measurable X₁' ∧ Measurable X₂' ∧ Measurable X₃' ∧
8989
IdentDistrib X₁' X₁ μA μ₁ ∧ IdentDistrib X₂' X₂ μA μ₂ ∧ IdentDistrib X₃' X₃ μA μ₃ ∧
9090
FiniteRange X₁' ∧ FiniteRange X₂' ∧ FiniteRange X₃' := by
@@ -121,7 +121,7 @@ lemma independent_copies4_nondep_finiteRange {α : Type u}
121121
∃ (A : Type (max u_1 u_2 u_3 u_4)) (_ : MeasurableSpace A) (μA : Measure A)
122122
(X₁' X₂' X₃' X₄' : A → α),
123123
IsProbabilityMeasure μA ∧
124-
iIndepFun (fun _ ↦ mS) ![X₁', X₂', X₃', X₄'] μA ∧
124+
iIndepFun ![X₁', X₂', X₃', X₄'] μA ∧
125125
Measurable X₁' ∧ Measurable X₂' ∧ Measurable X₃' ∧ Measurable X₄'
126126
∧ IdentDistrib X₁' X₁ μA μ₁ ∧ IdentDistrib X₂' X₂ μA μ₂ ∧ IdentDistrib X₃' X₃ μA μ₃
127127
∧ IdentDistrib X₄' X₄ μA μ₄ ∧ FiniteRange X₁' ∧ FiniteRange X₂'

0 commit comments

Comments
 (0)