File size: 4,245 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | import OAI.Probability.Ising.Contraction
import OAI.Probability.Ising.Influence
namespace OAI
open scoped BigOperators Classical
namespace BufferedIsing
noncomputable section
/-- The oriented pair matrix is precisely the original edge-list interaction;
parallel edges are summed, with no ghost and no change to the field. -/
def dssMatrix {n m : β} (G : FiniteGraph n m) (u v : Fin n) : β :=
β e, if G.left e = u then if G.right e = v then G.coupling e else 0 else 0
lemma dssMatrix_nonneg {n m : β} (G : FiniteGraph n m) (u v : Fin n) :
0 β€ dssMatrix G u v := by
apply Finset.sum_nonneg
intro e _
split_ifs <;> first | exact G.coupling_nonneg e | exact le_rfl
lemma dss_hamiltonian_eq {n m : β} (G : FiniteGraph n m) (h : Fin n β β)
(Ο : Spins n) : DSS.hamiltonian (dssMatrix G) h Ο = energy G h Ο := by
unfold DSS.hamiltonian energy dssMatrix
change ((β u, β v, (β e, if G.left e = u then if G.right e = v then
G.coupling e else 0 else 0) * spin (Ο u) * spin (Ο v)) + _) = _
congr 1
simp only [Finset.sum_mul]
calc
_ = β u, β e, β v, (if G.left e = u then if G.right e = v then
G.coupling e else 0 else 0) * spin (Ο u) * spin (Ο v) := by
apply Finset.sum_congr rfl
intro u _
exact Finset.sum_comm
_ = β e, β u, β v, (if G.left e = u then if G.right e = v then
G.coupling e else 0 else 0) * spin (Ο u) * spin (Ο v) := Finset.sum_comm
_ = _ := by simp [ite_mul, Finset.sum_ite_irrel]
lemma dss_mass_eq {n m : β} (G : FiniteGraph n m) (h : Fin n β β)
(Ο : Spins n) : DSS.mass (dssMatrix G) h Ο = weight G h Ο := by
rw [DSS.mass, weight, dss_hamiltonian_eq]
lemma dss_average_eq {n m : β} (G : FiniteGraph n m) (h : Fin n β β)
(f : Spins n β β) : DSS.average (dssMatrix G) h f = expectation G h f := by
simp only [DSS.average, DSS.part, dss_mass_eq, expectation]
congr!
/-- The arbitrary-field covariance bound for the finite edge-list Gibbs law, including equal sites. -/
theorem arbitraryFieldCovarianceBound : ArbitraryFieldCovarianceBound := by
intro n m G h u v
have H := DSS.covariance_le_zero_field (dssMatrix G) (dssMatrix_nonneg G) h u v
simp only [DSS.correlation, DSS.mean, dss_average_eq] at H
convert H using 1 <;> congr!
theorem effectiveCouplingBound : EffectiveCouplingBound :=
covarianceBound_iff_effectiveCouplingBound.mp arbitraryFieldCovarianceBound
lemma extremeLogOdds_le_zero {n m : β} (G : FiniteGraph n m)
(h : Fin n β β) (I J F : Finset (Fin n))
(hIJ : Disjoint I J) (hIF : Disjoint I F) (hJF : Disjoint J F)
(i j : KeptVertex F) (hi : i.val β I) (hj : j.val β J) (Ο : Spins n) :
extremeLogOdds G h I J F Ο β€ 4 * Real.artanh (qZero G I J F i j) := by
rw [extremeLogOdds_eq_actualCoupling G h I J F hIJ hIF hJF i j hi hj Ο,
artanh_qZero_eq_actualCoupling G I J F hIJ i j hi hj]
exact mul_le_mul_of_nonneg_left
(effectiveCouplingBound _ _ (actualComparisonGraph G I J F)
(actualComparisonField G h I J F Ο) _ _
(actualTerminal_ne G I J F hIJ i j hi hj)) (by norm_num)
/-- Finite-graph comparison for arbitrary probability mixtures on both sides. Dirac mixtures recover the conditional laws. -/
theorem finite_graph_comparison {n m : β} (G : FiniteGraph n m)
(h : Fin n β β) (I J F : Finset (Fin n))
(hIJ : Disjoint I J) (hIF : Disjoint I F) (hJF : Disjoint J F)
(i j : KeptVertex F) (hi : i.val β I) (hj : j.val β J)
(a Ο : Spins n) (mix mix' : Spins n β β)
(hmix : β b, 0 β€ mix b) (hmix' : β b, 0 β€ mix' b)
(hmixsum : β b, mix b = 1) (hmix'sum : β b, mix' b = 1) :
Real.exp (-4 * Real.artanh (qZero G I J F i j)) β€
mixtureProb G h I J F a Ο mix / mixtureProb G h I J F a Ο mix' β§
mixtureProb G h I J F a Ο mix / mixtureProb G h I J F a Ο mix' β€
Real.exp (4 * Real.artanh (qZero G I J F i j)) := by
have H := mixture_ratio_extreme G h I J F hIJ hIF hJF a Ο mix mix'
hmix hmix' hmixsum hmix'sum
have HB := extremeLogOdds_le_zero G h I J F hIJ hIF hJF i j hi hj Ο
exact β¨(Real.exp_le_exp.mpr (by linarith)).trans H.1,
H.2.trans (Real.exp_le_exp.mpr HB)β©
end
end BufferedIsing
end OAI
|