import OAI.Geometry.Perimeter.Regularity.EllipticDifference namespace OAI noncomputable section open Set Filter MeasureTheory open scoped Topology ENNReal ContDiff InnerProductSpace namespace RPISingularHarnack variable {n : ℕ} theorem contDiff_cutoff {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] {f : Euc n → V} {U : Set (Euc n)} (hU : IsOpen U) {k : ℕ∞} (hf : ContDiffOn ℝ k f U) {χ : Euc n → ℝ} (hχ : ContDiff ℝ k χ) (hsχ : tsupport χ⊆U) : ContDiff ℝ k (fun x ↦ χ x•f x) := by rw [contDiff_iff_contDiffAt] intro x by_cases hx : x∈tsupport χ · exact hχ.contDiffAt.smul (hf.contDiffAt (hU.mem_nhds (hsχ hx))) · apply (contDiffAt_const (c := (0:V))).congr_of_eventuallyEq filter_upwards [(isClosed_tsupport χ).isOpen_compl.mem_nhds hx] with y hy simp only [image_eq_zero_of_notMem_tsupport hy,zero_smul] theorem local_compact_extension {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] {f : Euc n → V} {U : Set (Euc n)} (hU : IsOpen U) {p : Euc n} (hp : p∈U) {k : ℕ∞} (hf : ContDiffOn ℝ k f U) : ∃ r : ℝ, 0