Download data/lean/OAI/Analysis/Conductivity/Variational/ContDiffClmDet.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.94 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Conductivity/Variational/ContDiffClmDet.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/Conductivity/Variational/ContDiffClmDet.lean
-
curl -L -o ContDiffClmDet.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Conductivity/Variational/ContDiffClmDet.lean
5.94 kB
| 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 | |