theoremspinGroupCount_mean_of_site_means {N : ℕ} {A : Type*} [DecidableEqA]
(group : FinN→A) (a : A) (μ : FinN→MeasureBool)
[∀ i, IsProbabilityMeasure (μ i)] (m : ℝ)
(hm : ∀ i, group i = a → (∫ σ, spinValue σ ∂μ i) = m) :
(∫σ : SpinN, (spinGroupCount group σ a : ℝ) ∂Measure.pi μ) =
(spinGroupSize group a : ℝ) * ((1 + m) / 2) :=by
proof · 14
lines
have hi (σ : SpinN) : (spinGroupCount group σ a : ℝ) =
∑ i, spinGroupCountSummand group a i (σ i) := (sum_spinGroupCountSummand group a σ).symm
simp_rw [hi]
rw [integral_finsetSum _ (fun _ _ =>Integrable.of_finite)]
have hj (i : FinN) :
(∫σ : SpinN, spinGroupCountSummand group a i (σ i) ∂Measure.pi μ) =
if group i = a then (1 + m) / 2else0:=by
rw [integral_comp_eval (μ := μ) (i := i) (measurable_of_finite _).aestronglyMeasurable]
by_cases hg : group i = a
· simpa only [spinGroupCountSummand, hg, true_and, ite_true] using
spin_true_mean_of_spin_mean (μ i) (hm i hg)
· simp [spinGroupCountSummand, hg]
simp_rw [hj]
simp [Finset.sum_ite, spinGroupSize, mul_comm]
theoremmagneticCanonical_projection_distance {N : ℕ} {A : Type*}
[FintypeA] [DecidableEqA] (group : FinN→A) (k : A→ℕ)
(hk : ∀ a, k a ≤ spinGroupSize group a) (m : A→ℝ) (hm : ∀ a, |m a| < 1)
(hcount : ∀ a, (k a : ℝ) = (spinGroupSize group a : ℝ) * ((1 + m a) / 2))
(h : FieldStep) :
(∫σ : SpinN, (hammingDist σ (spinGroupProjection group k hk σ) : ℝ)
∂Measure.pi (fun i => fieldCanonicalSpinLaw h (magneticBias h (m (group i))))) ≤∑ a, Real.sqrt (spinGroupSize group a) :=by
proof · 6
lines
apply spinGroupProjection_product_mean_distance
intro a
rw [spinGroupCount_mean_of_site_means group a _ (m a) (fun i hi =>by
rw [hi]
exact fieldCanonicalSpinLaw_magnetic_mean h (hm a))]
exact (hcount a).symm