Matrix relative entropy, operator convexity, and perspective
DefinitionTroppMatrixConcentration_ch8_entropyFor a scalar function , write for its real continuous-functional-calculus value on a complex square matrix . For positive-definite , define
For a convex set , operator convexity means that for every positive finite matrix dimension, Hermitian with spectra in , and . Define the matrix perspective by
These provide the deterministic interfaces for Lieb’s theorem. No trace-one normalization is imposed. On positive-definite inputs the inverse square root is the inverse of the positive square root.
Formalization Note. The operations themselves are total. Continuous functional calculus returns zero for non-Hermitian matrices; on Hermitian matrices it applies the given real function to the finite spectrum. The logarithm retains the existing spectral definition, including its values outside the intended positive-definite domain. The square root takes value zero on nonpositive real inputs, and its inverse uses total real inversion, with . Theorems restrict entropy and perspective inputs to positive-definite matrices.
import Definitions.Def_TroppMatrixConcentration_spectral
import Mathlib.Analysis.Convex.Function
open scoped Matrix.Norms.L2Operator ComplexOrder
noncomputable section
namespace TroppMatrixConcentration
def ch8_matrixFunction {d : Type*} [Fintype d] [DecidableEq d]
(f : ℝ → ℝ) (A : Matrix d d ℂ) : Matrix d d ℂ := cfc f A
def ch8_relativeEntropy {d : Type*} [Fintype d] [DecidableEq d]
(A H : Matrix d d ℂ) : ℝ :=
(Matrix.trace (A * (matrixLog A - matrixLog H) - (A - H))).re
def ch8_operatorConvexOn (I : Set ℝ) (f : ℝ → ℝ) : Prop :=
Convex ℝ I ∧ ∀ (d : ℕ) (_ : NeZero d) (A H : Matrix (Fin d) (Fin d) ℂ),
A.IsHermitian → H.IsHermitian → spectrum ℝ A ⊆ I → spectrum ℝ H ⊆ I →
∀ (t : ℝ), 0 ≤ t → t ≤ 1 →
loewnerLE (ch8_matrixFunction f (t • A + (1 - t) • H))
(t • ch8_matrixFunction f A + (1 - t) • ch8_matrixFunction f H)
def ch8_perspective {d : Type*} [Fintype d] [DecidableEq d]
(f : ℝ → ℝ) (A H : Matrix d d ℂ) : Matrix d d ℂ :=
let S := ch8_matrixFunction Real.sqrt A
let R := ch8_matrixFunction (fun x => (Real.sqrt x)⁻¹) A
S * ch8_matrixFunction f (R * H * R) * S
end TroppMatrixConcentration
Read-back
What the Lean code literally says, in plain math · gpt-6
TroppMatrixConcentration.ch8_matrixFunction: For any finite index type equipped with decidable equality, any function , and any complex square matrix indexed by , this defines a complex square matrix by the real continuous functional calculus . Explicitly, if is Hermitian and is a unitary diagonalization with real eigenvalues, then ; if is not Hermitian, this real functional calculus returns the zero matrix. There is no assumed positivity, invertibility, or continuity of ; every function on the finite spectrum is continuous in its subspace topology. The index type may be empty, in which case the output is the unique empty square matrix.
TroppMatrixConcentration.ch8_relativeEntropy: For any finite index type equipped with decidable equality and any two complex square matrices indexed by , this defines the real number , where uses the real continuous functional calculus: for Hermitian , it is , with and for ; for non-Hermitian , it is the zero matrix. No Hermitian, positive semidefinite, positive definite, invertibility, support, or normalization assumptions are imposed on or . In particular, zero or negative eigenvalues are handled by this total real logarithm rather than excluded, and no infinite value is used. If is empty, the trace is an empty sum and the defined real number is zero.
TroppMatrixConcentration.ch8_operatorConvexOn: For any set and any function , this predicate is the conjunction of convexity of over and the following property: for every natural number with a supplied witness that , every pair of complex matrices indexed by , if are Hermitian and their real spectra are subsets of , then for every real satisfying , the matrix is positive semidefinite, meaning that it is Hermitian and its quadratic form is real and nonnegative for every . Here the real spectrum of a matrix is the set of real for which is not invertible, and denotes real continuous functional calculus: for Hermitian it is , while for non-Hermitian it is zero. Convexity means that whenever and satisfy . The matrix dimension zero is excluded by the witness; both endpoint weights and are included; no positivity of or continuity assumption on is added. The empty set is allowed: it is convex, and no Hermitian matrix of positive dimension has spectrum contained in it, so the matrix implication is vacuous in that case.
TroppMatrixConcentration.ch8_perspective: For any finite index type equipped with decidable equality, any function , and any complex square matrices indexed by , this defines the complex square matrix , where , , for and for , and using the total real inverse . Thus for and for . For every real function , here is real continuous functional calculus: it equals for Hermitian and equals the zero matrix for non-Hermitian . No Hermitian, positive definite, positive semidefinite, invertibility, or continuity assumptions are imposed on the arguments. Zero and negative eigenvalues of Hermitian are both sent to zero by and ; if is non-Hermitian then and the output is zero; if is non-Hermitian its functional calculus is zero. Empty is allowed, yielding the unique empty square matrix.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.