File size: 5,944 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import Mathlib
import OAI.Analysis.Conductivity.Sobolev.LocalPiolaFlux

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
namespace ScalarConductivity

lemma contDiff_clm_det {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E] (n : WithTop β„•βˆž) :
    ContDiff ℝ n (fun L : E β†’L[ℝ] E => L.det) := by
  classical
  let b := Module.finBasis ℝ E
  simp_rw [ContinuousLinearMap.det, ← LinearMap.det_toMatrix b, Matrix.det_apply',
    LinearMap.toMatrix_apply]
  apply ContDiff.sum
  intro Οƒ _
  apply contDiff_const.mul
  apply contDiff_prod
  intro i _
  change ContDiff ℝ n (fun L : E β†’L[ℝ] E => (b.coord (Οƒ i)).toContinuousLinearMap (L (b i)))
  exact (b.coord (Οƒ i)).toContinuousLinearMap.contDiff.comp ((ContinuousLinearMap.apply ℝ E (b i)).contDiff)

lemma contDiff_of_contDiffOn_tsupport {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [NormedAddCommGroup V] [NormedSpace ℝ V] {n : WithTop β„•βˆž} {f : E β†’ V} {s : Set E}
    (hs : IsOpen s) (hf : ContDiffOn ℝ n f s) (hfS : tsupport f βŠ† s) : ContDiff ℝ n f := by
  rw [contDiff_iff_contDiffAt]
  intro x
  by_cases hx : x ∈ tsupport f
  Β· exact hf.contDiffAt (hs.mem_nhds (hfS hx))
  Β· exact contDiffAt_const.congr_of_eventuallyEq (notMem_tsupport_iff_eventuallyEq.mp hx)

lemma localPiolaFlux_smooth {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E]
    (X : OpenPartialHomeomorph E E) (hX : ContDiffOn ℝ (↑(⊀ : β„•βˆž)) X X.source)
    (hXi : ContDiffOn ℝ (↑(⊀ : β„•βˆž)) X.symm X.target)
    (F : E β†’ E) (hF : ContDiff ℝ (↑(⊀ : β„•βˆž)) F) (hc : HasCompactSupport F)
    (hs : tsupport F βŠ† X.source) : ContDiff ℝ (↑(⊀ : β„•βˆž)) (localPiolaFlux X F) := by
  apply contDiff_of_contDiffOn_tsupport X.open_target _ (localPiolaFlux_tsupport X F hc hs)
  apply X.open_target.contDiffOn_iff.mpr
  intro y hy
  have hxi := hXi.contDiffAt (X.open_target.mem_nhds hy)
  have hx := hX.contDiffAt (X.open_source.mem_nhds (X.map_target hy))
  have hd : ContDiffAt ℝ (↑(⊀ : β„•βˆž)) (fun z => fderiv ℝ X (X.symm z)) y :=
    (hx.fderiv_right (by simp)).comp y hxi
  have hd0 : (fderiv ℝ X (X.symm y)).det β‰  0 :=
    local_fderiv_det_ne_zero X (hX.differentiableOn (by simp))
      (hXi.differentiableOn (by simp)) (X.map_target hy)
  have hdet := ((contDiff_clm_det (E := E) (↑(⊀ : β„•βˆž))).contDiffAt.comp y hd).abs hd0
  have hformula := (hdet.inv (abs_ne_zero.mpr hd0)).smul
    (hd.clm_apply (hF.contDiffAt.comp y hxi))
  apply hformula.congr_of_eventuallyEq
  filter_upwards [X.open_target.mem_nhds hy] with z hz
  simp [localPiolaFlux, hz]

lemma exists_smooth_extension_near_compact {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E] {U K : Set E} (hU : IsOpen U) (hK : IsCompact K) (hKU : K βŠ† U)
    (Ο† : E β†’ ℝ) (hΟ† : ContDiffOn ℝ (↑(⊀ : β„•βˆž)) Ο† U) :
    βˆƒ g : E β†’ ℝ, ContDiff ℝ (↑(⊀ : β„•βˆž)) g ∧ βˆ€ x ∈ K, g =αΆ [𝓝 x] Ο† := by
  obtain βŸ¨Ο‡, hΟ‡β‚€, hχ₁, _⟩ := exists_contMDiffMap_zero_one_nhds_of_isClosed
    (π“˜(ℝ, E)) hU.isClosed_compl hK.isClosed
      (disjoint_left.mpr (fun x hx hxK => hx (hKU hxK))) (n := ⊀)
  have hΟ‡ : ContDiff ℝ (↑(⊀ : β„•βˆž)) (Ο‡ : E β†’ ℝ) := contMDiff_iff_contDiff.mp Ο‡.contMDiff
  refine ⟨fun x => Ο‡ x * Ο† x, ?_, ?_⟩
  Β· rw [contDiff_iff_contDiffAt]
    intro x
    by_cases hx : x ∈ U
    · exact hχ.contDiffAt.mul (hφ.contDiffAt (hU.mem_nhds hx))
    Β· have hzero : βˆ€αΆ  z in 𝓝 x, Ο‡ z = 0 := hΟ‡β‚€.filter_mono (nhds_le_nhdsSet hx)
      apply (contDiffAt_const : ContDiffAt ℝ (↑(⊀ : β„•βˆž)) (fun _ : E => (0 : ℝ)) x).congr_of_eventuallyEq
      filter_upwards [hzero] with z hz
      simp [hz]
  Β· intro x hx
    have hone : βˆ€αΆ  z in 𝓝 x, Ο‡ z = 1 := hχ₁.filter_mono (nhds_le_nhdsSet hx)
    filter_upwards [hone] with z hz
    simp [hz]

lemma compactFlux_local_test
    {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E] [MeasurableSpace E]
    (ΞΌ : Measure E) {U : Set E} (hU : IsOpen U)
    (F : E β†’ E) (hc : HasCompactSupport F) (hs : tsupport F βŠ† U)
    (hF : βˆ€ ψ : E β†’ ℝ, ContDiff ℝ (↑(⊀ : β„•βˆž)) ψ β†’
      (∫ x, fderiv ℝ ψ x (F x) βˆ‚ΞΌ) = 0)
    (Ο† : E β†’ ℝ) (hΟ† : ContDiffOn ℝ (↑(⊀ : β„•βˆž)) Ο† U) :
    (∫ x, fderiv ℝ Ο† x (F x) βˆ‚ΞΌ) = 0 := by
  obtain ⟨g, hg, hge⟩ := exists_smooth_extension_near_compact hU hc hs Ο† hΟ†
  rw [← hF g hg]
  apply integral_congr_ae
  filter_upwards [] with x
  by_cases hx : x ∈ tsupport F
  Β· rw [(hge x hx).fderiv_eq]
  Β· rw [image_eq_zero_of_notMem_tsupport hx, map_zero, map_zero]

lemma localPiolaFlux_zero_pairing
    {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
    (ΞΌ : Measure E) [ΞΌ.IsAddHaarMeasure]
    (X : OpenPartialHomeomorph E E) (hX : ContDiffOn ℝ (↑(⊀ : β„•βˆž)) X X.source)
    (hXi : ContDiffOn ℝ (↑(⊀ : β„•βˆž)) X.symm X.target)
    (F : E β†’ E) (hc : HasCompactSupport F) (hs : tsupport F βŠ† X.source)
    (hF : βˆ€ ψ : E β†’ ℝ, ContDiff ℝ (↑(⊀ : β„•βˆž)) ψ β†’
      (∫ x, fderiv ℝ ψ x (F x) βˆ‚ΞΌ) = 0)
    (ψ : E β†’ ℝ) (hψ : ContDiff ℝ (↑(⊀ : β„•βˆž)) ψ) :
    (∫ y, fderiv ℝ ψ y (localPiolaFlux X F y) βˆ‚ΞΌ) = 0 := by
  rw [localPiolaFlux_pairing ΞΌ X (hX.differentiableOn (by simp))
    (fun _ hx => local_fderiv_det_ne_zero X (hX.differentiableOn (by simp))
      (hXi.differentiableOn (by simp)) hx)
    F (subset_closure.trans hs) ψ (hψ.differentiable (by simp))]
  exact compactFlux_local_test μ X.open_source F hc hs hF _ (hψ.comp_contDiffOn hX)

end ScalarConductivity

end

end OAI