math / data /lean /OAI /Geometry /IntegralFillings /Charts /Extensions.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
6.06 kB
import Mathlib
import OAI.Geometry.IntegralFillings.Charts.Differentiability
import OAI.Geometry.IntegralFillings.Charts.Jacobian
namespace OAI
section
open Set Filter MeasureTheory
open scoped Topology ENNReal NNReal
open MeasureTheory Filter Set Metric
open scoped Topology Pointwise NNReal
namespace SharpIntegralFillings
namespace IntegerChart
variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X] [Nonempty X]
{k : β„•} (C : IntegerChart X k)
noncomputable def paramExtended : Euc k β†’ X :=
by classical exact fun z => if hz : z ∈ C.domain then C.param ⟨z,hz⟩ else Classical.arbitrary X
lemma measurable_paramExtended : Measurable C.paramExtended := by
classical
obtain ⟨L,U,hL,_⟩ := C.bilipschitz
exact hL.continuous.measurable.dite measurable_const C.borel
omit [MeasurableSpace X] [BorelSpace X] in
lemma scalar_ae_paramExtended (b : X β†’ ℝ) :
C.scalar b =ᡐ[volume.restrict C.domain] b ∘ C.paramExtended := by
filter_upwards [ae_restrict_mem C.borel] with z hz
simp only [scalar,paramExtended,Function.comp_apply,dite_eq_left hz]
variable [CompactSpace X]
omit [Nonempty X] in
lemma measurableEmbedding_param : MeasurableEmbedding C.param := by
let := C.borel.standardBorel
obtain ⟨L,U,hL,hU⟩ := C.bilipschitz
exact hL.continuous.measurable.measurableEmbedding hU.injective
omit [MeasurableSpace X] [BorelSpace X] [Nonempty X] [CompactSpace X] in
lemma integrable_weighted_jacobian {Ο€ : Fin k β†’ X β†’ ℝ}
(hΟ€ : βˆ€ i, βˆƒ K : ℝβ‰₯0, LipschitzWith K (Ο€ i)) :
Integrable (fun z => (C.multiplicity z : ℝ)*C.jacobian Ο€ z)
(volume.restrict C.domain) := by
obtain ⟨B,hB⟩ := C.exists_jacobian_bound hΟ€
exact C.integrable.mul_bdd (C.jacobian_aestronglyMeasurable hΟ€) hB
lemma weighted_jacobian_le_measure
(hC : IsMetricCurrent C.action) {Ξ½ : Measure X} [IsFiniteMeasure Ξ½]
(hΞ½ : Controls C.action Ξ½) (Ο€ : Fin k β†’ X β†’ ℝ) (K : Fin k β†’ ℝβ‰₯0)
(hK : βˆ€ i, LipschitzWith (K i) (Ο€ i)) :
densityPush (volume.restrict C.domain) C.paramExtended
(fun z => |(C.multiplicity z : ℝ)*C.jacobian Ο€ z|) ≀ (∏ i, K i) β€’ Ξ½ := by
have he : MeasurableEmbedding (fun z : C.domain => C.paramExtended (z : Euc k)) := by
convert C.measurableEmbedding_param using 1
funext z
simp [paramExtended,z.property]
apply signed_chart_control_dominates_on (volume.restrict C.domain) ((∏ i,K i) β€’ Ξ½)
C.measurable_paramExtended (ae_restrict_mem C.borel) he
(C.integrable_weighted_jacobian (fun i => ⟨K i,hK i⟩))
intro b hb
have heq : (∫ z, (C.multiplicity z : ℝ)*C.jacobian Ο€ z*b (C.paramExtended z)
βˆ‚volume.restrict C.domain) = C.action b Ο€ := by
rw [action,ite_eq_left ⟨hb,fun i => ⟨K i,hK i⟩⟩]
apply integral_congr_ae
filter_upwards [C.scalar_ae_paramExtended b] with z hz
dsimp only [Function.comp_apply] at hz
rw [hz]
ring
rw [heq,integral_smul_nnreal_measure]
simpa only [NNReal.smul_def,NNReal.coe_prod,smul_eq_mul] using hC.mass_bound hΞ½ hb K hK
end IntegerChart
end SharpIntegralFillings
namespace SharpIntegralFillings
namespace IntegerChart
variable {X : Type*} [MetricSpace X] {k : β„•} (C : IntegerChart X k)
lemma ae_fderivWithin_scalar_eq_linear {t : Set (Euc k)}
(ht : MeasurableSet t) (hts : t βŠ† C.domain)
{f : X β†’ ℝ} {K : ℝβ‰₯0} (hf : LipschitzWith K f) (β„“ : Euc k β†’L[ℝ] ℝ)
(heq : βˆ€ z ∈ t, C.scalar f z = β„“ z) :
βˆ€α΅ z βˆ‚volume.restrict t, fderivWithin ℝ (C.scalar f) C.domain z = β„“ := by
have hd := (C.ae_differentiableWithinAt_scalar hf).filter_mono
(ae_mono (Measure.restrict_mono hts le_rfl))
filter_upwards [hd,ae_uniqueDiffWithinAt volume t,ae_restrict_mem ht] with z hz hu hzt
rw [←fderivWithin_subset hts hu hz,fderivWithin_congr' heq hzt,β„“.fderivWithin hu]
lemma exists_inverse_coordinate_tests {t : Set (Euc k)}
(ht : MeasurableSet t) (hts : t βŠ† C.domain)
(β„“ : Fin k β†’ Euc k β†’L[ℝ] ℝ) (K : ℝβ‰₯0)
(hrow : βˆ€ i y (hy : y ∈ t) z (hz : z ∈ t),
|β„“ i y - β„“ i z| ≀ (K : ℝ)*dist (C.param ⟨y,hts hy⟩) (C.param ⟨z,hts hz⟩)) :
βˆƒ Ο€ : Fin k β†’ X β†’ ℝ, (βˆ€ i, LipschitzWith K (Ο€ i)) ∧
(βˆ€ i, βˆ€ z ∈ t, C.scalar (Ο€ i) z = β„“ i z) ∧
βˆ€α΅ z βˆ‚volume.restrict t,
C.jacobian Ο€ z = (Matrix.of fun i j => β„“ i (EuclideanSpace.single j 1)).det := by
classical
by_cases hne : t.Nonempty
Β· let := hne.to_subtype
let Ο† : t β†’ X := fun z => C.param ⟨z,hts z.property⟩
have hinj : Function.Injective Ο† := by
obtain ⟨L,U,hL,hU⟩ := C.bilipschitz
intro a b hab
apply Subtype.ext
exact congrArg (fun z : C.domain => (z : Euc k)) (hU.injective hab)
let q : Fin k β†’ X β†’ ℝ := fun i x => β„“ i ((Function.invFun Ο† x : t) : Euc k)
have hq (i : Fin k) : LipschitzOnWith K (q i) (Set.range Ο†) := by
apply lipschitzOnWith_iff_dist_le_mul.mpr
rintro _ ⟨a,rfl⟩ _ ⟨b,rfl⟩
simpa only [q,Function.leftInverse_invFun hinj a,
Function.leftInverse_invFun hinj b,Real.dist_eq] using
hrow i a a.property b b.property
choose Ο€ hΟ€ heq using fun i => (hq i).extend_real
have hagree (i : Fin k) (z : Euc k) (hz : z ∈ t) : C.scalar (Ο€ i) z = β„“ i z := by
rw [C.scalar_eq (hts hz)]
change Ο€ i (Ο† ⟨z,hz⟩) = _
rw [←heq i (Set.mem_range_self (⟨z,hz⟩ : t))]
dsimp only [q]
rw [Function.leftInverse_invFun hinj]
refine βŸ¨Ο€,hΟ€,hagree,?_⟩
have hae : βˆ€α΅ z βˆ‚volume.restrict t, βˆ€ i,
fderivWithin ℝ (C.scalar (Ο€ i)) C.domain z = β„“ i :=
ae_all_iff.mpr fun i => C.ae_fderivWithin_scalar_eq_linear ht hts (hΟ€ i) (β„“ i) (hagree i)
filter_upwards [hae] with z hz
simp only [jacobian,hz]
rfl
Β· have ht0 : t = βˆ… := Set.not_nonempty_iff_eq_empty.mp hne
subst t
exact ⟨fun _ _ => 0,fun _ => LipschitzWith.const' (0 : ℝ),by simp,by simp⟩
end IntegerChart
end SharpIntegralFillings
end
end OAI