Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The N=2N=2N=2 matrices DDD, CCC, AAA and the roots c±c_\pmc±​

Definition
hardy2001_qubit

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

linear-algebramathematical-physicsquantum-foundationsquantum-information

For real parameters a,b,ca,b,ca,b,c, Section 8.6 (and Section 5) of the paper consider the 4×44\times44×4 matrix

D=(101−a1−b01ab1−aa1c1−bbc1),D=\begin{pmatrix}1&0&1-a&1-b\\0&1&a&b\\1-a&a&1&c\\1-b&b&c&1\end{pmatrix},D=​101−a1−b​01ab​1−aa1c​1−bbc1​​,

the change-of-variables matrix

C=(1000110000100001),C=\begin{pmatrix}1&0&0&0\\1&1&0&0\\0&0&1&0\\0&0&0&1\end{pmatrix},C=​1100​0100​0010​0001​​,

the 3×33\times33×3 matrix

A=(12a−12b−12a−1212c−12b−12c−1212),A=\begin{pmatrix}\tfrac12&a-\tfrac12&b-\tfrac12\\a-\tfrac12&\tfrac12&c-\tfrac12\\b-\tfrac12&c-\tfrac12&\tfrac12\end{pmatrix},A=​21​a−21​b−21​​a−21​21​c−21​​b−21​c−21​21​​​,

and the two numbers

c±=1−a−b+2ab±2ab(1−a)(1−b).c_\pm=1-a-b+2ab\pm2\sqrt{ab(1-a)(1-b)} .c±​=1−a−b+2ab±2ab(1−a)(1−b)​.

DijD_{ij}Dij​ is the probability of obtaining the iii-th fiducial measurement on the jjj-th fiducial state of a system with N=2N=2N=2, K=4K=4K=4. Pure states then lie on the surface v⃗ TAv⃗=12\vec v^{\,T}A\vec v=\tfrac12vTAv=21​.

Formalization Note Rows and columns are indexed from 000. ⋅\sqrt{\cdot}⋅​ is Real.sqrt, which returns 000 on negative arguments. Statements that use c±c_\pmc±​ assume 0≤a,b≤10\le a,b\le10≤a,b≤1, where the radicand is nonnegative.

Definition code
import Mathlib

namespace HardyFiveAxioms

/-- The matrix `D` of the `N = 2`, `K = 4` case (Hardy 2001, Eqs. (34) and (74)), with
fiducial vectors indexed `0, 1, 2, 3` (the paper's `1, 2, 3, 4`). -/
def qubitD (a b c : ℝ) : Matrix (Fin 4) (Fin 4) ℝ :=
  !![1, 0, 1 - a, 1 - b;
     0, 1, a, b;
     1 - a, a, 1, c;
     1 - b, b, c, 1]

/-- The change of variables `r = C v` (Hardy 2001, Eq. (78)). -/
def qubitC : Matrix (Fin 4) (Fin 4) ℝ :=
  !![1, 0, 0, 0;
     1, 1, 0, 0;
     0, 0, 1, 0;
     0, 0, 0, 1]

/-- The `3 × 3` matrix `A` of Hardy 2001, Eq. (83). -/
noncomputable def qubitA (a b c : ℝ) : Matrix (Fin 3) (Fin 3) ℝ :=
  !![1 / 2, a - 1 / 2, b - 1 / 2;
     a - 1 / 2, 1 / 2, c - 1 / 2;
     b - 1 / 2, c - 1 / 2, 1 / 2]

/-- `c₊ = 1 - a - b + 2ab + 2√(ab(1-a)(1-b))` (Hardy 2001, Eqs. (37) and (85)). -/
noncomputable def cPlus (a b : ℝ) : ℝ :=
  1 - a - b + 2 * a * b + 2 * Real.sqrt (a * b * (1 - a) * (1 - b))

/-- `c₋ = 1 - a - b + 2ab - 2√(ab(1-a)(1-b))` (Hardy 2001, Eqs. (37) and (85)). -/
noncomputable def cMinus (a b : ℝ) : ℝ :=
  1 - a - b + 2 * a * b - 2 * Real.sqrt (a * b * (1 - a) * (1 - b))

end HardyFiveAxioms
Source
L. Hardy, *Quantum Theory From Five Reasonable Axioms*, arXiv:quant-ph/0101012v4 (2001), https://arxiv.org/abs/quant-ph/0101012, p. 9, Eqs. (34), (37); pp. 20–21, Section 8.6, Eqs. (74), (78), (83), (85)
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.

For real numbers a,b,ca,b,ca,b,c (no constraints):

  • D(a,b,c)D(a,b,c)D(a,b,c) is the real 4×44\times44×4 matrix with rows (1,0,1−a,1−b)(1,0,1-a,1-b)(1,0,1−a,1−b), (0,1,a,b)(0,1,a,b)(0,1,a,b), (1−a,a,1,c)(1-a,a,1,c)(1−a,a,1,c), (1−b,b,c,1)(1-b,b,c,1)(1−b,b,c,1). It is symmetric.
  • CCC is the real 4×44\times44×4 matrix with rows (1,0,0,0)(1,0,0,0)(1,0,0,0), (1,1,0,0)(1,1,0,0)(1,1,0,0), (0,0,1,0)(0,0,1,0)(0,0,1,0), (0,0,0,1)(0,0,0,1)(0,0,0,1).
  • A(a,b,c)A(a,b,c)A(a,b,c) is the real symmetric 3×33\times33×3 matrix with diagonal entries 12\tfrac1221​, (1,2)(1,2)(1,2) entry a−12a-\tfrac12a−21​, (1,3)(1,3)(1,3) entry b−12b-\tfrac12b−21​, and (2,3)(2,3)(2,3) entry c−12c-\tfrac12c−21​.
  • c+(a,b)=1−a−b+2ab+2ab(1−a)(1−b)c_+(a,b)=1-a-b+2ab+2\sqrt{ab(1-a)(1-b)}c+​(a,b)=1−a−b+2ab+2ab(1−a)(1−b)​ and c−(a,b)=1−a−b+2ab−2ab(1−a)(1−b)c_-(a,b)=1-a-b+2ab-2\sqrt{ab(1-a)(1-b)}c−​(a,b)=1−a−b+2ab−2ab(1−a)(1−b)​. Here t\sqrt{t}t​ is the nonnegative square root for t≥0t\ge0t≥0 and is 000 for t<0t<0t<0, so outside 0≤a,b≤10\le a,b\le10≤a,b≤1 the radicand may be negative and then c+=c−=1−a−b+2abc_+=c_-=1-a-b+2abc+​=c−​=1−a−b+2ab.
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