File size: 11,579 Bytes
159357f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
import Mathlib
import OAI.Analysis.Conductivity.Branching.JoinHull
import OAI.Analysis.Conductivity.Variational.ConjugateDiagonal
import OAI.Analysis.Conductivity.Variational.CompactCompatibleReplacement

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 MeasureTheory Filter Topology
open scoped Matrix.Norms.Elementwise

theorem exists_compact_depth_reduction_two
    (μ : Measure Coord3) [μ.IsAddHaarMeasure]
    (u : Coord3 → Fin 2 → ℝ) (A : Coord3 → Symmetric3)
    {U : Set Coord3} (hU : IsOpen U) (hUb : Bornology.IsBounded U)
    (hu : ContDiffOn ℝ (↑(⊤ : ℕ∞)) u U)
    (hA : ContDiffOn ℝ (↑(⊤ : ℕ∞)) (fun x => (A x).val) U)
    (hdiv : ∀ j (ψ : Coord3 → ℝ), ContDiff ℝ (↑(⊤ : ℕ∞)) ψ → HasCompactSupport ψ →
      tsupport ψ ⊆ U → (∫ x, fderiv ℝ ψ x ((conductivityFlux u A x).col j) ∂μ) = 0)
    {a b : ℝ} (ha : 0 < a) {T : Set DiagonalTriple}
    (hT : IsOpen T) (hsub : ∀ d ∈ T, IsFiniteLaminate a b d)
    (hperm : ∀ d ∈ T, ∀ e : Equiv.Perm (Fin 3), d ∘ e ∈ T)
    {p : Coord3} (hpU : p ∈ U)
    (hD : Function.Surjective (fderiv ℝ u p)) {n : ℕ}
    (hp : A p ∈ spectralExtension (depthClass T (n+1)))
    (hn : A p ∉ spectralExtension (depthClass T n)) :
    ∃ W : Set Coord3, IsOpen W ∧ p ∈ W ∧ closure W ⊆ U ∧ IsCompact (closure W) ∧
      ∀ O : Set Coord3, IsOpen O → O ⊆ W → ∀ ε : ℝ, 0 < ε →
      ∃ R : CompactTwoFieldReplacement μ O u A,
        (∀ x ∈ O, R.tensor x ∈ matrixFiniteLaminate a b) ∧
        μ {x | x ∈ O ∧ R.tensor x ∉ spectralExtension (depthClass T n)} ≤ ENNReal.ofReal ε := by
  obtain ⟨Q, hQ, d, hd, hrep⟩ := hp
  have hdn : d ∉ depthClass T n := fun h => hn ⟨Q, hQ, d, h, hrep⟩
  obtain ⟨i, θ, α, β, hθ, hθ1, hα, hβ, he, _⟩ := depthClass_plan hsub hd hdn
  have hre : conjugateDiagonal Q (coordinateJoin i θ α β) = A p := by
    apply Subtype.ext
    simpa only [conjugateDiagonal, he] using hrep.symm
  obtain ⟨v, L, B, η, c, m, C, hLv, hB, hBn, hη, hη1, hm, hpath, hC, hCs,
    hdet, hconst, hCG, hCa, hCb⟩ := spectral_join_plan ha
      (depthClass_subset_laminate hsub n) i hα hβ hθ hθ1 hQ
  rw [hre] at hconst
  have hTo : IsOpen (spectralExtension (depthClass T n)) :=
    isOpen_spectralExtension (isOpen_depthClass ha hT hsub n) (depthClass_permute hperm n)
  let G := endpointGraph (-η) (1-η) (matrixFiniteLaminate a b)
    (spectralExtension (depthClass T n)) (spectralExtension (depthClass T n))
  have hGo : IsOpen G := isOpen_endpointGraph _ _ (isOpen_matrixFiniteLaminate ha) hTo hTo
  have hGC : ∀ z ∈ Icc (-η) (1-η), (z, C z) ∈ G :=
    path_mem_endpointGraph _ _ C hCG hCa hCb
  obtain ⟨W, hW, hpW, hWU, hWc, hop⟩ := exists_locally_smooth_compact_split μ u A
    hU hUb hpU hu hA hdiv hD v L hLv B hB hBn hη hη1 hm hpath C hC hCs hdet hconst hGo hGC
  refine ⟨W, hW, hpW, hWU, hWc, ?_⟩
  intro O hO hOW ε hε
  obtain ⟨R, q, _, _, hqG, hqm⟩ := hop O hO hOW ε hε
  refine ⟨R, fun x hx => (hqG x hx).1, le_trans (measure_mono ?_) hqm⟩
  intro x hx
  refine ⟨hx.1, ?_, ?_⟩
  · exact (hqG x hx.1).2.1.resolve_right hx.2
  · exact (hqG x hx.1).2.2.resolve_right hx.2

end ScalarConductivity

namespace ScalarConductivity
open Matrix Set MeasureTheory Filter Topology
open scoped Matrix.Norms.Elementwise

theorem exists_compact_depth_reduction_selected
    (J : Set (Fin 2))
    (μ : Measure Coord3) [μ.IsAddHaarMeasure]
    (u : Coord3 → Fin 2 → ℝ) (A : Coord3 → Symmetric3)
    {U : Set Coord3} (hU : IsOpen U) (hUb : Bornology.IsBounded U)
    (hu : ContDiffOn ℝ (↑(⊤ : ℕ∞)) u U)
    (hA : ContDiffOn ℝ (↑(⊤ : ℕ∞)) (fun x => (A x).val) U)
    (hdiv : ∀ j ∈ J, ∀ (ψ : Coord3 → ℝ), ContDiff ℝ (↑(⊤ : ℕ∞)) ψ → HasCompactSupport ψ →
      tsupport ψ ⊆ U → (∫ x, fderiv ℝ ψ x ((conductivityFlux u A x).col j) ∂μ) = 0)
    {a b : ℝ} (ha : 0 < a) {T : Set DiagonalTriple}
    (hT : IsOpen T) (hsub : ∀ d ∈ T, IsFiniteLaminate a b d)
    (hperm : ∀ d ∈ T, ∀ e : Equiv.Perm (Fin 3), d ∘ e ∈ T)
    {p : Coord3} (hpU : p ∈ U)
    (hD : Function.Surjective (fderiv ℝ u p)) {n : ℕ}
    (hp : A p ∈ spectralExtension (depthClass T (n+1)))
    (hn : A p ∉ spectralExtension (depthClass T n)) :
    ∃ W : Set Coord3, IsOpen W ∧ p ∈ W ∧ closure W ⊆ U ∧ IsCompact (closure W) ∧
      ∀ O : Set Coord3, IsOpen O → O ⊆ W → ∀ ε : ℝ, 0 < ε →
      ∃ R : CompactSelectedReplacement J μ O u A,
        (∀ x ∈ O, R.tensor x ∈ matrixFiniteLaminate a b) ∧
        μ {x | x ∈ O ∧ R.tensor x ∉ spectralExtension (depthClass T n)} ≤ ENNReal.ofReal ε := by
  obtain ⟨Q, hQ, d, hd, hrep⟩ := hp
  have hdn : d ∉ depthClass T n := fun h => hn ⟨Q, hQ, d, h, hrep⟩
  obtain ⟨i, θ, α, β, hθ, hθ1, hα, hβ, he, _⟩ := depthClass_plan hsub hd hdn
  have hre : conjugateDiagonal Q (coordinateJoin i θ α β) = A p := by
    apply Subtype.ext
    simpa only [conjugateDiagonal, he] using hrep.symm
  obtain ⟨v, L, B, η, c, m, C, hLv, hB, hBn, hη, hη1, hm, hpath, hC, hCs,
    hdet, hconst, hCG, hCa, hCb⟩ := spectral_join_plan ha
      (depthClass_subset_laminate hsub n) i hα hβ hθ hθ1 hQ
  rw [hre] at hconst
  have hTo : IsOpen (spectralExtension (depthClass T n)) :=
    isOpen_spectralExtension (isOpen_depthClass ha hT hsub n) (depthClass_permute hperm n)
  let G := endpointGraph (-η) (1-η) (matrixFiniteLaminate a b)
    (spectralExtension (depthClass T n)) (spectralExtension (depthClass T n))
  have hGo : IsOpen G := isOpen_endpointGraph _ _ (isOpen_matrixFiniteLaminate ha) hTo hTo
  have hGC : ∀ z ∈ Icc (-η) (1-η), (z, C z) ∈ G :=
    path_mem_endpointGraph _ _ C hCG hCa hCb
  obtain ⟨W, hW, hpW, hWU, hWc, hop⟩ := exists_locally_smooth_selected_split J μ u A
    hU hUb hpU hu hA hdiv hD v L hLv B hB hBn hη hη1 hm hpath C hC hCs hdet hconst hGo hGC
  refine ⟨W, hW, hpW, hWU, hWc, ?_⟩
  intro O hO hOW ε hε
  obtain ⟨R, q, _, _, hqG, hqm⟩ := hop O hO hOW ε hε
  refine ⟨R, fun x hx => (hqG x hx).1, le_trans (measure_mono ?_) hqm⟩
  intro x hx
  refine ⟨hx.1, ?_, ?_⟩
  · exact (hqG x hx.1).2.1.resolve_right hx.2
  · exact (hqG x hx.1).2.2.resolve_right hx.2

end ScalarConductivity

namespace ScalarConductivity
open Matrix Set MeasureTheory Filter Topology
open scoped Matrix.Norms.Elementwise

lemma gradientColumns_surjective {m : Type*} [Fintype m] [DecidableEq m]
    (D : Coord3 →L[ℝ] (m → ℝ))
    (hD : LinearIndependent ℝ (gradientColumns D).col) : Function.Surjective D := by
  let E := gradientColumns D
  have hh : Eᵀ * (((Eᵀ * E)⁻¹ * Eᵀ)ᵀ) = 1 := by
    rw [← Matrix.transpose_mul, gram_leftInverse E hD, Matrix.transpose_one]
  have hs := Matrix.mulVec_surjective_iff_exists_right_inverse.mpr ⟨_, hh⟩
  intro y
  obtain ⟨x, hx⟩ := hs y
  exact ⟨x, (gradientColumns_apply D x).symm.trans hx⟩

lemma exists_independent_pairedPotential_at {u : Coord3 → ℝ} {p : Coord3}
    (hu : DifferentiableAt ℝ u p) (hp : fderiv ℝ u p ≠ 0) :
    ∃ j : Fin 3, Function.Surjective (fderiv ℝ (pairedPotential u j) p) := by
  obtain ⟨i, hi⟩ := exists_coordinate_nonzero hp
  obtain ⟨j, hji⟩ := exists_ne i
  refine ⟨j, ?_⟩
  rw [(pairedPotential_hasFDerivAt hu.hasFDerivAt j).fderiv]
  exact pairedFunctional_surjective hi hji.symm

lemma pairedPotential_contDiffOn {u : Coord3 → ℝ} {O : Set Coord3}
    (hu : ContDiffOn ℝ (↑(⊤ : ℕ∞)) u O) (j : Fin 3) :
    ContDiffOn ℝ (↑(⊤ : ℕ∞)) (pairedPotential u j) O := by
  apply contDiffOn_pi.mpr
  intro i
  fin_cases i
  · exact hu
  · exact (contDiff_apply ℝ ℝ j).contDiffOn

lemma column_derivative_ne_zero_of_independent {O : Set Coord3} (hO : IsOpen O)
    {v : Coord3 → Fin 2 → ℝ} (hv : DifferentiableOn ℝ v O)
    {x : Coord3} (hx : x ∈ O)
    (hr : LinearIndependent ℝ (gradientColumns (fderiv ℝ v x)).col) (j : Fin 2) :
    fderiv ℝ (fun y => v y j) x ≠ 0 := by
  intro hz
  have hh := ((ContinuousLinearMap.proj j).hasFDerivAt.comp x
    ((hv x hx).differentiableAt (hO.mem_nhds hx)).hasFDerivAt).fderiv
  have hzero : (gradientColumns (fderiv ℝ v x)).col j = 0 := by
    ext i
    have h := congrArg (fun L : Coord3 →L[ℝ] ℝ => L (Pi.single i 1)) (hh.symm.trans hz)
    exact h
  exact (hr.ne_zero j) hzero

lemma conductivityFlux_affine_column {O : Set Coord3} (hO : IsOpen O)
    {u v : Coord3 → Fin 2 → ℝ} {l κ : Fin 2 → ℝ} (A : Coord3 → Symmetric3)
    (he : ∀ x ∈ O, ∀ j, u x j = l j * v x 0 + κ j)
    (hv : DifferentiableOn ℝ v O) {x : Coord3} (hx : x ∈ O) (j : Fin 2) :
    (conductivityFlux u A x).col j = l j • (conductivityFlux v A x).col 0 := by
  ext i
  change (∑ k, (A x).val i k * gradientColumns (fderiv ℝ u x) k j) =
    l j * ∑ k, (A x).val i k * gradientColumns (fderiv ℝ v x) k 0
  simp_rw [gradientColumns_affine_column hO he hv hx]
  rw [Finset.mul_sum]
  apply Finset.sum_congr rfl
  intro k _
  ring

lemma active_flux_harmonic_of_affine
    (μ : Measure Coord3) {O : Set Coord3} (hO : IsOpen O)
    {u v : Coord3 → Fin 2 → ℝ} {l κ : Fin 2 → ℝ} (A : Coord3 → Symmetric3)
    (he : ∀ x ∈ O, ∀ j, u x j = l j * v x 0 + κ j)
    (hv : DifferentiableOn ℝ v O) {j : Fin 2} (hj : l j ≠ 0)
    (hdiv : ∀ (ψ : Coord3 → ℝ), ContDiff ℝ (↑(⊤ : ℕ∞)) ψ → HasCompactSupport ψ →
      tsupport ψ ⊆ O → (∫ x, fderiv ℝ ψ x ((conductivityFlux u A x).col j) ∂μ) = 0) :
    ∀ (ψ : Coord3 → ℝ), ContDiff ℝ (↑(⊤ : ℕ∞)) ψ → HasCompactSupport ψ →
      tsupport ψ ⊆ O → (∫ x, fderiv ℝ ψ x ((conductivityFlux v A x).col 0) ∂μ) = 0 := by
  intro ψ hψ hc hs
  have heq : (∫ x, fderiv ℝ ψ x ((conductivityFlux u A x).col j) ∂μ) =
      l j * ∫ x, fderiv ℝ ψ x ((conductivityFlux v A x).col 0) ∂μ := by
    rw [derivative_test_integral_congr μ ψ _
      (fun x => l j • (conductivityFlux v A x).col 0)
      (fun x hx => conductivityFlux_affine_column hO A he hv (hs hx) j)]
    simp_rw [map_smul, smul_eq_mul]
    exact integral_const_mul _ _
  exact (mul_eq_zero.mp (heq.symm.trans (hdiv ψ hψ hc hs))).resolve_left hj

def TwoFieldRankRegular (u : Coord3 → Fin 2 → ℝ) (O : Set Coord3) : Prop :=
  (∀ x ∈ O, LinearIndependent ℝ (gradientColumns (fderiv ℝ u x)).col) ∨
  (∃ (v : Coord3 → ℝ) (l κ : Fin 2 → ℝ),
    ContDiffOn ℝ (↑(⊤ : ℕ∞)) v O ∧ (∃ j, l j ≠ 0) ∧
    (∀ x ∈ O, fderiv ℝ v x ≠ 0) ∧
    (∀ x ∈ O, ∀ j, u x j = l j * v x + κ j)) ∨
  ∃ κ : Fin 2 → ℝ, ∀ x ∈ O, u x = κ

lemma TwoFieldRankRegular.mono {u : Coord3 → Fin 2 → ℝ} {O W : Set Coord3}
    (h : TwoFieldRankRegular u O) (hW : W ⊆ O) : TwoFieldRankRegular u W := by
  rcases h with h | h | ⟨κ, hκ⟩
  · exact Or.inl (fun x hx => h x (hW hx))
  · obtain ⟨v, l, κ, hv, hl, hd, he⟩ := h
    exact Or.inr (Or.inl ⟨v, l, κ, hv.mono hW, hl, fun x hx => hd x (hW hx),
      fun x hx => he x (hW hx)⟩)
  · exact Or.inr (Or.inr ⟨κ, fun x hx => hκ x (hW hx)⟩)

end ScalarConductivity

end

end OAI