Download data/lean/OAI/Analysis/Conductivity/Variational/ChangeOld.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.22 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Conductivity/Variational/ChangeOld.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/Conductivity/Variational/ChangeOld.lean
-
curl -L -o ChangeOld.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Conductivity/Variational/ChangeOld.lean
8.22 kB
| import Mathlib | |
| import OAI.Analysis.Conductivity.Geometry.CompactSplitSubpatch | |
| 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 | |
| lemma fderiv_eq_of_eqOn_open {E V : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| [NormedAddCommGroup V] [NormedSpace β V] {O : Set E} (hO : IsOpen O) | |
| {u v : E β V} (he : EqOn u v O) {x : E} (hx : x β O) : | |
| fderiv β u x = fderiv β v x := by | |
| apply Filter.EventuallyEq.fderiv_eq | |
| exact Filter.EventuallyEq.filter_mono (he.eventuallyEq_of_mem (hO.mem_nhds hx)) le_rfl | |
| def CompactTwoFieldReplacement.changeOld | |
| {ΞΌ : Measure Coord3} {O : Set Coord3} (hO : IsOpen O) | |
| {u v : Coord3 β Fin 2 β β} {A B : Coord3 β Symmetric3} | |
| (R : CompactTwoFieldReplacement ΞΌ O u A) (he : EqOn u v O) (hAB : EqOn A B O) : | |
| CompactTwoFieldReplacement ΞΌ O v B where | |
| du := R.du | |
| dF := R.dF | |
| tensor := R.tensor | |
| smooth_du := R.smooth_du | |
| compact_du := R.compact_du | |
| support_du := R.support_du | |
| smooth_dF := R.smooth_dF | |
| compact_dF := R.compact_dF | |
| support_dF := R.support_dF | |
| cauchy_dF := R.cauchy_dF | |
| smooth_tensor := R.smooth_tensor | |
| rank := by | |
| intro x hx | |
| rw [β fderiv_eq_of_eqOn_open hO (show EqOn (fun y => u y+R.du y) | |
| (fun y => v y+R.du y) O from fun y hy => by dsimp only; rw [he hy]) hx] | |
| exact R.rank x hx | |
| constitutive := by | |
| intro x hx | |
| rw [β fderiv_eq_of_eqOn_open hO (show EqOn (fun y => u y+R.du y) | |
| (fun y => v y+R.du y) O from fun y hy => by dsimp only; rw [he hy]) hx] | |
| rw [R.constitutive x hx] | |
| simp only [conductivityFlux, hAB hx, fderiv_eq_of_eqOn_open hO he hx] | |
| theorem exists_locally_smooth_compact_split | |
| (ΞΌ : Measure Coord3) [ΞΌ.IsAddHaarMeasure] | |
| (u : Coord3 β Fin 2 β β) (A : Coord3 β Symmetric3) {p : Coord3} | |
| {U : Set Coord3} (hU : IsOpen U) (hUb : Bornology.IsBounded U) (hpU : p β 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) | |
| (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) | |
| {ΞΈ c m : β} (hΞΈ : 0 < ΞΈ) (hΞΈ1 : ΞΈ < 1) | |
| (hm : 0 < m) (hpath : β z β Icc (-ΞΈ) (1-ΞΈ), m β€ 1+c*z) | |
| (C : β β Symmetric3) (hC : β z β Icc (-ΞΈ) (1-ΞΈ), ContinuousAt C z) | |
| (hCs : β z β Icc (-ΞΈ) (1-ΞΈ), ContDiffAt β (β(β€ : ββ)) (fun t => (C t).val) z) | |
| (hdet : β z β Icc (-ΞΈ) (1-ΞΈ), 0 < (splitJacobian d L c z).det) | |
| (hconstit : β z β Icc (-ΞΈ) (1-ΞΈ), | |
| (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 (-ΞΈ) (1-ΞΈ), (z, C z) β G) : | |
| β 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) (q : Coord3 β β), | |
| ContDiff β (β(β€ : ββ)) q β§ (β x, q x β Icc (-ΞΈ) (1-ΞΈ)) β§ | |
| (β x β O, (q x, R.tensor x) β G) β§ | |
| ΞΌ {x | x β O β§ q x β -ΞΈ β§ q x β 1-ΞΈ} β€ ENNReal.ofReal Ξ΅ := by | |
| obtain β¨v, V, hv, _, hV, hpV, hVU, heβ© := exists_smooth_compact_extension | |
| hU hUb isCompact_singleton (singleton_subset_iff.mpr hpU) u hu | |
| have hep : fderiv β v p = fderiv β u p := fderiv_eq_of_eqOn_open hV he (hpV (mem_singleton p)) | |
| have hAp : ContinuousAt A p := | |
| Topology.IsInducing.subtypeVal.continuousAt_iff.mpr | |
| (hA.continuousOn.continuousAt (hU.mem_nhds hpU)) | |
| have hdivv : β j (Ο : Coord3 β β), ContDiff β (β(β€ : ββ)) Ο β HasCompactSupport Ο β | |
| tsupport Ο β V β (β« x, fderiv β Ο x ((conductivityFlux v A x).col j) βΞΌ) = 0 := by | |
| intro j Ο hΟ hc hs | |
| rw [derivative_test_integral_congr ΞΌ Ο _ (fun x => (conductivityFlux u A x).col j) (by | |
| intro x hx | |
| simp only [conductivityFlux, fderiv_eq_of_eqOn_open hV he (hs hx)])] | |
| exact hdiv j Ο hΟ hc (hs.trans hVU) | |
| obtain β¨W, hW, hpW, hWV, hWc, hwβ© := exists_compact_split_on_subpatch ΞΌ v hv A hAp | |
| hV (hUb.subset hVU) (hpV (mem_singleton p)) (hA.mono hVU) hdivv (hep βΈ hD) | |
| d L hLd B hB hBn hΞΈ hΞΈ1 hm hpath C hC hCs hdet hconstit hG hCG | |
| refine β¨W, hW, hpW, hWV.trans hVU, hWc, ?_β© | |
| intro O hO hOW Ξ΅ hΞ΅ | |
| obtain β¨R, q, hq, hqr, hqG, hqmβ© := hw O hO hOW Ξ΅ hΞ΅ | |
| exact β¨R.changeOld hO (he.mono (hOW.trans (subset_closure.trans hWV))) (fun _ _ => rfl), | |
| q, hq, hqr, hqG, hqmβ© | |
| end ScalarConductivity | |
| namespace ScalarConductivity | |
| open Set MeasureTheory Filter Topology | |
| theorem local_compact_piola_difference_regular | |
| {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [FiniteDimensional β E] | |
| (Y : E β E) (hY : ContDiff β (β(β€ : ββ)) Y) | |
| (hi : ContDiff β (β(β€ : ββ)) Y.symm) | |
| {K U : Set E} (hU : IsOpen U) (hUb : Bornology.IsBounded U) | |
| (hK : IsCompact K) (hKU : K β U) (hoff : β x β K, Y x = x) | |
| (F : E β E) (hF : ContDiffOn β (β(β€ : ββ)) F U) : | |
| ContDiff β (β(β€ : ββ)) (fun x => piolaFlux Y F x-F x) β§ | |
| HasCompactSupport (fun x => piolaFlux Y F x-F x) β§ | |
| tsupport (fun x => piolaFlux Y F x-F x) β K := by | |
| obtain β¨G, W, hG, _, _, hKW, _, heβ© := exists_smooth_compact_extension hU hUb hK hKU F hF | |
| have hsame : (fun x => piolaFlux Y F x-F x) = fun x => piolaFlux Y G x-G x := by | |
| funext x | |
| by_cases hx : x β K | |
| Β· have hix := (equiv_mapsTo_of_fixed_compl Y K hoff).2 hx | |
| dsimp only [piolaFlux] | |
| rw [he (hKW hx), he (hKW hix)] | |
| Β· rw [piolaFlux_eq_off Y hK.isClosed hoff F hx, | |
| piolaFlux_eq_off Y hK.isClosed hoff G hx, sub_self, sub_self] | |
| have hs : tsupport (fun x => piolaFlux Y F x-F x) β K := by | |
| apply closure_minimal _ hK.isClosed | |
| intro x hx | |
| by_contra hn | |
| exact hx (by dsimp only; rw [piolaFlux_eq_off Y hK.isClosed hoff F hn, sub_self]) | |
| refine β¨?_, hK.of_isClosed_subset isClosed_closure hs, hsβ© | |
| rw [hsame] | |
| exact (piolaFlux_contDiff Y hY hi G hG).sub hG | |
| theorem local_compact_updated_flux_regular | |
| {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [FiniteDimensional β E] | |
| (Y : E β E) (hY : ContDiff β (β(β€ : ββ)) Y) | |
| (hi : ContDiff β (β(β€ : ββ)) Y.symm) | |
| {K U : Set E} (hU : IsOpen U) (hUb : Bornology.IsBounded U) | |
| (hK : IsCompact K) (hKU : K β U) (hoff : β x β K, Y x = x) | |
| (F Ξ΄ : E β E) (hF : ContDiffOn β (β(β€ : ββ)) F U) | |
| (hΞ΄ : ContDiff β (β(β€ : ββ)) Ξ΄) (hsΞ΄ : tsupport Ξ΄ β K) : | |
| ContDiff β (β(β€ : ββ)) (fun x => piolaFlux Y (fun z => F z+Ξ΄ z) x-F x) β§ | |
| HasCompactSupport (fun x => piolaFlux Y (fun z => F z+Ξ΄ z) x-F x) β§ | |
| tsupport (fun x => piolaFlux Y (fun z => F z+Ξ΄ z) x-F x) β K := by | |
| obtain β¨hs, _, hskβ© := local_compact_piola_difference_regular Y hY hi hU hUb hK hKU hoff F hF | |
| have hp := piolaFlux_contDiff Y hY hi Ξ΄ hΞ΄ | |
| have hps := piolaFlux_tsupport_subset Y hK.isClosed hoff Ξ΄ hsΞ΄ | |
| have heq : (fun x => piolaFlux Y (fun z => F z+Ξ΄ z) x-F x) = | |
| fun x => (piolaFlux Y F x-F x)+piolaFlux Y Ξ΄ x := by | |
| rw [piolaFlux_add] | |
| funext x; simp only [sub_eq_add_neg]; ac_rfl | |
| have htotal : tsupport (fun x => piolaFlux Y (fun z => F z+Ξ΄ z) x-F x) β K := by | |
| rw [heq] | |
| exact (tsupport_add _ _).trans (union_subset hsk hps) | |
| refine β¨?_, hK.of_isClosed_subset isClosed_closure htotal, htotalβ© | |
| rw [heq] | |
| exact hs.add hp | |
| end ScalarConductivity | |
| end | |
| end OAI | |