Download lean/OAI/Analysis/CoulombIonization/Fermionic/Density.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 7.71 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Analysis/CoulombIonization/Fermionic/Density.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Analysis/CoulombIonization/Fermionic/Density.lean
-
curl -L -o Density.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Analysis/CoulombIonization/Fermionic/Density.lean
7.71 kB
Lean 4 · 9
declarations statementsfull
def density {N : ℕ} (ψ : FormVector (N+1)) (hψ : ∀ s, MemLp (ψ.value s) 2) (x : Space) : ℝ := body · 1 line
(oneParticleDensity ψ hψ x).toReal
lemma density_nonneg {N : ℕ} (ψ : FormVector (N+1)) (hψ : ∀ s, MemLp (ψ.value s) 2) (x : Space) :
0 ≤ density ψ hψ x := ENNReal.toReal_nonneg lemma density_integrable {N : ℕ} (ψ : FormVector (N+1)) (hψ : ∀ s, MemLp (ψ.value s) 2) :
Integrable (density ψ hψ) := fermionDensity_real_integrable (toMany ψ hψ) lemma density_mass {N : ℕ} (ψ : FormVector (N+1)) (hψ : FormAdmissible ψ) :
(∫ x, density ψ hψ.1 x) = (N+1:ℝ) := by proof · 2 lines
change (∫ x, (fermionDensity (toMany ψ hψ.1) x).toReal) = _
rw [fermionDensity_real_mass,toMany_norm_sq,hψ.2.2.2.2.1,mul_one]lemma density_power_integrable {N : ℕ} (ψ : FormVector (N+1)) (hψ : FormAdmissible ψ) :
Integrable (fun x => density ψ hψ.1 x^(5/3:ℝ)) := by proof · 7 lines
have hm := (fermionDensity_aemeasurable (toMany ψ hψ.1)).pow_const (5/3:ℝ)
have hb := form_lieb_thirring ψ hψ
have hn : (∫⁻ x, oneParticleDensity ψ hψ.1 x^(5/3:ℝ)) ≠ ⊤ :=
ne_top_of_le_ne_top ENNReal.ofReal_ne_top hb
have hi := integrable_toReal_of_lintegral_ne_top hm hn
change Integrable (fun x => (fermionDensity (toMany ψ hψ.1) x).toReal ^ (5/3:ℝ))
simpa only [← ENNReal.toReal_rpow] using hilemma density_power_bound {N : ℕ} (ψ : FormVector (N+1)) (hψ : FormAdmissible ψ) :
(∫ x, density ψ hψ.1 x^(5/3:ℝ)) ≤
32*(N+1:ℝ) + (2048/3:ℝ) *
(∑ s : Spins (N+1), ∑ i : Fin (N+1), ∑ a : Fin 3,
∫ x : Configuration (N+1), ‖ψ.gradient s i a x‖^2) := by proof · 10 lines
have hm := (fermionDensity_aemeasurable (toMany ψ hψ.1)).pow_const (5/3:ℝ)
have hb := form_lieb_thirring ψ hψ
have hn : (∫⁻ x, oneParticleDensity ψ hψ.1 x^(5/3:ℝ)) ≠ ⊤ :=
ne_top_of_le_ne_top ENNReal.ofReal_ne_top hb
have he := integral_toReal hm (ae_lt_top' hm hn)
simp only [← ENNReal.toReal_rpow] at he
change (∫ x, (fermionDensity (toMany ψ hψ.1) x).toReal ^ (5/3:ℝ)) ≤ _
rw [he]
exact (ENNReal.toReal_le_toReal hn ENNReal.ofReal_ne_top).2 hb |>.trans_eq
(ENNReal.toReal_ofReal (by positivity))lemma toMany_coordinate_lintegral {N : ℕ} (ψ : FormVector N)
(hψ : ∀ s, MemLp (ψ.value s) 2) (i : Fin N) (w : Space → ℝ)
(hw : Measurable w) :
(∫⁻ q, ENNReal.ofReal (w (q i).1) * ENNReal.ofReal (‖toMany ψ hψ q‖^2)
∂configMeasure N oneMeasure) =
∑ s : Spins N, ∫⁻ x : Configuration N,
ENNReal.ofReal (w (x i)) * ENNReal.ofReal (‖ψ.value s x‖^2) := by proof · 20 lines
have hm : AEMeasurable (fun p : Configuration N × Spins N =>
ENNReal.ofReal (w (p.1 i)) * ENNReal.ofReal (‖ψ.value p.2 p.1‖^2))
((volume : Measure (Configuration N)).prod Measure.count) :=
((hw.comp ((measurable_pi_apply i).comp measurable_fst)).ennreal_ofReal.aemeasurable).mul
((memLp_spin ψ.value hψ).aestronglyMeasurable.norm.pow 2).aemeasurable.ennreal_ofReal
calc
_ = ∫⁻ q, ENNReal.ofReal (w (q i).1) *
ENNReal.ofReal (‖ψ.value (fun j => (q j).2) (fun j => (q j).1)‖^2)
∂configMeasure N oneMeasure := by
apply lintegral_congr_ae
filter_upwards [toMany_ae ψ hψ] with q hq
rw [hq]
_ = ∫⁻ p : Configuration N × Spins N,
ENNReal.ofReal (w (p.1 i)) * ENNReal.ofReal (‖ψ.value p.2 p.1‖^2)
∂volume.prod Measure.count :=
(splitSpin_preserving N).lintegral_comp_emb (splitSpin N).measurableEmbedding
(fun p : Configuration N × Spins N => ENNReal.ofReal (w (p.1 i)) * ENNReal.ofReal (‖ψ.value p.2 p.1‖^2))
_ = _ := by
rw [lintegral_prod_symm _ hm]
simp only [lintegral_fintype,Measure.count_singleton,mul_one]lemma density_coulomb_lintegral {N : ℕ} (ψ : FormVector (N+1)) (hψ : FormAdmissible ψ) :
(∫⁻ x, ENNReal.ofReal (‖x‖⁻¹) * oneParticleDensity ψ hψ.1 x) =
ENNReal.ofReal (∑ s : Spins (N+1), ∑ i : Fin (N+1),
∫ x : Configuration (N+1), ‖ψ.value s x‖^2 / ‖x i‖) := by proof · 29 lines
change (∫⁻ x : Space, ENNReal.ofReal (‖x‖⁻¹) * fermionDensity (toMany ψ hψ.1) x) = _
rw [density_weighted_lintegral (toMany ψ hψ.1) (fun x : Space => ‖x‖⁻¹) measurable_norm.inv]
trans ∑ i : Fin (N+1), ∑ s : Spins (N+1), ∫⁻ x : Configuration (N+1),
ENNReal.ofReal (‖x i‖⁻¹) * ENNReal.ofReal (‖ψ.value s x‖^2)
· exact Finset.sum_congr rfl (fun i _ =>
toMany_coordinate_lintegral ψ hψ.1 i (fun x : Space => ‖x‖⁻¹) measurable_norm.inv)
have hi (i : Fin (N+1)) (s : Spins (N+1)) :
(∫⁻ x : Configuration (N+1), ENNReal.ofReal (‖x i‖⁻¹) *
ENNReal.ofReal (‖ψ.value s x‖^2)) =
ENNReal.ofReal (∫ x : Configuration (N+1), ‖ψ.value s x‖^2 / ‖x i‖) := by
rw [ofReal_integral_eq_lintegral_ofReal (hψ.2.2.2.2.2.1 s i)
(Filter.Eventually.of_forall (fun x => by positivity))]
apply lintegral_congr
intro x
rw [← ENNReal.ofReal_mul (by positivity : 0 ≤ ‖x i‖⁻¹)]
congr 1
simp only [div_eq_mul_inv,mul_comm]
simp_rw [hi]
rw [Finset.sum_comm]
have hnuc (s : Spins (N+1)) (i : Fin (N+1)) :
0 ≤ ∫ x : Configuration (N+1), ‖ψ.value s x‖^2 / ‖x i‖ :=
integral_nonneg (fun _ => by positivity)
have heach (s : Spins (N+1)) :
(∑ i : Fin (N+1), ENNReal.ofReal (∫ x : Configuration (N+1), ‖ψ.value s x‖^2 / ‖x i‖)) =
ENNReal.ofReal (∑ i : Fin (N+1), ∫ x : Configuration (N+1), ‖ψ.value s x‖^2 / ‖x i‖) :=
(ENNReal.ofReal_sum_of_nonneg (fun i _ => hnuc s i)).symm
simp_rw [heach]
exact (ENNReal.ofReal_sum_of_nonneg (fun s _ => Finset.sum_nonneg
(fun i _ => hnuc s i))).symmlemma density_coulomb_integral {N : ℕ} (ψ : FormVector (N+1)) (hψ : FormAdmissible ψ) :
Integrable (fun x => density ψ hψ.1 x / ‖x‖) ∧
(∫ x, density ψ hψ.1 x / ‖x‖) =
∑ s : Spins (N+1), ∑ i : Fin (N+1),
∫ x : Configuration (N+1), ‖ψ.value s x‖^2 / ‖x i‖ := by proof · 15 lines
have hm : AEMeasurable (fun x => ENNReal.ofReal (‖x‖⁻¹) * oneParticleDensity ψ hψ.1 x) :=
measurable_norm.inv.ennreal_ofReal.aemeasurable.mul
(fermionDensity_aemeasurable (toMany ψ hψ.1))
have he := density_coulomb_lintegral ψ hψ
have hn : (∫⁻ x, ENNReal.ofReal (‖x‖⁻¹) * oneParticleDensity ψ hψ.1 x) ≠ ⊤ := by
rw [he]; exact ENNReal.ofReal_ne_top
have hv (x : Space) :
(ENNReal.ofReal (‖x‖⁻¹) * oneParticleDensity ψ hψ.1 x).toReal = density ψ hψ.1 x/‖x‖ := by
rw [ENNReal.toReal_mul,ENNReal.toReal_ofReal (by positivity)]
exact mul_comm _ _
have hit := integrable_toReal_of_lintegral_ne_top hm hn
have hei := integral_toReal hm (ae_lt_top' hm hn)
simp only [hv] at hit hei
refine ⟨hit, ?_⟩
rw [hei,he,ENNReal.toReal_ofReal (by positivity)]Outline