math / data /lean /OAI /Analysis /Conductivity /Geometry /SplitJacobian.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
9.14 kB
import Mathlib
import OAI.Analysis.Conductivity.Variational.CompletedPotential
import OAI.Analysis.Conductivity.Variational.SynchronizedChartWaves
import OAI.Analysis.Conductivity.Variational.RepairPushedGraphStability
namespace OAI
noncomputable section
open MeasureTheory
open scoped ENNReal
open Matrix Filter Topology
open Set MeasureTheory Filter Topology
open scoped BigOperators
open Set MeasureTheory Filter Topology
open scoped Manifold
open Set Filter
open scoped Topology
open Set Filter MeasureTheory
open scoped Topology Manifold ENNReal
open Set
namespace ScalarConductivity
open Matrix Set Filter Topology MeasureTheory
open scoped Matrix.Norms.Elementwise
def splitJacobian (d : Coord3) (L : Coord3 β†’L[ℝ] ℝ) (c z : ℝ) : Mat3 :=
operatorMatrix (ContinuousLinearMap.id ℝ Coord3 + lineShiftGradientOperator d c (z β€’ L))
lemma splitJacobian_continuous (d : Coord3) (L : Coord3 β†’L[ℝ] ℝ) (c : ℝ) :
Continuous (splitJacobian d L c) :=
operatorMatrix_continuous.comp (continuous_const.add
((lineShiftGradientOperator d c).continuous.comp (continuous_id.smul continuous_const)))
lemma matrix_two_pairing_symm (E F : Matrix (Fin 3) (Fin 2) ℝ)
(h : (Eα΅€ * F) 1 0 = (Eα΅€ * F) 0 1) : (Eα΅€ * F).IsSymm := by
ext i j
fin_cases i <;> fin_cases j <;> simp_all [Matrix.transpose_apply]
theorem exists_local_two_field_split
(ΞΌ : Measure Coord3) [ΞΌ.IsAddHaarMeasure]
(u : Coord3 β†’ Fin 2 β†’ ℝ) (hu : ContDiff ℝ (↑(⊀ : β„•βˆž)) u)
(A : Coord3 β†’ Symmetric3) {p : Coord3} (hA : ContinuousAt A p)
(hD : Function.Surjective (fderiv ℝ u p))
(d : Coord3) (L : Coord3 β†’L[ℝ] ℝ) (hLd : L d = 1)
(B : Mat3) (hB : B.IsSymm) (hBn : βˆ€ v, L (B *α΅₯ v) = 0)
{a b c m : ℝ} (ha : 0 ≀ a) (hb : 0 ≀ b) (ha1 : a ≀ 1) (hb1 : b ≀ 1)
(hm : 0 < m) (hpath : βˆ€ z ∈ Icc (-a) b, m ≀ 1 + c * z)
(C : ℝ β†’ Symmetric3) (hC : βˆ€ z ∈ Icc (-a) b, ContinuousAt C z)
(hdet : βˆ€ z ∈ Icc (-a) b, 0 < (splitJacobian d L c z).det)
(hconstit : βˆ€ z ∈ Icc (-a) b,
(C z).val = (splitJacobian d L c z).det⁻¹ β€’
(splitJacobian d L c z * ((A p).val + z β€’ B) * (splitJacobian d L c z)α΅€))
{G : Set (ℝ Γ— Symmetric3)} (hG : IsOpen G)
(hCG : βˆ€ z ∈ Icc (-a) b, (z, C z) ∈ G)
{U : Set Coord3} (hU : IsOpen U) (hpU : p ∈ U) :
βˆƒ (X : OpenPartialHomeomorph Coord3 Coord3) (V : Set Coord3),
IsOpen V ∧ p ∈ V ∧ V βŠ† U ∧ V βŠ† X.source ∧
ContDiff ℝ (↑(⊀ : β„•βˆž)) X ∧
ContDiffOn ℝ (↑(⊀ : β„•βˆž)) X.symm X.target ∧
βˆƒ M : ℝ, 0 < M ∧
βˆ€ H : SmoothScalar ℝ, Function.Periodic (smoothDirection 1 H).val 1 β†’
(∫ t in (0 : ℝ)..1, (smoothDirection 1 H).val t = 0) β†’
(βˆƒ B : ℝ, βˆ€ t, |H.val t| ≀ B) β†’
(βˆ€ t, -a ≀ (smoothDirection 1 H).val t ∧ (smoothDirection 1 H).val t ≀ b) β†’
βˆ€ Ο‡ : SmoothScalar Coord3, HasCompactSupport Ο‡.val β†’ tsupport Ο‡.val βŠ† X '' V β†’
(βˆ€ x, 0 ≀ Ο‡.val x ∧ Ο‡.val x ≀ 1) β†’
βˆƒ F : ℝ β†’ Fin 2 β†’ Coord3 β†’ Coord3,
(βˆ€ k j, ContDiff ℝ (↑(⊀ : β„•βˆž)) (F k j)) ∧
(βˆ€ k j, HasCompactSupport (F k j) ∧ tsupport (F k j) βŠ† V ∧
tsupport (F k j) βŠ† X.symm '' tsupport Ο‡.val) ∧
(βˆ€ k j (ψ : Coord3 β†’ ℝ), ContDiff ℝ (↑(⊀ : β„•βˆž)) ψ β†’
(∫ y, fderiv ℝ ψ y (F k j y) βˆ‚ΞΌ) = 0) ∧
βˆ€αΆ  k : ℝ in atTop, βˆƒ Y : Coord3 ≃ Coord3,
ContDiff ℝ (↑(⊀ : β„•βˆž)) Y ∧ ContDiff ℝ (↑(⊀ : β„•βˆž)) Y.symm ∧
(βˆ€ x βˆ‰ V, Y x = x) ∧ Y '' V = V ∧
(βˆ€ x, Y x = x + (c * k⁻¹ * localPullback X Ο‡.val x *
H.val (k * L (X x))) β€’ d) ∧
(βˆ€ x, |(fderiv ℝ Y x).det| ≀ M) ∧
βˆ€ x ∈ V,
let z := localPullback X Ο‡.val x * (smoothDirection 1 H).val (k * L (X x))
let E := gradientColumns (fderiv ℝ u x)
let Ft : Matrix (Fin 3) (Fin 2) ℝ := (A x).val * E + Matrix.of (fun i j => F k j x i)
let J := operatorMatrix (fderiv ℝ Y x)
let At := repairPushed (C z) J E Ft
0 < J.det ∧ LinearIndependent ℝ E.col ∧ (z, At) ∈ G ∧
At.val * gradientColumns (fderiv ℝ (u ∘ Y.symm) (Y x)) = pushFlux J Ft := by
classical
let D := fderiv ℝ u p
let Eβ‚€ := gradientColumns D
let E : Coord3 β†’ Matrix (Fin 3) (Fin 2) ℝ := fun y => gradientColumns (fderiv ℝ u y)
let Fβ‚€ := (A p).val * Eβ‚€
let Fe : Coord3 β†’ Matrix (Fin 3) (Fin 2) ℝ := fun y => (A y).val * E y
let J := splitJacobian d L c
let Fb : ℝ β†’ Matrix (Fin 3) (Fin 2) ℝ := fun z => ((A p).val + z β€’ B) * Eβ‚€
have hEc : Continuous E := by
apply continuous_pi; intro i
apply continuous_pi; intro j
exact (continuous_apply j).comp ((hu.continuous_fderiv (by simp)).clm_apply continuous_const)
have hFc : ContinuousAt Fe p := matrix_mul_contAt (continuousAt_subtype_val.comp hA) hEc.continuousAt
have hFbc : Continuous Fb := by
apply continuous_iff_continuousAt.mpr
intro z
exact matrix_mul_contAt (continuousAt_const.add (continuousAt_id.smul continuousAt_const)) continuousAt_const
have hrank : LinearIndependent ℝ Eβ‚€.col := gradientColumns_rank D hD
have hexact : βˆ€ z ∈ Icc (-a) b, repairPushed (C z) (J z) Eβ‚€ (Fb z) = C z := by
intro z hz
exact repairPushed_exact (C z) (J z) ((A p).val + z β€’ B) Eβ‚€ (hdet z hz).ne' (hconstit z hz)
obtain ⟨O, _, hKO, Ρ, hΡ, heps⟩ := repairPushed_graph_stability isCompact_Icc
C J (fun _ => Eβ‚€) Fb hC (fun _ _ => (splitJacobian_continuous d L c).continuousAt)
(fun _ _ => continuousAt_const) (fun _ _ => hFbc.continuousAt) hdet (fun _ _ => hrank) hG
(fun z hz => by rw [hexact z hz]; exact hCG z hz)
have hnb : βˆ€αΆ  x in 𝓝 p, β€–E x - Eβ‚€β€– < Ξ΅/2 ∧ β€–Fe x - Fβ‚€β€– < Ξ΅/2 := by
have he := hEc.continuousAt.eventually (Metric.ball_mem_nhds (E p) (half_pos hΞ΅))
have hf := hFc.eventually (Metric.ball_mem_nhds (Fe p) (half_pos hΞ΅))
simpa only [Metric.mem_ball, dist_eq_norm] using he.and hf
obtain ⟨W, hWb, hWo, hpW⟩ := mem_nhds_iff.mp hnb
obtain ⟨X, hpX, hXs, hX, hXi, hXu, hDX⟩ := exists_potential_chart hu p hD
(hU.inter hWo) ⟨hpU, hpW⟩
have hpol := symmetric_wave_polarization D B hB L hBn
obtain ⟨V, hV, hpV, hVs, hpert⟩ := exists_synchronized_chart_waves
(by simp [Coord3]) ΞΌ X hX hXi D hD u (fun y _ => hXu y)
hpX hDX d L hLd ha hb ha1 hb1 hm (by positivity : 0 < Ξ΅/2)
hpath (B * Eβ‚€).col hpol.1 hpol.2
obtain ⟨M, hM, hMbd⟩ := synchronized_det_bound d c L (Ρ/2)
refine ⟨X, V, hV, hpV, hVs.trans (fun _ hx => (hXs hx).1), hVs, hX, hXi, M, hM, ?_⟩
intro H hHp hHm hH hHr χ hχ hχV hχb
obtain ⟨F, hF, hFs, hsym, hdiv, hlim⟩ := hpert H hHp hHm hH hHr Ο‡ hΟ‡ hΟ‡V hΟ‡b
refine ⟨F, hF, hFs, hdiv, ?_⟩
filter_upwards [hlim] with k hk
obtain ⟨Y, hY, hYi, hoff, himage, hform, hFerr, hJerr⟩ := hk
refine ⟨Y, hY, hYi, hoff, himage, hform, ?_, ?_⟩
Β· intro x
apply hMbd _ _ _ (hJerr x).le
have hz := scalar_cutoff_segment ha hb (localPullback_bounds X χ.val hχb x) (hHr (k * L (X x)))
exact abs_le.mpr ⟨by linarith only [hz.1, ha1], by linarith only [hz.2, hb1]⟩
intro x hx
let z := localPullback X Ο‡.val x * (smoothDirection 1 H).val (k * L (X x))
let Q : Matrix (Fin 3) (Fin 2) ℝ := fun i j => F k j x i
let Jy := operatorMatrix (fderiv ℝ Y x)
have hz : z ∈ Icc (-a) b := scalar_cutoff_segment ha hb
(localPullback_bounds X χ.val hχb x) (hHr _)
have hsmall := hWb (hXs (hVs hx)).2
have hdJ : β€–Jy - J zβ€– < Ξ΅/2 := by
change β€–operatorMatrix (fderiv ℝ Y x) - operatorMatrix _β€– < Ξ΅/2
rw [← operatorMatrix_sub]
exact (operatorMatrix_norm_le _).trans_lt (hJerr x)
have hdF : β€–Fe x + Q - Fb zβ€– < Ξ΅ := by
have hq : β€–Q - z β€’ (B * Eβ‚€)β€– < Ξ΅/2 := by
apply columns_norm_lt _ (half_pos hΞ΅)
intro j
exact hFerr j x
have heq : Fe x + Q - Fb z = (Fe x - Fβ‚€) + (Q - z β€’ (B * Eβ‚€)) := by
dsimp only [Fb, Fβ‚€]
rw [Matrix.add_mul, Matrix.smul_mul]
abel
rw [heq]
exact (norm_add_le _ _).trans_lt (by linarith only [hq, hsmall.2])
have hbound : β€–(Jy - J z, E x - Eβ‚€, Fe x + Q - Fb z)β€– < Ξ΅ := by
rw [Prod.norm_def, Prod.norm_def, max_lt_iff, max_lt_iff]
exact ⟨hdJ.trans (by linarith), hsmall.1.trans (by linarith), hdF⟩
have hs := heps z (hKO hz) (Jy - J z) (E x - Eβ‚€) (Fe x + Q - Fb z) hbound
simp only [add_sub_cancel] at hs
refine ⟨hs.1, hs.2.1, hs.2.2, ?_⟩
rw [gradientColumns_recomposition Y (hY.differentiable (by simp))
(hYi.differentiable (by simp)) u (hu.differentiable (by simp))]
apply repairPushed_mul _ _ _ _ hs.1.ne' hs.2.1
rw [Matrix.mul_add]
apply (symmetric_gram_pairing (A x) (E x)).add
apply matrix_two_pairing_symm
rw [← gradientColumns_pairing, ← gradientColumns_pairing]
exact hsym k x
end ScalarConductivity
end
end OAI