import Euler.MeanWeakHarmonicScaling /-! # Compact smooth solenoidal tests determine ordinary L² solenoidal fields The curl-curl identity reduces the orthogonal complement of compact smooth curls inside the solenoidal space to globally weakly harmonic L² fields. -/ noncomputable section namespace Euler.ComparatorBridge open Set MeasureTheory InnerProductSpace Laplacian EulerSmoothLimit EulerVectorCalculus EulerMeanSolenoidal EulerMeanGradientTest EulerMeanVectorIdentities EulerMeanHarmonic EulerMeanCurlIntegration EulerMeanBoundary open scoped ContDiff Topology open Filter /-- A distributionally harmonic vector field on all of ℝ³ vanishes if it lies in L². -/ theorem weakHarmonicOn_univ_eq_zero (u : EulerMeanSolenoidal.L2) (hu : WeakHarmonicOn Set.univ u) : u = 0 := by have hball (n : ℕ) : WeakHarmonicOn (Metric.ball (0 : Space) ((n + 1 : ℕ) : ℝ)) u := by intro φ hc hs _ exact hu φ hc hs (Set.subset_univ _) have hall : ∀ᵐ x ∂volume, ∀ n : ℕ, x ∈ Metric.closedBall (0 : Space) (((n + 1 : ℕ) : ℝ) / 4) → ‖u x‖ ^ 2 ≤ (harmonicQuarterBallConstant * (((n + 1 : ℕ) : ℝ) ^ 3)⁻¹) * ‖u‖ ^ 2 := ae_all_iff.mpr (fun n => weakHarmonic_pointwise_scaled u ((n + 1 : ℕ) : ℝ) (by positivity) (hball n)) have hrad : Tendsto (fun n : ℕ => ((n + 1 : ℕ) : ℝ)) atTop atTop := tendsto_natCast_atTop_atTop.comp (tendsto_add_atTop_nat 1) have hlim : Tendsto (fun n : ℕ => (harmonicQuarterBallConstant * (((n + 1 : ℕ) : ℝ) ^ 3)⁻¹) * ‖u‖ ^ 2) atTop (𝓝 0) := by have hi := (tendsto_inv_atTop_zero : Tendsto (fun r : ℝ => r⁻¹) atTop (𝓝 0)).comp ((tendsto_pow_atTop (by decide : (3 : ℕ) ≠ 0)).comp hrad) simpa using (hi.const_mul harmonicQuarterBallConstant).mul_const (‖u‖ ^ 2) apply Lp.ext filter_upwards [hall, Lp.coeFn_zero Space 2 volume] with x hx hz rw [hz] have hlarge : ∀ᶠ n : ℕ in atTop, 4 * ‖x‖ ≤ ((n + 1 : ℕ) : ℝ) := hrad.eventually (eventually_ge_atTop (4 * ‖x‖)) have hzero : ‖u x‖ ^ 2 ≤ 0 := ge_of_tendsto hlim (hlarge.mono (fun n hn => hx n (by simpa only [Metric.mem_closedBall, dist_zero_right] using (show ‖x‖ ≤ ((n + 1 : ℕ) : ℝ) / 4 by linarith)))) exact norm_eq_zero.mp (sq_eq_zero_iff.mp (le_antisymm hzero (sq_nonneg _))) /-- Taking the L² class of a compact smooth curl is a linear operation. -/ def compactCurlMap : Test →ₗ[ℝ] L2 where toFun f := testValue (curlTest f) map_add' f g := by apply Lp.ext filter_upwards [testValue_ae (curlTest (f + g)), testValue_ae (curlTest f), testValue_ae (curlTest g), Lp.coeFn_add (testValue (curlTest f)) (testValue (curlTest g))] with x hfg hf hg ha rw [hfg, ha] simp only [Pi.add_apply, hf, hg] exact congrFun (vectorCurl_add (f : Space → Space) (g : Space → Space) (f.smooth.differentiable (by simp)) (g.smooth.differentiable (by simp))) x map_smul' c f := by simp only [RingHom.id_apply] apply Lp.ext filter_upwards [testValue_ae (curlTest (c • f)), testValue_ae (curlTest f), Lp.coeFn_smul c (testValue (curlTest f))] with x hcf hf hs rw [hcf, hs] simp only [Pi.smul_apply, hf] exact congrFun (vectorCurl_smul c (f : Space → Space) (f.smooth.differentiable (by simp))) x /-- L² classes of curls of genuine compactly supported smooth vector fields. -/ def compactCurlGenerators : Set L2 := Set.range (fun f : Test => testValue (curlTest f)) /-- The closed linear space generated by compactly supported smooth curls. -/ def compactCurlSpace : Submodule ℝ L2 := (Submodule.span ℝ compactCurlGenerators).topologicalClosure theorem compactCurlSpace_closed : IsClosed (compactCurlSpace : Set L2) := (Submodule.span ℝ compactCurlGenerators).isClosed_topologicalClosure instance : CompleteSpace compactCurlSpace := compactCurlSpace_closed.completeSpace_coe theorem compactCurl_mem_solenoidal (f : Test) : testValue (curlTest f) ∈ solenoidalSpace := curl_mem_solenoidal _ ((contDiff_piLp 2).mp f.smooth) (test_memLp (curlTest f)) theorem compactCurl_mem (f : Test) : testValue (curlTest f) ∈ compactCurlSpace := (Submodule.span ℝ compactCurlGenerators).le_topologicalClosure (Submodule.subset_span ⟨f, rfl⟩) theorem compactCurlSpace_le_solenoidal : compactCurlSpace ≤ solenoidalSpace := by apply (Submodule.span ℝ compactCurlGenerators).topologicalClosure_minimal _ gradientSpace.isClosed_orthogonal apply Submodule.span_le.mpr rintro _ ⟨f, rfl⟩ exact compactCurl_mem_solenoidal f /-- A solenoidal field annihilating compact smooth curls is weakly harmonic. -/ theorem weakHarmonicOn_univ_of_compactCurl_pairing_zero (u : L2) (hu : u ∈ solenoidalSpace) (htest : ∀ f : Test, ⟪u, testValue (curlTest f)⟫_ℝ = 0) : WeakHarmonicOn Set.univ u := by intro φ hc hs _ let f : Test := ⟨φ, hs, hc⟩ have h := solenoidal_curlcurl_pairing u hu f rw [htest (curlTest f)] at h have hz : ⟪u, testValue (laplacianTest f)⟫_ℝ = 0 := by linarith exact (l2_test_pairing u (laplacianTest f)).symm.trans hz /-- Compact smooth curls span the entire solenoidal Hilbert space densely. -/ theorem compactCurlSpace_eq_solenoidal : compactCurlSpace = solenoidalSpace := by have hbot : compactCurlSpace.orthogonal ⊓ solenoidalSpace = ⊥ := by apply eq_bot_iff.mpr intro u hu change u = 0 apply weakHarmonicOn_univ_eq_zero u apply weakHarmonicOn_univ_of_compactCurl_pairing_zero u hu.2 intro f rw [real_inner_comm] exact hu.1 _ (compactCurl_mem f) simpa only [hbot, sup_bot_eq] using (Submodule.sup_orthogonal_inf_of_hasOrthogonalProjection compactCurlSpace_le_solenoidal) /-- Linearity makes the closure of the generator set itself the full solenoidal space. -/ theorem closure_compactCurlGenerators : closure compactCurlGenerators = (solenoidalSpace : Set L2) := by have hspan : Submodule.span ℝ compactCurlGenerators = compactCurlMap.range := by change Submodule.span ℝ (compactCurlMap.range : Set L2) = compactCurlMap.range exact Submodule.span_eq _ calc closure compactCurlGenerators = (compactCurlSpace : Set L2) := by rw [compactCurlSpace, hspan, Submodule.topologicalClosure_coe] rfl _ = (solenoidalSpace : Set L2) := by rw [compactCurlSpace_eq_solenoidal] /-- Compact smooth curl classes regarded as a subset of the solenoidal Hilbert space. -/ def compactSolenoidalTests : Set solenoidalSpace := {u | (u : L2) ∈ compactCurlGenerators} /-- Every member is represented by an actual compact smooth divergence-free field. -/ theorem compactSolenoidalTests_representation (u : solenoidalSpace) (hu : u ∈ compactSolenoidalTests) : ∃ φ : Space → Space, ContDiff ℝ ∞ φ ∧ HasCompactSupport φ ∧ (∀ x, divergence φ x = 0) ∧ ((u : L2) : Space → Space) =ᵐ[volume] φ := by obtain ⟨f, hf⟩ := hu refine ⟨(curlTest f : Space → Space), (curlTest f).smooth, (curlTest f).compact, divergence_curl _ ((contDiff_piLp 2).mp f.smooth), ?_⟩ rw [← hf] exact testValue_ae (curlTest f) /-- A bundled compact smooth solenoidal test has the prescribed L² class. -/ theorem compactSolenoidalTests_testValue (u : solenoidalSpace) (hu : u ∈ compactSolenoidalTests) : ∃ f : Test, (∀ x, divergence (f : Space → Space) x = 0) ∧ testValue f = (u : L2) := by obtain ⟨f, hf⟩ := hu exact ⟨curlTest f, divergence_curl _ ((contDiff_piLp 2).mp f.smooth), hf⟩ /-- The compact test fields form a dense subset of the actual solenoidal L² space. -/ theorem compactSolenoidalTests_dense : Dense compactSolenoidalTests := by apply Subtype.dense_iff.mpr change (solenoidalSpace : Set L2) ⊆ closure (Subtype.val '' {u : solenoidalSpace | (u : L2) ∈ compactCurlGenerators}) have himage : Subtype.val '' {u : solenoidalSpace | (u : L2) ∈ compactCurlGenerators} = compactCurlGenerators := by ext x constructor · rintro ⟨u, hu, rfl⟩ exact hu · intro hx have hxS : x ∈ solenoidalSpace := by change x ∈ (solenoidalSpace : Set L2) rw [← closure_compactCurlGenerators] exact subset_closure hx exact ⟨⟨x, hxS⟩, hx, rfl⟩ rw [himage, closure_compactCurlGenerators] /-- Pairings against compact smooth solenoidal tests determine a solenoidal field. -/ theorem solenoidal_eq_zero_of_compact_test_pairing_zero (u : L2) (hu : u ∈ solenoidalSpace) (htest : ∀ f : Test, (∀ x, divergence (f : Space → Space) x = 0) → ⟪u, testValue f⟫_ℝ = 0) : u = 0 := by apply weakHarmonicOn_univ_eq_zero u apply weakHarmonicOn_univ_of_compactCurl_pairing_zero u hu intro f exact htest (curlTest f) (divergence_curl _ ((contDiff_piLp 2).mp f.smooth)) end Euler.ComparatorBridge