lemmaae_fderivWithin_scalar_eq_linear {t : Set (Euc k)}
(ht : MeasurableSet t) (hts : t ⊆C.domain)
{f : X→ℝ} {K : ℝ≥0} (hf : LipschitzWithK f) (ℓ : Euc k →L[ℝ] ℝ)
(heq : ∀ z ∈ t, C.scalar f z = ℓ z) :
∀ᵐ z ∂volume.restrict t, fderivWithin ℝ (C.scalar f) C.domain z = ℓ :=by
proof · 4
lines
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]
lemmaexists_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, LipschitzWithK (π 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
proof · 33
lines
classical
by_cases hne : t.Nonempty
· let:= hne.to_subtype
letφ : t →X:=fun z =>C.param ⟨z,hts z.property⟩
havehinj : Function.Injective φ :=by
obtain ⟨L,U,hL,hU⟩ :=C.bilipschitz
intro a b hab
apply Subtype.ext
exact congrArg (funz : C.domain => (z : Euc k)) (hU.injective hab)
letq : Fin k →X→ℝ:=fun i x => ℓ i ((Function.invFun φ x : t) : Euc k)
have hq (i : Fin k) : LipschitzOnWithK (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 usingfun 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,?_⟩
havehae : ∀ᵐ 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
· haveht0 : t = ∅ :=Set.not_nonempty_iff_eq_empty.mp hne
subst t
exact ⟨fun _ _ =>0,fun _ =>LipschitzWith.const' (0 : ℝ),by simp,by simp⟩