import OAI.Analysis.BernoulliCone.SmoothLocalizedExtension namespace OAI section noncomputable section open Set Filter InnerProductSpace open scoped Topology ContDiff namespace Bernoulli.DeSilvaJerison def exteriorFlux (p:Space 7×ℝ):Space 7:=κ • gradient Zsigned p.1+ ((p.2-κ*Zsigned p.1)/KSup p.1) • gradient KSup p.1 lemma exteriorFlux_contDiffAt {p:Space 7×ℝ} (hq:0not_lt.mpr ((upperParameter_seam_iff hp hq).mp h) ht have hqs:(upperParameter p.1 p.2)^2(exteriorFlux_contDiffAt hpd).of_le (by simp) |>.contDiffWithinAt) let S:Set (Space 7×ℝ):={p∈K|seamHeight p.1≤p.2} have hσ:ContinuousOn (fun p:Space 7×ℝ=>seamHeight p.1) K:=by intro p hpk exact ((seamHeight_contDiffAt (hq p hpk)).continuousAt.comp continuous_fst.continuousAt).continuousWithinAt have hS:IsClosed S:=hK.isClosed.isClosed_le hσ continuousOn_snd obtain ⟨B,hB,hBe⟩:=LocalExtension.exists_contDiff_one_of_closed_germs hS (F:=upperFlux) (by intro p hps have hqp:=((upperParameter_seam_iff (hp p hps.1) (hq p hps.1)).mpr hps.2) obtain ⟨C,hC,hCp,hCe⟩:=upperFlux_cap_local_extension (hp p hps.1) hqp refine ⟨C,hC.of_le (by simp),?_⟩ filter_upwards [hCe] with y hy hys exact hy (hp y hys.1) ((upperParameter_seam_iff (hp y hys.1) (hq y hys.1)).mpr hys.2)) refine ⟨A,B,hA,hB,?_,?_⟩ · intro p hpk exact (hAe.filter_mono (nhds_le_nhdsSet hpk)).self_of_nhds · intro p hpk hpt exact hBe ⟨hpk,hpt⟩ end Bernoulli.DeSilvaJerison end end end OAI