import NavierStokes.GenericSupportedPolynomial noncomputable section namespace NavierStokes.GenericDifferentialPolynomial open Set Filter open scoped Topology ContDiff BigOperators variable {D ι : Type*} [NormedAddCommGroup D] [NormedSpace ℝ D] /-- A single Cartesian field factor. Coordinate vectors give the usual multi-index derivatives; arbitrary fixed directions are also permitted. -/ inductive FieldFactor (D ι : Type*) where | input : ι → FieldFactor D ι | directional : D → FieldFactor D ι → FieldFactor D ι def FieldFactor.expression : FieldFactor D ι → Expression D ι Empty | .input i => .input i | .directional v f => .directional v f.expression def FieldFactor.eval (f : FieldFactor D ι) (u : ι → D → ℝ) : D → ℝ := f.expression.eval (fun k => Empty.elim k) u /-- Each leaf records the support of one differentiated field factor in the base and every increment. Multiplication constructs arbitrary positive-degree monomials without requiring undifferentiated components to share the support. -/ inductive FactorSupportAt (base : ι → D → ℝ) (inc : ℕ → ι → D → ℝ) (x : D) : Expression D ι Empty → Prop where | factor (f : FieldFactor D ι) (base_zero : f.eval base =ᶠ[𝓝 x] (fun _ => 0)) (increment_zero : ∀ j, f.eval (inc j) =ᶠ[𝓝 x] (fun _ => 0)) : FactorSupportAt base inc x f.expression | mul {e f : Expression D ι Empty} : FactorSupportAt base inc x e → FactorSupportAt base inc x f → FactorSupportAt base inc x (.mul e f) end NavierStokes.GenericDifferentialPolynomial