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