Download data/lean/OAI/Analysis/Calculus/Current/Cutoff.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 9.43 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Calculus/Current/Cutoff.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/Calculus/Current/Cutoff.lean
-
curl -L -o Cutoff.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Calculus/Current/Cutoff.lean
9.43 kB
| import OAI.Analysis.Calculus.Current.Coordinates | |
| import OAI.Analysis.Calculus.Current.Fiber.Normal | |
| import OAI.Analysis.Calculus.Quaternion.Cutoff | |
| /-! The exact cutoff factor in the regularized wave current. -/ | |
| noncomputable section | |
| namespace OAI.Analysis.Calculus.Current | |
| open OAI.Analysis.Calculus.Quaternion | |
| open scoped Matrix Matrix.Norms.Elementwise ContDiff | |
| theorem currentDirection_snd {d : β} (p : Index d Γ Fin 3) : | |
| (currentDirection p).2 = OAI.Analysis.Calculus.Quaternion.imaginaryDirection p.1 p.2 := by | |
| obtain β¨a, Ξ±β© := p | |
| fin_cases Ξ± <;> simp [currentDirection, OAI.Analysis.Calculus.Quaternion.imaginaryDirection, OAI.Analysis.Calculus.Quaternion.imaginarySlot] | |
| funext i | |
| simp [Pi.single_apply] | |
| theorem currentGradient_snd {d : β} {g : (Index d β β) β β} | |
| {x : Index d β β} {z : Index d β β} (hg : DifferentiableAt β g z) : | |
| OAI.Analysis.Calculus.Quaternion.gradientMap OAI.Analysis.Calculus.Quaternion.threeSlots | |
| (fun p => fderiv β (fun q : CurrentSpace d => g q.2) (x, z) (currentDirection p)) = | |
| OAI.Analysis.Calculus.Quaternion.imaginaryGradient g z := by | |
| have hF : fderiv β (fun q : CurrentSpace d => g q.2) (x, z) = | |
| (fderiv β g z).comp (ContinuousLinearMap.snd β (Index d β β) (Index d β β)) := by | |
| simpa only using! (hg.hasFDerivAt.comp (x, z) | |
| (ContinuousLinearMap.snd β (Index d β β) (Index d β β)).hasFDerivAt).fderiv | |
| funext a | |
| simp only [OAI.Analysis.Calculus.Quaternion.gradientMap, OAI.Analysis.Calculus.Quaternion.imaginaryGradient, hF, ContinuousLinearMap.comp_apply] | |
| change (β Ξ±, fderiv β g z ((currentDirection (a, Ξ±)).2) β’ OAI.Analysis.Calculus.Quaternion.threeSlots Ξ±) = _ | |
| simp only [currentDirection_snd] | |
| theorem current_smul_divergence_zero {d : β} | |
| {g : (Index d β β) β β} | |
| {A : (Index d β β) β (Index d β β) β Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q} | |
| {x : Index d β β} {z : Index d β β} | |
| (hg : DifferentiableAt β g z) | |
| (hA : DifferentiableAt β (fun p : CurrentSpace d => A p.1 p.2) (x, z)) | |
| (hG : star (OAI.Analysis.Calculus.Quaternion.imaginaryGradient g z) α΅₯* A x z = 0) | |
| (hdiv : β b, OAI.Analysis.Calculus.Quaternion.strongDivergence OAI.Analysis.Calculus.Quaternion.threeSlots (threeSlotMatrixDerivative A x z) b = 0) | |
| (b : Index d) : | |
| OAI.Analysis.Calculus.Quaternion.strongDivergence OAI.Analysis.Calculus.Quaternion.threeSlots | |
| (threeSlotMatrixDerivative (fun q w => g w β’ A q w) x z) b = 0 := by | |
| have hg' : DifferentiableAt β (fun p : CurrentSpace d => g p.2) (x, z) := | |
| hg.comp (x, z) differentiableAt_snd | |
| have hweighted : DifferentiableAt β | |
| (fun p : CurrentSpace d => g p.2 β’ A p.1 p.2) (x, z) := hg'.smul hA | |
| have hG' : star (OAI.Analysis.Calculus.Quaternion.gradientMap OAI.Analysis.Calculus.Quaternion.threeSlots | |
| (fun p => fderiv β (fun q : CurrentSpace d => g q.2) (x, z) (currentDirection p))) | |
| α΅₯* A x z = 0 := by | |
| rw [currentGradient_snd hg] | |
| exact hG | |
| have h := OAI.Analysis.Calculus.Quaternion.strongDivergence_current_smul_zero OAI.Analysis.Calculus.Quaternion.threeSlots currentDirection hg' hA hG' | |
| (fun j => by simpa only [fderiv_currentDirection hA] using hdiv j) b | |
| simpa only [fderiv_currentDirection (A := fun q w => g w β’ A q w) hweighted] using h | |
| def cutoffCurrent {d : β} (g : β β β) (a : β) | |
| (A : (Index d β β) β (Index d β β) β Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q) | |
| (x : Index d β β) (z : Index d β β) : Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q := | |
| g (phi z / (a : β)) β’ A x z | |
| theorem cutoffCurrent_divergence_zero {d : β} (g : β β β) (a : β) | |
| {A : (Index d β β) β (Index d β β) β Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q} | |
| {x : Index d β β} {z : Index d β β} (hY : z none β 0) | |
| (hg : DifferentiableAt β g (phi z / (a : β))) | |
| (hA : DifferentiableAt β (fun p : CurrentSpace d => A p.1 p.2) (x, z)) | |
| (htan : β b, β c, complexK (phaseRow (ratio z) c) * A x z c b = 0) | |
| (hdiv : β b, OAI.Analysis.Calculus.Quaternion.strongDivergence OAI.Analysis.Calculus.Quaternion.threeSlots (threeSlotMatrixDerivative A x z) b = 0) | |
| (b : Index d) : | |
| OAI.Analysis.Calculus.Quaternion.strongDivergence OAI.Analysis.Calculus.Quaternion.threeSlots (threeSlotMatrixDerivative (cutoffCurrent g a A) x z) b = 0 := by | |
| have hΟ : DifferentiableAt β (phi : (Index d β β) β β) z := by | |
| unfold phi | |
| fun_prop (disch := exact mul_ne_zero (two_ne_zero : (2 : β) β 0) hY) | |
| have hscale : DifferentiableAt β (fun q : β => q / (a : β)) (phi z) := by fun_prop | |
| have hgscale : DifferentiableAt β (fun q : β => g (q / (a : β))) (phi z) := | |
| hg.comp (phi z) hscale | |
| apply current_smul_divergence_zero (hgscale.comp z (hΟ.restrictScalars β)) hA | |
| _ hdiv b | |
| apply OAI.Analysis.Calculus.Quaternion.imaginaryGradient_real_comp_annihilates hΟ hgscale | |
| simpa only [fderiv_phi_single z hY] using htan | |
| theorem cutoffWaveCurrent_divergence_zero {d : β} {ΞΉ : Type*} [Fintype ΞΉ] | |
| (g : β β β) (a : β) (ΞΊ cR cI : ΞΉ β β) (v : ΞΉ β Fin d β β) | |
| (x : Index d β β) (z : Index d β β) (hY : z none β 0) | |
| (hg : DifferentiableAt β g (phi z / (a : β))) (b : Index d) : | |
| OAI.Analysis.Calculus.Quaternion.strongDivergence OAI.Analysis.Calculus.Quaternion.threeSlots | |
| (threeSlotMatrixDerivative (cutoffCurrent g a (waveCurrent ΞΊ cR cI v)) x z) b = 0 := by | |
| apply cutoffCurrent_divergence_zero g a hY hg | |
| Β· apply differentiableAt_pi.mpr | |
| intro i | |
| apply differentiableAt_pi.mpr | |
| intro j | |
| exact (contDiffAt_waveCurrent ΞΊ cR cI v x z hY i j).differentiableAt (by simp) | |
| Β· intro j | |
| simpa only [Matrix.mulVec_single_one, Matrix.col_apply] using | |
| waveCurrent_image_tangent ΞΊ cR cI v x z (Pi.single j 1) | |
| Β· exact waveCurrent_strongDivergence ΞΊ cR cI v x z hY | |
| theorem cutoffCurrent_zero_of_outside {d : β} (g : β β β) (a R : β) | |
| (hg : β q : β, R β€ βqβ β g q = 0) | |
| (A : (Index d β β) β (Index d β β) β Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q) | |
| (x : Index d β β) (z : Index d β β) (hz : R β€ βphi z / (a : β)β) : | |
| cutoffCurrent g a A x z = 0 := by | |
| simp [cutoffCurrent, hg _ hz] | |
| theorem cutoffCurrent_eq_of_inside {d : β} (g : β β β) (a r : β) | |
| (hg : β q : β, βqβ β€ r β g q = 1) | |
| (A : (Index d β β) β (Index d β β) β Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q) | |
| (x : Index d β β) (z : Index d β β) (hz : βphi z / (a : β)β β€ r) : | |
| cutoffCurrent g a A x z = A x z := by | |
| simp [cutoffCurrent, hg _ hz] | |
| /-- A concrete smooth cutoff with the exact inner and outer radii in the source. -/ | |
| def phaseBump : ContDiffBump (0 : β) where | |
| rIn := 1 / 100 | |
| rOut := 1 / 20 | |
| rIn_pos := by norm_num | |
| rIn_lt_rOut := by norm_num | |
| def phaseCutoff : β β β := phaseBump | |
| theorem phaseCutoff_contDiff : ContDiff β β phaseCutoff := phaseBump.contDiff | |
| theorem phaseCutoff_nonneg (q : β) : 0 β€ phaseCutoff q := phaseBump.nonneg | |
| theorem phaseCutoff_le_one (q : β) : phaseCutoff q β€ 1 := phaseBump.le_one | |
| theorem phaseCutoff_eq_one (q : β) (hq : βqβ β€ 1 / 100) : phaseCutoff q = 1 := by | |
| apply phaseBump.one_of_mem_closedBall | |
| simpa [phaseBump, Metric.mem_closedBall, dist_zero_right] using hq | |
| theorem phaseCutoff_eq_zero (q : β) (hq : 1 / 20 β€ βqβ) : phaseCutoff q = 0 := by | |
| apply phaseBump.zero_of_le_dist | |
| simpa [phaseBump, dist_zero_right] using hq | |
| theorem cutoffCurrent_isHermitian {d : β} (g : β β β) (a : β) | |
| (A : (Index d β β) β (Index d β β) β Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q) | |
| (x : Index d β β) (z : Index d β β) (hA : (A x z).IsHermitian) : | |
| (cutoffCurrent g a A x z).IsHermitian := by | |
| apply Matrix.ext | |
| intro i j | |
| simp only [Matrix.conjTranspose_apply, cutoffCurrent, Matrix.smul_apply, Quaternion.star_smul] | |
| rw [hA.apply] | |
| theorem cutoffCurrent_image_tangent {d : β} (g : β β β) (a : β) | |
| (A : (Index d β β) β (Index d β β) β Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q) | |
| (x : Index d β β) (z : Index d β β) | |
| (hA : β v, β b, complexK (phaseRow (ratio z) b) * (A x z *α΅₯ v) b = 0) | |
| (v : Index d β OAI.Analysis.Calculus.Quaternion.Q) : | |
| β b, complexK (phaseRow (ratio z) b) * (cutoffCurrent g a A x z *α΅₯ v) b = 0 := by | |
| simp only [cutoffCurrent, Matrix.smul_mulVec, Pi.smul_apply, mul_smul_comm, | |
| β Finset.smul_sum, hA, smul_zero] | |
| theorem cutoffCurrent_quadratic_nonneg {d : β} (g : β β β) (a : β) | |
| (A : (Index d β β) β (Index d β β) β Matrix (Index d) (Index d) OAI.Analysis.Calculus.Quaternion.Q) | |
| (x : Index d β β) (z : Index d β β) (hg : 0 β€ g (phi z / (a : β))) | |
| (hA : β v, 0 β€ (β b, star (v b) * (A x z *α΅₯ v) b).re) (v : Index d β OAI.Analysis.Calculus.Quaternion.Q) : | |
| 0 β€ (β b, star (v b) * (cutoffCurrent g a A x z *α΅₯ v) b).re := by | |
| simp only [cutoffCurrent, Matrix.smul_mulVec, Pi.smul_apply, mul_smul_comm, | |
| β Finset.smul_sum, Quaternion.re_smul, smul_eq_mul] | |
| exact mul_nonneg hg (hA v) | |
| end OAI.Analysis.Calculus.Current | |