Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Problem 02 definitions — Equality case for compressed convex functional calculus

Definition
rybin2026_p02_compressed_convex_calculus

by wenxinzhang · Sep 4, 2026 · Mathlib c5ea003 (Lean v4.30.0)

convexityhilbert-spacesoperator-theorypositive-contractions

unitSquare. This is the subset of functions x:{0,1}→Rx:\{0,1\}\to\mathbb Rx:{0,1}→R lying pointwise between the constant functions 000 and 111; equivalently,

unitSquare⁡={x:{0,1}→R | 0≤x(0)≤1 and 0≤x(1)≤1}.\operatorname{unitSquare} =\left\{x:\{0,1\}\to\mathbb R\ \middle|\ 0\le x(0)\le1\ \text{and}\ 0\le x(1)\le1\right\}.unitSquare={x:{0,1}→R ∣ 0≤x(0)≤1 and 0≤x(1)≤1}.

JointSpectralData. For every natural number nnn, including n=0n=0n=0, a value of JointSpectralData⁡(n)\operatorname{JointSpectralData}(n)JointSpectralData(n) consists of a complex n×nn\times nn×n matrix UUU, proofs of both U∗U=InU^{*}U=I_nU∗U=In​ and UU∗=InUU^{*}=I_nUU∗=In​, and a function assigning to every i∈{0,…,n−1}i\in\{0,\ldots,n-1\}i∈{0,…,n−1} a pair λi:{0,1}→R\lambda_i:\{0,1\}\to\mathbb Rλi​:{0,1}→R such that 0≤λi(0)≤10\le\lambda_i(0)\le10≤λi​(0)≤1 and 0≤λi(1)≤10\le\lambda_i(1)\le10≤λi​(1)≤1. Here U∗U^{*}U∗ is the conjugate transpose. When n=0n=0n=0, the matrices and spectral function have empty index sets, and the spectral bounds are vacuous.

JointSpectralData.operator. Given any natural number nnn, joint spectral data with unitary matrix UUU and spectral pairs λi∈[0,1]2\lambda_i\in[0,1]^2λi​∈[0,1]2, and a coordinate c∈{0,1}c\in\{0,1\}c∈{0,1}, the associated complex n×nn\times nn×n matrix is defined by

Xc=U diag⁡ ⁣((λi(c))i=0n−1) U∗,X_c =U\,\operatorname{diag}\!\bigl((\lambda_i(c))_{i=0}^{n-1}\bigr)\,U^{*},Xc​=Udiag((λi​(c))i=0n−1​)U∗,

where each real number λi(c)\lambda_i(c)λi​(c) is regarded as a complex number and the displayed diagonal matrix has zero off-diagonal entries. For n=0n=0n=0, this is the unique empty 0×00\times00×0 matrix.

JointSpectralData.functional. Given any natural number nnn, joint spectral data with unitary matrix UUU and spectral pairs λi∈[0,1]2\lambda_i\in[0,1]^2λi​∈[0,1]2, and an arbitrary total function f:R{0,1}→Rf:\mathbb R^{\{0,1\}}\to\mathbb Rf:R{0,1}→R, the associated complex n×nn\times nn×n matrix is defined by

f(S)=U diag⁡ ⁣((f(λi))i=0n−1) U∗,f(S) =U\,\operatorname{diag}\!\bigl((f(\lambda_i))_{i=0}^{n-1}\bigr)\,U^{*},f(S)=Udiag((f(λi​))i=0n−1​)U∗,

with each real value f(λi)f(\lambda_i)f(λi​) regarded as complex. No continuity, measurability, boundedness, or other regularity condition is imposed on fff. For n=0n=0n=0, the result is the unique empty 0×00\times00×0 matrix.

IsOrthogonalProjection. For every natural number nnn, including 000, and every complex n×nn\times nn×n matrix PPP, the proposition IsOrthogonalProjection⁡(P)\operatorname{IsOrthogonalProjection}(P)IsOrthogonalProjection(P) means exactly the conjunction

P∗=PandP2=P.P^{*}=P \qquad\text{and}\qquad P^2=P.P∗=PandP2=P.

Thus it requires both self-adjointness and idempotence. In dimension 000, the unique empty matrix satisfies both equalities.

Reduces. For every natural number nnn, including 000, and arbitrary complex n×nn\times nn×n matrices PPP and XXX, the proposition Reduces⁡(P,X)\operatorname{Reduces}(P,X)Reduces(P,X) means exactly

PX=XP.PX=XP.PX=XP.

This definition itself does not require PPP to be a projection or impose any other condition on either matrix. In dimension 000, the equality holds automatically.

CompressionWitness. Fix any natural number nnn, joint spectral data SSS with unitary matrix UUU and spectral pairs λi∈[0,1]2\lambda_i\in[0,1]^2λi​∈[0,1]2, and an arbitrary complex n×nn\times nn×n matrix PPP. A compression witness consists of another joint spectral-data record with a complex matrix VVV and pairs μi∈[0,1]2\mu_i\in[0,1]^2μi​∈[0,1]2, satisfying V∗V=InV^{*}V=I_nV∗V=In​ and VV∗=InVV^{*}=I_nVV∗=In​, together with the two equalities

V diag⁡ ⁣((μi(0))i=0n−1)V∗=P ⁣(U diag⁡ ⁣((λi(0))i=0n−1)U∗)PV\,\operatorname{diag}\!\bigl((\mu_i(0))_{i=0}^{n-1}\bigr)V^{*} = P\!\left(U\,\operatorname{diag}\!\bigl((\lambda_i(0))_{i=0}^{n-1}\bigr)U^{*}\right)PVdiag((μi​(0))i=0n−1​)V∗=P(Udiag((λi​(0))i=0n−1​)U∗)P

and

V diag⁡ ⁣((μi(1))i=0n−1)V∗=P ⁣(U diag⁡ ⁣((λi(1))i=0n−1)U∗)P.V\,\operatorname{diag}\!\bigl((\mu_i(1))_{i=0}^{n-1}\bigr)V^{*} = P\!\left(U\,\operatorname{diag}\!\bigl((\lambda_i(1))_{i=0}^{n-1}\bigr)U^{*}\right)P.Vdiag((μi​(1))i=0n−1​)V∗=P(Udiag((λi​(1))i=0n−1​)U∗)P.

The parameter PPP is not required here to be self-adjoint, idempotent, or commuting with either matrix; the factor on both sides of each compressed operator is PPP itself. No relationship between (V,μi)(V,\mu_i)(V,μi​) and (U,λi)(U,\lambda_i)(U,λi​) is required beyond the two displayed matrix equalities. When n=0n=0n=0, all indexing data are empty and both equalities are automatic.

Definition code
import Mathlib

open Matrix Set
open scoped ComplexConjugate Matrix

namespace RybinAI2026.P02

/-- The square `[0,1]²`, represented as functions on a two-element type. -/
def unitSquare : Set (Fin 2 → ℝ) := Icc 0 1

/-- Simultaneous spectral data for two commuting positive contractions in finite dimension. -/
structure JointSpectralData (n : ℕ) where
  unitary : Matrix (Fin n) (Fin n) ℂ
  unitary_left : unitaryᴴ * unitary = 1
  unitary_right : unitary * unitaryᴴ = 1
  spectrum : Fin n → Fin 2 → ℝ
  spectrum_mem : ∀ i, spectrum i ∈ unitSquare

/-- The operator with coordinate `c` in a simultaneous diagonalization. -/
noncomputable def JointSpectralData.operator {n : ℕ} (S : JointSpectralData n)
    (c : Fin 2) : Matrix (Fin n) (Fin n) ℂ :=
  S.unitary * diagonal (fun i => (S.spectrum i c : ℂ)) * S.unitaryᴴ

/-- Joint continuous functional calculus in the supplied common eigenbasis. -/
noncomputable def JointSpectralData.functional {n : ℕ} (S : JointSpectralData n)
    (f : (Fin 2 → ℝ) → ℝ) : Matrix (Fin n) (Fin n) ℂ :=
  S.unitary * diagonal (fun i => (f (S.spectrum i) : ℂ)) * S.unitaryᴴ

/-- A self-adjoint idempotent matrix. -/
def IsOrthogonalProjection {n : ℕ} (P : Matrix (Fin n) (Fin n) ℂ) : Prop :=
  Pᴴ = P ∧ P * P = P

/-- A projection reduces an operator exactly when it commutes with it. -/
def Reduces {n : ℕ} (P X : Matrix (Fin n) (Fin n) ℂ) : Prop :=
  P * X = X * P

/-- A simultaneous diagonalization of the two compressed operators. -/
structure CompressionWitness {n : ℕ} (S : JointSpectralData n)
    (P : Matrix (Fin n) (Fin n) ℂ) where
  compressed : JointSpectralData n
  first_eq : compressed.operator 0 = P * S.operator 0 * P
  second_eq : compressed.operator 1 = P * S.operator 1 * P

end RybinAI2026.P02
Source
https://rybindmitry.github.io/problems/2.html
Read-back

What the Lean code literally says, in plain math · gpt-5.6-sol

unitSquare. This is the subset of functions x:{0,1}→Rx:\{0,1\}\to\mathbb Rx:{0,1}→R lying pointwise between the constant functions 000 and 111; equivalently,

unitSquare⁡={x:{0,1}→R | 0≤x(0)≤1 and 0≤x(1)≤1}.\operatorname{unitSquare} =\left\{x:\{0,1\}\to\mathbb R\ \middle|\ 0\le x(0)\le1\ \text{and}\ 0\le x(1)\le1\right\}.unitSquare={x:{0,1}→R ∣ 0≤x(0)≤1 and 0≤x(1)≤1}.

JointSpectralData. For every natural number nnn, including n=0n=0n=0, a value of JointSpectralData⁡(n)\operatorname{JointSpectralData}(n)JointSpectralData(n) consists of a complex n×nn\times nn×n matrix UUU, proofs of both U∗U=InU^{*}U=I_nU∗U=In​ and UU∗=InUU^{*}=I_nUU∗=In​, and a function assigning to every i∈{0,…,n−1}i\in\{0,\ldots,n-1\}i∈{0,…,n−1} a pair λi:{0,1}→R\lambda_i:\{0,1\}\to\mathbb Rλi​:{0,1}→R such that 0≤λi(0)≤10\le\lambda_i(0)\le10≤λi​(0)≤1 and 0≤λi(1)≤10\le\lambda_i(1)\le10≤λi​(1)≤1. Here U∗U^{*}U∗ is the conjugate transpose. When n=0n=0n=0, the matrices and spectral function have empty index sets, and the spectral bounds are vacuous.

JointSpectralData.operator. Given any natural number nnn, joint spectral data with unitary matrix UUU and spectral pairs λi∈[0,1]2\lambda_i\in[0,1]^2λi​∈[0,1]2, and a coordinate c∈{0,1}c\in\{0,1\}c∈{0,1}, the associated complex n×nn\times nn×n matrix is defined by

Xc=U diag⁡ ⁣((λi(c))i=0n−1) U∗,X_c =U\,\operatorname{diag}\!\bigl((\lambda_i(c))_{i=0}^{n-1}\bigr)\,U^{*},Xc​=Udiag((λi​(c))i=0n−1​)U∗,

where each real number λi(c)\lambda_i(c)λi​(c) is regarded as a complex number and the displayed diagonal matrix has zero off-diagonal entries. For n=0n=0n=0, this is the unique empty 0×00\times00×0 matrix.

JointSpectralData.functional. Given any natural number nnn, joint spectral data with unitary matrix UUU and spectral pairs λi∈[0,1]2\lambda_i\in[0,1]^2λi​∈[0,1]2, and an arbitrary total function f:R{0,1}→Rf:\mathbb R^{\{0,1\}}\to\mathbb Rf:R{0,1}→R, the associated complex n×nn\times nn×n matrix is defined by

f(S)=U diag⁡ ⁣((f(λi))i=0n−1) U∗,f(S) =U\,\operatorname{diag}\!\bigl((f(\lambda_i))_{i=0}^{n-1}\bigr)\,U^{*},f(S)=Udiag((f(λi​))i=0n−1​)U∗,

with each real value f(λi)f(\lambda_i)f(λi​) regarded as complex. No continuity, measurability, boundedness, or other regularity condition is imposed on fff. For n=0n=0n=0, the result is the unique empty 0×00\times00×0 matrix.

IsOrthogonalProjection. For every natural number nnn, including 000, and every complex n×nn\times nn×n matrix PPP, the proposition IsOrthogonalProjection⁡(P)\operatorname{IsOrthogonalProjection}(P)IsOrthogonalProjection(P) means exactly the conjunction

P∗=PandP2=P.P^{*}=P \qquad\text{and}\qquad P^2=P.P∗=PandP2=P.

Thus it requires both self-adjointness and idempotence. In dimension 000, the unique empty matrix satisfies both equalities.

Reduces. For every natural number nnn, including 000, and arbitrary complex n×nn\times nn×n matrices PPP and XXX, the proposition Reduces⁡(P,X)\operatorname{Reduces}(P,X)Reduces(P,X) means exactly

PX=XP.PX=XP.PX=XP.

This definition itself does not require PPP to be a projection or impose any other condition on either matrix. In dimension 000, the equality holds automatically.

CompressionWitness. Fix any natural number nnn, joint spectral data SSS with unitary matrix UUU and spectral pairs λi∈[0,1]2\lambda_i\in[0,1]^2λi​∈[0,1]2, and an arbitrary complex n×nn\times nn×n matrix PPP. A compression witness consists of another joint spectral-data record with a complex matrix VVV and pairs μi∈[0,1]2\mu_i\in[0,1]^2μi​∈[0,1]2, satisfying V∗V=InV^{*}V=I_nV∗V=In​ and VV∗=InVV^{*}=I_nVV∗=In​, together with the two equalities

V diag⁡ ⁣((μi(0))i=0n−1)V∗=P ⁣(U diag⁡ ⁣((λi(0))i=0n−1)U∗)PV\,\operatorname{diag}\!\bigl((\mu_i(0))_{i=0}^{n-1}\bigr)V^{*} = P\!\left(U\,\operatorname{diag}\!\bigl((\lambda_i(0))_{i=0}^{n-1}\bigr)U^{*}\right)PVdiag((μi​(0))i=0n−1​)V∗=P(Udiag((λi​(0))i=0n−1​)U∗)P

and

V diag⁡ ⁣((μi(1))i=0n−1)V∗=P ⁣(U diag⁡ ⁣((λi(1))i=0n−1)U∗)P.V\,\operatorname{diag}\!\bigl((\mu_i(1))_{i=0}^{n-1}\bigr)V^{*} = P\!\left(U\,\operatorname{diag}\!\bigl((\lambda_i(1))_{i=0}^{n-1}\bigr)U^{*}\right)P.Vdiag((μi​(1))i=0n−1​)V∗=P(Udiag((λi​(1))i=0n−1​)U∗)P.

The parameter PPP is not required here to be self-adjoint, idempotent, or commuting with either matrix; the factor on both sides of each compressed operator is PPP itself. No relationship between (V,μi)(V,\mu_i)(V,μi​) and (U,λi)(U,\lambda_i)(U,λi​) is required beyond the two displayed matrix equalities. When n=0n=0n=0, all indexing data are empty and both equalities are automatic.

Human review
  • Endorsed by Shuze Chen · Sep 5, 2026

  • Endorsed by wenxinzhang · Sep 5, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me