math / data /lean /OAI /Analysis /Brenier /CutVariation.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
24.4 kB
import OAI.Analysis.Brenier.HalfspaceKernel
namespace OAI
noncomputable section
open MeasureTheory Filter
open scoped Topology
namespace Problem358
/-- Transport the moving-halfspace derivative through a measure-preserving
coordinate chart. The affine geometry enters only through the exact threshold
identity, while the derivative and all integration steps are proved here. -/
theorem hasDerivAt_integral_cut_difference_of_chart
{X V : Type*} [MeasurableSpace X] [MeasurableSpace V]
{μ : Measure X} [SFinite μ] {ρ : Measure V}
{chart : X Γ— ℝ β†’ V} (hchart : MeasurePreserving chart (ΞΌ.prod volume) ρ)
{f ell : ℝ β†’ V β†’ ℝ} {speed : ℝ β†’ X β†’ ℝ} {A B slope trace : X β†’ ℝ}
{s : Set ℝ} (hs : s ∈ nhds 0)
(hf : βˆ€ h, Measurable (f h)) (hell : βˆ€ h, Measurable (ell h))
(hspeed : βˆ€ h, Measurable (speed h))
(hlevel : βˆ€ h ∈ s, βˆ€ p : X Γ— ℝ,
0 ≀ ell h (chart p) ↔ -(h * speed h p.1) ≀ p.2)
(hspeedlim : βˆ€α΅ x βˆ‚ΞΌ, Tendsto (fun h => speed h x) (nhds 0) (nhds (slope x)))
(hlim : βˆ€α΅ x βˆ‚ΞΌ, βˆ€ u : ℝ,
Tendsto (fun h : ℝ => f h (chart (x, -(h * speed h x * u))))
(nhds 0) (nhds (trace x)))
(hspeedbound : βˆ€α΅ x βˆ‚ΞΌ, βˆ€ h ∈ s, |speed h x| ≀ A x)
(hbound : βˆ€α΅ x βˆ‚ΞΌ, βˆ€ h ∈ s, βˆ€ t : ℝ, β€–f h (chart (x, t))β€– ≀ B x)
(hdom : Integrable (fun x => A x * B x) ΞΌ)
(hInt : βˆ€αΆ  h in nhds 0, Integrable (f h) ρ) :
HasDerivAt (fun h : ℝ => ∫ v,
f h v * ((if 0 ≀ ell h v then (1 : ℝ) else 0) -
(if 0 ≀ ell 0 v then (1 : ℝ) else 0)) βˆ‚Ο)
(∫ x, slope x * trace x βˆ‚ΞΌ) 0 := by
let F : ℝ β†’ X β†’ ℝ β†’ ℝ := fun h => Function.curry (f h ∘ chart)
have hF : βˆ€ h, Measurable (Function.uncurry (F h)) := by
intro h
simpa only [F, Function.uncurry_curry] using (hf h).comp hchart.measurable
have hFI : βˆ€αΆ  h in nhds 0, Integrable (Function.uncurry (F h)) (ΞΌ.prod volume) := by
filter_upwards [hInt] with h hh
simpa only [F, Function.uncurry_curry] using hchart.integrable_comp_of_integrable hh
have hd := hasDerivAt_prod_integral_halfspace_difference_local
(f := F) hs hF hspeed hspeedlim hlim hspeedbound hbound hdom hFI
apply hd.congr_of_eventuallyEq
filter_upwards [hs] with h hh
have hraw : Measurable (fun v => f h v *
((if 0 ≀ ell h v then (1 : ℝ) else 0) -
(if 0 ≀ ell 0 v then (1 : ℝ) else 0))) :=
(hf h).mul ((Measurable.ite (measurableSet_le measurable_const (hell h))
measurable_const measurable_const).sub
(Measurable.ite (measurableSet_le measurable_const (hell 0))
measurable_const measurable_const))
rw [← hchart.map_eq, integral_map hchart.measurable.aemeasurable hraw.aestronglyMeasurable]
apply integral_congr_ae
exact Eventually.of_forall fun p => by
have hz := hlevel 0 (mem_of_mem_nhds hs) p
simp only [zero_mul, neg_zero] at hz
simp only [F, Function.curry, Function.comp_apply, hlevel h hh p, hz]
end Problem358
end
noncomputable section
open MeasureTheory Finset
open scoped BigOperators
namespace Problem358
namespace FiniteIntersectionVariation
/-- Exact finite telescoping formula, changing the factors one at a time. -/
theorem prod_range_sub_prod_range {R : Type*} [CommRing R]
(a b : β„• β†’ R) (n : β„•) :
(∏ i ∈ Finset.range n, a i) - (∏ i ∈ Finset.range n, b i) =
βˆ‘ i ∈ Finset.range n,
(a i - b i) * (∏ j ∈ Finset.range i, a j) *
∏ j ∈ Finset.Ico (i + 1) n, b j := by
induction n with
| zero => simp
| succ n ih =>
rw [Finset.sum_range_succ]
have hsum :
(βˆ‘ i ∈ Finset.range n,
(a i - b i) * (∏ j ∈ Finset.range i, a j) *
∏ j ∈ Finset.Ico (i + 1) (n + 1), b j) =
(βˆ‘ i ∈ Finset.range n,
(a i - b i) * (∏ j ∈ Finset.range i, a j) *
∏ j ∈ Finset.Ico (i + 1) n, b j) * b n := by
rw [Finset.sum_mul]
apply Finset.sum_congr rfl
intro i hi
rw [Finset.prod_Ico_succ_top (Nat.succ_le_of_lt (Finset.mem_range.mp hi))]
ring
rw [hsum, ← ih]
simp only [Finset.Ico_self, Finset.prod_empty, mul_one, Finset.prod_range_succ]
ring
/-- The indicator of a finite intersection factors into the individual indicators. -/
theorem indicator_finite_intersection {X : Type*} (A : β„• β†’ Set X) (n : β„•) (x : X) :
({x | βˆ€ i < n, x ∈ A i}.indicator (fun _ => (1 : ℝ))) x =
∏ i ∈ Finset.range n, (A i).indicator (fun _ => (1 : ℝ)) x := by
classical
by_cases hx : βˆ€ i < n, x ∈ A i
Β· rw [Set.indicator_of_mem (s := {x | βˆ€ i < n, x ∈ A i}) hx]
symm
apply Finset.prod_eq_one
intro i hi
exact Set.indicator_of_mem (hx i (Finset.mem_range.mp hi)) _
Β· rw [Set.indicator_of_notMem (s := {x | βˆ€ i < n, x ∈ A i}) hx]
push Not at hx
obtain ⟨i, hi, hix⟩ := hx
symm
apply Finset.prod_eq_zero (Finset.mem_range.mpr hi)
exact Set.indicator_of_notMem hix _
/-- Each term changes one cut; all other cuts appear only as bounded indicator factors. -/
theorem indicator_intersection_sub {X : Type*} (A B : β„• β†’ Set X) (n : β„•) (x : X) :
({x | βˆ€ i < n, x ∈ A i}.indicator (fun _ => (1 : ℝ))) x -
({x | βˆ€ i < n, x ∈ B i}.indicator (fun _ => (1 : ℝ))) x =
βˆ‘ i ∈ Finset.range n,
((A i).indicator (fun _ => (1 : ℝ)) x - (B i).indicator (fun _ => (1 : ℝ)) x) *
(∏ j ∈ Finset.range i, (A j).indicator (fun _ => (1 : ℝ)) x) *
∏ j ∈ Finset.Ico (i + 1) n, (B j).indicator (fun _ => (1 : ℝ)) x := by
rw [indicator_finite_intersection, indicator_finite_intersection]
exact prod_range_sub_prod_range _ _ n
/-- Signed contribution from changing one cut in the finite intersection. -/
def cutTerm {X : Type*} (A B : β„• β†’ Set X) (n i : β„•) (x : X) : ℝ :=
((A i).indicator (fun _ => (1 : ℝ)) x - (B i).indicator (fun _ => (1 : ℝ)) x) *
(∏ j ∈ Finset.range i, (A j).indicator (fun _ => (1 : ℝ)) x) *
∏ j ∈ Finset.Ico (i + 1) n, (B j).indicator (fun _ => (1 : ℝ)) x
lemma norm_indicator_one_le {X : Type*} (S : Set X) (x : X) :
β€–S.indicator (fun _ => (1 : ℝ)) xβ€– ≀ 1 := by
classical
by_cases hx : x ∈ S <;> simp [hx]
lemma norm_cutTerm_le {X : Type*} (A B : β„• β†’ Set X) (n i : β„•) (x : X) :
β€–cutTerm A B n i xβ€– ≀ 1 := by
classical
have hd : β€–(A i).indicator (fun _ => (1 : ℝ)) x -
(B i).indicator (fun _ => (1 : ℝ)) xβ€– ≀ 1 := by
by_cases ha : x ∈ A i <;> by_cases hb : x ∈ B i <;>
simp [ha, hb]
have hp (C : β„• β†’ Set X) (s : Finset β„•) :
β€–βˆ j ∈ s, (C j).indicator (fun _ => (1 : ℝ)) xβ€– ≀ 1 := by
rw [norm_prod]
exact Finset.prod_le_oneβ‚€ (fun _ _ => norm_nonneg _) (fun j _ => norm_indicator_one_le (C j) x)
unfold cutTerm
rw [norm_mul, norm_mul]
calc
_ ≀ (1 : ℝ) * 1 * 1 := by
gcongr
Β· exact hp A _
Β· exact hp B _
_ = 1 := by norm_num
variable {X : Type*} [MeasurableSpace X] {ΞΌ : Measure X}
lemma measurable_cutTerm (A B : β„• β†’ Set X) (n i : β„•)
(hA : βˆ€ j, MeasurableSet (A j)) (hB : βˆ€ j, MeasurableSet (B j)) :
Measurable (cutTerm A B n i) := by
have hAm (j : β„•) : Measurable ((A j).indicator (fun _ => (1 : ℝ))) :=
measurable_const.indicator (hA j)
have hBm (j : β„•) : Measurable ((B j).indicator (fun _ => (1 : ℝ))) :=
measurable_const.indicator (hB j)
exact ((hAm i).sub (hBm i)).mul
(Finset.measurable_prod _ (fun j _ => hAm j)) |>.mul
(Finset.measurable_prod _ (fun j _ => hBm j))
lemma integrable_cutTerm_mul (A B : β„• β†’ Set X) (n i : β„•)
(hA : βˆ€ j, MeasurableSet (A j)) (hB : βˆ€ j, MeasurableSet (B j))
{w : X β†’ ℝ} (hw : Integrable w ΞΌ) :
Integrable (fun x => cutTerm A B n i x * w x) ΞΌ := by
exact hw.bdd_mul (measurable_cutTerm A B n i hA hB).aestronglyMeasurable
(Filter.Eventually.of_forall fun x => norm_cutTerm_le A B n i x)
/-- Weighted integral form of finite-intersection telescoping. -/
theorem integral_indicator_intersection_sub (A B : β„• β†’ Set X) (n : β„•)
(hA : βˆ€ j, MeasurableSet (A j)) (hB : βˆ€ j, MeasurableSet (B j))
{w : X β†’ ℝ} (hw : Integrable w ΞΌ) :
(∫ x, (({x | βˆ€ i < n, x ∈ A i}.indicator (fun _ => (1 : ℝ))) x -
({x | βˆ€ i < n, x ∈ B i}.indicator (fun _ => (1 : ℝ))) x) * w x βˆ‚ΞΌ) =
βˆ‘ i ∈ Finset.range n, ∫ x, cutTerm A B n i x * w x βˆ‚ΞΌ := by
have heq (x : X) :
(({x | βˆ€ i < n, x ∈ A i}.indicator (fun _ => (1 : ℝ))) x -
({x | βˆ€ i < n, x ∈ B i}.indicator (fun _ => (1 : ℝ))) x) * w x =
βˆ‘ i ∈ Finset.range n, cutTerm A B n i x * w x := by
rw [indicator_intersection_sub, Finset.sum_mul]
rfl
simp_rw [heq]
exact integral_finsetSum _ (fun i _ => integrable_cutTerm_mul A B n i hA hB hw)
lemma measurableSet_finiteIntersection (A : β„• β†’ Set X) (n : β„•)
(hA : βˆ€ i, MeasurableSet (A i)) :
MeasurableSet {x | βˆ€ i < n, x ∈ A i} := by
have heq : {x | βˆ€ i < n, x ∈ A i} = β‹‚ i, β‹‚ (_ : i < n), A i := by
ext x
simp
rw [heq]
exact MeasurableSet.iInter fun i => MeasurableSet.iInter fun (_ : i < n) => hA i
/-- Difference of weighted intersection integrals is the sum of independent cut variations. -/
theorem integral_intersection_sub_integral_intersection (A B : β„• β†’ Set X) (n : β„•)
(hA : βˆ€ j, MeasurableSet (A j)) (hB : βˆ€ j, MeasurableSet (B j))
{w : X β†’ ℝ} (hw : Integrable w ΞΌ) :
(∫ x in {x | βˆ€ i < n, x ∈ A i}, w x βˆ‚ΞΌ) -
(∫ x in {x | βˆ€ i < n, x ∈ B i}, w x βˆ‚ΞΌ) =
βˆ‘ i ∈ Finset.range n, ∫ x, cutTerm A B n i x * w x βˆ‚ΞΌ := by
have hMA := measurableSet_finiteIntersection A n hA
have hMB := measurableSet_finiteIntersection B n hB
rw [← integral_indicator hMA, ← integral_indicator hMB,
← integral_sub (hw.indicator hMA) (hw.indicator hMB)]
calc
_ = ∫ x, (({x | βˆ€ i < n, x ∈ A i}.indicator (fun _ => (1 : ℝ))) x -
({x | βˆ€ i < n, x ∈ B i}.indicator (fun _ => (1 : ℝ))) x) * w x βˆ‚ΞΌ := by
apply integral_congr_ae
apply Filter.Eventually.of_forall
intro x
by_cases hax : x ∈ {x | βˆ€ i < n, x ∈ A i} <;>
by_cases hbx : x ∈ {x | βˆ€ i < n, x ∈ B i} <;>
simp [Set.indicator, hax, hbx]
_ = _ := integral_indicator_intersection_sub A B n hA hB hw
/-- Reassemble derivatives of signed single-cut contributions into the derivative of a cell integral. -/
theorem hasDerivAt_intersection_integral (A : ℝ β†’ β„• β†’ Set X) (n : β„•)
(hA : βˆ€ t i, MeasurableSet (A t i)) {w : X β†’ ℝ} (hw : Integrable w ΞΌ)
(d : β„• β†’ ℝ)
(hd : βˆ€ i < n, HasDerivAt
(fun t : ℝ => ∫ x, cutTerm (A t) (A 0) n i x * w x βˆ‚ΞΌ) (d i) 0) :
HasDerivAt (fun t : ℝ => ∫ x in {x | βˆ€ i < n, x ∈ A t i}, w x βˆ‚ΞΌ)
(βˆ‘ i ∈ Finset.range n, d i) 0 := by
have hs : HasDerivAt
(fun t : ℝ => βˆ‘ i ∈ Finset.range n, ∫ x, cutTerm (A t) (A 0) n i x * w x βˆ‚ΞΌ)
(βˆ‘ i ∈ Finset.range n, d i) 0 :=
HasDerivAt.fun_sum (fun i hi => hd i (Finset.mem_range.mp hi))
have hs' := hs.const_add (∫ x in {x | βˆ€ i < n, x ∈ A 0 i}, w x βˆ‚ΞΌ)
apply hs'.congr_of_eventuallyEq
apply Filter.Eventually.of_forall
intro t
have heq := integral_intersection_sub_integral_intersection
(A t) (A 0) n (hA t) (hA 0) hw
dsimp
linarith
variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V]
lemma integrable_cutTerm_smul (A B : β„• β†’ Set X) (n i : β„•)
(hA : βˆ€ j, MeasurableSet (A j)) (hB : βˆ€ j, MeasurableSet (B j))
{w : X β†’ V} (hw : Integrable w ΞΌ) :
Integrable (fun x => cutTerm A B n i x β€’ w x) ΞΌ := by
exact hw.bdd_smul 1 (measurable_cutTerm A B n i hA hB).aestronglyMeasurable
(Filter.Eventually.of_forall fun x => norm_cutTerm_le A B n i x)
/-- Vector-valued version, in particular applicable to unnormalized cell moments. -/
theorem integral_intersection_sub_integral_intersection_vector
(A B : β„• β†’ Set X) (n : β„•)
(hA : βˆ€ j, MeasurableSet (A j)) (hB : βˆ€ j, MeasurableSet (B j))
{w : X β†’ V} (hw : Integrable w ΞΌ) :
(∫ x in {x | βˆ€ i < n, x ∈ A i}, w x βˆ‚ΞΌ) -
(∫ x in {x | βˆ€ i < n, x ∈ B i}, w x βˆ‚ΞΌ) =
βˆ‘ i ∈ Finset.range n, ∫ x, cutTerm A B n i x β€’ w x βˆ‚ΞΌ := by
have hMA := measurableSet_finiteIntersection A n hA
have hMB := measurableSet_finiteIntersection B n hB
rw [← integral_indicator hMA, ← integral_indicator hMB,
← integral_sub (hw.indicator hMA) (hw.indicator hMB)]
calc
_ = ∫ x, βˆ‘ i ∈ Finset.range n, cutTerm A B n i x β€’ w x βˆ‚ΞΌ := by
apply integral_congr_ae
apply Filter.Eventually.of_forall
intro x
have heq : {x | βˆ€ i < n, x ∈ A i}.indicator w x -
{x | βˆ€ i < n, x ∈ B i}.indicator w x =
(({x | βˆ€ i < n, x ∈ A i}.indicator (fun _ => (1 : ℝ))) x -
({x | βˆ€ i < n, x ∈ B i}.indicator (fun _ => (1 : ℝ))) x) β€’ w x := by
by_cases hax : x ∈ {x | βˆ€ i < n, x ∈ A i} <;>
by_cases hbx : x ∈ {x | βˆ€ i < n, x ∈ B i} <;>
simp [Set.indicator, hax, hbx]
dsimp only
rw [heq, indicator_intersection_sub, Finset.sum_smul]
rfl
_ = _ := integral_finsetSum _ (fun i _ => integrable_cutTerm_smul A B n i hA hB hw)
/-- Reassemble single-cut derivatives for vector-valued integrals, including cell moments. -/
theorem hasDerivAt_intersection_integral_vector (A : ℝ β†’ β„• β†’ Set X) (n : β„•)
(hA : βˆ€ t i, MeasurableSet (A t i)) {w : X β†’ V} (hw : Integrable w ΞΌ)
(d : β„• β†’ V)
(hd : βˆ€ i < n, HasDerivAt
(fun t : ℝ => ∫ x, cutTerm (A t) (A 0) n i x β€’ w x βˆ‚ΞΌ) (d i) 0) :
HasDerivAt (fun t : ℝ => ∫ x in {x | βˆ€ i < n, x ∈ A t i}, w x βˆ‚ΞΌ)
(βˆ‘ i ∈ Finset.range n, d i) 0 := by
have hs : HasDerivAt
(fun t : ℝ => βˆ‘ i ∈ Finset.range n, ∫ x, cutTerm (A t) (A 0) n i x β€’ w x βˆ‚ΞΌ)
(βˆ‘ i ∈ Finset.range n, d i) 0 :=
HasDerivAt.fun_sum (fun i hi => hd i (Finset.mem_range.mp hi))
have hs' := hs.const_add (∫ x in {x | βˆ€ i < n, x ∈ A 0 i}, w x βˆ‚ΞΌ)
apply hs'.congr_of_eventuallyEq
apply Filter.Eventually.of_forall
intro t
have heq := integral_intersection_sub_integral_intersection_vector
(A t) (A 0) n (hA t) (hA 0) hw
dsimp
exact (sub_eq_iff_eq_add.mp heq).trans (add_comm _ _)
end FiniteIntersectionVariation
end Problem358
end
noncomputable section
open MeasureTheory Set
open scoped BigOperators NNReal
namespace Problem358
/-- Changing membership in a finite intersection requires changing membership
in at least one cut. This weighted pointwise form also applies to signed moments. -/
theorem norm_indicator_iInter_sub_le_sum
{ΞΉ X F : Type*} [Fintype ΞΉ] [NormedAddCommGroup F]
(A B : ΞΉ β†’ Set X) (f : X β†’ F) (x : X) :
β€–(β‹‚ i, A i).indicator f x - (β‹‚ i, B i).indicator f xβ€– ≀
βˆ‘ i, β€–(A i).indicator f x - (B i).indicator f xβ€– := by
classical
by_cases hA : βˆ€ i, x ∈ A i
Β· by_cases hB : βˆ€ i, x ∈ B i
Β· simp only [indicator_of_mem (mem_iInter.mpr hA),
indicator_of_mem (mem_iInter.mpr hB), sub_self, norm_zero]
exact Finset.sum_nonneg (fun i _ => norm_nonneg _)
· obtain ⟨i, hi⟩ := not_forall.mp hB
have hB' : x βˆ‰ β‹‚ j, B j := by simpa only [mem_iInter] using hB
rw [indicator_of_mem (mem_iInter.mpr hA), indicator_of_notMem hB', sub_zero]
have hsum := Finset.single_le_sum
(fun j (_ : j ∈ (Finset.univ : Finset ι)) =>
norm_nonneg ((A j).indicator f x - (B j).indicator f x)) (Finset.mem_univ i)
simpa only [indicator_of_mem (hA i), indicator_of_notMem hi, sub_zero] using hsum
Β· have hA' : x βˆ‰ β‹‚ j, A j := by simpa only [mem_iInter] using hA
by_cases hB : βˆ€ i, x ∈ B i
· obtain ⟨i, hi⟩ := not_forall.mp hA
rw [indicator_of_notMem hA', indicator_of_mem (mem_iInter.mpr hB),
zero_sub, norm_neg]
have hsum := Finset.single_le_sum
(fun j (_ : j ∈ (Finset.univ : Finset ι)) =>
norm_nonneg ((A j).indicator f x - (B j).indicator f x)) (Finset.mem_univ i)
simpa only [indicator_of_notMem hi, indicator_of_mem (hB i),
zero_sub, norm_neg] using hsum
Β· have hB' : x βˆ‰ β‹‚ j, B j := by simpa only [mem_iInter] using hB
simp only [indicator_of_notMem hA', indicator_of_notMem hB', sub_self, norm_zero]
exact Finset.sum_nonneg (fun i _ => norm_nonneg _)
/-- The total variation of a finite-cut weighted integral is bounded by the
sum of the individual weighted cut variations. -/
theorem norm_integral_iInter_sub_le_sum
{ΞΉ X : Type*} [Fintype ΞΉ] [MeasurableSpace X] {ΞΌ : Measure X}
{A B : ΞΉ β†’ Set X} {f : X β†’ ℝ}
(hA : βˆ€ i, MeasurableSet (A i)) (hB : βˆ€ i, MeasurableSet (B i))
(hf : Integrable f ΞΌ) :
β€–(∫ x in β‹‚ i, A i, f x βˆ‚ΞΌ) - (∫ x in β‹‚ i, B i, f x βˆ‚ΞΌ)β€– ≀
βˆ‘ i, ∫ x, β€–(A i).indicator f x - (B i).indicator f xβ€– βˆ‚ΞΌ := by
classical
have hiA := MeasurableSet.iInter hA
have hiB := MeasurableSet.iInter hB
rw [← integral_indicator hiA, ← integral_indicator hiB,
← integral_sub (hf.indicator hiA) (hf.indicator hiB)]
have hint (i : ΞΉ) : Integrable (fun x =>
β€–(A i).indicator f x - (B i).indicator f xβ€–) ΞΌ :=
((hf.indicator (hA i)).sub (hf.indicator (hB i))).norm
calc
β€–βˆ« x, (β‹‚ i, A i).indicator f x - (β‹‚ i, B i).indicator f x βˆ‚ΞΌβ€– ≀
∫ x, βˆ‘ i, β€–(A i).indicator f x - (B i).indicator f xβ€– βˆ‚ΞΌ := by
apply norm_integral_le_of_norm_le
(integrable_finsetSum Finset.univ (fun i _ => hint i))
exact Filter.Eventually.of_forall (norm_indicator_iInter_sub_le_sum A B f)
_ = βˆ‘ i, ∫ x, β€–(A i).indicator f x - (B i).indicator f xβ€– βˆ‚ΞΌ := by
exact integral_finsetSum _ (fun i _ => hint i)
/-- Finite intersections preserve quantitative Lipschitz control when each cut
is controlled in weighted `LΒΉ`. No differentiation or nonnegative density premise
is assumed, so both cell mass and cell moments fit this interface. -/
theorem lipschitzOnWith_integral_iInter_of_cutL1
{ΞΉ X A : Type*} [Fintype ΞΉ] [MeasurableSpace X] [PseudoMetricSpace A]
{ΞΌ : Measure X} {S : Set A} {cuts : A β†’ ΞΉ β†’ Set X} {f : X β†’ ℝ}
(C : ΞΉ β†’ ℝβ‰₯0) (hf : Integrable f ΞΌ)
(hcuts : βˆ€ a ∈ S, βˆ€ i, MeasurableSet (cuts a i))
(hcut : βˆ€ a ∈ S, βˆ€ b ∈ S, βˆ€ i,
(∫ x, β€–(cuts a i).indicator f x - (cuts b i).indicator f xβ€– βˆ‚ΞΌ) ≀
C i * dist a b) :
LipschitzOnWith (βˆ‘ i, C i)
(fun a => ∫ x in β‹‚ i, cuts a i, f x βˆ‚ΞΌ) S := by
apply LipschitzOnWith.of_dist_le_mul
intro a ha b hb
rw [dist_eq_norm]
calc
β€–(∫ x in β‹‚ i, cuts a i, f x βˆ‚ΞΌ) - (∫ x in β‹‚ i, cuts b i, f x βˆ‚ΞΌ)β€– ≀
βˆ‘ i, ∫ x, β€–(cuts a i).indicator f x - (cuts b i).indicator f xβ€– βˆ‚ΞΌ :=
norm_integral_iInter_sub_le_sum (hcuts a ha) (hcuts b hb) hf
_ ≀ βˆ‘ i, (C i : ℝ) * dist a b := Finset.sum_le_sum (fun i _ => hcut a ha b hb i)
_ = (βˆ‘ i, C i : ℝβ‰₯0) * dist a b := by simp only [NNReal.coe_sum, Finset.sum_mul]
end Problem358
end
noncomputable section
open MeasureTheory Filter
open scoped BigOperators Topology
namespace Problem358
namespace FiniteCellVariation
/-- The unchanged factors in the one-cut-at-a-time expansion of a cell. -/
def remainingIndicator {V : Type*} (ell : ℝ β†’ β„• β†’ V β†’ ℝ)
(n i : β„•) (h : ℝ) (v : V) : ℝ :=
(∏ j ∈ Finset.range i, if 0 ≀ ell h j v then (1 : ℝ) else 0) *
∏ j ∈ Finset.Ico (i + 1) n, if 0 ≀ ell 0 j v then (1 : ℝ) else 0
lemma norm_remainingIndicator_le {V : Type*} (ell : ℝ β†’ β„• β†’ V β†’ ℝ)
(n i : β„•) (h : ℝ) (v : V) : β€–remainingIndicator ell n i h vβ€– ≀ 1 := by
have hp (t : ℝ) (s : Finset β„•) :
β€–βˆ j ∈ s, if 0 ≀ ell t j v then (1 : ℝ) else 0β€– ≀ 1 := by
rw [norm_prod]
apply Finset.prod_le_oneβ‚€ (fun _ _ => norm_nonneg _)
intro j _
split_ifs <;> norm_num
unfold remainingIndicator
rw [norm_mul]
calc
_ ≀ (1 : ℝ) * 1 := by gcongr <;> exact hp _ _
_ = 1 := mul_one _
lemma measurable_remainingIndicator {V : Type*} [MeasurableSpace V]
(ell : ℝ β†’ β„• β†’ V β†’ ℝ) (hell : βˆ€ h i, Measurable (ell h i))
(n i : β„•) (h : ℝ) : Measurable (remainingIndicator ell n i h) := by
have hm (t : ℝ) (j : β„•) :
Measurable (fun v => if 0 ≀ ell t j v then (1 : ℝ) else 0) :=
Measurable.ite (measurableSet_le measurable_const (hell t j))
measurable_const measurable_const
exact (Finset.measurable_prod _ (fun j _ => hm h j)).mul
(Finset.measurable_prod _ (fun j _ => hm 0 j))
lemma integrable_remainingIndicator_mul {V : Type*} [MeasurableSpace V]
{ρ : Measure V} (ell : ℝ β†’ β„• β†’ V β†’ ℝ)
(hell : βˆ€ h i, Measurable (ell h i)) (n i : β„•) (h : ℝ)
{w : V β†’ ℝ} (hw : Integrable w ρ) :
Integrable (fun v => remainingIndicator ell n i h v * w v) ρ := by
exact hw.bdd_mul (measurable_remainingIndicator ell hell n i h).aestronglyMeasurable
(Eventually.of_forall fun v => norm_remainingIndicator_le ell n i h v)
/-- Scalar weighted cell differentiation assembled from measure-preserving face
charts. All ambient integrability and finite-intersection algebra are discharged
here; the remaining hypotheses are exclusively the local geometry, trace, and
domination data of the individual faces. The chart spaces may depend on the face. -/
theorem hasDerivAt_cell_integral_of_face_charts
{V : Type*} [MeasurableSpace V] {ρ : Measure V}
{X : β„• β†’ Type*} [βˆ€ i, MeasurableSpace (X i)]
{ΞΌ : βˆ€ i, Measure (X i)} [βˆ€ i, SFinite (ΞΌ i)]
(ell : ℝ β†’ β„• β†’ V β†’ ℝ) (n : β„•)
(hell : βˆ€ h i, Measurable (ell h i))
{w : V β†’ ℝ} (hwM : Measurable w) (hw : Integrable w ρ)
(chart : βˆ€ i, X i Γ— ℝ β†’ V)
(hchart : βˆ€ i < n, MeasurePreserving (chart i) ((ΞΌ i).prod volume) ρ)
(speed : βˆ€ i, ℝ β†’ X i β†’ ℝ)
(A B slope trace : βˆ€ i, X i β†’ ℝ) (s : β„• β†’ Set ℝ)
(hs : βˆ€ i < n, s i ∈ nhds 0)
(hspeed : βˆ€ i < n, βˆ€ h, Measurable (speed i h))
(hlevel : βˆ€ i < n, βˆ€ h ∈ s i, βˆ€ p : X i Γ— ℝ,
0 ≀ ell h i (chart i p) ↔ -(h * speed i h p.1) ≀ p.2)
(hspeedlim : βˆ€ i < n, βˆ€α΅ x βˆ‚ΞΌ i,
Tendsto (fun h => speed i h x) (nhds 0) (nhds (slope i x)))
(hlim : βˆ€ i < n, βˆ€α΅ x βˆ‚ΞΌ i, βˆ€ u : ℝ,
Tendsto (fun h : ℝ =>
remainingIndicator ell n i h (chart i (x, -(h * speed i h x * u))) *
w (chart i (x, -(h * speed i h x * u))))
(nhds 0) (nhds (trace i x)))
(hspeedbound : βˆ€ i < n, βˆ€α΅ x βˆ‚ΞΌ i, βˆ€ h ∈ s i, |speed i h x| ≀ A i x)
(hbound : βˆ€ i < n, βˆ€α΅ x βˆ‚ΞΌ i, βˆ€ h ∈ s i, βˆ€ t : ℝ,
β€–remainingIndicator ell n i h (chart i (x, t)) * w (chart i (x, t))β€– ≀ B i x)
(hdom : βˆ€ i < n, Integrable (fun x => A i x * B i x) (ΞΌ i)) :
HasDerivAt
(fun h : ℝ => ∫ v in {v | βˆ€ i < n, 0 ≀ ell h i v}, w v βˆ‚Ο)
(βˆ‘ i ∈ Finset.range n, ∫ x, slope i x * trace i x βˆ‚ΞΌ i) 0 := by
let cuts : ℝ β†’ β„• β†’ Set V := fun h i => {v | 0 ≀ ell h i v}
have hcuts : βˆ€ h i, MeasurableSet (cuts h i) :=
fun h i => measurableSet_le measurable_const (hell h i)
apply FiniteIntersectionVariation.hasDerivAt_intersection_integral cuts n hcuts hw
(fun i => ∫ x, slope i x * trace i x βˆ‚ΞΌ i)
intro i hi
have hd := hasDerivAt_integral_cut_difference_of_chart (hchart i hi) (hs i hi)
(fun h => (measurable_remainingIndicator ell hell n i h).mul hwM)
(fun h => hell h i) (hspeed i hi) (hlevel i hi) (hspeedlim i hi)
(hlim i hi) (hspeedbound i hi) (hbound i hi) (hdom i hi)
(Eventually.of_forall fun h => integrable_remainingIndicator_mul ell hell n i h hw)
apply hd.congr_of_eventuallyEq
apply Eventually.of_forall
intro h
apply integral_congr_ae
apply Eventually.of_forall
intro v
simp only [Pi.mul_apply, FiniteIntersectionVariation.cutTerm, remainingIndicator, cuts,
Set.indicator_apply, Set.mem_ofPred_eq]
ring
end FiniteCellVariation
end Problem358
end
end OAI