cfahlgren1's picture
download
raw
22.4 kB
import Mathlib
import OAI.Analysis.CoulombRadii.Variational.ConfigurationSplit
namespace OAI
section
noncomputable section
open MeasureTheory Filter
open scoped BigOperators Topology ContDiff
namespace NeutralAtom
def wedgeInsert {n : ℕ} (f : Position → ℝ) (ψ : Wavefunction n) : Wavefunction (n+1) :=
sumWavefunction (fun i : Fin (n+1) => permutationSign (Equiv.swap 0 i))
(fun i => permuteWavefunction (Equiv.swap 0 i) (insertWavefunction f ψ))
def wedgeInsertGradient {n : ℕ} (f : Position → ℝ) (ψ : Wavefunction n) (g : Gradient n) :
Gradient (n+1) :=
sumGradient (fun i : Fin (n+1) => permutationSign (Equiv.swap 0 i))
(fun i => permuteGradient (Equiv.swap 0 i) (insertGradient f ψ g))
theorem antisymmetrize_insert_eq {n : ℕ} {ψ : Wavefunction n} (hψ : IsAntisymmetric ψ)
(f : Position → ℝ) (σ : Spins (n+1)) :
antisymmetrize (insertWavefunction f ψ) σ =ᵐ[volume]
(fun x => (n.factorial : ℝ) • wedgeInsert f ψ σ x) := by
classical
have hi : ∀ᵐ x : Configuration (n+1) ∂volume, ∀ i : Fin (n+1), ∀ p : Equiv.Perm (Fin n),
permutationSign (Equiv.Perm.decomposeFin.symm (i,p)) •
permuteWavefunction (Equiv.Perm.decomposeFin.symm (i,p)) (insertWavefunction f ψ) σ x =
permutationSign (Equiv.swap 0 i) • permuteWavefunction (Equiv.swap 0 i) (insertWavefunction f ψ) σ x := by
apply (ae_all_iff).mpr
intro i
apply (ae_all_iff).mpr
intro p
filter_upwards [insert_permute_decompose hψ f i p σ] with x hx
rw [hx, permutationSign_decompose, smul_smul]
simp only [mul_assoc, permutationSign_sq, mul_one]
filter_upwards [hi] with x hx
unfold antisymmetrize sumWavefunction wedgeInsert
rw [← Equiv.sum_comp Equiv.Perm.decomposeFin.symm]
rw [Fintype.sum_prod_type]
simp_rw [hx]
simp only [Finset.sum_const, Finset.card_univ, Fintype.card_perm, Fintype.card_fin,
sumWavefunction, Finset.smul_sum]
apply Finset.sum_congr rfl
intro i _
simp only [Complex.real_smul, nsmul_eq_mul, Complex.ofReal_natCast]
theorem HasWeakGradient.unique_of_ae_eq {n : ℕ} {ψ χ : Wavefunction n} {g h : Gradient n}
(hg : HasWeakGradient ψ g) (hh : HasWeakGradient χ h)
(he : ∀ σ, ψ σ =ᵐ[volume] χ σ)
(hgi : ∀ σ i a, MemLp (g σ i a) 2 volume)
(hhi : ∀ σ i a, MemLp (h σ i a) 2 volume)
(σ : Spins n) (i : Fin n) (a : Fin 3) : g σ i a =ᵐ[volume] h σ i a := by
apply ae_eq_of_integral_contDiff_smul_eq
((hgi σ i a).locallyIntegrable (by norm_num))
((hhi σ i a).locallyIntegrable (by norm_num))
intro φ hφ hφc
have hl : (∫ x, (fderiv ℝ φ x (coordinateDirection i a) : ℂ) * ψ σ x) =
∫ x, (fderiv ℝ φ x (coordinateDirection i a) : ℂ) * χ σ x :=
integral_congr_ae ((he σ).mono fun x hx => by dsimp; rw [hx])
have hneg := (hg σ i a φ hφ hφc).symm.trans (hl.trans (hh σ i a φ hφ hφc))
simpa only [Complex.real_smul] using neg_injective hneg
def InsertionSupport {n : ℕ} (R : ℝ) (F : Wavefunction (n+1)) : Prop :=
∀ σ x, F σ x ≠ 0 → R < ‖x 0‖ ∧ ∀ i : Fin n, ‖x i.succ‖ ≤ R
theorem insertionSupport_tensor {n : ℕ} {R : ℝ} {f : Position → ℝ}
{ψ : Wavefunction n} (hf : ∀ y, ‖y‖ ≤ R → f y = 0)
(hψ : ∀ σ x, R < ‖x‖ → ψ σ x = 0) :
InsertionSupport R (insertWavefunction f ψ) := by
intro σ x hx
have hi : σ 0 = 0 := by
by_contra hh
exact hx (by simp [insertWavefunction, hh])
have hf0 : f (x 0) ≠ 0 := by
intro hh
exact hx (by simp [insertWavefunction, hh])
have hψ0 : ψ (fun i => σ i.succ) (fun i => x i.succ) ≠ 0 := by
intro hh
exact hx (by simp [insertWavefunction, hh])
have htail : ‖fun i : Fin n => x i.succ‖ ≤ R := by
by_contra hh
exact hψ0 (hψ _ _ (lt_of_not_ge hh))
exact ⟨lt_of_not_ge (fun hh => hf0 (hf _ hh)), fun i => (norm_le_pi_norm _ i).trans htail⟩
theorem InsertionSupport.swap {n : ℕ} {R : ℝ} {F : Wavefunction (n+1)}
(hF : InsertionSupport R F) {σ : Spins (n+1)} {x : Configuration (n+1)}
{i : Fin (n+1)} (hi : permuteWavefunction (Equiv.swap 0 i) F σ x ≠ 0) :
R < ‖x i‖ ∧ ∀ j, j ≠ i → ‖x j‖ ≤ R := by
have h := hF (σ ∘ Equiv.swap 0 i) (x ∘ Equiv.swap 0 i) hi
refine ⟨by simpa only [Function.comp_apply, Equiv.swap_apply_left] using h.1, ?_⟩
intro j hji
have hne : Equiv.swap 0 i j ≠ 0 := by
intro hh
have he := congrArg (Equiv.swap 0 i) hh
exact hji (by simpa only [Equiv.swap_apply_self, Equiv.swap_apply_left] using he)
have hg : ∀ k : Fin (n+1), k ≠ 0 → ‖x (Equiv.swap 0 i k)‖ ≤ R := by
intro k hk
cases k using Fin.cases with
| zero => exact (hk rfl).elim
| succ k => exact h.2 k
simpa only [Equiv.swap_apply_self] using hg _ hne
theorem InsertionSupport.placements_disjoint {n : ℕ} {R : ℝ} {F G : Wavefunction (n+1)}
(hF : InsertionSupport R F) (hG : InsertionSupport R G) (σ : Spins (n+1))
(x : Configuration (n+1)) {i j : Fin (n+1)} (hij : i ≠ j) :
permuteWavefunction (Equiv.swap 0 i) F σ x = 0 ∨
permuteWavefunction (Equiv.swap 0 j) G σ x = 0 := by
by_contra hh
have hi := hF.swap (not_or.mp hh).1
have hj := hG.swap (not_or.mp hh).2
exact (not_lt_of_ge (hj.2 i hij)) hi.1
theorem norm_sq_sum_of_disjoint {ι : Type*} [Fintype ι] (v : ι → ℂ)
(hv : ∀ i j, i ≠ j → v i = 0 ∨ v j = 0) :
‖∑ i, v i‖^2 = ∑ i, ‖v i‖^2 := by
classical
by_cases he : ∃ i, v i ≠ 0
· obtain ⟨i,hi⟩ := he
have hz : ∀ j, j ≠ i → v j = 0 := fun j hji => (hv j i hji).resolve_right hi
rw [Finset.sum_eq_single i, Finset.sum_eq_single i]
· intro j _ hji
simp [hz j hji]
· simp
· intro j _ hji
exact hz j hji
· simp
· have hz : ∀ i, v i = 0 := by simpa using he
simp [hz]
def spinsPerm {n : ℕ} (p : Equiv.Perm (Fin n)) : Spins n ≃ Spins n :=
(Equiv.piCongrLeft (fun _ : Fin n => Fin 2) p).symm
@[simp] theorem spinsPerm_apply {n : ℕ} (p : Equiv.Perm (Fin n)) (σ : Spins n) :
spinsPerm p σ = σ ∘ p := rfl
theorem normSquared_permute {n : ℕ} (p : Equiv.Perm (Fin n)) (ψ : Wavefunction n) :
normSquared (permuteWavefunction p ψ) = normSquared ψ := by
unfold normSquared permuteWavefunction
have hi (σ : Spins n) := (configurationPerm_preserving p).integral_comp
(configurationPerm p).toHomeomorph.measurableEmbedding (fun x => ‖ψ (σ ∘ p) x‖^2)
simp only [configurationPerm_apply] at hi
simp_rw [hi]
exact Equiv.sum_comp (spinsPerm p) (fun σ => ∫ x, ‖ψ σ x‖^2)
theorem energy_permute {n : ℕ} (Z : ℕ) (p : Equiv.Perm (Fin n))
(ψ : Wavefunction n) (g : Gradient n) :
energy Z (permuteWavefunction p ψ) (permuteGradient p g) = energy Z ψ g := by
have hi (σ : Spins n) (i : Fin n) (a : Fin 3) :=
(configurationPerm_preserving p).integral_comp
(configurationPerm p).toHomeomorph.measurableEmbedding (fun x => ‖g (σ ∘ p) (p.symm i) a x‖^2)
simp only [configurationPerm_apply] at hi
have hv (σ : Spins n) := (configurationPerm_preserving p).integral_comp
(configurationPerm p).toHomeomorph.measurableEmbedding
(fun x => coulombPotential Z x * ‖ψ (σ ∘ p) x‖^2)
simp only [configurationPerm_apply, coulombPotential_permute] at hv
unfold energy permuteWavefunction permuteGradient
simp_rw [hi, hv]
congr 1
· congr 1
have hs (σ : Spins n) : (∑ i : Fin n, ∑ a : Fin 3, ∫ x, ‖g σ (p.symm i) a x‖^2) =
∑ i : Fin n, ∑ a : Fin 3, ∫ x, ‖g σ i a x‖^2 :=
Equiv.sum_comp p.symm (fun i => ∑ a : Fin 3, ∫ x, ‖g σ i a x‖^2)
simp_rw [hs]
exact Equiv.sum_comp (spinsPerm p) (fun σ => ∑ i : Fin n, ∑ a : Fin 3, ∫ x, ‖g σ i a x‖^2)
· exact Equiv.sum_comp (spinsPerm p) (fun σ => ∫ x, coulombPotential Z x * ‖ψ σ x‖^2)
theorem norm_sq_sum_real_smul_of_disjoint {ι : Type*} [Fintype ι]
(c : ι → ℝ) (v : ι → ℂ) (hv : ∀ i j, i ≠ j → v i = 0 ∨ v j = 0) :
‖∑ i, c i • v i‖^2 = ∑ i, (c i)^2 * ‖v i‖^2 := by
rw [norm_sq_sum_of_disjoint (fun i => c i • v i)]
· simp only [norm_smul, mul_pow, Real.norm_eq_abs, sq_abs]
· intro i j hij
rcases hv i j hij with hi | hj
· exact Or.inl (by rw [hi, smul_zero])
· exact Or.inr (by rw [hj, smul_zero])
theorem FormRegular.integrable_potential {n : ℕ} {ψ : Wavefunction n} {g : Gradient n}
(hd : FormRegular ψ g) (Z : ℕ) (σ : Spins n) :
Integrable (fun x : Configuration n => coulombPotential Z x*‖ψ σ x‖^2) := by
have hn := integrable_finsetSum Finset.univ (fun i _ => hd.2.2.2.1 σ i)
have hp := integrable_finsetSum Finset.univ (fun i _ =>
integrable_finsetSum (Finset.univ.filter (fun j => i < j))
(fun j hj => hd.2.2.2.2 σ i j (Finset.mem_filter.mp hj).2))
apply ((hn.const_mul (-(Z:ℝ))).add hp).congr
exact Eventually.of_forall fun x => by
simp only [Pi.add_apply, coulombPotential, add_mul, Finset.sum_mul, mul_assoc]
theorem normSquared_disjoint_sum {n : ℕ} {ι : Type*} [Fintype ι]
(c : ι → ℝ) {ψ : ι → Wavefunction n} (hψ : ∀ i σ, MemLp (ψ i σ) 2 volume)
(hd : ∀ σ x i j, i ≠ j → ψ i σ x = 0 ∨ ψ j σ x = 0) :
normSquared (sumWavefunction c ψ) = ∑ i, (c i)^2 * normSquared (ψ i) := by
unfold normSquared sumWavefunction
simp_rw [norm_sq_sum_real_smul_of_disjoint c _ (hd _ _)]
simp_rw [integral_finsetSum _ (fun i _ => ((hψ i _).norm.integrable_sq).const_mul ((c i)^2)),
integral_const_mul]
rw [Finset.sum_comm]
simp only [Finset.mul_sum]
theorem energy_disjoint_sum {n : ℕ} {ι : Type*} [Fintype ι]
(Z : ℕ) (c : ι → ℝ) {ψ : ι → Wavefunction n} {g : ι → Gradient n}
(h : ∀ i, FormRegular (ψ i) (g i))
(hd : ∀ σ x i j, i ≠ j → ψ i σ x = 0 ∨ ψ j σ x = 0)
(hdg : ∀ σ k a x i j, i ≠ j → g i σ k a x = 0 ∨ g j σ k a x = 0) :
energy Z (sumWavefunction c ψ) (sumGradient c g) = ∑ i, (c i)^2 * energy Z (ψ i) (g i) := by
have hk (σ : Spins n) (k : Fin n) (a : Fin 3) :
(∫ x, ‖sumGradient c g σ k a x‖^2) =
∑ i, (c i)^2 * ∫ x, ‖g i σ k a x‖^2 := by
simp only [sumGradient]
simp_rw [norm_sq_sum_real_smul_of_disjoint c _ (hdg _ _ _ _)]
rw [integral_finsetSum _ (fun i _ => ((h i).2.2.1 σ k a).norm.integrable_sq.const_mul ((c i)^2))]
simp only [integral_const_mul]
have hv (σ : Spins n) :
(∫ x, coulombPotential Z x * ‖sumWavefunction c ψ σ x‖^2) =
∑ i, (c i)^2 * ∫ x, coulombPotential Z x * ‖ψ i σ x‖^2 := by
simp only [sumWavefunction]
simp_rw [norm_sq_sum_real_smul_of_disjoint c _ (hd _ _), Finset.mul_sum]
simp_rw [← mul_assoc, mul_comm (coulombPotential Z _) ((c _)^2), mul_assoc]
rw [integral_finsetSum _ (fun i _ => ((h i).integrable_potential Z σ).const_mul ((c i)^2))]
simp only [integral_const_mul]
unfold energy
simp_rw [hk, hv]
have hs : (∑ σ : Spins n, ∑ k : Fin n, ∑ a : Fin 3, ∑ i, (c i)^2 * ∫ x, ‖g i σ k a x‖^2) =
∑ i, (c i)^2 * ∑ σ : Spins n, ∑ k : Fin n, ∑ a : Fin 3, ∫ x, ‖g i σ k a x‖^2 := by
simp_rw [Finset.sum_comm (f := fun a i => (c i)^2 * ∫ x, ‖g i _ _ a x‖^2)]
simp_rw [Finset.sum_comm (f := fun k i => ∑ a : Fin 3, (c i)^2 * ∫ x, ‖g i _ k a x‖^2)]
rw [Finset.sum_comm]
simp only [Finset.mul_sum]
rw [hs, Finset.sum_comm (f := fun σ i => (c i)^2 * ∫ x, coulombPotential Z x * ‖ψ i σ x‖^2)]
rw [Finset.mul_sum, ← Finset.sum_add_distrib]
apply Finset.sum_congr rfl
intro i _
rw [← Finset.mul_sum]
ring
theorem insertionSupport_gradient {n : ℕ} {R : ℝ} {f : Position → ℝ}
{ψ : Wavefunction n} {g : Gradient n} (hf : ∀ y, ‖y‖ ≤ R → f y = 0)
(hdf : ∀ a y, ‖y‖ ≤ R → fderiv ℝ f y (EuclideanSpace.single a 1) = 0)
(hψ : ∀ σ x, R < ‖x‖ → ψ σ x = 0)
(hg : ∀ σ i a x, R < ‖x‖ → g σ i a x = 0) (i : Fin (n+1)) (a : Fin 3) :
InsertionSupport R (fun σ x => insertGradient f ψ g σ i a x) := by
cases i using Fin.cases with
| zero => exact insertionSupport_tensor (hdf a) hψ
| succ i => exact insertionSupport_tensor hf (fun σ x hx => hg σ i a x hx)
theorem wedgeInsert_antisymmetric {n : ℕ} {ψ : Wavefunction n} (hψ : IsAntisymmetric ψ)
(f : Position → ℝ) : IsAntisymmetric (wedgeInsert f ψ) := by
intro p σ
have hl := (antisymmetrize_insert_eq hψ f (σ ∘ p)).comp_tendsto
(configurationPerm_preserving p).quasiMeasurePreserving.tendsto_ae
filter_upwards [hl, antisymmetrize_insert_eq hψ f σ,
antisymmetrize_antisymmetric (insertWavefunction f ψ) p σ] with x hx hy hz
change antisymmetrize (insertWavefunction f ψ) (σ ∘ p) (x ∘ p) = _ at hx
rw [hx, hy] at hz
simp only [Complex.real_smul, Complex.ofReal_natCast] at hz
have hc : (n.factorial : ℂ) ≠ 0 := by exact_mod_cast Nat.factorial_ne_zero n
apply mul_left_cancel₀ hc
simpa only [Function.comp_apply, configurationPerm_apply,
mul_left_comm ((Equiv.Perm.sign p : ℤ) : ℂ)] using hz
theorem FormRegular.wedgeInsert {n : ℕ} {f : Position → ℝ} {ψ : Wavefunction n} {g : Gradient n}
(hψ : IsAntisymmetric ψ) (h : FormRegular (insertWavefunction f ψ) (insertGradient f ψ g)) :
FormDomain (wedgeInsert f ψ) (wedgeInsertGradient f ψ g) :=
⟨wedgeInsert_antisymmetric hψ f,
FormRegular.finite_sum (fun i => permutationSign (Equiv.swap 0 i))
(fun i => h.permute (Equiv.swap 0 i))⟩
theorem normSquared_wedgeInsert {n : ℕ} {R : ℝ} {f : Position → ℝ}
{ψ : Wavefunction n} (hψLp : ∀ σ, MemLp (ψ σ) 2 volume) (hfLp : MemLp f 2 volume)
(hs : InsertionSupport R (insertWavefunction f ψ)) :
normSquared (wedgeInsert f ψ) = (n+1 : ℝ) * normSquared (insertWavefunction f ψ) := by
have hLp (i : Fin (n+1)) (σ : Spins (n+1)) :
MemLp (permuteWavefunction (Equiv.swap 0 i) (insertWavefunction f ψ) σ) 2 volume :=
(insertWavefunction_memLp hψLp hfLp _).comp_measurePreserving
(configurationPerm_preserving (Equiv.swap 0 i))
unfold wedgeInsert
rw [normSquared_disjoint_sum _ hLp (fun σ x i j hij => hs.placements_disjoint hs σ x hij)]
simp only [pow_two, permutationSign_sq, one_mul, normSquared_permute, Finset.sum_const,
Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, Nat.cast_add, Nat.cast_one]
theorem energy_wedgeInsert {n : ℕ} (Z : ℕ) {R : ℝ} {f : Position → ℝ}
{ψ : Wavefunction n} {g : Gradient n}
(h : FormRegular (insertWavefunction f ψ) (insertGradient f ψ g))
(hs : InsertionSupport R (insertWavefunction f ψ))
(hsg : ∀ i a, InsertionSupport R (fun σ x => insertGradient f ψ g σ i a x)) :
energy Z (wedgeInsert f ψ) (wedgeInsertGradient f ψ g) =
(n+1 : ℝ) * energy Z (insertWavefunction f ψ) (insertGradient f ψ g) := by
unfold wedgeInsert wedgeInsertGradient
rw [energy_disjoint_sum Z _ (fun i => h.permute (Equiv.swap 0 i))
(fun σ x i j hij => hs.placements_disjoint hs σ x hij)
(fun σ k a x i j hij => (hsg ((Equiv.swap 0 i).symm k) a).placements_disjoint
(hsg ((Equiv.swap 0 j).symm k) a) σ x hij)]
simp only [pow_two, permutationSign_sq, one_mul, energy_permute, Finset.sum_const,
Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, Nat.cast_add, Nat.cast_one]
theorem integrable_supported_weight {A : Type*} [MeasurableSpace A] {μ : Measure A}
{ψ : A → ℂ} (hψ : MemLp ψ 2 μ) {W : A → ℝ} (hW : Measurable W)
{C : ℝ} (hb : ∀ x, ψ x ≠ 0 → |W x| ≤ C) :
Integrable (fun x => W x * ‖ψ x‖^2) μ := by
apply (hψ.norm.integrable_sq.const_mul C).mono'
(hW.aestronglyMeasurable.mul (hψ.aestronglyMeasurable.norm.pow 2))
apply Eventually.of_forall
intro x
by_cases hx : ψ x = 0
· simp [hx]
· change ‖W x * ‖ψ x‖^2‖ ≤ C * ‖ψ x‖^2
simpa only [Real.norm_eq_abs, abs_mul, abs_pow, abs_norm] using
mul_le_mul_of_nonneg_right (hb x hx) (sq_nonneg ‖ψ x‖)
theorem integrable_weighted_tensor {n : ℕ} {f : Position → ℝ} (hf : MemLp f 2 volume)
{ψ : Configuration n → ℂ} {W : Configuration n → ℝ}
(hW : Integrable (fun x => W x * ‖ψ x‖^2)) :
Integrable (fun x : Configuration (n+1) => W (fun i => x i.succ) *
‖f (x 0) • ψ (fun i => x i.succ)‖^2) := by
have hi : Integrable (fun z : Position × Configuration n => (f z.1)^2 * (W z.2 * ‖ψ z.2‖^2)) :=
hf.integrable_sq.mul_prod hW
have hp := (configurationSplit_preserving n).integrable_comp_of_integrable hi
apply hp.congr
exact Eventually.of_forall fun x => by
simp only [Function.comp_apply, configurationSplit_apply, norm_smul, mul_pow, Real.norm_eq_abs, sq_abs]
ring
theorem integral_weighted_tensor {n : ℕ} (f : Position → ℝ)
(ψ : Configuration n → ℂ) (W : Configuration n → ℝ) :
(∫ x : Configuration (n+1), W (fun i => x i.succ) * ‖f (x 0) • ψ (fun i => x i.succ)‖^2) =
(∫ y : Position, (f y)^2) * ∫ x : Configuration n, W x * ‖ψ x‖^2 := by
have he := (configurationSplit_preserving n).integral_comp
(configurationSplit n).toHomeomorph.measurableEmbedding
(fun z : Position × Configuration n => (f z.1)^2 * (W z.2 * ‖ψ z.2‖^2))
have hi := integral_prod_mul (μ := (volume : Measure Position)) (ν := (volume : Measure (Configuration n)))
(fun y => (f y)^2) (fun x => W x * ‖ψ x‖^2)
rw [← hi]
change _ = ∫ z : Position × Configuration n, (f z.1)^2 * (W z.2 * ‖ψ z.2‖^2)
rw [← he]
apply integral_congr_ae
exact Eventually.of_forall fun x => by
simp only [configurationSplit_apply, norm_smul, mul_pow, Real.norm_eq_abs, sq_abs]
ring
theorem inserted_nuclear_bound {n : ℕ} {d : ℝ} (hd : 0 < d)
{f : Position → ℝ} {ψ : Wavefunction n} (hf : ∀ y, ‖y‖ ≤ d → f y = 0)
(σ : Spins (n+1)) (x : Configuration (n+1)) (hx : insertWavefunction f ψ σ x ≠ 0) :
|‖x 0‖⁻¹| ≤ d⁻¹ := by
have hdf : d < ‖x 0‖ := by
by_contra hh
have hhf := hf (x 0) (le_of_not_gt hh)
exact hx (by simp [insertWavefunction, hhf])
simpa only [one_div, abs_of_nonneg (inv_nonneg.mpr (norm_nonneg _))] using
one_div_le_one_div_of_le hd hdf.le
theorem inserted_pair_bound {n : ℕ} {R d : ℝ} (hRd : R < d)
{f : Position → ℝ} {ψ : Wavefunction n} (hf : ∀ y, ‖y‖ ≤ d → f y = 0)
(hψ : ∀ σ x, R < ‖x‖ → ψ σ x = 0)
(σ : Spins (n+1)) (x : Configuration (n+1)) (i : Fin n)
(hx : insertWavefunction f ψ σ x ≠ 0) : |‖x 0-x i.succ‖⁻¹| ≤ (d-R)⁻¹ := by
have hdf : d < ‖x 0‖ := by
by_contra hh
exact hx (by simp [insertWavefunction, hf (x 0) (le_of_not_gt hh)])
have htail := (insertionSupport_tensor (fun y hy => hf y (hy.trans hRd.le)) hψ σ x hx).2 i
have hb := norm_sub_norm_le (x 0) (x i.succ)
have hdist : d-R ≤ ‖x 0-x i.succ‖ := by linarith
simpa only [one_div, abs_of_nonneg (inv_nonneg.mpr (norm_nonneg _))] using
one_div_le_one_div_of_le (sub_pos.mpr hRd) hdist
theorem FormRegular.insert_separated {n : ℕ} {ψ : Wavefunction n} {g : Gradient n}
(h : FormRegular ψ g) {R d : ℝ} (hd : 0 < d) (hRd : R < d)
(hψ : ∀ σ x, R < ‖x‖ → ψ σ x = 0)
{f : Position → ℝ} (hf : ContDiff ℝ ∞ f) (hfLp : MemLp f 2 volume)
(hdfLp : ∀ a, MemLp (fun y => fderiv ℝ f y (EuclideanSpace.single a 1)) 2 volume)
(hfout : ∀ y, ‖y‖ ≤ d → f y = 0) :
FormRegular (insertWavefunction f ψ) (insertGradient f ψ g) := by
refine ⟨HasWeakGradient.insert h.1 h.2.1 h.2.2.1 hf hfLp hdfLp,
insertWavefunction_memLp h.2.1 hfLp, insertGradient_memLp h.2.1 h.2.2.1 hfLp hdfLp, ?_, ?_⟩
· intro σ i
cases i using Fin.cases with
| zero =>
exact integrable_supported_weight (insertWavefunction_memLp h.2.1 hfLp σ)
(by fun_prop) (inserted_nuclear_bound hd hfout σ)
| succ i =>
by_cases hσ : σ 0 = 0
· simpa only [insertWavefunction, hσ, ↓reduceIte] using
integrable_weighted_tensor hfLp (h.2.2.2.1 (fun i => σ i.succ) i)
· simp [insertWavefunction, hσ]
· intro σ i j hij
cases i using Fin.cases with
| zero =>
cases j using Fin.cases with
| zero => exact (lt_irrefl _ hij).elim
| succ j =>
exact integrable_supported_weight (insertWavefunction_memLp h.2.1 hfLp σ)
(by fun_prop) (inserted_pair_bound hRd hfout hψ σ · j)
| succ i =>
cases j using Fin.cases with
| zero => exact (not_lt_of_ge (Fin.zero_le _) hij).elim
| succ j =>
by_cases hσ : σ 0 = 0
· simpa only [insertWavefunction, hσ, ↓reduceIte] using
integrable_weighted_tensor hfLp (h.pair (fun i => σ i.succ) i j)
· simp [insertWavefunction, hσ]
theorem coulombPotential_cons {n : ℕ} (Z : ℕ) (y : Position) (x : Configuration n) :
coulombPotential Z (Fin.cons y x) = coulombPotential Z x - (Z : ℝ)*‖y‖⁻¹ +
∑ i : Fin n, ‖y-x i‖⁻¹ := by
have hs {k : ℕ} (z : Configuration k) :
(∑ i : Fin k, ∑ j ∈ Finset.univ.filter (fun j => i < j), ‖z i-z j‖⁻¹) =
(1/2:ℝ) * ∑ i : Fin k, ∑ j : Fin k, ‖z i-z j‖⁻¹ :=
half_ordered_sum _ (fun i j => by rw [norm_sub_rev]) (fun i => by simp)
simp only [coulombPotential, hs, Fin.sum_univ_succ, Fin.cons_zero, Fin.cons_succ,
sub_self, norm_zero, inv_zero, zero_add, Finset.sum_add_distrib]
simp_rw [norm_sub_rev _ y]
ring
def gradientNormSquared {n : ℕ} (g : Gradient n) : ℝ :=
∑ i : Fin n, ∑ a : Fin 3, normSquared (fun σ x => g σ i a x)
theorem gradientNormSquared_eq {n : ℕ} (g : Gradient n) :
gradientNormSquared g = ∑ σ : Spins n, ∑ i : Fin n, ∑ a : Fin 3, ∫ x, ‖g σ i a x‖^2 := by
unfold gradientNormSquared normSquared
simp_rw [Finset.sum_comm (f := fun a σ => ∫ x, ‖g σ _ a x‖^2)]
rw [Finset.sum_comm]
def potentialForm {n : ℕ} (Z : ℕ) (ψ : Wavefunction n) : ℝ :=
∑ σ : Spins n, ∫ x, coulombPotential Z x * ‖ψ σ x‖^2
theorem energy_decompose {n : ℕ} (Z : ℕ) (ψ : Wavefunction n) (g : Gradient n) :
energy Z ψ g = (1/2 : ℝ)*gradientNormSquared g + potentialForm Z ψ := by
rw [gradientNormSquared_eq]
rfl
end NeutralAtom
end
end
end OAI

Xet Storage Details

Size:
22.4 kB
·
Xet hash:
ef7e9a795dbfaa42a19c1d718a42712a8e137e92eb56bb64382c626d1ecb864f

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.