Skip to content

Commit 7c45b64

Browse files
committed
chore: last upstreaming comment; minor golfs
1 parent 0d7326d commit 7c45b64

File tree

7 files changed

+25
-34
lines changed

7 files changed

+25
-34
lines changed

Carleson/ToMathlib/Analysis/MeanInequalitiesPow.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Mathlib.Analysis.MeanInequalitiesPow
22
import Mathlib.MeasureTheory.Function.LpSeminorm.TriangleInequality
33

4+
-- Upstreaming status: looks useful and ready to go
5+
46
namespace ENNReal
57

68
theorem rpow_add_le_mul_rpow_add_rpow' (z₁ z₂ : ℝ≥0∞) {p : ℝ} (hp : 0 ≤ p) :

Carleson/ToMathlib/HardyLittlewood.lean

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -870,21 +870,17 @@ theorem hasWeakType_maximalFunction_equal_exponents
870870
simp only [enorm_eq_self, mem_setOf_eq]
871871
exact fun ht ↦ ht.trans_le (f_mon hmn x)
872872
apply (rpow_le_rpow_iff p_pos).mp
873-
rw [ENNReal.mul_rpow_of_nonneg _ _ (by positivity)]
874-
rw [rpow_inv_rpow p_pos.ne']
875-
by_cases ht : t = 0; · rw [ht]; simp [(zero_rpow_of_pos p_pos)]
876-
have htp : (t : ℝ≥0∞) ^ (p : ℝ) ≠ 0 :=
877-
(rpow_pos (coe_pos.mpr ((zero_le t).lt_of_ne' ht)) coe_ne_top).ne'
878-
have htp' : (t : ℝ≥0∞) ^ (p : ℝ) ≠ ⊤ :=
879-
ne_of_lt ((rpow_lt_top_iff_of_pos p_pos).mpr coe_lt_top)
880-
refine (mul_le_iff_le_inv htp htp').mpr ?_
873+
rw [ENNReal.mul_rpow_of_nonneg _ _ (by positivity), rpow_inv_rpow p_pos.ne']
874+
by_cases ht : t = 0
875+
· rw [ht]; simp [(zero_rpow_of_pos p_pos)]
876+
refine (mul_le_iff_le_inv (by positivity) (by finiteness)).mpr ?_
881877
calc
882878
_ ≤ _ := measure_mono (hunion t)
883879
_ ≤ _ := by
884880
have := MeasureTheory.tendsto_measure_iUnion_atTop (μ := μ) hm
885881
refine le_of_tendsto_of_frequently this (.of_forall fun x ↦ ?_)
886882
dsimp only [Function.comp_apply]
887-
refine (mul_le_iff_le_inv htp htp').mp ?_
883+
refine (mul_le_iff_le_inv (by positivity) (by finiteness)).mp ?_
888884
rw [← rpow_inv_rpow (x := μ _) p_pos.ne', ← ENNReal.mul_rpow_of_nonneg _ _ (by positivity)]
889885
exact (rpow_le_rpow_iff p_pos).mpr (hestfin x t)
890886

Carleson/ToMathlib/LorentzType.lean

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,12 +397,11 @@ lemma HasRestrictedWeakType'.hasLorentzType [SigmaFinite ν]
397397
rw [G_finite]
398398
unfold r
399399
apply (ENNReal.rpow_lt_top_iff_of_pos p_toReal_pos).mpr
400-
apply ENNReal.div_lt_top _ (by simpa)
401-
apply ENNReal.mul_ne_top hc hf.2.ne
400+
have := hf.2.ne
401+
exact ENNReal.div_lt_top (by finiteness) (by simpa)
402402
rcases ν.exists_subset_measure_lt_top hG' this with ⟨H, hH, H_subset_G', H_gt, H_finite⟩
403403
have H_pos := (zero_le _).trans_lt H_gt
404-
have := (hT f hf H hH).2
405-
apply this.not_gt
404+
apply (hT f hf H hH).2.not_gt
406405
calc _
407406
_ < l * ν H := by
408407
rw [← ENNReal.lt_div_iff_mul_lt

Carleson/ToMathlib/RealInterpolation/InterpolatedExponents.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,7 @@ lemma ζ_pos_iff_aux₀ (ht : t ∈ Ioo 0 1) (hp₀ : 0 < p₀) (hq₀ : 0 < q
783783

784784
lemma inv_toReal_iff (hp₀ : 0 < p₀) (hp₁ : 0 < p₁) :
785785
p₀⁻¹.toReal < p₁⁻¹.toReal ↔ p₁ < p₀ :=
786-
Iff.trans (toReal_lt_toReal (ne_of_lt (inv_lt_top.mpr hp₀))
787-
(ne_of_lt (inv_lt_top.mpr hp₁))) ENNReal.inv_lt_inv
786+
Iff.trans (toReal_lt_toReal (inv_lt_top.mpr hp₀).ne (inv_lt_top.mpr hp₁).ne) ENNReal.inv_lt_inv
788787

789788
lemma ζ_pos_iff (ht : t ∈ Ioo 0 1) (hp₀ : 0 < p₀) (hq₀ : 0 < q₀) (hp₁ : 0 < p₁) (hq₁ : 0 < q₁)
790789
(hp₀p₁ : p₀ ≠ p₁) (hq₀q₁ : q₀ ≠ q₁) :

Carleson/ToMathlib/RealInterpolation/Minkowski.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ lemma weaktype_estimate_trunc_top {C₁ : ℝ≥0} (hC₁ : 0 < C₁) {p p₁ q
979979
simp only [this, mul_zero, zero_le]
980980
· have snorm_p_pos : eLpNorm f p μ ≠ 0 := by
981981
intro snorm_0
982-
apply Ne.symm (ne_of_lt snorm_pos)
982+
apply snorm_pos.ne'
983983
apply eLpNormEssSup_eq_zero_iff.mpr
984984
exact (eLpNorm_eq_zero_iff hf.1 hp.ne').mp snorm_0
985985
-- XXX: these lines are the same as in the lemma above

Carleson/ToMathlib/WeakType.lean

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ lemma distibution_top (f : α → ε) (μ : Measure α) : distribution f ∞ μ
4242
lemma distribution_mono_right (h : t ≤ s) : distribution f s μ ≤ distribution f t μ :=
4343
measure_mono fun _ a ↦ lt_of_le_of_lt h a
4444

45-
lemma distribution_mono_right' : (Antitone (fun t ↦ distribution f t μ)) :=
45+
lemma distribution_mono_right' : Antitone (fun t ↦ distribution f t μ) :=
4646
fun _ _ h ↦ distribution_mono_right h
4747

4848
@[measurability, fun_prop]
@@ -57,9 +57,8 @@ lemma distribution_measurable {g : α' → ℝ≥0∞} (hg : Measurable g) :
5757
lemma distribution_toReal_le {f : α → ℝ≥0∞} :
5858
distribution (ENNReal.toReal ∘ f) t μ ≤ distribution f t μ := by
5959
simp_rw [distribution]
60-
apply measure_mono
61-
simp_rw [comp_apply, enorm_eq_self, setOf_subset_setOf]
62-
exact fun x hx ↦ hx.trans_le enorm_toReal_le
60+
gcongr with x
61+
simp [comp_apply, enorm_eq_self]
6362

6463
lemma distribution_toReal_eq {f : α → ℝ≥0∞} (hf : ∀ᵐ x ∂μ, f x ≠ ∞) :
6564
distribution (ENNReal.toReal ∘ f) t μ = distribution f t μ := by
@@ -75,9 +74,7 @@ lemma distribution_add_le_of_enorm {A : ℝ≥0∞}
7574
({x | t < ‖g₁ x‖ₑ} ∪ {x | s < ‖g₂ x‖ₑ})) = 0 := by
7675
apply measure_mono_null ?_ h
7776
intro x
78-
simp only [mem_diff, mem_setOf_eq, mem_union, not_or, not_lt, mem_compl_iff, not_le, and_imp]
79-
refine fun h₁ h₂ h₃ ↦ lt_of_le_of_lt ?_ h₁
80-
gcongr
77+
simpa using fun h₁ h₂ h₃ ↦ lt_of_le_of_lt (by gcongr) h₁
8178
calc
8279
μ {x | A * (t + s) < ‖f x‖ₑ}
8380
≤ μ ({x | t < ‖g₁ x‖ₑ} ∪ {x | s < ‖g₂ x‖ₑ}) := measure_mono_ae' h₁
@@ -106,6 +103,7 @@ lemma tendsto_measure_iUnion_distribution (t₀ : ℝ≥0∞) :
106103
_ ≤ t₀ + (↑a)⁻¹ := by gcongr
107104
_ < _ := h₁
108105

106+
-- TODO: better lemma name!
109107
lemma select_neighborhood_distribution (t₀ : ℝ≥0∞) (l : ℝ≥0∞)
110108
(hu : l < distribution f t₀ μ) :
111109
∃ n : ℕ, l < distribution f (t₀ + (↑n)⁻¹) μ := by
@@ -152,8 +150,8 @@ lemma continuousWithinAt_distribution (t₀ : ℝ≥0∞) :
152150
exact ⟨zero_le 0, zero_le ε⟩
153151
-- Case: 0 < distribution f t₀ μ
154152
· obtain ⟨n, wn⟩ :=
155-
select_neighborhood_distribution t₀ _ (ENNReal.sub_lt_self db_not_top.ne_top
156-
(ne_of_lt db_not_zero).symm (ne_of_lt ε_gt_0).symm)
153+
select_neighborhood_distribution t₀ _
154+
(ENNReal.sub_lt_self db_not_top.ne_top db_not_zero.ne' ε_gt_0.ne')
157155
use Iio (t₀ + (↑n)⁻¹)
158156
constructor
159157
· exact Iio_mem_nhds (lt_add_right t₀nottop.ne_top (ENNReal.inv_ne_zero.mpr (by finiteness)))

Carleson/TwoSidedCarleson/Basic.lean

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,12 @@ lemma czOperator_welldefined {g : X → ℂ} (hg : BoundedFiniteSupport g) (hr :
110110
· exact mKxg.nullMeasurableSet_support
111111
obtain ⟨M, hM⟩ := bdd_Kxg
112112
apply integrableOn_of_integrableOn_inter_support measurableSet_ball.compl
113-
apply Measure.integrableOn_of_bounded
114-
· apply ne_top_of_le_ne_top
115-
· exact ne_of_lt hg.measure_support_lt
116-
· apply measure_mono
117-
trans support Kxg
118-
· exact inter_subset_right
119-
· exact support_mul_subset_right (K x) g
120-
· exact mKxg
121-
· exact hM
113+
apply Measure.integrableOn_of_bounded ?_ mKxg hM
114+
apply ne_top_of_le_ne_top (hg.measure_support_lt.ne)
115+
apply measure_mono
116+
trans support Kxg
117+
· exact inter_subset_right
118+
· exact support_mul_subset_right (K x) g
122119

123120
-- This could be adapted to state T_r is a linear operator but maybe it's not worth the effort
124121
lemma czOperator_sub {f g : X → ℂ} (hf : BoundedFiniteSupport f) (hg : BoundedFiniteSupport g) (hr : 0 < r) :

0 commit comments

Comments
 (0)