Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Hardy's N2N^2N2 fiducial projectors ∣n⟩⟨n∣|n\rangle\langle n|∣n⟩⟨n∣, ∣mn⟩x⟨mn∣|mn\rangle_x\langle mn|∣mn⟩x​⟨mn∣, ∣mn⟩y⟨mn∣|mn\rangle_y\langle mn|∣mn⟩y​⟨mn∣

Definition
hardy2001_projectors

by Lucas · Oct 2, 2026 · Mathlib 0df444a (Lean v4.33.1)

linear-algebramathematical-physicsquantum-foundationsquantum-information

Let ∣1⟩,…,∣N⟩|1\rangle,\dots,|N\rangle∣1⟩,…,∣N⟩ be the standard orthonormal basis of CN\mathbb C^NCN. For m<nm<nm<n put

∣mn⟩x=12(∣m⟩+∣n⟩),∣mn⟩y=12(∣m⟩+i∣n⟩).|mn\rangle_x=\frac1{\sqrt2}\big(|m\rangle+|n\rangle\big),\qquad |mn\rangle_y=\frac1{\sqrt2}\big(|m\rangle+i|n\rangle\big).∣mn⟩x​=2​1​(∣m⟩+∣n⟩),∣mn⟩y​=2​1​(∣m⟩+i∣n⟩).

For a vector v∈CNv\in\mathbb C^Nv∈CN, ∣v⟩⟨v∣|v\rangle\langle v|∣v⟩⟨v∣ denotes the N×NN\times NN×N matrix with entries vjvk‾v_j\overline{v_k}vj​vk​​. Hardy's fiducial projectors are the operators

∣n⟩⟨n∣  (1≤n≤N),∣mn⟩x⟨mn∣,  ∣mn⟩y⟨mn∣  (1≤m<n≤N),|n\rangle\langle n|\ \ (1\le n\le N),\qquad |mn\rangle_x\langle mn|,\ \ |mn\rangle_y\langle mn|\ \ (1\le m<n\le N),∣n⟩⟨n∣  (1≤n≤N),∣mn⟩x​⟨mn∣,  ∣mn⟩y​⟨mn∣  (1≤m<n≤N),

which number N+2(N2)=N2N+2\binom N2=N^2N+2(2N​)=N2 in total. They are indexed by the disjoint union of {1,…,N}\{1,\dots,N\}{1,…,N} with two copies of the set of pairs m<nm<nm<n.

Section 5 uses these projectors to put quantum theory in a form resembling classical probability theory: the state is the vector of the N2N^2N2 probabilities pk=tr(P^kρ^)p_k=\mathrm{tr}(\hat P_k\hat\rho)pk​=tr(P^k​ρ^​).

Formalization Note Indices are Fin N, so ∣n⟩|n\rangle∣n⟩ is ket (n-1). The two copies of the pairs are labelled false (xxx) and true (yyy). The paper writes ∣mn⟩x⟨mn∣|mn\rangle_x\langle mn|∣mn⟩x​⟨mn∣ for the projector onto ∣mn⟩x|mn\rangle_x∣mn⟩x​, and similarly for yyy. ket, ketX, ketY and proj are also used directly in other statements of this mission.

Definition code
import Mathlib

namespace HardyFiveAxioms

/-- The orthonormal basis vector `|n⟩ ∈ ℂᴺ`. -/
def ket {N : ℕ} (n : Fin N) : Fin N → ℂ :=
  Pi.single n 1

/-- `|mn⟩ₓ = (|m⟩ + |n⟩)/√2` (Hardy 2001, Section 5). -/
noncomputable def ketX {N : ℕ} (m n : Fin N) : Fin N → ℂ :=
  ((1 / Real.sqrt 2 : ℝ) : ℂ) • (ket m + ket n)

/-- `|mn⟩_y = (|m⟩ + i|n⟩)/√2` (Hardy 2001, Section 5). -/
noncomputable def ketY {N : ℕ} (m n : Fin N) : Fin N → ℂ :=
  ((1 / Real.sqrt 2 : ℝ) : ℂ) • (ket m + Complex.I • ket n)

/-- The operator `|v⟩⟨v|` on `ℂᴺ`, as the matrix with entries `vᵢ · conj(vⱼ)`. -/
def proj {N : ℕ} (v : Fin N → ℂ) : Matrix (Fin N) (Fin N) ℂ :=
  Matrix.vecMulVec v (star v)

/-- Index set of Hardy's `N²` fiducial projectors: one for each basis vector `n`, and two
(labelled `x` = `false`, `y` = `true`) for each pair `m < n`. -/
abbrev FiducialIndex (N : ℕ) : Type :=
  Fin N ⊕ ({p : Fin N × Fin N // p.1 < p.2} × Bool)

/-- Hardy's `N²` fiducial projectors (Hardy 2001, Eqs. (26)–(27)):
`|n⟩⟨n|` for `n = 1, …, N`, and `|mn⟩ₓ⟨mn|`, `|mn⟩_y⟨mn|` for `m < n`. -/
noncomputable def fiducialProjector {N : ℕ} : FiducialIndex N → Matrix (Fin N) (Fin N) ℂ
  | Sum.inl n => proj (ket n)
  | Sum.inr (p, false) => proj (ketX p.1.1 p.1.2)
  | Sum.inr (p, true) => proj (ketY p.1.1 p.1.2)

end HardyFiveAxioms
Source
L. Hardy, *Quantum Theory From Five Reasonable Axioms*, arXiv:quant-ph/0101012v4 (2001), https://arxiv.org/abs/quant-ph/0101012, p. 8, Section 5, Eqs. (26)–(27) and the surrounding text
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic)

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, with full knowledge of the source paper and of the intended meaning. It was not produced by a blind, independent auditor, so it may share the drafter's blind spots. Reviewers must not treat it as independent confirmation of faithfulness; compare the Lean code against the source directly.

Fix N∈NN\in\mathbb NN∈N and index coordinates by {0,…,N−1}\{0,\dots,N-1\}{0,…,N−1}.

  • ket(n)∈CN\mathrm{ket}(n)\in\mathbb C^Nket(n)∈CN is the standard unit vector ene_nen​.
  • ketX(m,n)=12(em+en)\mathrm{ketX}(m,n)=\frac1{\sqrt2}(e_m+e_n)ketX(m,n)=2​1​(em​+en​) and ketY(m,n)=12(em+i en)\mathrm{ketY}(m,n)=\frac1{\sqrt2}(e_m+i\,e_n)ketY(m,n)=2​1​(em​+ien​), for arbitrary indices m,nm,nm,n. No order or distinctness of m,nm,nm,n is required here. If m=nm=nm=n, then ketX(n,n)=2 en\mathrm{ketX}(n,n)=\sqrt2\,e_nketX(n,n)=2​en​, which is not a unit vector.
  • For v∈CNv\in\mathbb C^Nv∈CN, proj(v)\mathrm{proj}(v)proj(v) is the N×NN\times NN×N complex matrix with (j,k)(j,k)(j,k) entry vj vk‾v_j\,\overline{v_k}vj​vk​​. It is the rank-one operator ∣v⟩⟨v∣|v\rangle\langle v|∣v⟩⟨v∣, and it is idempotent only when ∥v∥=1\|v\|=1∥v∥=1.
  • The index type is the disjoint union of {0,…,N−1}\{0,\dots,N-1\}{0,…,N−1} with the product of {(m,n):m<n}\{(m,n): m<n\}{(m,n):m<n} and {false,true}\{\text{false},\text{true}\}{false,true}.
  • The family fid\mathrm{fid}fid sends an index nnn of the first kind to proj(en)\mathrm{proj}(e_n)proj(en​), a pair (m,n)(m,n)(m,n) with label false to proj(ketX(m,n))\mathrm{proj}(\mathrm{ketX}(m,n))proj(ketX(m,n)), and a pair (m,n)(m,n)(m,n) with label true to proj(ketY(m,n))\mathrm{proj}(\mathrm{ketY}(m,n))proj(ketY(m,n)). Because m<nm<nm<n, these vectors are unit vectors.
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 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