yang
This project has not described itself yet.
Brought by drakestapleton
yang / evidence / lean_wilson_replica_exchange.txt
| 1 | Effective correlations under the periodic SU(2) Wilson law |
| 2 | 2026-11-22 | Spark AArch64 | sh scripts/build_and_run_spark.sh openai_bridge |
| 3 | Lean 4.32.0 | 8c9756b28d64dab099da31a4c09229a9e6a2ef35 |
| 4 | Mathlib 81a5d257c8e410db227a6665ed08f64fea08e997 |
| 5 | |
| 6 | Source and data SHA-256 |
| 7 | 20e65bfb71a19dd8226c72656696cbda2ef25c58c94c418024bf62026029af82 proofs/WilsonWordClustering.lean |
| 8 | 267a68c43a8eacf57deb182f7be55b53bc8730108ac7239773cc6650c874601a proofs/WilsonReplicaExchange.lean |
| 9 | 61780cb05bfc47757f60c472cea01f4bc5ddc78d51d3697ef49047d41820f87f proofs/WilsonReplicaShells.lean |
| 10 | d8c4be226a6df7211289c507154578177c232d84ba728303098842cfbc51549f proofs/WilsonReplicaFrame.lean |
| 11 | be70168a0f70ec94632ea532b33537036256058212e9b4c23c32e15ec59f25cd proofs/WilsonReplicaSlabs.lean |
| 12 | 97f69d63315719c93ee81e04b07303537070f57f2849193a8ec5a8bd5a60576d proofs/WilsonReplicaLoss.lean |
| 13 | 853cd194c9f9824672cfd56e70fbe472afc692608c2637f777d2a9b5c463ebc7 proofs/WilsonReplicaEndpoint.lean |
| 14 | ef536660058a88365d70992ddc71dae72332fb7ebfe78b050c5f58856c3be4fb proofs/WilsonReplicaColor.lean |
| 15 | b2f3831e4a6f8fbe11be0d4db256eaf2e3d6542024b05e073808f7daf983c737 scripts/replica_shell_probe.py |
| 16 | cdef24bb1cbfb061cd79d569c7207acb2d759c2dd5e7ce346484a29ca7af25b8 evidence/wilson_replica_shell_probe.tsv |
| 17 | |
| 18 | Exact identity under the normalized Wilson law |
| 19 | Sample two independent configurations U,V. For a mask i let S_i exchange |
| 20 | the links in that mask between U and V. Write J_i = (log w - log w∘S_i)/2 |
| 21 | for the joint Boltzmann weight w. Only faces split by the mask contribute |
| 22 | to J_i. If no plaquette is split by two masks and every mask flips |
| 23 | D=(F(U)-F(V))(G(U)-G(V)), then 2 Cov(F,G) = E[D product_i tanh J_i]. |
| 24 | Product Haar invariance under link exchanges proves the identity at all |
| 25 | finite beta. Shells need no probabilistic independence. |
| 26 | |
| 27 | On a fine periodic torus of side b*l, l >= 2, b >= 1, take F and G to be |
| 28 | products of normalized straight-blocked spatial plaquette traces on slices |
| 29 | s,u of the coarse torus. Exactly k=b*cyclicDistance(s,u) fine slab masks |
| 30 | separate them. Hence |Cov| <= 2 E[product_{j<k}|tanh J_j|]. |
| 31 | The trace products can have arbitrary lengths and repeated plaquettes. |
| 32 | |
| 33 | Pinned frames and the endpoint formula |
| 34 | A frame constructed from links it pins sends their product Haar prior to |
| 35 | identities on those links and independent Haar coordinates on the rest. |
| 36 | The proof conditions on the selected links and uses left and right Haar |
| 37 | invariance on the complementary coordinates. It then transports the |
| 38 | gauge-invariant Wilson weight to this pinned prior. Growing a rooted |
| 39 | forest admits either edge orientation. Both the signed identity and the |
| 40 | absolute slab bound hold in this field-dependent frame. |
| 41 | |
| 42 | For spatial plaquettes on distinct, nonadjacent periodic time slices, |
| 43 | exchange the four links of each endpoint. No face crosses both masks. |
| 44 | Pinning three sides of each plaquette leaves one fluctuating side e. |
| 45 | In its own frame each replica has link matrix U_e and oriented staple |
| 46 | matrix S_U (a sum of six staples). The endpoint factor uses |
| 47 | J_e = (beta/4) Re Tr[(U_e - V_e)(S_U - S_V)]. |
| 48 | Cauchy-Schwarz bounds |J_e| by |beta|/4 times the product of the two |
| 49 | Frobenius differences. The geometric and energy identities are exact, |
| 50 | including the sign and the fundamental trace normalization. The concrete |
| 51 | 4^4 test below builds the six-link forest used by the measurement. |
| 52 | |
| 53 | Physical decay criterion |
| 54 | Let A_j=|tanh J_j|, W_j=product_{i<j} A_i, and M_j=E[W_j]. |
| 55 | Then M_0=1 and M_{j+1}=M_j-E[W_j(1-A_j)]. The event A_j <= q_j pays |
| 56 | at least (1-q_j) E[W_j 1_{A_j<=q_j}] toward the next loss. If it pays |
| 57 | (1-exp(-m R)) M_j at every intervening fine shell, |Cov| <= 2 exp(-m R k). |
| 58 | Here R is the fine physical spacing. The more general loss theorem allows |
| 59 | unequal per-shell exponent budgets. A continuum use requires a common |
| 60 | positive m as spacing, volume, bare coupling and separation vary. |
| 61 | |
| 62 | CPU experiment |
| 63 | Metropolis sweeps use symmetric quaternion proposals and the full periodic |
| 64 | Wilson staples. Both independent replicas are updated in each run. |
| 65 | Measurements use elementary spatial 0-1 plaquettes at t=0,2, with all |
| 66 | three spatial coordinates zero. Slab masks include every link based at |
| 67 | cyclic distance at most 0 or 1. Local masks contain the source plaquette |
| 68 | and then all links on faces meeting it. Endpoint masks contain just the |
| 69 | source or target plaquette. The rooted spanning tree and the pair of |
| 70 | three-edge trees are fixed before sampling. The per-field frame uses |
| 71 | parallel transport on the selected edges. |
| 72 | |
| 73 | Each row records eight contiguous batch means and their standard error. |
| 74 | Hot and cold starts are separate Markov runs. Errors quantify variation |
| 75 | among these batches and omit possible thermalization bias. The diagnostic |
| 76 | uses binary64. Stable losses evaluate 2 exp(-2|J|)/(1+exp(-2|J|)) and |
| 77 | can still underflow. A displayed unit factor is rounded. None of the |
| 78 | sample means or errors enter a Lean proof. |
| 79 | |
| 80 | group side beta start raw slab framed slab forest endpoints (batch SE) norm-test masses j=0,1 |
| 81 | SU2 4 2.3 hot 1.00000 1.00000 0.75617 (0.02980) 0.11328, 0.07329 |
| 82 | SU2 4 2.3 cold 1.00000 1.00000 0.74867 (0.01514) 0.09375, 0.11090 |
| 83 | SU2 4 4 hot 1.00000 1.00000 0.80111 (0.02971) 0.08594, 0.07119 |
| 84 | SU2 4 4 cold 1.00000 1.00000 0.76790 (0.01695) 0.14062, 0.09133 |
| 85 | SU2 6 2.3 hot 1.00000 1.00000 0.76471 (0.02094) 0.09375, 0.07284 |
| 86 | SU2 6 2.3 cold 1.00000 1.00000 0.80281 (0.02255) 0.10156, 0.07388 |
| 87 | U1 4 2.3 hot 1.00000 1.00000 0.34937 (0.02186) 0.57812, 0.36445 |
| 88 | U1 4 2.3 cold 1.00000 1.00000 0.33457 (0.02272) 0.62500, 0.39682 |
| 89 | U1 4 4 hot 1.00000 1.00000 0.41293 (0.04050) 0.53125, 0.36245 |
| 90 | U1 4 4 cold 1.00000 1.00000 0.37872 (0.01902) 0.55078, 0.39778 |
| 91 | |
| 92 | The norm-test columns measure the event that the Frobenius upper bound |
| 93 | on |J| is <= atanh(0.9). The second event carries the first shell weight. |
| 94 | The TSV also reports the event tested against the actual |tanh J|, stable |
| 95 | losses, signed estimates, and E[|D| product A]/2 for each mask choice. |
| 96 | The compact U(1) control uses unit quaternions in the fixed real-i plane |
| 97 | and symmetric proposals in that same plane. Endpoint attenuation occurs |
| 98 | in that Abelian control as well. The numerical comparison at matched bare |
| 99 | beta does not match the physical scales of the two theories. The Lean |
| 100 | statements above concern SU(2). |
| 101 | All runs use separation two. The endpoint improvement supplies only two |
| 102 | factors whatever the separation. Interior slab factors saturate on these |
| 103 | tests. Establishing weighted overlap or signed cancellations at increasing |
| 104 | physical separations, and constructing the continuum spectral comparison, |
| 105 | remain open. |
| 106 | |
| 107 | Relative color averaging |
| 108 | The joint Wilson law is invariant under global conjugation in the second |
| 109 | replica. Lean proves that one may average a signed shell estimator over |
| 110 | any nonempty finite family of such conjugations before taking its absolute |
| 111 | value. The endpoint theorem applies directly to the two pinned staples. |
| 112 | For SU(2), the CPU probe uses conjugation by the quaternion units 1,i,j,k. |
| 113 | These flip pairs of imaginary coordinates. For U(1), all internal color |
| 114 | orientations fix every link. The estimator checks the color action against |
| 115 | the frame and plaquette traces. Both absolute comparisons in the table |
| 116 | use exactly the same orientations and paired configurations. |
| 117 | |
| 118 | group beta start mean of absolutes absolute signed mean endpoint cancellation (batch SE) outer slab cancellation |
| 119 | SU2 2.3 hot 0.764930 0.700858 0.064071 (0.005487) 0 |
| 120 | SU2 2.3 cold 0.755808 0.658349 0.097459 (0.009347) 0 |
| 121 | SU2 4 hot 0.788743 0.713920 0.074824 (0.011908) 0 |
| 122 | SU2 4 cold 0.804698 0.737599 0.067098 (0.014157) 0 |
| 123 | U1 2.3 hot 0.349371 0.349371 0.000000 (0.000000) 0 |
| 124 | U1 2.3 cold 0.334568 0.334568 0.000000 (0.000000) 0 |
| 125 | U1 4 hot 0.412925 0.412925 0.000000 (0.000000) 0 |
| 126 | U1 4 cold 0.378721 0.378721 0.000000 (0.000000) 0 |
| 127 | |
| 128 | Color columns are populated on the eight paired 256-sample 4^4 runs. |
| 129 | NA denotes a measurement omitted in that run. |
| 130 | The outer-slab columns repeat the color test on the single separating |
| 131 | shell of radius one in a spanning-tree frame. Its measured absolute factor |
| 132 | rounds to one and its cancellation rounds to zero in these runs. |
| 133 | |
| 134 | Reproduction (Python with NumPy 2.5.3) |
| 135 | python3 scripts/replica_shell_probe.py |
| 136 | python3 scripts/replica_shell_probe.py --beta 2.3 4 --warmup 256 --samples 256 |
| 137 | python3 scripts/replica_shell_probe.py --side 6 --beta 2.3 --warmup 256 --samples 256 |
| 138 | python3 scripts/replica_shell_probe.py --group U1 --beta 2.3 4 --warmup 256 --samples 256 |
| 139 | python3 scripts/replica_shell_probe.py --colors --group SU2 --beta 2.3 4 --warmup 256 --samples 256 |
| 140 | python3 scripts/replica_shell_probe.py --colors --group U1 --beta 2.3 4 --warmup 256 --samples 256 |
| 141 | The seed and sweep stride are in each row. Checks compare the local action |
| 142 | increment with the complete action, confirm each pinned tree link is the |
| 143 | identity, compare every plaquette trace before and after framing, enumerate |
| 144 | the four-point exchange orbit and compare the one-link formula with the |
| 145 | full action difference. The repeated SU(2) runs reproduced every shared column. |
| 146 | |
| 147 | Exact controls |
| 148 | The Wolfram kernel simplified the normalized two-flip sum with weights |
| 149 | exp(-2(i x+j y)) and signs (-1)^(i+j) to tanh(x)tanh(y) for real x,y. |
| 150 | For two identical random factors taking 1/4 and 3/4 with equal probability, |
| 151 | the exact product mean is 5/16 while the product of their means is 1/4. |
| 152 | |
| 153 | Axiom audit |
| 154 | YangMills.PeriodicWilson.replica_exchange_identity [propext, Classical.choice, Quot.sound] |
| 155 | YangMills.PeriodicWilson.twice_wilsonCovariance [propext, Classical.choice, Quot.sound] |
| 156 | YangMills.PeriodicWilson.exchangeField_stable [propext, Classical.choice, Quot.sound] |
| 157 | YangMills.PeriodicWilson.replica_shell_identity [propext, Classical.choice, Quot.sound] |
| 158 | YangMills.PeriodicWilson.replica_covariance_bound [propext, Classical.choice, Quot.sound] |
| 159 | YangMills.PeriodicWilson.PinnedFrame.map_prior [propext, Classical.choice, Quot.sound] |
| 160 | YangMills.PeriodicWilson.PinnedFrame.framed_shell_identity [propext, Classical.choice, Quot.sound] |
| 161 | YangMills.PeriodicWilson.framed_blockedProduct_replica_bound [propext, Classical.choice, Quot.sound] |
| 162 | YangMills.PeriodicWilson.slab_boundaries_disjoint [propext, Classical.choice, Quot.sound] |
| 163 | YangMills.PeriodicWilson.blockedProduct_replica_bound [propext, Classical.choice, Quot.sound] |
| 164 | YangMills.PeriodicWilson.slabMoment_succ [propext, Classical.choice, Quot.sound] |
| 165 | YangMills.PeriodicWilson.moderateShellMass_le_loss [propext, Classical.choice, Quot.sound] |
| 166 | YangMills.PeriodicWilson.blockedProduct_physical_bound_of_overlap [propext, Classical.choice, Quot.sound] |
| 167 | YangMills.PeriodicWilson.framed_blockedProduct_physical_bound_of_overlap [propext, Classical.choice, Quot.sound] |
| 168 | YangMills.PeriodicWilson.singleLink_exchange [propext, Classical.choice, Quot.sound] |
| 169 | YangMills.PeriodicWilson.stapleExchange_abs_le [propext, Classical.choice, Quot.sound] |
| 170 | YangMills.PeriodicWilson.endpoint_covariance_identity [propext, Classical.choice, Quot.sound] |
| 171 | YangMills.PeriodicWilson.rotateReplica_eq_of_commute [propext, Classical.choice, Quot.sound] |
| 172 | YangMills.PeriodicWilson.colorAverage_integral [propext, Classical.choice, Quot.sound] |
| 173 | YangMills.PeriodicWilson.colorAverage_bound [propext, Classical.choice, Quot.sound] |
| 174 | YangMills.PeriodicWilson.endpoint_color_bound [propext, Classical.choice, Quot.sound] |
| 175 | YangMills.PeriodicWilson.colorAverage_abs_le [propext, Classical.choice, Quot.sound] |
| 176 | YangMills.PeriodicWilson.colorAverage_eq_of_commute [propext, Classical.choice, Quot.sound] |
| 177 | |
| 178 | Concrete Lean applications |
| 179 | import WilsonReplicaColor |
| 180 | import WilsonReplicaLoss |
| 181 | open YangMills YangMills.PeriodicWilson YangMills.FundamentalSU2 |
| 182 | open MeasureTheory Real |
| 183 | noncomputable section |
| 184 | private def face (s : ZMod 4) : Face 4 := (fun t => if t=3 then s else 0, ⟨(0,1),by decide⟩) |
| 185 | private def bottom (s : ZMod 4) := (corners (face s)).1 |
| 186 | private def left (s : ZMod 4) := (corners (face s)).2.2.2 |
| 187 | private def right (s : ZMod 4) := (corners (face s)).2.1 |
| 188 | private def top (s : ZMod 4) := (corners (face s)).2.2.1 |
| 189 | private def P0 : PinnedFrame 4 := PinnedFrame.empty 4 |
| 190 | private def P1 : PinnedFrame 4 := P0.attach (bottom 0) false (by decide) (by |
| 191 | intro f hf |
| 192 | exact False.elim (Finset.notMem_empty _ hf)) |
| 193 | private def P2 : PinnedFrame 4 := P1.attach (left 0) false (by decide) (by |
| 194 | intro f hf |
| 195 | change f ∈ {bottom 0} at hf |
| 196 | simp only [Finset.mem_singleton] at hf |
| 197 | rcases hf with rfl; decide) |
| 198 | private def P3 : PinnedFrame 4 := P2.attach (right 0) false (by decide) (by |
| 199 | intro f hf |
| 200 | change f ∈ {left 0, bottom 0} at hf |
| 201 | simp only [Finset.mem_insert,Finset.mem_singleton] at hf |
| 202 | rcases hf with rfl | rfl <;> decide) |
| 203 | private def P4 : PinnedFrame 4 := P3.attach (bottom 2) false (by decide) (by |
| 204 | intro f hf |
| 205 | change f ∈ {right 0, left 0, bottom 0} at hf |
| 206 | simp only [Finset.mem_insert,Finset.mem_singleton] at hf |
| 207 | rcases hf with rfl | rfl | rfl <;> decide) |
| 208 | private def P5 : PinnedFrame 4 := P4.attach (left 2) false (by decide) (by |
| 209 | intro f hf |
| 210 | change f ∈ {bottom 2, right 0, left 0, bottom 0} at hf |
| 211 | simp only [Finset.mem_insert,Finset.mem_singleton] at hf |
| 212 | rcases hf with rfl | rfl | rfl | rfl <;> decide) |
| 213 | private def P6 : PinnedFrame 4 := P5.attach (right 2) false (by decide) (by |
| 214 | intro f hf |
| 215 | change f ∈ {left 2, bottom 2, right 0, left 0, bottom 0} at hf |
| 216 | simp only [Finset.mem_insert,Finset.mem_singleton] at hf |
| 217 | rcases hf with rfl | rfl | rfl | rfl | rfl <;> decide) |
| 218 | |
| 219 | -- Same six forward tree links and remaining oriented sides as the CPU probe. |
| 220 | example (β : ℝ) : 2*wilsonCovariance β (wilsonPlaquetteTrace (face 0)) (wilsonPlaquetteTrace (face 2)) = |
| 221 | ∫ z, replicaDifference (wilsonPlaquetteTrace (face 0)) (wilsonPlaquetteTrace (face 2)) z * |
| 222 | (tanh (stapleExchange β (top 0) (P6.pair z)) * tanh (stapleExchange β (top 2) (P6.pair z))) ∂replicaLaw 4 β := by |
| 223 | obtain ⟨hpq,hcut⟩ := separated_endpoint_cuts (face 0) (face 2) 3 (by decide) (by decide) |
| 224 | (by decide) (by decide) (by decide) (by decide) (by decide) |
| 225 | apply endpoint_covariance_identity P6 (by decide) β _ _ _ _ (by decide) (by decide) _ _ hpq hcut |
| 226 | all_goals |
| 227 | intro f hf hne |
| 228 | simp only [faceEdges,Finset.mem_insert,Finset.mem_singleton] at hf |
| 229 | rcases hf with rfl | rfl | rfl | rfl <;> first | exact False.elim (hne rfl) | decide |
| 230 | |
| 231 | -- A reverse edge is also pinned. |
| 232 | example (U : WilsonConfig 4) : |
| 233 | (P0.attach (bottom 0) true (by decide) (fun _ h => False.elim (Finset.notMem_empty _ h))).project U (bottom 0) = 1 := |
| 234 | PinnedFrame.pins _ U ⟨_, Finset.mem_insert_self ..⟩ |
| 235 | |
| 236 | example : cyclicDistance (l := 4) 0 3 = 1 := by decide |
| 237 | example : slabMask (l := 4) 3 0 1 (bottom 2) = false := by decide |
| 238 | example {l : ℕ+} (t : Axis) (s : ZMod l.val) (k : ℕ) : slabMoment 0 t s (k+1) = 0 := by |
| 239 | simp [slabMoment,exchangeField,logWeight,tanh_zero] |
| 240 | example : (1/2 : ℝ)*((1/4)^2+(3/4)^2) = 5/16 ∧ ((1/2 : ℝ)*(1/4+3/4))^2 = 1/4 := by norm_num |
| 241 | -- A side-two blocked lattice at beta four uses two fine shells on side four. |
| 242 | private def smallFace (s : ZMod 2) : Face 2 := (fun t => if t=3 then s else 0, ⟨(0,1),by decide⟩) |
| 243 | private theorem spatialSmall (s : ZMod 2) : spatialSlice 3 s [smallFace s] := by |
| 244 | intro p hp; simp only [List.mem_singleton] at hp; subst p; simp [smallFace] |
| 245 | example (m R : ℝ) (P : PinnedFrame (2*2)) (q : ℕ → ℝ) |
| 246 | (h : ∀ j < 2, (1-exp (-(m*R)))*slabMoment 4 3 (blockCoordinate 2 2 0) j (P.framedLaw 4) ≤ |
| 247 | (1-q j)*moderateShellMass 4 3 (blockCoordinate 2 2 0) j (q j) (P.framedLaw 4)) : |
| 248 | |blockedCovariance 2 4 (plaquetteProduct [smallFace 0]) (plaquetteProduct [smallFace 1])| ≤ |
| 249 | 2*exp (-2*(m*R)) := by |
| 250 | have hd : (2:ℕ)*cyclicDistance (l := 2) 0 1 = 2 := by decide |
| 251 | have H := framed_blockedProduct_physical_bound_of_overlap (l := 2) (by decide) 2 4 m R P 3 0 1 _ _ |
| 252 | (spatialSmall 0) (spatialSmall 1) q (fun j hj => h j (hd ▸ hj)) |
| 253 | change _ ≤ 2*exp (-((2*cyclicDistance (l := 2) 0 1 : ℕ) : ℝ)*(m*R)) at H |
| 254 | rw [hd] at H |
| 255 | simpa only [Nat.cast_ofNat] using H |
| 256 | |
| 257 | -- Every internal orientation equal to the identity fixes arbitrary replicas. |
| 258 | example {l : ℕ+} (Q : WilsonReplicas l → ℝ) (z : WilsonReplicas l) : |
| 259 | colorAverage (fun _ : Fin 4 => (1 : gaugeGroup.image)) Q z = Q z := |
| 260 | colorAverage_eq_of_commute _ _ _ (fun _ _ => Commute.one_left _) |
| 261 | |
| 262 | end |
| 263 | End of Lean applications |
| 264 | |
| 265 | Rejected source mutations |
| 266 | LogSign rejected exit=1 |
| 267 | MutantLogSign.lean:38:101: error: unsolved goals |
| 268 | StapleNormalization rejected exit=1 |
| 269 | MutantStapleNormalization.lean:66:2: error: ring failed, ring expressions not equal |
| 270 | ForestOrientation rejected exit=1 |
| 271 | MutantForestOrientation.lean:51:54: error: Application type mismatch: The argument |
| 272 | WeightLoss rejected exit=1 |
| 273 | MutantWeightLoss.lean:27:2: error: 'change' tactic failed, pattern |
| 274 | CutGeometry rejected exit=1 |
| 275 | MutantCutGeometry.lean:58:48: error: Tactic `decide` proved that the proposition |
| 276 | Independence rejected exit=1 |
| 277 | MutantIndependence.lean:62:79: error: unsolved goals |
| 278 | WrongFreeEdge rejected exit=1 |
| 279 | MutantWrongFreeEdge.lean:51:82: error: Tactic `decide` proved that the proposition |
| 280 | AbsoluteAfterAverage rejected exit=1 |
| 281 | MutantAbsoluteAfterAverage.lean:48:35: error: Application type mismatch: The argument |