Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

GHZ scenario: Pauli matrices, GHZ state, spin eigenvectors, Born probabilities

Definition
DrezetGHZ_Quantum

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

bell-nonlocalityghzquantum-foundations

Quantum-mechanical objects of the three-particle GHZ experiment.

  1. Pauli matrices in the σz\sigma_zσz​ eigenbasis (∣+z⟩,∣−z⟩)(|{+z}\rangle,|{-z}\rangle)(∣+z⟩,∣−z⟩):
σx=(0110),σy=(0−ii0),σz=(100−1).\sigma_x=\begin{pmatrix}0&1\\1&0\end{pmatrix},\quad \sigma_y=\begin{pmatrix}0&-i\\ i&0\end{pmatrix},\quad \sigma_z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}.σx​=(01​10​),σy​=(0i​−i0​),σz​=(10​0−1​).
  1. Three-qubit operators A(1)B(2)C(3)=A⊗B⊗CA^{(1)}B^{(2)}C^{(3)} = A\otimes B\otimes CA(1)B(2)C(3)=A⊗B⊗C, acting on vectors indexed by {0,1}3\{0,1\}^3{0,1}3 (index 000 is ∣+z⟩|{+z}\rangle∣+z⟩).
  2. GHZ state (Eq. (1)):
∣ψ⟩=12(∣+z+z+z⟩−∣−z−z−z⟩).|\psi\rangle=\tfrac{1}{\sqrt2}\big(|{+z}{+z}{+z}\rangle-|{-z}{-z}{-z}\rangle\big).∣ψ⟩=2​1​(∣+z+z+z⟩−∣−z−z−z⟩).
  1. Settings n^∈{x^,y^}\hat n\in\{\hat x,\hat y\}n^∈{x^,y^​}, with observables σx^=σx\sigma_{\hat x}=\sigma_xσx^​=σx​ and σy^=σy\sigma_{\hat y}=\sigma_yσy^​​=σy​. The normalized eigenvectors for an outcome a∈{±1}a\in\{\pm1\}a∈{±1} are
∣ax^⟩=12(∣+z⟩+a∣−z⟩),∣ay^⟩=12(∣+z⟩+ia∣−z⟩).|a_{\hat x}\rangle=\tfrac1{\sqrt2}(|{+z}\rangle+a|{-z}\rangle),\qquad |a_{\hat y}\rangle=\tfrac1{\sqrt2}(|{+z}\rangle+ia|{-z}\rangle).∣ax^​⟩=2​1​(∣+z⟩+a∣−z⟩),∣ay^​​⟩=2​1​(∣+z⟩+ia∣−z⟩).
  1. Born probabilities (Eq. (16) with θ=ψ\theta=\psiθ=ψ):
P(α,β,γ∣n^1,n^2,n^3,ψ)=∣⟨αn^1βn^2γn^3∣ψ⟩∣2.P(\alpha,\beta,\gamma\mid\hat n_1,\hat n_2,\hat n_3,\psi)=\big|\langle\alpha_{\hat n_1}\beta_{\hat n_2}\gamma_{\hat n_3}\mid\psi\rangle\big|^2.P(α,β,γ∣n^1​,n^2​,n^3​,ψ)=​⟨αn^1​​βn^2​​γn^3​​∣ψ⟩​2.

These are the quantum predictions that every GHZ statement in this mission refers to.

Formalization Note Outcomes ±1\pm1±1 are elements of ℤˣ. Three-qubit vectors are functions on Fin 2 × Fin 2 × Fin 2. bornProb is real-valued (Complex.normSq).

Definition code
import Mathlib

/-!
# Quantum side of the GHZ scenario (Drezet 2023, Section II, Eqs. (1)–(5))

Qubit basis convention: index `0` is `|+z⟩`, index `1` is `|−z⟩`.
Three-qubit vectors are functions on `Fin 2 × Fin 2 × Fin 2`
(particle 1, particle 2, particle 3); three-qubit operators are threefold
Kronecker products `A ⊗ B ⊗ C`.
-/

namespace DrezetGHZ

open Matrix Kronecker

/-- Pauli matrix `σ_x` in the `σ_z` eigenbasis `(|+z⟩, |−z⟩)`. -/
def pauliX : Matrix (Fin 2) (Fin 2) ℂ := !![0, 1; 1, 0]

/-- Pauli matrix `σ_y` in the `σ_z` eigenbasis `(|+z⟩, |−z⟩)`. -/
def pauliY : Matrix (Fin 2) (Fin 2) ℂ := !![0, -Complex.I; Complex.I, 0]

/-- Pauli matrix `σ_z` in its own eigenbasis `(|+z⟩, |−z⟩)`. -/
def pauliZ : Matrix (Fin 2) (Fin 2) ℂ := !![1, 0; 0, -1]

/-- Index type of the computational basis of three spin-½ particles. -/
abbrev ThreeQubit := Fin 2 × Fin 2 × Fin 2

/-- The operator `A^{(1)} B^{(2)} C^{(3)} = A ⊗ B ⊗ C` on three qubits. -/
def tensor3 (A B C : Matrix (Fin 2) (Fin 2) ℂ) : Matrix ThreeQubit ThreeQubit ℂ :=
  A ⊗ₖ (B ⊗ₖ C)

/-- The GHZ state of Eq. (1):
`|ψ⟩ = (|+z⟩|+z⟩|+z⟩ − |−z⟩|−z⟩|−z⟩)/√2`. -/
noncomputable def ghzState : ThreeQubit → ℂ := fun i =>
  if i = (0, 0, 0) then 1 / (Real.sqrt 2 : ℂ)
  else if i = (1, 1, 1) then -1 / (Real.sqrt 2 : ℂ)
  else 0

/-- The two Stern–Gerlach settings used in the GHZ argument: spin along `x̂` or along `ŷ`. -/
inductive Setting
  | x
  | y
  deriving DecidableEq

instance : Fintype Setting :=
  ⟨{.x, .y}, fun s => by cases s <;> simp⟩

/-- The spin observable measured for a setting: `σ_x` for `x̂`, `σ_y` for `ŷ`. -/
def Setting.observable : Setting → Matrix (Fin 2) (Fin 2) ℂ
  | .x => pauliX
  | .y => pauliY

/-- Normalized eigenvector of the setting's observable for eigenvalue `a = ±1`
(outcomes are elements of `ℤˣ = {1, -1}`):
`|a_x⟩ = (|+z⟩ + a|−z⟩)/√2`, `|a_y⟩ = (|+z⟩ + i a|−z⟩)/√2`. -/
noncomputable def spinEigenvector : Setting → ℤˣ → (Fin 2 → ℂ)
  | .x, a => ![1 / (Real.sqrt 2 : ℂ), ((a : ℤ) : ℂ) / (Real.sqrt 2 : ℂ)]
  | .y, a => ![1 / (Real.sqrt 2 : ℂ), ((a : ℤ) : ℂ) * Complex.I / (Real.sqrt 2 : ℂ)]

/-- Product vector `|u⟩₁|v⟩₂|w⟩₃`. -/
def productKet (u v w : Fin 2 → ℂ) : ThreeQubit → ℂ := fun i => u i.1 * v i.2.1 * w i.2.2

/-- Born probability `P(α, β, γ | n̂₁, n̂₂, n̂₃, ψ) = |⟨α_{n̂₁}, β_{n̂₂}, γ_{n̂₃} | ψ⟩|²`
(Eq. (16) with `θ = ψ`) that Alice, Bob and Charlie, measuring the GHZ state
along settings `n₁, n₂, n₃`, obtain outcomes `α, β, γ ∈ {±1}`. -/
noncomputable def bornProb (n₁ n₂ n₃ : Setting) (α β γ : ℤˣ) : ℝ :=
  Complex.normSq
    (star (productKet (spinEigenvector n₁ α) (spinEigenvector n₂ β) (spinEigenvector n₃ γ))
      ⬝ᵥ ghzState)

end DrezetGHZ
Source
A. Drezet, "An Elementary Proof That Everett's Quantum Multiverse Is Nonlocal: Bell-Locality and Branch-Symmetry in the Many-Worlds Interpretation", arXiv:2306.07794v1 [quant-ph] (2023), https://arxiv.org/abs/2306.07794, p. 2 Eq. (1); p. 3 Eqs. (2)–(5); p. 5 Eq. (16).
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as the drafter; non-blind

Non-blind read-back — not independent testimony. This read-back was written by the same agent that drafted the Lean statements of this proposal, with full knowledge of the source paper and of the intended meaning. It is not a blind, independent audit and must not be mistaken for independent testimony; reviewers should compare the Lean code against the source themselves.

This file defines, inside the namespace DrezetGHZ:

  • σx\sigma_xσx​, σy\sigma_yσy​, σz\sigma_zσz​: the 2×22\times22×2 complex matrices (0110)\begin{pmatrix}0&1\\1&0\end{pmatrix}(01​10​), (0−ii0)\begin{pmatrix}0&-i\\ i&0\end{pmatrix}(0i​−i0​) and (100−1)\begin{pmatrix}1&0\\0&-1\end{pmatrix}(10​0−1​), with rows and columns indexed by {0,1}\{0,1\}{0,1}.
  • The index set T={0,1}×{0,1}×{0,1}T=\{0,1\}\times\{0,1\}\times\{0,1\}T={0,1}×{0,1}×{0,1}. For three 2×22\times22×2 matrices A,B,CA,B,CA,B,C, the 8×88\times88×8 matrix A⊗(B⊗C)A\otimes(B\otimes C)A⊗(B⊗C) indexed by TTT, with entries (A⊗B⊗C)(i,j,k),(i′,j′,k′)=Aii′Bjj′Ckk′(A\otimes B\otimes C)_{(i,j,k),(i',j',k')}=A_{ii'}B_{jj'}C_{kk'}(A⊗B⊗C)(i,j,k),(i′,j′,k′)​=Aii′​Bjj′​Ckk′​.
  • A vector ψ:T→C\psi:T\to\mathbb Cψ:T→C with ψ(0,0,0)=1/2\psi(0,0,0)=1/\sqrt2ψ(0,0,0)=1/2​, ψ(1,1,1)=−1/2\psi(1,1,1)=-1/\sqrt2ψ(1,1,1)=−1/2​, and ψ=0\psi=0ψ=0 at the other six indices.
  • A type of settings with exactly two distinct values, xxx and yyy, with decidable equality and a finite-type structure listing both values. It maps x↦σxx\mapsto\sigma_xx↦σx​ and y↦σyy\mapsto\sigma_yy↦σy​.
  • For a setting and a∈Z×={1,−1}a\in\mathbb Z^\times=\{1,-1\}a∈Z×={1,−1}, a vector in C2\mathbb C^2C2: for xxx it is (1/2, a/2)(1/\sqrt2,\ a/\sqrt2)(1/2​, a/2​); for yyy it is (1/2, a i/2)(1/\sqrt2,\ a\,i/\sqrt2)(1/2​, ai/2​).
  • For u,v,w∈C2u,v,w\in\mathbb C^2u,v,w∈C2, the vector (u⊗v⊗w)(i,j,k)=uivjwk(u\otimes v\otimes w)(i,j,k)=u_i v_j w_k(u⊗v⊗w)(i,j,k)=ui​vj​wk​ on TTT.
  • For settings n1,n2,n3n_1,n_2,n_3n1​,n2​,n3​ and α,β,γ∈{±1}\alpha,\beta,\gamma\in\{\pm1\}α,β,γ∈{±1}, the real number
bornProb(n1,n2,n3;α,β,γ)=∣∑t∈T(en1,α⊗en2,β⊗en3,γ)(t)‾  ψ(t)∣2,\mathrm{bornProb}(n_1,n_2,n_3;\alpha,\beta,\gamma)=\Big|\sum_{t\in T}\overline{(e_{n_1,\alpha}\otimes e_{n_2,\beta}\otimes e_{n_3,\gamma})(t)}\;\psi(t)\Big|^2,bornProb(n1​,n2​,n3​;α,β,γ)=​t∈T∑​(en1​,α​⊗en2​,β​⊗en3​,γ​)(t)​ψ(t)​2,

where en,ae_{n,a}en,a​ is the vector above and the bar is complex conjugation.

There are no hypotheses. All the definitions are concrete and total.

Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Oct 8, 2026

    Confirmed by the mission captain (proposal self-audit).

  • Endorsed by mikedeng1 · Nov 8, 2026

    Confirmed by the mission captain (proposal self-audit).

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