lemmareal_section_strictMono {g : E×ℝ→ℝ} (hg : Differentiableℝ g)
{p : E} {a b : ℝ} (hd : ∀ z∈Icc a b, 0<wallDerivative g (p,z)) :
StrictMonoOn (fun z => g (p,z)) (Icc a b) :=by
proof · 6
lines
apply strictMonoOn_of_deriv_pos (convex_Icc a b)
((hg.continuous.comp (continuous_const.prodMk continuous_id)).continuousOn)
intro z hz
change 0<deriv (fun t => g (p,t)) z
rw [(real_section_hasDeriv hg p z).deriv]
exact hd z (interior_subset hz)
theoremexists_smooth_simple_wall {g : E×ℝ→ℝ}
(hg : ContDiffℝ (↑(⊤ : ℕ∞)) g) {U : SetE} (hU : IsOpenU)
{a b : ℝ} (hab : a<b)
(hleft : ∀ p∈U, g (p,a)<0) (hright : ∀ p∈U, 0<g (p,b))
(hder : ∀ p∈U, ∀ z∈Icc a b, 0<wallDerivative g (p,z)) :
∃ρ : E→ℝ, ContDiffOnℝ (↑(⊤ : ℕ∞)) ρ U∧
(∀ p∈U, ρ p∈Ioo a b ∧ g (p,ρ p)=0) ∧∀ p∈U, ∀ z∈Icc a b, g (p,z)=0→ z=ρ p :=by
proof · 36
lines
classical
have hd := hg.differentiable (by simp)
have he (p : E) (hp : p∈U) : ∃ z∈Ioo a b, g (p,z)=0:=by
obtain ⟨z,hz,hgz⟩ := intermediate_value_Icc hab.le
((hg.continuous.comp (continuous_const.prodMk continuous_id)).continuousOn (s :=Icc a b))
(show (0:ℝ)∈Icc (g (p,a)) (g (p,b)) from ⟨(hleft p hp).le,(hright p hp).le⟩)
change g (p,z)=0 at hgz
refine ⟨z,⟨lt_of_le_of_ne hz.1 ?_,lt_of_le_of_ne hz.2 ?_⟩,hgz⟩
· intro h; subst z; linarith [hleft p hp]
· intro h; subst z; linarith [hright p hp]
choose ρ₀ hρ₀ using he
letρ : E→ℝ:=fun p =>ifhp : p∈Uthen ρ₀ p hp else0have hρ (p : E) (hp : p∈U) : ρ p∈Ioo a b ∧ g (p,ρ p)=0:=by
simpa only [ρ,dite_eq_left hp] using hρ₀ p hp
have huniq (p : E) (hp : p∈U) (z : ℝ) (hz : z∈Icc a b) (hgz : g (p,z)=0) : z=ρ p :=by
apply (real_section_strictMono hd (hder p hp)).injOn hz (Ioo_subset_Icc_self (hρ p hp).1)
exact hgz.trans (hρ p hp).2.symm
refine ⟨ρ,?_,hρ,huniq⟩
intro p hp
havehc : ContDiffAtℝ (↑(⊤ : ℕ∞)) g (p,ρ p) := hg.contDiffAt
havehinv : (fderiv ℝ g (p,ρ p) ∘LContinuousLinearMap.inr ℝEℝ).IsInvertible:=by
apply realCLM_invertible
change wallDerivative g (p,ρ p)≠0
exact (hder p hp (ρ p) (Ioo_subset_Icc_self (hρ p hp).1)).ne'
let ψ := hc.implicitFunction (by simp) hinv
havehψsmooth : ContDiffAtℝ (↑(⊤ : ℕ∞)) ψ p := hc.contDiffAt_implicitFunction (by simp) hinv
havehψself : ψ p=ρ p := hc.implicitFunction_apply_self (by simp) hinv
havehψeq : ∀ᶠ q in 𝓝 p, g (q,ψ q)=0:=byhave hh := hc.eventually_apply_implicitFunction (by simp) hinv
simpa only [(hρ p hp).2] using hh
havehψin : ∀ᶠ q in 𝓝 p, ψ q∈Ioo a b :=
hψsmooth.continuousAt (isOpen_Ioo.mem_nhds (by simpa only [hψself] using (hρ p hp).1))
havehident : ψ =ᶠ[𝓝 p] ρ :=by
filter_upwards [hU.mem_nhds hp,hψeq,hψin] with q hq he hi
exact huniq q hq _ (Ioo_subset_Icc_self hi) he
exact (hψsmooth.congr_of_eventuallyEq hident.symm).contDiffWithinAt