11import Carleson.ToMathlib.DoublingMeasure
22import Carleson.ToMathlib.WeakType
3+ import Carleson.ToMathlib.Data.ENNReal
34import Mathlib.Algebra.Order.Group.Int
45import Mathlib.Analysis.CStarAlgebra.Classes
56import Mathlib.Data.Int.Star
67
7- open MeasureTheory Measure NNReal Metric Complex Set TopologicalSpace Bornology Function
8- open scoped ENNReal
8+ open MeasureTheory Measure Metric Complex Set TopologicalSpace Bornology Function ENNReal
9+ open scoped NNReal
910noncomputable section
1011
1112-- todo: rename and protect `Real.RCLike`
@@ -173,11 +174,24 @@ class IsCancellative (τ : ℝ) [CompatibleFunctions ℝ X A] : Prop where
173174
174175export IsCancellative (norm_integral_exp_le)
175176
176- /-- The "volume function" `V`. Note that we will need to assume
177- `IsFiniteMeasureOnCompacts` and `ProperSpace` to actually know that this volume is finite. -/
178- def Real.vol {X : Type *} [PseudoMetricSpace X] [MeasureSpace X] (x y : X) : ℝ :=
177+ /-- The "volume function" `V`. Preferably use `vol` instead. -/
178+ protected def Real.vol {X : Type *} [PseudoMetricSpace X] [MeasureSpace X] (x y : X) : ℝ :=
179179 volume.real (ball x (dist x y))
180180
181+ /-- The "volume function" `V`. We will need to assume
182+ `IsFiniteMeasureOnCompacts` and `ProperSpace` to actually know that this volume is finite. -/
183+ def vol {X : Type *} [PseudoMetricSpace X] [MeasureSpace X] (x y : X) : ℝ≥0 ∞ :=
184+ volume (ball x (dist x y))
185+
186+ lemma Real.vol_def {X : Type *} [PseudoMetricSpace X] [MeasureSpace X] {x y : X} :
187+ Real.vol x y = (vol x y).toReal := rfl
188+
189+ lemma ofReal_vol {X : Type *} [PseudoMetricSpace X] [MeasureSpace X] [ProperSpace X]
190+ [IsFiniteMeasureOnCompacts (volume : Measure X)] {x y : X} :
191+ ENNReal.ofReal (Real.vol x y) = vol x y := by
192+ simp_rw [Real.vol_def, ENNReal.ofReal_toReal_eq_iff, vol]
193+ apply measure_ball_ne_top
194+
181195-- /-- In Mathlib we only have the operator norm for continuous linear maps,
182196-- and `T_*` is not linear.
183197-- Here is the norm for an arbitrary map `T` between normed spaces
@@ -245,22 +259,24 @@ lemma mul_defaultD_pow_pos (a : ℕ) {r : ℝ} (hr : 0 < r) (z : ℤ) : 0 < r *
245259section Kernel
246260
247261variable {X : Type *} {a : ℕ} {K : X → X → ℂ} [PseudoMetricSpace X] [MeasureSpace X]
248- open Real (vol)
249262open Function
250263
251264/-- The constant used twice in the definition of the Calderon-Zygmund kernel. -/
252- @[simp] def C_K (a : ℝ) : ℝ := 2 ^ a ^ 3
265+ @[simp] def C_K (a : ℝ) : ℝ≥ 0 := 2 ^ a ^ 3
253266
254- lemma C_K_pos (a : ℝ) : 0 < C_K a := by unfold C_K; positivity
267+ lemma C_K_pos {a : ℝ} : 0 < C_K a := NNReal.rpow_pos (by norm_num)
268+ lemma C_K_pos_real {a : ℝ} : 0 < (C_K a : ℝ) := C_K_pos
255269
256270/-- `K` is a one-sided Calderon-Zygmund kernel
257271In the formalization `K x y` is defined everywhere, even for `x = y`. The assumptions on `K` show
258- that `K x x = 0`. -/
272+ that `K x x = 0`.
273+
274+ Todo: maybe make enorm_K_le_vol_inv + enorm_K_sub_le + K_eq_zero_of_dist_eq_zero the axioms. -/
259275class IsOneSidedKernel (a : outParam ℕ) (K : X → X → ℂ) : Prop where
260276 measurable_K : Measurable (uncurry K)
261- norm_K_le_vol_inv (x y : X) : ‖K x y‖ ≤ C_K a / vol x y
277+ norm_K_le_vol_inv (x y : X) : ‖K x y‖ ≤ C_K a / Real. vol x y
262278 norm_K_sub_le {x y y' : X} (h : 2 * dist y y' ≤ dist x y) :
263- ‖K x y - K x y'‖ ≤ (dist y y' / dist x y) ^ (a : ℝ)⁻¹ * (C_K a / vol x y)
279+ ‖K x y - K x y'‖ ≤ (dist y y' / dist x y) ^ (a : ℝ)⁻¹ * (C_K a / Real. vol x y)
264280
265281export IsOneSidedKernel (measurable_K norm_K_le_vol_inv norm_K_sub_le)
266282
@@ -278,27 +294,47 @@ lemma measurable_K_left [IsOneSidedKernel a K] (y : X) : Measurable (K · y) :=
278294lemma measurable_K_right [IsOneSidedKernel a K] (x : X) : Measurable (K x) :=
279295 measurable_K.of_uncurry_left
280296
281- lemma integrableOn_K_Icc [IsOpenPosMeasure (volume : Measure X)] [ProperSpace X]
297+ lemma enorm_K_le_vol_inv [ProperSpace X] [IsFiniteMeasureOnCompacts (volume : Measure X)]
298+ [IsOneSidedKernel a K] (x y : X) : ‖K x y‖ₑ ≤ (C_K a : ℝ≥0 ∞) / vol x y := by
299+ rw [← ofReal_norm, ← ofReal_vol, ← ofReal_coe_nnreal]
300+ refine le_trans ?_ (ofReal_div_le measureReal_nonneg)
301+ gcongr
302+ apply norm_K_le_vol_inv
303+
304+
305+ lemma enorm_K_sub_le [ProperSpace X] [IsFiniteMeasureOnCompacts (volume : Measure X)]
306+ [IsOneSidedKernel a K] {x y y' : X} (h : 2 * dist y y' ≤ dist x y) :
307+ ‖K x y - K x y'‖ₑ ≤ (edist y y' / edist x y) ^ (a : ℝ)⁻¹ * (C_K a / vol x y) := by
308+ simp_rw [← ofReal_norm, ← ofReal_vol, ← ofReal_coe_nnreal, edist_dist]
309+ calc
310+ _ ≤ ENNReal.ofReal ((dist y y' / dist x y) ^ (a : ℝ)⁻¹ * (C_K a / Real.vol x y)) := by
311+ gcongr; apply norm_K_sub_le h
312+ _ ≤ _ := by
313+ rw [ENNReal.ofReal_mul']; swap
314+ · exact div_nonneg NNReal.zero_le_coe measureReal_nonneg
315+ gcongr
316+ · rw [← ENNReal.ofReal_rpow_of_nonneg (by positivity) (by positivity)]
317+ gcongr
318+ apply ofReal_div_le (by positivity)
319+ · exact ofReal_div_le measureReal_nonneg
320+
321+ lemma integrableOn_K_Icc [IsOpenPosMeasure (volume : Measure X)]
322+ [IsFiniteMeasureOnCompacts (volume : Measure X)] [ProperSpace X]
282323 [Regular (volume : Measure X)] [IsOneSidedKernel a K] {x : X} {r R : ℝ} (hr : r > 0 ) :
283324 IntegrableOn (K x) {y | dist x y ∈ Icc r R} volume := by
284325 use Measurable.aestronglyMeasurable (measurable_K_right x)
285326 rw [hasFiniteIntegral_def]
286327 calc ∫⁻ (y : X) in {y | dist x y ∈ Icc r R}, ‖K x y‖ₑ
287- _ ≤ ∫⁻ (y : X) in {y | dist x y ∈ Icc r R},
288- ENNReal.ofReal (C_K a / volume.real (ball x r)) := by
328+ _ ≤ ∫⁻ (y : X) in {y | dist x y ∈ Icc r R}, C_K a / volume (ball x r) := by
289329 refine setLIntegral_mono measurable_const (fun y hy ↦ ?_)
290- rw [← ofReal_norm]
291- refine ENNReal.ofReal_le_ofReal <| (norm_K_le_vol_inv x y).trans ?_
330+ refine (enorm_K_le_vol_inv x y).trans ?_
331+ rw [vol]
292332 gcongr
293- · exact (C_K_pos a).le
294- · rw [measureReal_def]
295- apply ENNReal.toReal_pos (ne_of_gt <| measure_ball_pos volume x hr)
296- exact measure_ball_ne_top x r
297- · exact measureReal_mono (ball_subset_ball hy.1 )
333+ exact hy.1
298334 _ < _ := by
299- rw [lintegral_const ]
300- apply ENNReal.mul_lt_top ENNReal.ofReal_lt_top
301- rw [Measure.restrict_apply MeasurableSet.univ, univ_inter ]
335+ rw [setLIntegral_const ]
336+ apply ENNReal.mul_lt_top ( ENNReal.div_lt_top ENNReal.coe_ne_top _); swap
337+ · simp_rw [← pos_iff_ne_zero, measure_ball_pos _ _ hr ]
302338 refine (Ne.lt_top fun h ↦ ?_)
303339 have : {y | dist x y ∈ Icc r R} ⊆ closedBall x R := by
304340 intro y ⟨_, hy⟩
@@ -310,7 +346,7 @@ In the formalization `K x y` is defined everywhere, even for `x = y`. The assump
310346that `K x x = 0`. -/
311347class IsTwoSidedKernel (a : outParam ℕ) (K : X → X → ℂ) extends IsOneSidedKernel a K where
312348 norm_K_sub_le' {x x' y : X} (h : 2 * dist x x' ≤ dist x y) :
313- ‖K x y - K x' y‖ ≤ (dist x x' / dist x y) ^ (a : ℝ)⁻¹ * (C_K a / vol x y)
349+ ‖K x y - K x' y‖ₑ ≤ (edist x x' / edist x y) ^ (a : ℝ)⁻¹ * (C_K a / vol x y)
314350
315351export IsTwoSidedKernel (norm_K_sub_le')
316352
@@ -364,7 +400,7 @@ lemma le_cdist_iterate {x : X} {r : ℝ} (hr : 0 ≤ r) (f g : Θ X) (k : ℕ) :
364400 | succ k ih =>
365401 trans 2 * dist_{x, (defaultA a) ^ k * r} f g
366402 · rw [pow_succ', mul_assoc]
367- exact (mul_le_mul_left zero_lt_two).mpr ih
403+ exact (_root_. mul_le_mul_left zero_lt_two).mpr ih
368404 · convert le_cdist (ball_subset_ball _) using 1
369405 · exact dist_congr rfl (by rw [← mul_assoc, pow_succ'])
370406 · nth_rw 1 [← one_mul ((defaultA a) ^ k * r)]; gcongr
0 commit comments