lemmacoarseUnion_integral {δ B : ℝ} (hδ : 0 < δ) (D : SetPlane)
(f : Plane→ℝ) (hf : IntegrableOn f (coarseUnion δ BD)) :
∫ x in coarseUnion δ BD, f x =
∑ z ∈ coarseIndices δ BD, ∫ x in coarseCell δ z, f x :=by
proof · 13
lines
classical
letS:= coarseIndices δ BDhaveheq : coarseUnion δ BD = ⋃ z : S, coarseCell δ z.1:=by
ext x
simp [coarseUnion, S]
rw [heq]
rw [integral_iUnion_ae
(funz : S=> (coarseCell_isCompact δ z.1).measurableSet.nullMeasurableSet)
(fun z w hne => coarseCell_aeDisjoint hδ (fun h => hne (Subtype.ext h)))]
· rw [tsum_fintype]
exact Finset.sum_coe_sort S (fun z =>∫ x in coarseCell δ z, f x)
· rw [← heq]
exact hf
lemmacoarseCell_integral_error {δ L : ℝ} {z : ℤ×ℤ} {b : Plane}
(hδ : 0≤ δ) (hL : 0≤L) (hb : b ∈ coarseCell δ z)
(f : Plane→ℝ) (hf : IntegrableOn f (coarseCell δ z))
(hLip : ∀ x ∈ coarseCell δ z, |f x - f b| ≤L * ‖x - b‖) :
|(∫ x in coarseCell δ z, f x) - δ ^ 2 * f b| ≤L * Real.sqrt 2 * δ ^ 3:=by
proof · 17
lines
have hc := coarseCell_isCompact δ z
havehconst : IntegrableOn (fun_ : Plane=> f b) (coarseCell δ z) :=
continuousOn_const.integrableOn_compact hc
haveheq : (∫ x in coarseCell δ z, f x) - δ ^ 2 * f b =
∫ x in coarseCell δ z, (f x - f b) :=by
rw [integral_sub hf hconst, integral_const]
simp only [smul_eq_mul, measureReal_def, Measure.restrict_apply_univ]
rw [← measureReal_def, coarseCell_volume hδ]
rw [heq, ←Real.norm_eq_abs]
calc
‖∫ x in coarseCell δ z, (f x - f b)‖ ≤
(L * (Real.sqrt 2 * δ)) * volume.real (coarseCell δ z) :=by
apply norm_setIntegral_le_of_norm_le_const hc.measure_lt_top
intro x hx
rw [Real.norm_eq_abs]
exact (hLip x hx).trans (mul_le_mul_of_nonneg_left (same_cell_distance hδ hx hb) hL)
_ = L * Real.sqrt 2 * δ ^ 3:=by rw [coarseCell_volume hδ]; ring
theoremcoarseUnion_integral_error {δ BL : ℝ} (D : SetPlane)
(hδ : 0 < δ) (hδ1 : δ ≤1) (hB : 0≤B) (hL : 0≤L)
(b : ℤ×ℤ→Plane) (hb : ∀ z ∈ coarseIndices δ BD, b z ∈ coarseCell δ z)
(f : Plane→ℝ) (hf : IntegrableOn f (coarseUnion δ BD))
(hLip : ∀ z ∈ coarseIndices δ BD, ∀ x ∈ coarseCell δ z,
|f x - f (b z)| ≤L * ‖x - b z‖) :
|(∫ x in coarseUnion δ BD, f x) -
∑ z ∈ coarseIndices δ BD, δ ^ 2 * f (b z)| ≤
(2 * B + 4) ^ 2 * L * Real.sqrt 2 * δ :=by
proof · 17
lines
classical
letS:= coarseIndices δ BDhave hcell (z : ℤ×ℤ) (hz : z ∈S) :
|(∫ x in coarseCell δ z, f x) - δ ^ 2 * f (b z)| ≤L * Real.sqrt 2 * δ ^ 3:=by
apply coarseCell_integral_error hδ.le hL (hb z hz) f
· apply hf.mono_set
exact subset_iUnion₂_of_subset z hz subset_rfl
· exact hLip z hz
rw [coarseUnion_integral hδ D f hf, ←Finset.sum_sub_distrib]
have hsum := (Finset.abs_sum_le_sum_abs
(fun z => (∫ x in coarseCell δ z, f x) - δ ^ 2 * f (b z)) S).trans
(Finset.sum_le_sum hcell)
have hcount := mul_le_mul_of_nonneg_right (coarse_count_bound D hδ hδ1 hB)
(show0≤L * Real.sqrt 2 * δ by positivity)
simp only [Finset.sum_const, nsmul_eq_mul] at hsum
dsimp [S] at hsum
nlinarith only [hsum, hcount]
theoremtagged_sum_le_domain_integral {δ BL : ℝ} {D : SetPlane}
(hδ : 0 < δ) (hδ1 : δ ≤1) (hB : 0≤B) (hL : 0≤L)
(hD : MeasurableSetD) (hbound : ∀ x ∈D, |x 0| ≤B∧ |x 1| ≤B)
(b : ℤ×ℤ→Plane) (hb : ∀ z ∈ coarseIndices δ BD, b z ∈ coarseCell δ z)
(f : Plane→ℝ) (hf : IntegrableOn f (coarseUnion δ BD))
(hf1 : ∀ x ∈ coarseUnion δ BD \ D, f x ≤1)
(hLip : ∀ z ∈ coarseIndices δ BD, ∀ x ∈ coarseCell δ z,
|f x - f (b z)| ≤L * ‖x - b z‖) :
(∑ z ∈ coarseIndices δ BD, δ ^ 2 * f (b z)) ≤
(∫ x inD, f x) + (2 * B + 4) ^ 2 * L * Real.sqrt 2 * δ +
volume.real (coarseUnion δ BD \ D) :=by
proof · 4
lines
have herror := coarseUnion_integral_error D hδ hδ1 hB hL b hb f hf hLip
have hupper := coarseUnion_integral_le hδ hD hbound f hf hf1
have herr := (abs_le.mp herror).1
linarith only [herr, hupper]
lemmacoarseCell_integral_error_of_oscillation {δ W : ℝ} {z : ℤ×ℤ} {b : Plane}
(hδ : 0≤ δ) (f : Plane→ℝ) (hf : IntegrableOn f (coarseCell δ z))
(hosc : ∀ x ∈ coarseCell δ z, |f x - f b| ≤W * δ) :
|(∫ x in coarseCell δ z, f x) - δ ^ 2 * f b| ≤W * δ ^ 3:=by
proof · 16
lines
have hc := coarseCell_isCompact δ z
havehconst : IntegrableOn (fun_ : Plane=> f b) (coarseCell δ z) :=
continuousOn_const.integrableOn_compact hc
haveheq : (∫ x in coarseCell δ z, f x) - δ ^ 2 * f b =
∫ x in coarseCell δ z, (f x - f b) :=by
rw [integral_sub hf hconst, integral_const]
simp only [smul_eq_mul, measureReal_def, Measure.restrict_apply_univ]
rw [← measureReal_def, coarseCell_volume hδ]
rw [heq, ←Real.norm_eq_abs]
calc
‖∫ x in coarseCell δ z, (f x - f b)‖ ≤
(W * δ) * volume.real (coarseCell δ z) :=by
apply norm_setIntegral_le_of_norm_le_const hc.measure_lt_top
intro x hx
simpa only [Real.norm_eq_abs] using hosc x hx
_ = W * δ ^ 3:=by rw [coarseCell_volume hδ]; ring
theoremcoarseUnion_integral_error_of_oscillation {δ BW : ℝ} (D : SetPlane)
(hδ : 0 < δ) (hδ1 : δ ≤1) (hB : 0≤B) (hW : 0≤W)
(b : ℤ×ℤ→Plane) (f : Plane→ℝ)
(hf : IntegrableOn f (coarseUnion δ BD))
(hosc : ∀ z ∈ coarseIndices δ BD, ∀ x ∈ coarseCell δ z,
|f x - f (b z)| ≤W * δ) :
|(∫ x in coarseUnion δ BD, f x) -
∑ z ∈ coarseIndices δ BD, δ ^ 2 * f (b z)| ≤ (2 * B + 4) ^ 2 * W * δ :=by
proof · 17
lines
classical
letS:= coarseIndices δ BDhave hcell (z : ℤ×ℤ) (hz : z ∈S) :
|(∫ x in coarseCell δ z, f x) - δ ^ 2 * f (b z)| ≤W * δ ^ 3:=by
apply coarseCell_integral_error_of_oscillation hδ.le f
· apply hf.mono_set
exact subset_iUnion₂_of_subset z hz subset_rfl
· exact hosc z hz
rw [coarseUnion_integral hδ D f hf, ←Finset.sum_sub_distrib]
have hsum := (Finset.abs_sum_le_sum_abs
(fun z => (∫ x in coarseCell δ z, f x) - δ ^ 2 * f (b z)) S).trans
(Finset.sum_le_sum hcell)
have hcount := mul_le_mul_of_nonneg_right (coarse_count_bound D hδ hδ1 hB)
(mul_nonneg hW hδ.le)
simp only [Finset.sum_const, nsmul_eq_mul] at hsum
dsimp [S] at hsum
nlinarith only [hsum, hcount]
theoremtagged_sum_le_domain_integral_of_oscillation {δ BW : ℝ} {D : SetPlane}
(hδ : 0 < δ) (hδ1 : δ ≤1) (hB : 0≤B) (hW : 0≤W)
(hD : MeasurableSetD) (hbound : ∀ x ∈D, |x 0| ≤B∧ |x 1| ≤B)
(b : ℤ×ℤ→Plane) (f : Plane→ℝ)
(hf : IntegrableOn f (coarseUnion δ BD))
(hf1 : ∀ x ∈ coarseUnion δ BD \ D, f x ≤1)
(hosc : ∀ z ∈ coarseIndices δ BD, ∀ x ∈ coarseCell δ z,
|f x - f (b z)| ≤W * δ) :
(∑ z ∈ coarseIndices δ BD, δ ^ 2 * f (b z)) ≤
(∫ x inD, f x) + (2 * B + 4) ^ 2 * W * δ +
volume.real (coarseUnion δ BD \ D) :=by
proof · 4
lines
have herror := coarseUnion_integral_error_of_oscillation D hδ hδ1 hB hW b f hf hosc
have hupper := coarseUnion_integral_le hδ hD hbound f hf hf1
have herr := (abs_le.mp herror).1
linarith only [herr, hupper]