import Mathlib.Analysis.Calculus.DifferentialForm.Basic import Mathlib.Analysis.Calculus.ContDiff.Comp /-! # Exterior Derivative Smooth -/ namespace OAI.Analysis.DifferentialForms.Manifold.ExteriorDerivativeSmooth /-! # Regularity of the exterior derivative on a normed vector space These lemmas use mathlib's actual exterior derivative, defined by alternating the FrΓ©chet derivative. They make the loss of one finite derivative explicit; in particular the exterior derivative preserves smoothness. -/ open scoped ContDiff variable {π•œ E F : Type*} [NontriviallyNormedField π•œ] [NormedAddCommGroup E] [NormedSpace π•œ E] [NormedAddCommGroup F] [NormedSpace π•œ F] {n : β„•} {r s : WithTop β„•βˆž} {form : E β†’ E [β‹€^Fin n]β†’L[π•œ] F} /-- Taking the exterior derivative loses at most one derivative. -/ theorem contDiff_extDeriv_of_add_one_le (hform : ContDiff π•œ s form) (hrs : r + 1 ≀ s) : ContDiff π•œ r (extDeriv form) := by change ContDiff π•œ r ((ContinuousAlternatingMap.alternatizeUncurryFinCLM π•œ E F) ∘ fderiv π•œ form) exact (ContinuousAlternatingMap.alternatizeUncurryFinCLM π•œ E F).contDiff.comp (hform.fderiv_right hrs) /-- The exterior derivative of a smooth differential form is smooth. -/ theorem contDiff_extDeriv_infty (hform : ContDiff π•œ ∞ form) : ContDiff π•œ ∞ (extDeriv form) := contDiff_extDeriv_of_add_one_le hform (by simp) /-- Local regularity of the exterior derivative, with the derivative order explicit. -/ theorem contDiffAt_extDeriv_of_add_one_le {x : E} (hform : ContDiffAt π•œ s form x) (hrs : r + 1 ≀ s) : ContDiffAt π•œ r (extDeriv form) x := by change ContDiffAt π•œ r ((ContinuousAlternatingMap.alternatizeUncurryFinCLM π•œ E F) ∘ fderiv π•œ form) x exact (ContinuousAlternatingMap.alternatizeUncurryFinCLM π•œ E F).contDiff.contDiffAt.comp x (hform.fderiv_right hrs) /-- Relative exterior differentiation preserves the expected regularity on a set with unique derivatives. -/ theorem contDiffOn_extDerivWithin_of_add_one_le {U : Set E} (hform : ContDiffOn π•œ s form U) (hU : UniqueDiffOn π•œ U) (hrs : r + 1 ≀ s) : ContDiffOn π•œ r (fun x => extDerivWithin form U x) U := by change ContDiffOn π•œ r ((ContinuousAlternatingMap.alternatizeUncurryFinCLM π•œ E F) ∘ fderivWithin π•œ form U) U exact (hform.fderivWithin hU hrs).continuousLinearMap_comp (ContinuousAlternatingMap.alternatizeUncurryFinCLM π•œ E F) /-- On an open set, the ordinary exterior derivative has the same local regularity as the relative one. -/ theorem contDiffOn_extDeriv_of_isOpen {U : Set E} (hform : ContDiffOn π•œ s form U) (hU : IsOpen U) (hrs : r + 1 ≀ s) : ContDiffOn π•œ r (extDeriv form) U := by change ContDiffOn π•œ r ((ContinuousAlternatingMap.alternatizeUncurryFinCLM π•œ E F) ∘ fderiv π•œ form) U exact (hform.fderiv_of_isOpen hU hrs).continuousLinearMap_comp (ContinuousAlternatingMap.alternatizeUncurryFinCLM π•œ E F) end OAI.Analysis.DifferentialForms.Manifold.ExteriorDerivativeSmooth