File size: 5,329 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 95 96 97 98 99 100 101 102 103 104 105 106 107 | import OAI.Combinatorics.ContingencyTables.Sampling.AllSmallFibres
import OAI.Combinatorics.ContingencyTables.Sampling.UnitGraphEnergy
namespace OAI
/-! # The small-state walk when no dense completion remains
Every retained completion then has weight one. The same local graph is
sampled by accepting every valid proposal; no reference row is chosen.
-/
namespace ContingencyTables.SmallGraphProfiles
open scoped BigOperators Classical
open CompletionCounts CommonBasesFPRAS FiniteExposureVariance
noncomputable section
universe u
variable {I J : Type u} [Fintype I] [Fintype J] [LinearOrder I] [LinearOrder J]
variable (r : I β β) (c : J β β) [Nonempty (PaperStates r c)]
local notation "d" => dimensionAllowance (I := I) (J := J)
local instance : DecidableEq (PaperStates r c) := Classical.decEq _
local notation "Adj" => physicalAdjacent r c (d^20) (d^12) (stateCapacity r c) (stateCapacity_small r c)
def unitSmallChain : FiniteChain (PaperStates r c) :=
MetropolisChain.chain (fun _ => 1) (fun _ => by norm_num) Adj
(physicalAdjacent_symmetric r c _ _ (stateCapacity r c) (stateCapacity_small r c))
(smallProposal d) ((smallProposal_bounds d (by unfold dimensionAllowance; omega)).1.le)
(5*d^2+1)
(physicalAdjacent_degree_allowance r c _ _ (stateCapacity r c) (stateCapacity_small r c))
(smallProposal_degree d (by unfold dimensionAllowance; omega))
lemma unitSmallChain_pi (z : PaperStates r c) :
(unitSmallChain r c).Ο z=1/(Fintype.card (PaperStates r c):β) := by
simp only [unitSmallChain,MetropolisChain.chain,FiniteChain.ofMoves,
MetropolisChain.normalizer,Finset.sum_const,Finset.card_univ,nsmul_eq_mul,mul_one]
lemma unitSmallChain_energy (H : PaperStates r c β β) :
(unitSmallChain r c).energy H=
(smallProposal d/(Fintype.card (PaperStates r c):β))*
((β x,β y,if Adj x y then (H x-H y)^2 else 0)/2) := by
exact MetropolisChain.unit_chain_energy Adj
(physicalAdjacent_symmetric r c _ _ (stateCapacity r c) (stateCapacity_small r c))
(smallProposal d) ((smallProposal_bounds d (by unfold dimensionAllowance; omega)).1.le)
(5*d^2+1)
(physicalAdjacent_degree_allowance r c _ _ (stateCapacity r c) (stateCapacity_small r c))
(smallProposal_degree d (by unfold dimensionAllowance; omega)) H
omit [Nonempty (PaperStates r c)] in
lemma stateGraphEnergy_allSmall (hsmall : β i j,FirstPaperPhysicalMarginal.paperSmall r c i j=true)
(H : PaperStates r c β β) :
stateGraphEnergy r c H=(β x,β y,if Adj x y then (H x-H y)^2 else 0)/2 := by
have he := fullEnergy_physical_eq r c (d^20) (d^12) (stateCapacity r c) (stateCapacity_small r c) H
change stateGraphEnergy r c H=(β x,β y,if Adj x y then
min (stateWeight r c x) (stateWeight r c y)*(H x-H y)^2 else 0)/2 at he
simpa only [stateWeight_allSmall r c hsmall,min_self,one_mul] using he
omit [LinearOrder I] [LinearOrder J] [Nonempty (PaperStates r c)] in
lemma allowance_fourteen [Nonempty I] [Nonempty J] : 14 β€ d := by
have hi := Fintype.card_pos (Ξ± := I)
have hj := Fintype.card_pos (Ξ± := J)
unfold dimensionAllowance
nlinarith
lemma unitSmallChain_pi_weight
(hsmall : β i j,FirstPaperPhysicalMarginal.paperSmall r c i j=true) (z : PaperStates r c) :
(unitSmallChain r c).Ο z=stateWeight r c z/(β y,stateWeight r c y) := by
rw [unitSmallChain_pi]
simp only [stateWeight_allSmall r c hsmall,Finset.sum_const,Finset.card_univ,nsmul_eq_mul,mul_one]
lemma unitSmallChain_energy_lower
(hsmall : β i j,FirstPaperPhysicalMarginal.paperSmall r c i j=true)
(H : PaperStates r c β β) :
(smallProposal d)/(2*(β z,stateWeight r c z))*stateGraphEnergy r c H β€
(unitSmallChain r c).energy H := by
have hsum : (β z,stateWeight r c z)=(Fintype.card (PaperStates r c):β) := by
simp only [stateWeight_allSmall r c hsmall,Finset.sum_const,Finset.card_univ,nsmul_eq_mul,mul_one]
have hi := unitSmallChain_energy r c H
rw [βstateGraphEnergy_allSmall r c hsmall H] at hi
rw [hsum]
calc
_ = ((smallProposal d/(Fintype.card (PaperStates r c):β))*stateGraphEnergy r c H)/2 := by ring
_ = (unitSmallChain r c).energy H/2 := by rw [hi]
_ β€ (unitSmallChain r c).energy H := by linarith [(unitSmallChain r c).energy_nonneg H]
/-- The full graph bound includes the empty large rectangle. -/
theorem unitSmallChain_poincare [Nonempty I] [Nonempty J]
(hsmall : β i j,FirstPaperPhysicalMarginal.paperSmall r c i j=true)
(H : PaperStates r c β β) :
(unitSmallChain r c).variance H β€ (d:β)^160*(unitSmallChain r c).energy H := by
let K : β := 770*(d:β)^4*((d^20:β):β)^6
have hΞ² := (smallProposal_bounds d (by unfold dimensionAllowance; omega)).1
have hv : variance (stateWeight r c) H β€ K*stateGraphEnergy r c H :=
firstPaper_physical_variance r c H
have hp := chain_poincare_of_weighted_graph (unitSmallChain r c) (stateWeight r c) H
(stateWeight_positive r c) (unitSmallChain_pi_weight r c hsmall)
(stateGraphEnergy r c H) K (smallProposal d) (by dsimp [K]; positivity) hΞ² hv
(unitSmallChain_energy_lower r c hsmall H)
exact hp.trans (mul_le_mul_of_nonneg_right
(smallProposal_poincare_budget d allowance_fourteen) ((unitSmallChain r c).energy_nonneg H))
end
end ContingencyTables.SmallGraphProfiles
end OAI
|