Skip to content

Commit 9d5afa1

Browse files
chore: bump mathlib (#527)
* Original motivation: can leanprover-community/mathlib4#34023 be used to golf some proofs? * When leanprover-community/mathlib4#34039 (`finiteness [h, h']` syntax) is merged, it will also be interesting to try using it more. * And leanprover-community/mathlib4#34133 (positivity bugfix) might also help with using positivity/finiteness more. --------- Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
1 parent e00f133 commit 9d5afa1

File tree

13 files changed

+94
-119
lines changed

13 files changed

+94
-119
lines changed

Carleson/Discrete/ExceptionalSet.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ lemma tree_count :
669669
lemma boundary_exception {u : 𝔓 X} :
670670
volume (⋃ i ∈ 𝓛 (X := X) n u, (i : Set X)) ≤ C5_2_9 X n * volume (𝓘 u : Set X) := by
671671
by_cases h_𝓛_n_u_non_empty : Set.Nonempty (𝓛 (X := X) n u)
672-
· set X_u := { x ∈ GridStructure.coeGrid (𝓘 u) | EMetric.infEdist x (GridStructure.coeGrid (𝓘 u))ᶜ ≤ 12 * (D ^ (𝔰 u - Z * (n + 1) - 1 : ℤ) : ℝ≥0∞)} with h_X_u -- 5.2.25
672+
· set X_u := { x ∈ GridStructure.coeGrid (𝓘 u) | Metric.infEDist x (GridStructure.coeGrid (𝓘 u))ᶜ ≤ 12 * (D ^ (𝔰 u - Z * (n + 1) - 1 : ℤ) : ℝ≥0∞)} with h_X_u -- 5.2.25
673673
calc volume (⋃ i ∈ 𝓛 (X := X) n u, (i : Set X))
674674
_ ≤ volume X_u := by
675675
have i_subset_X_u : ∀ i ∈ 𝓛 (X := X) n u, GridStructure.coeGrid i ⊆ X_u := by
@@ -693,8 +693,8 @@ lemma boundary_exception {u : 𝔓 X} :
693693
rel [dist_bpt_c_i_le]
694694
_ ≤ 12 * D ^ s i := by linarith
695695
-- show the the triangle inequality implies distance between ipt and (𝓘 u)ᶜ <= 12 * D ^ s i
696-
calc EMetric.infEdist ipt (GridStructure.coeGrid (𝓘 u))ᶜ
697-
_ ≤ edist ipt bpt := EMetric.infEdist_le_edist_of_mem <| Set.mem_compl h_bpt_not_in_I_u
696+
calc Metric.infEDist ipt (GridStructure.coeGrid (𝓘 u))ᶜ
697+
_ ≤ edist ipt bpt := Metric.infEDist_le_edist_of_mem <| Set.mem_compl h_bpt_not_in_I_u
698698
_ ≤ ENNReal.ofReal (12 * D ^ s i) := by
699699
rw [edist_dist]
700700
exact ENNReal.ofReal_le_ofReal ipt_bpt_triangle_ineq
@@ -740,7 +740,7 @@ lemma boundary_exception {u : 𝔓 X} :
740740
show 𝔰 u = s (𝓘 u) from rfl, add_comm,
741741
neg_add_eq_sub] at small_boundary_h_intermediate
742742
have small_b := GridStructure.small_boundary small_boundary_h
743-
have X_u_in_terms_of_t : X_u = { x ∈ GridStructure.coeGrid (𝓘 u) | EMetric.infEdist x (GridStructure.coeGrid (𝓘 u))ᶜ ≤ ((t * D ^ (s (𝓘 u))):ℝ≥0∞)} := by
743+
have X_u_in_terms_of_t : X_u = { x ∈ GridStructure.coeGrid (𝓘 u) | Metric.infEDist x (GridStructure.coeGrid (𝓘 u))ᶜ ≤ ((t * D ^ (s (𝓘 u))):ℝ≥0∞)} := by
744744
rw [ht, show s (𝓘 u) = 𝔰 u from rfl,
745745
show (D ^ 𝔰 u : ℝ≥0∞) = (D ^ 𝔰 u : ℝ≥0) by simp]
746746
rw_mod_cast [D_pow_algebra, h_X_u]

Carleson/ForestOperator/LargeSeparation.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ lemma global_tree_control1_supbound (hu₁ : u₁ ∈ t) (hu₂ : u₂ ∈ t) (h
14041404
‖adjointCarlesonSum ℭ f x₀‖ₑ + (ε / 2 : ℝ≥0) := by
14051405
apply ENNReal.exists_biSup_le_enorm_add_eps (by positivity)
14061406
⟨c J, mem_ball_self (by unfold defaultD; positivity)⟩
1407-
rw [isBounded_image_iff_bddAbove_norm]
1407+
rw [isBounded_image_iff_bddAbove_norm']
14081408
exact hf.bddAbove_norm_adjointCarlesonSum |>.mono (image_subset_range ..)
14091409
obtain ⟨x', hx', ex'⟩ : ∃ x₀ ∈ ball (c J) (8⁻¹ * D ^ s J),
14101410
‖adjointCarlesonSum ℭ f x₀‖ₑ - (ε / 2 : ℝ≥0) ≤
@@ -1779,10 +1779,9 @@ lemma holder_correlation_tree (hu₁ : u₁ ∈ t) (hu₂ : u₂ ∈ t) (hu : u
17791779
(edist x x' / D ^ s J) ^ (a : ℝ)⁻¹ / edist x x' ^ τ :=
17801780
ENNReal.div_le_div_right (edist_holderFunction_le hu₁ hu₂ hu h2u hJ hf₁ hf₂ mx mx') _
17811781
_ = _ := by
1782-
have dn0 : edist x x' ≠ 0 := by rw [← zero_lt_iff]; exact edist_pos.mpr hn
17831782
rw [mul_div_assoc, defaultτ, ← ENNReal.div_rpow_of_nonneg _ _ (by positivity),
17841783
div_eq_mul_inv, div_eq_mul_inv, ← mul_rotate _ (edist x x'),
1785-
ENNReal.inv_mul_cancel dn0 (edist_ne_top x x'), one_mul]
1784+
ENNReal.inv_mul_cancel (by positivity [edist_pos.mpr hn]) (edist_ne_top x x'), one_mul]
17861785
_ ≤ C7_5_9s a * C7_5_10 a * P7_5_4 t u₁ u₂ f₁ f₂ J +
17871786
ENNReal.ofReal (16 * D ^ s J) ^ τ *
17881787
(I7_5_4 a * P7_5_4 t u₁ u₂ f₁ f₂ J * ((D : ℝ≥0∞) ^ s J)⁻¹ ^ (a : ℝ)⁻¹) := by

Carleson/ForestOperator/RemainingTiles.lean

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ lemma square_function_count (hJ : J ∈ 𝓙₆ t u₁) {s' : ℤ} :
258258
rw [Measure.restrict_apply_univ]
259259
exact volume_coeGrid_lt_top⟩
260260
let 𝒟 (s₀ x) : Set (Grid X) := { I | x ∈ ball (c I) (8 * D ^ s I) ∧ s I = s₀ }
261-
let supp : Set X := { x ∈ J | EMetric.infEdist x Jᶜ ≤ 8 * (D ^ (s J - s')) }
261+
let supp : Set X := { x ∈ J | Metric.infEDist x Jᶜ ≤ 8 * (D ^ (s J - s')) }
262262
have hsupp : supp ⊆ J := fun x hx ↦ hx.1
263263
have vsupp : volume.real supp ≤ 2 * (↑8 * ↑D ^ (-s')) ^ κ * volume.real (J : Set X) := by
264264
simp only [supp, sub_eq_neg_add, ENNReal.zpow_add (x := D) (by simp) (by finiteness),
@@ -361,13 +361,20 @@ lemma square_function_count (hJ : J ∈ 𝓙₆ t u₁) {s' : ℤ} :
361361
congr!
362362
simp [mul_assoc, mul_comm (G := ℝ) 14]
363363

364+
-- PRed to mathlib: leanprover-community/mathlib4#34142
365+
variable {α} (s t : Finset α) in
366+
theorem _root_.Finset.diag_eq_filter [DecidableEq α] :
367+
Finset.diag s = (s ×ˢ s).filter fun a : α × α => a.fst = a.snd := by
368+
ext; simp +contextual
369+
364370
open Classical in
365371
lemma sum_𝓙₆_indicator_sq_eq {f : Grid X → X → ℝ≥0∞} :
366372
(∑ J ∈ (𝓙₆ t u₁).toFinset, (J : Set X).indicator (f J) x) ^ 2 =
367373
∑ J ∈ (𝓙₆ t u₁).toFinset, (J : Set X).indicator (f J · ^ 2) x := by
368374
rw [sq, Finset.sum_mul_sum, ← Finset.sum_product']
369-
have dsub : (𝓙₆ t u₁).toFinset.diag ⊆ (𝓙₆ t u₁).toFinset ×ˢ (𝓙₆ t u₁).toFinset :=
370-
Finset.filter_subset ..
375+
have dsub : (𝓙₆ t u₁).toFinset.diag ⊆ (𝓙₆ t u₁).toFinset ×ˢ (𝓙₆ t u₁).toFinset := by
376+
rw [Finset.diag_eq_filter]
377+
exact Finset.filter_subset ..
371378
rw [← Finset.sum_subset dsub]; swap
372379
· intro p mp np
373380
simp_rw [Finset.mem_product, Finset.mem_diag, mem_toFinset, not_and] at mp np

Carleson/GridStructure.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class GridStructure {A : outParam ℝ≥0} [PseudoMetricSpace X] [DoublingMeasur
3535
ball_subset_Grid {i} : ball (c i) (D ^ s i / 4) ⊆ coeGrid i --2.0.10
3636
Grid_subset_ball {i} : coeGrid i ⊆ ball (c i) (4 * D ^ s i) --2.0.10
3737
small_boundary {i} {t : ℝ≥0} (ht : D ^ (- S - s i) ≤ t) :
38-
volume.real { x ∈ coeGrid i | EMetric.infEdist x (coeGrid i)ᶜ ≤ t * (D ^ (s i):ℝ≥0∞)} ≤
38+
volume.real { x ∈ coeGrid i | Metric.infEDist x (coeGrid i)ᶜ ≤ t * (D ^ (s i):ℝ≥0∞)} ≤
3939
2 * t ^ κ * volume.real (coeGrid i)
4040
coeGrid_measurable {i} : MeasurableSet (coeGrid i)
4141

Carleson/TileExistence.lean

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ lemma dyadic_property {l : ℤ} (hl : -S ≤ l) {k : ℤ} (hl_k : l ≤ k) :
825825
structure ClosenessProperty {k1 k2 : ℤ} (hk1 : -S ≤ k1) (hk2 : -S ≤ k2)
826826
(y1 : Yk X k1) (y2 : Yk X k2) : Prop where
827827
I3_subset : I3 hk1 y1 ⊆ I3 hk2 y2
828-
I3_infdist_lt : EMetric.infEdist (y1 : X) (I3 hk2 y2)ᶜ < (6 * D ^ k1 : ℝ≥0∞)
828+
I3_infdist_lt : Metric.infEDist (y1 : X) (I3 hk2 y2)ᶜ < (6 * D ^ k1 : ℝ≥0∞)
829829

830830
local macro "clProp(" hkl:term ", " y1:term " | " hkr:term ", " y2:term ")" : term =>
831831
`(ClosenessProperty $hkl $hkr $y1 $y2)
@@ -854,7 +854,7 @@ lemma transitive_boundary' {k1 k2 k3 : ℤ} (hk1 : -S ≤ k1) (hk2 : -S ≤ k2)
854854
exact (ENNReal.zpow_pos hd_nzero (by finiteness) _).ne'
855855
have hdp_finit42 : (D ^ 42 : ℝ≥0∞) ≠ ⊤ := by finiteness
856856
refine ⟨⟨hi3_1_2, ?_⟩, ⟨hi3_2_3, ?_⟩⟩
857-
· apply lt_of_le_of_lt (EMetric.infEdist_anti _) hx'
857+
· apply lt_of_le_of_lt (Metric.infEDist_anti _) hx'
858858
rw [compl_subset_compl]
859859
exact hi3_2_3
860860
· rw [← emetric_ball,EMetric.mem_ball] at hx_4k2 hx_4k2'
@@ -863,16 +863,16 @@ lemma transitive_boundary' {k1 k2 k3 : ℤ} (hk1 : -S ≤ k1) (hk2 : -S ≤ k2)
863863
rw [ENNReal.ofReal_mul (by norm_num), ← ENNReal.ofReal_rpow_of_pos (realD_pos a),
864864
ENNReal.ofReal_ofNat,ENNReal.ofReal_natCast,ENNReal.rpow_intCast] at hx_4k2 hx_4k2'
865865
calc
866-
EMetric.infEdist (y2 : X) (I3 hk3 y3)ᶜ
867-
≤ edist (y2 : X) (y1 : X) + EMetric.infEdist (y1 : X) (I3 hk3 y3)ᶜ :=
868-
EMetric.infEdist_le_edist_add_infEdist
869-
_ = EMetric.infEdist (y1 : X) (I3 hk3 y3)ᶜ + edist (y1 : X) (y2 : X) := by
866+
Metric.infEDist (y2 : X) (I3 hk3 y3)ᶜ
867+
≤ edist (y2 : X) (y1 : X) + Metric.infEDist (y1 : X) (I3 hk3 y3)ᶜ :=
868+
Metric.infEDist_le_edist_add_infEDist
869+
_ = Metric.infEDist (y1 : X) (I3 hk3 y3)ᶜ + edist (y1 : X) (y2 : X) := by
870870
rw [add_comm,edist_comm]
871-
_ ≤ EMetric.infEdist (y1 : X) (I3 hk3 y3)ᶜ +
871+
_ ≤ Metric.infEDist (y1 : X) (I3 hk3 y3)ᶜ +
872872
(edist (y1:X) x + edist x y2) := by
873873
rw [ENNReal.add_le_add_iff_left hx'.ne_top]
874874
exact edist_triangle (↑y1) x ↑y2
875-
_ < EMetric.infEdist (y1 : X) (I3 hk3 y3)ᶜ + edist (y1 : X) x + 4 * D ^ k2 := by
875+
_ < Metric.infEDist (y1 : X) (I3 hk3 y3)ᶜ + edist (y1 : X) x + 4 * D ^ k2 := by
876876
rw [← add_assoc, ENNReal.add_lt_add_iff_left (by finiteness)]
877877
exact hx_4k2
878878
_ < 6 * D ^ k1 + 4 * D ^ k1 + 4 * D ^ k2 := by
@@ -919,7 +919,7 @@ lemma transitive_boundary {k1 k2 k3 : ℤ} (hk1 : -S ≤ k1) (hk2 : -S ≤ k2) (
919919
· exact ⟨le_refl _,by
920920
obtain hx := hcl.I3_infdist_lt
921921
apply lt_of_le_of_lt _ hx
922-
apply EMetric.infEdist_anti
922+
apply Metric.infEDist_anti
923923
simp only [compl_subset_compl]
924924
exact hcl.I3_subset⟩
925925
exact hcl
@@ -1116,7 +1116,7 @@ lemma small_boundary' (k : ℤ) (hk : -S ≤ k) (hk_mK : -S ≤ k - K') (y : Yk
11161116
simp only [disjoint_iUnion_right, disjoint_iUnion_left]
11171117
intro u hu u' hu'
11181118
rw [Set.disjoint_iff]
1119-
obtain ⟨x,hx⟩ := EMetric.infEdist_lt_iff.mp hu'.I3_infdist_lt
1119+
obtain ⟨x, hx⟩ := Metric.infEDist_lt_iff.mp hu'.I3_infdist_lt
11201120
intro x' hx'
11211121
have : x ∈ ball (u:X) (2⁻¹ * D^(l:ℤ)) := by
11221122
simp only [mem_inter_iff, mem_compl_iff, mem_ball] at hx hx' ⊢
@@ -1411,7 +1411,7 @@ end ProofData
14111411

14121412
lemma boundary_measure {k : ℤ} (hk : -S ≤ k) (y : Yk X k) {t : ℝ≥0} (ht : t ∈ Set.Ioo 0 1)
14131413
(htD : (D ^ (-S : ℤ) : ℝ) ≤ t * D ^ k) :
1414-
volume ({x | x ∈ I3 hk y ∧ EMetric.infEdist x (I3 hk y)ᶜ ≤ (↑t * ↑D ^ k)}) ≤
1414+
volume ({x | x ∈ I3 hk y ∧ Metric.infEDist x (I3 hk y)ᶜ ≤ (↑t * ↑D ^ k)}) ≤
14151415
2 * t ^ κ * volume (I3 hk y) := by
14161416
have hconst_n : -S ≤ k - const_n a ht * K' := by
14171417
suffices (D ^ (-S : ℤ) : ℝ) ≤ D ^ (k - const_n a ht * K' : ℤ) by
@@ -1425,7 +1425,7 @@ lemma boundary_measure {k : ℤ} (hk : -S ≤ k) (y : Yk X k) {t : ℝ≥0} (ht
14251425
positivity
14261426
simp only [mem_Ioo] at ht
14271427
calc
1428-
volume ({x | x ∈ I3 hk y ∧ EMetric.infEdist x (I3 hk y)ᶜ ≤ (↑t * ↑D ^ k)})
1428+
volume ({x | x ∈ I3 hk y ∧ Metric.infEDist x (I3 hk y)ᶜ ≤ (↑t * ↑D ^ k)})
14291429
_ ≤ volume (⋃ (y' : Yk X (k - const_n a ht *K')), ⋃ (_ : clProp(hconst_n,y'|hk,y)),
14301430
I3 hconst_n y') := by
14311431
apply volume.mono
@@ -1450,9 +1450,9 @@ lemma boundary_measure {k : ℤ} (hk : -S ≤ k) (y : Yk X k) {t : ℝ≥0} (ht
14501450
rw [← ENNReal.ofReal_natCast,ENNReal.ofReal_pos]
14511451
exact realD_pos a
14521452
calc
1453-
EMetric.infEdist (y' : X) (I3 hk y)ᶜ
1454-
_ ≤ EMetric.infEdist (x:X) (I3 hk y)ᶜ + edist (y':X) x :=
1455-
EMetric.infEdist_le_infEdist_add_edist
1453+
Metric.infEDist (y' : X) (I3 hk y)ᶜ
1454+
_ ≤ Metric.infEDist (x:X) (I3 hk y)ᶜ + edist (y':X) x :=
1455+
Metric.infEDist_le_infEDist_add_edist
14561456
_ < t * D^k + 4 * D^(k-const_n a ht * K') := by
14571457
apply ENNReal.add_lt_add_of_le_of_lt _ hxb' hxy'
14581458
apply (hxb'.trans_lt _).ne
@@ -1540,11 +1540,11 @@ lemma boundary_measure {k : ℤ} (hk : -S ≤ k) (y : Yk X k) {t : ℝ≥0} (ht
15401540

15411541
lemma boundary_measure' {k : ℤ} (hk : -S ≤ k) (y : Yk X k) {t : ℝ≥0} (ht : t ∈ Set.Ioo 0 1)
15421542
(htD : (D ^ (-S : ℤ) : ℝ) ≤ t * D ^ k) :
1543-
volume.real ({x | x ∈ I3 hk y ∧ EMetric.infEdist x (I3 hk y)ᶜ ≤ (↑t * ↑D ^ k)}) ≤
1543+
volume.real ({x | x ∈ I3 hk y ∧ Metric.infEDist x (I3 hk y)ᶜ ≤ (↑t * ↑D ^ k)}) ≤
15441544
2 * t ^ κ * volume.real (I3 hk y) := by
15451545
dsimp only [Measure.real]
15461546
calc
1547-
volume ({x | x ∈ I3 hk y ∧ EMetric.infEdist x (I3 hk y)ᶜ ≤ (↑t * ↑D ^ k)}) |>.toReal
1547+
volume ({x | x ∈ I3 hk y ∧ Metric.infEDist x (I3 hk y)ᶜ ≤ (↑t * ↑D ^ k)}) |>.toReal
15481548
_ ≤ ((2 : ℝ≥0∞) * t ^ κ : ℝ≥0∞).toReal * (volume (I3 hk y)).toReal := by
15491549
rw [← ENNReal.toReal_mul]
15501550
rw [ENNReal.toReal_le_toReal]

0 commit comments

Comments
 (0)