Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Two-area weighted swap and cutoff model

Definition
NullConeWeightedSwap

by scuba8684 · Nov 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysismathematical-physicsquantum-gravity

Each area band has a copy of the label set. A retained label contributes an amplitude of w0\sqrt{w_0}w0​​ or w1\sqrt{w_1}w1​​ in its respective band. The fixed observable is the negative swap in each paired two-dimensional block. The boost multiplies the second component by the relative phase zzz. The reference response is the change on the normalized full pair, and the signed block subtracts half this response times the squared norm of the cut vector. The definitions also specify Wang’s padded prefix cuts and the five equal-rank cut families in the SHIN09 supplement.

Definition code
import Mathlib.Algebra.BigOperators.Ring.Finset
import Mathlib.Analysis.Real.Sqrt
import Mathlib.Data.Complex.Basic
import Mathlib.Data.Finset.Sum

/-!
The finite two-area swap model of Xinjun Wang, Theorem 2, and the equal-rank
extension of the SHIN09 cutoff audit. The block uses the unnormalized
matrix element, with the reference response computed on the full pair.
-/

namespace NullCone.WeightedSwap

open Finset
open scoped BigOperators ComplexConjugate

noncomputable section

/-- The real matrix element of the negative swap on one paired block. -/
def swapForm (x y : ℂ) : ℝ := -(conj x * y + conj y * x).re

/-- The relative boost phase acts on the second component. -/
def swapChange (z x y : ℂ) : ℝ := swapForm x (z * y) - swapForm x y

/-- The normalized response of the fixed, fully retained reference pair. -/
def referenceResponse (w₀ w₁ : ℝ) (z : ℂ) : ℝ :=
  swapChange z (Real.sqrt w₀ : ℂ) (Real.sqrt w₁ : ℂ) / (w₀ + w₁)

def signedBlock (z : ℂ) (δ : ℝ) (x y : ℂ) : ℝ :=
  swapChange z x y - δ / 2 * (conj x * x + conj y * y).re

/-- The unnormalized signed amplitude on finite sets of labels in the two bands. -/
def signedAmplitude {ι : Type*} [DecidableEq ι]
    (w₀ w₁ : ℝ) (z : ℂ) (A B : Finset ι) : ℝ :=
  ∑ j ∈ A ∪ B, signedBlock z (referenceResponse w₀ w₁ z)
    (if j ∈ A then (Real.sqrt w₀ : ℂ) else 0)
    (if j ∈ B then (Real.sqrt w₁ : ℂ) else 0)

/-- The labels of a two-band prefix cut. -/
def prefixCut (a b : ℕ) : Finset (ℕ ⊕ ℕ) := (range a).disjSum (range b)

/-- Wang's padded cycle contains r first-band labels and one second-band label.
In the first band the quotient is the block number and the remainder gives its
position. The second-band label is the last member of each block. -/
def cycleIndex (r : ℕ) : ℕ ⊕ ℕ → ℕ := Sum.elim (fun j => j / r) id

inductive RankRoute
  | aligned | positive | zero | negative | opposed

/-- Partition each band's labels into two countable lists. The stage k uses n = k + 1. -/
def firstBand (k : ℕ) : Finset (ℕ ⊕ ℕ) := prefixCut (5 * (k + 1)) (k + 1)

def firstListCount (r : RankRoute) (k : ℕ) : ℕ :=
  match r with
  | .aligned => 5 * (k + 1)
  | .positive => 2 * (k + 1) + 1
  | .zero => 2 * (k + 1)
  | .negative => 2 * k + 1
  | .opposed => k + 1

def secondBand (r : RankRoute) (k : ℕ) : Finset (ℕ ⊕ ℕ) :=
  prefixCut (firstListCount r k) (6 * (k + 1) - firstListCount r k)

/-- The amplitudes of the five equal-rank routes in units of the reference response times w. -/
def rankValue (r : RankRoute) (k : ℕ) : ℤ :=
  match r with
  | .aligned => 6 * (k + 1 : ℤ)
  | .positive => 2
  | .zero => 0
  | .negative => -2
  | .opposed => -2 * (k + 1 : ℤ)

end
end NullCone.WeightedSwap
Source
Xinjun Wang, From open gluing to closed amplitudes on the null cone, §3, equations (5)–(8), https://doi.org/10.5281/zenodo.24571102. Equal-rank cutoff families from the Null-cone amplitude verification project (SHIN09) supplement, https://github.com/SHIN09-git/null-cone-quantum-gravity-verification/pull/1. Adapted for Prove2Me.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me