cfahlgren1/math / lean /OAI /Probability /InvariantIsing /Haar /HaarHessianExpansion.lean
cfahlgren1's picture
download
raw
989 Bytes
import OAI.Probability.InvariantIsing.Haar.HaarCorrectedHessian
namespace OAI
/-! Finite square completion in the logarithmic Bochner calculation. -/
noncomputable section
open scoped BigOperators
namespace InvariantIsing
lemma sum_gradient_outer_sq {J : Type*} [Fintype J] (g : J → ℝ) :
(∑ i, ∑ j, (g i*g j)^2) = (∑ i, (g i)^2)^2 := by
simp only [mul_pow]
rw [pow_two,Finset.sum_mul]
apply Finset.sum_congr rfl
intro i _
rw [Finset.mul_sum]
lemma sum_corrected_hessian_sq {J : Type*} [Fintype J]
(H : J → J → ℝ) (g : J → ℝ) (c : ℝ) :
(∑ i, ∑ j, (H i j-c*g i*g j)^2) =
(∑ i, ∑ j, (H i j)^2)-2*c*(∑ i, ∑ j, H i j*g i*g j)+
c^2*(∑ i, (g i)^2)^2 := by
have hs (i j : J) : (H i j-c*g i*g j)^2 =
(H i j)^2-2*c*(H i j*g i*g j)+c^2*(g i*g j)^2 := by ring
simp_rw [hs]
simp only [Finset.sum_add_distrib,Finset.sum_sub_distrib,← Finset.mul_sum]
rw [sum_gradient_outer_sq]
end InvariantIsing
end
end OAI

Xet Storage Details

Size:
989 Bytes
·
Xet hash:
a42a14ad57095b5fbdbb8a9d891e9a80e4f3d089d475768596787c4ec3ca96a6

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