interplane.Get Omega
Read in your language

yang

This project has not described itself yet.

Brought by drakestapleton

branch main Branches Tags History

yang / evidence / lean_wilson_replica_exchange.txt

281 lines · 17570 bytes Raw Blame History
1Effective correlations under the periodic SU(2) Wilson law
22026-11-22 | Spark AArch64 | sh scripts/build_and_run_spark.sh openai_bridge
3Lean 4.32.0 | 8c9756b28d64dab099da31a4c09229a9e6a2ef35
4Mathlib 81a5d257c8e410db227a6665ed08f64fea08e997
5
6Source and data SHA-256
720e65bfb71a19dd8226c72656696cbda2ef25c58c94c418024bf62026029af82 proofs/WilsonWordClustering.lean
8267a68c43a8eacf57deb182f7be55b53bc8730108ac7239773cc6650c874601a proofs/WilsonReplicaExchange.lean
961780cb05bfc47757f60c472cea01f4bc5ddc78d51d3697ef49047d41820f87f proofs/WilsonReplicaShells.lean
10d8c4be226a6df7211289c507154578177c232d84ba728303098842cfbc51549f proofs/WilsonReplicaFrame.lean
11be70168a0f70ec94632ea532b33537036256058212e9b4c23c32e15ec59f25cd proofs/WilsonReplicaSlabs.lean
1297f69d63315719c93ee81e04b07303537070f57f2849193a8ec5a8bd5a60576d proofs/WilsonReplicaLoss.lean
13853cd194c9f9824672cfd56e70fbe472afc692608c2637f777d2a9b5c463ebc7 proofs/WilsonReplicaEndpoint.lean
14ef536660058a88365d70992ddc71dae72332fb7ebfe78b050c5f58856c3be4fb proofs/WilsonReplicaColor.lean
15b2f3831e4a6f8fbe11be0d4db256eaf2e3d6542024b05e073808f7daf983c737 scripts/replica_shell_probe.py
16cdef24bb1cbfb061cd79d569c7207acb2d759c2dd5e7ce346484a29ca7af25b8 evidence/wilson_replica_shell_probe.tsv
17
18Exact identity under the normalized Wilson law
19Sample two independent configurations U,V. For a mask i let S_i exchange
20the links in that mask between U and V. Write J_i = (log w - log w∘S_i)/2
21for the joint Boltzmann weight w. Only faces split by the mask contribute
22to J_i. If no plaquette is split by two masks and every mask flips
23D=(F(U)-F(V))(G(U)-G(V)), then 2 Cov(F,G) = E[D product_i tanh J_i].
24Product Haar invariance under link exchanges proves the identity at all
25finite beta. Shells need no probabilistic independence.
26
27On a fine periodic torus of side b*l, l >= 2, b >= 1, take F and G to be
28products of normalized straight-blocked spatial plaquette traces on slices
29s,u of the coarse torus. Exactly k=b*cyclicDistance(s,u) fine slab masks
30separate them. Hence |Cov| <= 2 E[product_{j<k}|tanh J_j|].
31The trace products can have arbitrary lengths and repeated plaquettes.
32
33Pinned frames and the endpoint formula
34A frame constructed from links it pins sends their product Haar prior to
35identities on those links and independent Haar coordinates on the rest.
36The proof conditions on the selected links and uses left and right Haar
37invariance on the complementary coordinates. It then transports the
38gauge-invariant Wilson weight to this pinned prior. Growing a rooted
39forest admits either edge orientation. Both the signed identity and the
40absolute slab bound hold in this field-dependent frame.
41
42For spatial plaquettes on distinct, nonadjacent periodic time slices,
43exchange the four links of each endpoint. No face crosses both masks.
44Pinning three sides of each plaquette leaves one fluctuating side e.
45In its own frame each replica has link matrix U_e and oriented staple
46matrix 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)].
48Cauchy-Schwarz bounds |J_e| by |beta|/4 times the product of the two
49Frobenius differences. The geometric and energy identities are exact,
50including the sign and the fundamental trace normalization. The concrete
514^4 test below builds the six-link forest used by the measurement.
52
53Physical decay criterion
54Let A_j=|tanh J_j|, W_j=product_{i<j} A_i, and M_j=E[W_j].
55Then M_0=1 and M_{j+1}=M_j-E[W_j(1-A_j)]. The event A_j <= q_j pays
56at 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).
58Here R is the fine physical spacing. The more general loss theorem allows
59unequal per-shell exponent budgets. A continuum use requires a common
60positive m as spacing, volume, bare coupling and separation vary.
61
62CPU experiment
63Metropolis sweeps use symmetric quaternion proposals and the full periodic
64Wilson staples. Both independent replicas are updated in each run.
65Measurements use elementary spatial 0-1 plaquettes at t=0,2, with all
66three spatial coordinates zero. Slab masks include every link based at
67cyclic distance at most 0 or 1. Local masks contain the source plaquette
68and then all links on faces meeting it. Endpoint masks contain just the
69source or target plaquette. The rooted spanning tree and the pair of
70three-edge trees are fixed before sampling. The per-field frame uses
71parallel transport on the selected edges.
72
73Each row records eight contiguous batch means and their standard error.
74Hot and cold starts are separate Markov runs. Errors quantify variation
75among these batches and omit possible thermalization bias. The diagnostic
76uses binary64. Stable losses evaluate 2 exp(-2|J|)/(1+exp(-2|J|)) and
77can still underflow. A displayed unit factor is rounded. None of the
78sample means or errors enter a Lean proof.
79
80group 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
92The norm-test columns measure the event that the Frobenius upper bound
93on |J| is <= atanh(0.9). The second event carries the first shell weight.
94The TSV also reports the event tested against the actual |tanh J|, stable
95losses, signed estimates, and E[|D| product A]/2 for each mask choice.
96The compact U(1) control uses unit quaternions in the fixed real-i plane
97and symmetric proposals in that same plane. Endpoint attenuation occurs
98in that Abelian control as well. The numerical comparison at matched bare
99beta does not match the physical scales of the two theories. The Lean
100statements above concern SU(2).
101All runs use separation two. The endpoint improvement supplies only two
102factors whatever the separation. Interior slab factors saturate on these
103tests. Establishing weighted overlap or signed cancellations at increasing
104physical separations, and constructing the continuum spectral comparison,
105remain open.
106
107Relative color averaging
108The joint Wilson law is invariant under global conjugation in the second
109replica. Lean proves that one may average a signed shell estimator over
110any nonempty finite family of such conjugations before taking its absolute
111value. The endpoint theorem applies directly to the two pinned staples.
112For SU(2), the CPU probe uses conjugation by the quaternion units 1,i,j,k.
113These flip pairs of imaginary coordinates. For U(1), all internal color
114orientations fix every link. The estimator checks the color action against
115the frame and plaquette traces. Both absolute comparisons in the table
116use exactly the same orientations and paired configurations.
117
118group 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
128Color columns are populated on the eight paired 256-sample 4^4 runs.
129NA denotes a measurement omitted in that run.
130The outer-slab columns repeat the color test on the single separating
131shell of radius one in a spanning-tree frame. Its measured absolute factor
132rounds to one and its cancellation rounds to zero in these runs.
133
134Reproduction (Python with NumPy 2.5.3)
135python3 scripts/replica_shell_probe.py
136python3 scripts/replica_shell_probe.py --beta 2.3 4 --warmup 256 --samples 256
137python3 scripts/replica_shell_probe.py --side 6 --beta 2.3 --warmup 256 --samples 256
138python3 scripts/replica_shell_probe.py --group U1 --beta 2.3 4 --warmup 256 --samples 256
139python3 scripts/replica_shell_probe.py --colors --group SU2 --beta 2.3 4 --warmup 256 --samples 256
140python3 scripts/replica_shell_probe.py --colors --group U1 --beta 2.3 4 --warmup 256 --samples 256
141The seed and sweep stride are in each row. Checks compare the local action
142increment with the complete action, confirm each pinned tree link is the
143identity, compare every plaquette trace before and after framing, enumerate
144the four-point exchange orbit and compare the one-link formula with the
145full action difference. The repeated SU(2) runs reproduced every shared column.
146
147Exact controls
148The Wolfram kernel simplified the normalized two-flip sum with weights
149exp(-2(i x+j y)) and signs (-1)^(i+j) to tanh(x)tanh(y) for real x,y.
150For two identical random factors taking 1/4 and 3/4 with equal probability,
151the exact product mean is 5/16 while the product of their means is 1/4.
152
153Axiom audit
154YangMills.PeriodicWilson.replica_exchange_identity [propext, Classical.choice, Quot.sound]
155YangMills.PeriodicWilson.twice_wilsonCovariance [propext, Classical.choice, Quot.sound]
156YangMills.PeriodicWilson.exchangeField_stable [propext, Classical.choice, Quot.sound]
157YangMills.PeriodicWilson.replica_shell_identity [propext, Classical.choice, Quot.sound]
158YangMills.PeriodicWilson.replica_covariance_bound [propext, Classical.choice, Quot.sound]
159YangMills.PeriodicWilson.PinnedFrame.map_prior [propext, Classical.choice, Quot.sound]
160YangMills.PeriodicWilson.PinnedFrame.framed_shell_identity [propext, Classical.choice, Quot.sound]
161YangMills.PeriodicWilson.framed_blockedProduct_replica_bound [propext, Classical.choice, Quot.sound]
162YangMills.PeriodicWilson.slab_boundaries_disjoint [propext, Classical.choice, Quot.sound]
163YangMills.PeriodicWilson.blockedProduct_replica_bound [propext, Classical.choice, Quot.sound]
164YangMills.PeriodicWilson.slabMoment_succ [propext, Classical.choice, Quot.sound]
165YangMills.PeriodicWilson.moderateShellMass_le_loss [propext, Classical.choice, Quot.sound]
166YangMills.PeriodicWilson.blockedProduct_physical_bound_of_overlap [propext, Classical.choice, Quot.sound]
167YangMills.PeriodicWilson.framed_blockedProduct_physical_bound_of_overlap [propext, Classical.choice, Quot.sound]
168YangMills.PeriodicWilson.singleLink_exchange [propext, Classical.choice, Quot.sound]
169YangMills.PeriodicWilson.stapleExchange_abs_le [propext, Classical.choice, Quot.sound]
170YangMills.PeriodicWilson.endpoint_covariance_identity [propext, Classical.choice, Quot.sound]
171YangMills.PeriodicWilson.rotateReplica_eq_of_commute [propext, Classical.choice, Quot.sound]
172YangMills.PeriodicWilson.colorAverage_integral [propext, Classical.choice, Quot.sound]
173YangMills.PeriodicWilson.colorAverage_bound [propext, Classical.choice, Quot.sound]
174YangMills.PeriodicWilson.endpoint_color_bound [propext, Classical.choice, Quot.sound]
175YangMills.PeriodicWilson.colorAverage_abs_le [propext, Classical.choice, Quot.sound]
176YangMills.PeriodicWilson.colorAverage_eq_of_commute [propext, Classical.choice, Quot.sound]
177
178Concrete Lean applications
179import WilsonReplicaColor
180import WilsonReplicaLoss
181open YangMills YangMills.PeriodicWilson YangMills.FundamentalSU2
182open MeasureTheory Real
183noncomputable section
184private def face (s : ZMod 4) : Face 4 := (fun t => if t=3 then s else 0, ⟨(0,1),by decide⟩)
185private def bottom (s : ZMod 4) := (corners (face s)).1
186private def left (s : ZMod 4) := (corners (face s)).2.2.2
187private def right (s : ZMod 4) := (corners (face s)).2.1
188private def top (s : ZMod 4) := (corners (face s)).2.2.1
189private def P0 : PinnedFrame 4 := PinnedFrame.empty 4
190private def P1 : PinnedFrame 4 := P0.attach (bottom 0) false (by decide) (by
191 intro f hf
192 exact False.elim (Finset.notMem_empty _ hf))
193private 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)
198private 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)
203private 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)
208private 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)
213private 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.
220example (β : ℝ) : 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.
232example (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
236example : cyclicDistance (l := 4) 0 3 = 1 := by decide
237example : slabMask (l := 4) 3 0 1 (bottom 2) = false := by decide
238example {l : ℕ+} (t : Axis) (s : ZMod l.val) (k : ℕ) : slabMoment 0 t s (k+1) = 0 := by
239 simp [slabMoment,exchangeField,logWeight,tanh_zero]
240example : (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.
242private def smallFace (s : ZMod 2) : Face 2 := (fun t => if t=3 then s else 0, ⟨(0,1),by decide⟩)
243private 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]
245example (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.
258example {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
262end
263End of Lean applications
264
265Rejected source mutations
266LogSign rejected exit=1
267MutantLogSign.lean:38:101: error: unsolved goals
268StapleNormalization rejected exit=1
269MutantStapleNormalization.lean:66:2: error: ring failed, ring expressions not equal
270ForestOrientation rejected exit=1
271MutantForestOrientation.lean:51:54: error: Application type mismatch: The argument
272WeightLoss rejected exit=1
273MutantWeightLoss.lean:27:2: error: 'change' tactic failed, pattern
274CutGeometry rejected exit=1
275MutantCutGeometry.lean:58:48: error: Tactic `decide` proved that the proposition
276Independence rejected exit=1
277MutantIndependence.lean:62:79: error: unsolved goals
278WrongFreeEdge rejected exit=1
279MutantWrongFreeEdge.lean:51:82: error: Tactic `decide` proved that the proposition
280AbsoluteAfterAverage rejected exit=1
281MutantAbsoluteAfterAverage.lean:48:35: error: Application type mismatch: The argument