Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Spin–statistics: Lorentz group, two-particle operators, composite particles

Definition
SpinStatistics_Defs

by LG · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

lorentz-groupmathematical-physicsquantum-mechanics

Shared definitions for the spin–statistics mission.

  1. Minkowski metric. η=diag(1,−1,−1,−1)\eta = \mathrm{diag}(1,-1,-1,-1)η=diag(1,−1,−1,−1) on R4\mathbb R^4R4, coordinate 000 being time.
  2. Lorentz transformation. A real 4×44\times 44×4 matrix Λ\LambdaΛ with ΛTηΛ=η\Lambda^{\mathsf T}\eta\Lambda = \etaΛTηΛ=η.
  3. Restricted Lorentz group SO+(1,3)SO^+(1,3)SO+(1,3): Lorentz transformations with det⁡Λ=1\det\Lambda = 1detΛ=1 and Λ00≥1\Lambda_{00}\ge 1Λ00​≥1 (proper and orthochronous). It is the identity component of the Lorentz group and is generated by rotations and boosts. It is encoded as a subset of M4(R)M_4(\mathbb R)M4​(R).
  4. Symmetric / antisymmetric parts of a two-particle wavefunction ψ:X×X→C\psi : X\times X\to\mathbb Cψ:X×X→C:
ψS(x,y)=12(ψ(x,y)+ψ(y,x)),ψA(x,y)=12(ψ(x,y)−ψ(y,x)).\psi_S(x,y)=\tfrac12\big(\psi(x,y)+\psi(y,x)\big),\qquad \psi_A(x,y)=\tfrac12\big(\psi(x,y)-\psi(y,x)\big).ψS​(x,y)=21​(ψ(x,y)+ψ(y,x)),ψA​(x,y)=21​(ψ(x,y)−ψ(y,x)).
  1. Two-particle creation operator. For a finite set XXX of positions, a complex algebra AAA (of operators) and a field ϕ:X→A\phi : X\to Aϕ:X→A,
Φ[ψ]  =  ∑x≠yψ(x,y) ϕ(x)ϕ(y)∈A,\Phi[\psi] \;=\; \sum_{x\ne y}\psi(x,y)\,\phi(x)\phi(y)\in A,Φ[ψ]=x=y∑​ψ(x,y)ϕ(x)ϕ(y)∈A,

a discretised version of ∬ψ(x,y)ϕ(x)ϕ(y) dx dy\iint\psi(x,y)\phi(x)\phi(y)\,dx\,dy∬ψ(x,y)ϕ(x)ϕ(y)dxdy over distinct positions. 6. Exchange maps for composites. Two composites of kkk constituents each are indexed by {0,1}×{0,…,k−1}\{0,1\}\times\{0,\dots,k-1\}{0,1}×{0,…,k−1} (composite, slot). σ\sigmaσ swaps the composite label; τi\tau_iτi​ swaps only the two constituents in slot iii. 7. Addition of angular momenta. With spins recorded as doubled values 2j∈N2j\in\mathbb N2j∈N, CanAddTo(l,J)\mathrm{CanAddTo}(l,J)CanAddTo(l,J) holds when a system of constituents with doubled spins lll can have total doubled spin JJJ: the empty system has J=0J=0J=0, and adding a constituent of doubled spin aaa to a system of doubled spin bbb yields exactly the JJJ with ∣a−b∣≤J≤a+b|a-b|\le J\le a+b∣a−b∣≤J≤a+b and J≡a+b(mod2)J\equiv a+b \pmod 2J≡a+b(mod2) (Clebsch–Gordan rule).

Formalization Note. Positions form a finite type (a lattice discretisation of the integral) and the sum excludes the diagonal x=yx=yx=y, matching the source's standing assumption x≠yx\ne yx=y. The Lorentz group is a Set of matrices rather than a bundled subgroup; theorems quantify over its elements.

Definition code
import Mathlib

namespace SpinStatistics

/-! ### Relativity: the Minkowski metric and the restricted Lorentz group -/

/-- The Minkowski metric `η = diag(1, -1, -1, -1)` on `ℝ⁴` (signature `(+,-,-,-)`,
coordinate `0` is time). -/
noncomputable def minkowskiMetric : Matrix (Fin 4) (Fin 4) ℝ :=
  Matrix.diagonal ![1, -1, -1, -1]

/-- A real `4 × 4` matrix `Λ` is a Lorentz transformation if it preserves the Minkowski
metric: `Λᵀ η Λ = η`. -/
def IsLorentz (Λ : Matrix (Fin 4) (Fin 4) ℝ) : Prop :=
  Λ.transpose * minkowskiMetric * Λ = minkowskiMetric

/-- `Λ` belongs to the restricted (proper, orthochronous) Lorentz group `SO⁺(1,3)`:
it is a Lorentz transformation, has determinant `1`, and preserves the direction of
time (`Λ₀₀ ≥ 1`). This is the connected component of the identity, generated by
the 3-dimensional rotations and the boosts. -/
def IsRestrictedLorentz (Λ : Matrix (Fin 4) (Fin 4) ℝ) : Prop :=
  IsLorentz Λ ∧ Λ.det = 1 ∧ 1 ≤ Λ 0 0

/-- The restricted Lorentz group `SO⁺(1,3)`, as a subset of the real `4 × 4` matrices. -/
def restrictedLorentzSet : Set (Matrix (Fin 4) (Fin 4) ℝ) :=
  {Λ | IsRestrictedLorentz Λ}

/-! ### Two-particle wavefunctions and field operators -/

/-- The symmetric part `ψ_S(x,y) = (ψ(x,y) + ψ(y,x)) / 2` of a two-particle
wavefunction. -/
noncomputable def symmPart {X : Type*} (ψ : X → X → ℂ) : X → X → ℂ :=
  fun x y => (ψ x y + ψ y x) / 2

/-- The antisymmetric part `ψ_A(x,y) = (ψ(x,y) - ψ(y,x)) / 2` of a two-particle
wavefunction. -/
noncomputable def antisymmPart {X : Type*} (ψ : X → X → ℂ) : X → X → ℂ :=
  fun x y => (ψ x y - ψ y x) / 2

/-- The two-particle creation operator `∑_{x ≠ y} ψ(x,y) φ(x) φ(y)` built from a
complex wavefunction `ψ` and a field `φ` with values in a complex algebra `A` of
operators, on a finite set `X` of positions (a discretisation of
`∬ ψ(x,y) φ(x) φ(y) dx dy`, restricted to distinct positions `x ≠ y`). -/
def twoParticleOp {X A : Type*} [Fintype X] [DecidableEq X] [Ring A] [Algebra ℂ A]
    (ψ : X → X → ℂ) (φ : X → A) : A :=
  ∑ x, ∑ y ∈ Finset.univ.filter (fun y => x ≠ y), ψ x y • (φ x * φ y)

/-! ### Composite particles -/

/-- Exchange of the two composite particles. A configuration of two composites, each
made of `k` constituents, is indexed by `Fin 2 × Fin k` (composite label, constituent
slot); this map swaps the composite label and keeps the slot. -/
def swapComposites {k : ℕ} (p : Fin 2 × Fin k) : Fin 2 × Fin k :=
  (Equiv.swap (0 : Fin 2) 1 p.1, p.2)

/-- Exchange of the `i`-th constituent of the first composite with the `i`-th
constituent of the second composite (all other constituents stay in place). -/
def swapConstituent {k : ℕ} (i : Fin k) (p : Fin 2 × Fin k) : Fin 2 × Fin k :=
  if p.2 = i then (Equiv.swap (0 : Fin 2) 1 p.1, p.2) else p

/-- Quantum-mechanical addition of angular momenta, with spins measured in units of
`ħ/2` (so a spin `j` is recorded as the natural number `2j`).
`CanAddTo l J` means that a system whose constituents have doubled spins `l` can have
total doubled spin `J`: the empty system has spin `0`, and adding a constituent of
doubled spin `a` to a system of doubled spin `b` can produce exactly the doubled spins
`J` with `|a - b| ≤ J ≤ a + b` and `J ≡ a + b (mod 2)` (the Clebsch–Gordan rule). -/
inductive CanAddTo : List ℕ → ℕ → Prop
  | nil : CanAddTo [] 0
  | cons {a b J : ℕ} {l : List ℕ} :
      CanAddTo l b → a ≤ J + b → b ≤ J + a → J ≤ a + b → (J + a + b) % 2 = 0 →
      CanAddTo (a :: l) J

end SpinStatistics
Source
Wikipedia, "Spin–statistics theorem" (https://en.wikipedia.org/wiki/Spin%E2%80%93statistics_theorem), PDF snapshot supplied by the proposal owner; sections 'Exchange symmetry or permutation symmetry' (p. 2), 'Relation to representation theory of the Lorentz group' and 'Composite particles' (p. 4)
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent that drafted the statements; NON-BLIND

NON-BLIND READ-BACK — NOT INDEPENDENT TESTIMONY. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement below, at the explicit instruction of the proposal owner. The author knew the intended meaning and the source text while writing it, so it must not be mistaken for a blind, independent audit. An independent blind read-back is still recommended before this proposal is submitted.

The file declares, in namespace SpinStatistics:

  • η\etaη is the real 4×44\times44×4 diagonal matrix with diagonal (1,−1,−1,−1)(1,-1,-1,-1)(1,−1,−1,−1).
  • A real 4×44\times44×4 matrix Λ\LambdaΛ is Lorentz iff ΛT η Λ=η\Lambda^{\mathsf T}\,\eta\,\Lambda=\etaΛTηΛ=η (matrix product, exact equality).
  • Λ\LambdaΛ is restricted Lorentz iff it is Lorentz, det⁡Λ=1\det\Lambda=1detΛ=1, and its (0,0)(0,0)(0,0) entry is ≥1\ge 1≥1. The restricted Lorentz set is the set of all such matrices (no group structure is declared on it).
  • For any type XXX and ψ:X→X→C\psi:X\to X\to\mathbb Cψ:X→X→C: ψS(x,y)=(ψ(x,y)+ψ(y,x))/2\psi_S(x,y)=(\psi(x,y)+\psi(y,x))/2ψS​(x,y)=(ψ(x,y)+ψ(y,x))/2 and ψA(x,y)=(ψ(x,y)−ψ(y,x))/2\psi_A(x,y)=(\psi(x,y)-\psi(y,x))/2ψA​(x,y)=(ψ(x,y)−ψ(y,x))/2 (division in C\mathbb CC, so no junk values).
  • For a finite type XXX with decidable equality, a ring AAA that is a C\mathbb CC-algebra, ψ:X→X→C\psi:X\to X\to\mathbb Cψ:X→X→C and ϕ:X→A\phi:X\to Aϕ:X→A: Φ[ψ,ϕ]=∑x∈X∑y∈X, y≠xψ(x,y)⋅(ϕ(x)ϕ(y))\Phi[\psi,\phi]=\sum_{x\in X}\sum_{y\in X,\,y\ne x}\psi(x,y)\cdot(\phi(x)\phi(y))Φ[ψ,ϕ]=∑x∈X​∑y∈X,y=x​ψ(x,y)⋅(ϕ(x)ϕ(y)), where ⋅\cdot⋅ is the scalar action of C\mathbb CC on AAA. Diagonal terms x=yx=yx=y are excluded. If XXX is empty or a singleton the sum is 000.
  • For k∈Nk\in\mathbb Nk∈N, σ:{0,1}×{0,…,k−1}→\sigma:\{0,1\}\times\{0,\dots,k-1\}\toσ:{0,1}×{0,…,k−1}→ itself sends (a,i)↦(1−a,i)(a,i)\mapsto(1-a,i)(a,i)↦(1−a,i); τi\tau_iτi​ sends (a,i)↦(1−a,i)(a,i)\mapsto(1-a,i)(a,i)↦(1−a,i) and fixes every (a,j)(a,j)(a,j) with j≠ij\ne ij=i.
  • CanAddTo\mathrm{CanAddTo}CanAddTo is the smallest relation between finite lists of naturals and naturals with: CanAddTo([ ],0)\mathrm{CanAddTo}([\,],0)CanAddTo([],0); and if CanAddTo(l,b)\mathrm{CanAddTo}(l,b)CanAddTo(l,b), a≤J+ba\le J+ba≤J+b, b≤J+ab\le J+ab≤J+a, J≤a+bJ\le a+bJ≤a+b and J+a+bJ+a+bJ+a+b is even, then CanAddTo(a::l,J)\mathrm{CanAddTo}(a::l,J)CanAddTo(a::l,J). In particular CanAddTo([ ],J)\mathrm{CanAddTo}([\,],J)CanAddTo([],J) holds only for J=0J=0J=0.

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