Spectral von Neumann entropy (K1-A) #
Category: 1-Mathlib (CSD-free; staged as a Mathlib-upstream candidate).
The von Neumann entropy of a density operator, defined spectrally as
S(ρ) = ∑ᵢ negMulLog (λᵢ) = − ∑ᵢ λᵢ log λᵢ,
where λᵢ are the (real) eigenvalues of the Hermitian ρ and
Real.negMulLog x = −x log x. This is the K1-A tranche of specs/k1-plan.md; it reuses the
spectral machinery already staged in TraceDistance.lean
(Matrix.IsHermitian.cfc, re_trace_cfc, the IsHermitian.cfc algebra layer).
Delivered:
vonNeumannEntropy hρ := ∑ i, Real.negMulLog (hρ.eigenvalues i);- the operator-form headline
S(ρ) = Re Tr(cfc negMulLog ρ) = − Re Tr(ρ log ρ)(vonNeumannEntropy_eq_re_trace_cfc,vonNeumannEntropy_eq_neg_re_trace_mul_log), identifying the spectral sum with−Tr(ρ log ρ)viare_trace_cfc; - non-negativity
0 ≤ S(ρ)for a density operator (vonNeumannEntropy_nonneg), fromλᵢ ∈ [0,1](PSD ⟹λᵢ ≥ 0;∑ λᵢ = trace = 1⟹λᵢ ≤ 1) andReal.negMulLog_nonneg; - pure-state vanishing
S(ρ) = 0for a rank-1 projection (ρ * ρ = ρ,trace ρ = 1) (vonNeumannEntropy_eq_zero_of_pure), since the spectrum is{0,1}andnegMulLogvanishes there; - unitary invariance
S(U ρ Uᴴ) = S(ρ)(vonNeumannEntropy_conj_unitary), via charpoly conjugation-invariance +eigenvalues_eq_eigenvalues_iff; - unconditional additivity on tensor products
S(ρ ⊗ σ) = S(ρ) + S(σ)for density operators (PSD, unit trace) (vonNeumannEntropy_kronecker), via the Kronecker spectrumspectral_sum_kronecker(the eigenvalues ofρ ⊗ₖ σare the productsλᵢ μⱼ, in permutation-invariant spectral-sum form); the explicit-hypothesis formvonNeumannEntropy_kronecker_of_eigenvaluesis retained for callers holding a sorted eigenvalue-product witness. See the note below.
Note on the Kronecker spectrum (K1-A.2, done) #
Mathlib has no lemma identifying the eigenvalues of a Kronecker product ρ ⊗ₖ σ with the
products λᵢ μⱼ of the factor eigenvalues (no Kronecker spectral theorem). We supply it here, in
the spectral-sum form that additivity needs (spectral_sum_kronecker):
∑_c g(λ(ρ⊗σ)_c) = ∑_{i,j} g(λρ(i)·λσ(j)) for every g : ℝ → ℝ.
The route is charpoly-based and permutation-invariant, so it sidesteps the subtlety that
Mathlib's eigenvalues is the sorted spectrum (matching it pointwise to the products along an
ad-hoc reindexing is the easy-to-get-wrong step; the spectral sum avoids it). Concretely:
ρ⊗σ = (U_ρ⊗U_σ) · diagonal(λρ·λσ) · (U_ρ⊗U_σ)ᴴ (kronecker_eq_conj_diagonal_eigenvalues,
from the two spectral theorems + mul_kronecker_mul + diagonal_kronecker_diagonal), so its
charpoly is ∏_p (X − ↑(λρ(p.1)·λσ(p.2))) (charpoly_conj_unitary + charpoly_diagonal); the
spectral sum is then read off the charpoly root multiset by spectral_sum_eq_of_charpoly_prod.
No external axiom is incurred (foundational triple only). This discharges the former K1-A.2 item;
the conditional vonNeumannEntropy_kronecker_of_eigenvalues is kept as a convenience.
negMulLog is strictly positive on the open interval (0,1): 0 < x < 1 ⟹ 0 < negMulLog x.
Companion to Real.negMulLog_nonneg (the closed-interval ≥ 0). The strict interior positivity
is what the entropy-increase witness needs: a genuine superposition Born weight p ∈ (0,1)
contributes strictly positive Shannon entropy. Since log x < 0 for 0 < x < 1 and x > 0,
negMulLog x = -(x log x) > 0.
The von Neumann entropy S(ρ) = ∑ᵢ negMulLog(λᵢ) = −∑ᵢ λᵢ log λᵢ of a Hermitian
operator, defined spectrally from its real eigenvalues.
Equations
- QuantumInfo.vonNeumannEntropy hρ = ∑ i : n, (hρ.eigenvalues i).negMulLog
Instances For
Operator-form identity: S(ρ) = −Tr(ρ log ρ) #
Operator-form headline (the negMulLog-trace identity):
S(ρ) = Re Tr(cfc negMulLog ρ), directly from re_trace_cfc at f = Real.negMulLog.
The −Tr(ρ log ρ) form: S(ρ) = − Re Tr(cfc (x ↦ x log x) ρ). Here
cfc (x ↦ x log x) ρ is the operator ρ log ρ (log ρ being cfc log ρ), so this is the
standard S(ρ) = −Tr(ρ log ρ).
The cfc operator ρ log ρ equals the multiplicative cfc cfc (x ↦ x log x) ρ. The product
ρ · log ρ of the spectral identity ρ = hρ.cfc id and log ρ = hρ.cfc log is, by
cfc_mul, the cfc of the pointwise product. So hρ.cfc (x ↦ x log x) is genuinely ρ log ρ
and the headline above reads S(ρ) = −Re Tr(ρ log ρ).
Non-negativity #
Helper: a density operator's eigenvalues lie in [0,1]. PSD gives λᵢ ≥ 0; unit trace
gives ∑ λᵢ = 1, hence each λᵢ ≤ 1 (a single term bounded by a sum of non-negatives).
S(ρ) ≥ 0 for a density operator (PSD, unit trace). Each eigenvalue lies in [0,1],
where Real.negMulLog is non-negative.
Maximum-entropy bound S ≤ log d #
Maximum-entropy bound S(ρ) ≤ log d for a density operator (PSD, unit trace) on a space
of dimension d = Fintype.card n ≥ 1. The maximally mixed state ρ = I/d saturates it.
Route: negMulLog is concave on Ici 0 (Real.concaveOn_negMulLog); Finset Jensen
(ConcaveOn.le_map_sum) with uniform weights wᵢ = 1/d and pᵢ = λᵢ ∈ [0,1] ⊂ Ici 0 gives
∑ᵢ (1/d)·negMulLog(λᵢ) ≤ negMulLog(∑ᵢ (1/d)·λᵢ) = negMulLog(1/d) (using ∑λᵢ = trace = 1),
and negMulLog(1/d) = (1/d)·log d. Multiply through by d.
cfc injectivity on the spectrum #
IsHermitian.cfc injectivity on eigenvalues: if hρ.cfc f = hρ.cfc g then f and g
agree on every eigenvalue. Conjugating U · diag(↑∘f∘λ) · Uᴴ = U · diag(↑∘g∘λ) · Uᴴ by Uᴴ … U
collapses (via UᴴU = 1) to the diagonals, whose entries are f(λᵢ) and g(λᵢ).
Pure-state vanishing #
S(ρ) = 0 for a projection (ρ Hermitian, idempotent ρ·ρ = ρ). The idempotency
forces λᵢ² = λᵢ, so the spectrum is {0,1}, where negMulLog vanishes. The pure-state
case is the rank-1 instance ρ = |ψ⟩⟨ψ| (a projection with trace ρ = 1); see
vonNeumannEntropy_eq_zero_of_pure for that named form. Unit trace is not needed for S = 0
itself (every projection, including 0 and I, has spectrum in {0,1}).
S(ρ) = 0 for a pure state — a rank-1 density projection (ρ Hermitian, idempotent
ρ·ρ = ρ, unit trace trace ρ = 1). Direct corollary of
vonNeumannEntropy_eq_zero_of_projection. The unit-trace hypothesis is non-vacuous and
non-degenerate: it forces ∑ λᵢ = 1 with λᵢ ∈ {0,1}, i.e. exactly one eigenvalue equal
to 1, so ρ ≠ 0; this is the genuine rank-1 pure state |ψ⟩⟨ψ|, not the trivial ρ = 0.
Unitary invariance #
Charpoly conjugation-invariance: (U ρ Uᴴ).charpoly = ρ.charpoly for U unitary
(Uᴴ U = 1). Two applications of charpoly_mul_comm plus Uᴴ U = 1.
Unitary invariance S(U ρ Uᴴ) = S(ρ). Conjugation by a unitary preserves the
characteristic polynomial, hence (by eigenvalues_eq_eigenvalues_iff) the eigenvalue
function, hence the spectral entropy sum.
Tensor additivity #
The Kronecker product of two Hermitian matrices is Hermitian.
Additivity on tensor products S(ρ ⊗ σ) = S(ρ) + S(σ), under the explicit hypothesis
that the eigenvalues of ρ ⊗ₖ σ are the products λ(e c).1 · μ(e c).2 of factor eigenvalues
along a reindexing e : (n × m) ≃ k of the Kronecker index.
This is the conditional form: it takes the eigenvalue-product fact as a hypothesis. The
unconditional headline vonNeumannEntropy_kronecker discharges it via the Kronecker spectrum
spectral_sum_kronecker (K1-A.2, done); this form is retained for callers that already hold a
sorted eigenvalue-product witness along a specific reindexing e. The negMulLog-product
algebra and the ∑ λ = ∑ μ = 1 collapse are proved here.
hsumρ/hsumσ are the unit-trace conditions ∑ λᵢ = ∑ μⱼ = 1; hnnρ/hnnσ the
PSD non-negativity of the factor eigenvalues.
The Kronecker spectrum (discharging the K1-A.2 hypothesis) #
Spectral-sum diagonalization invariance (charpoly form). If a Hermitian A has
characteristic polynomial ∏ c, (X − ↑(d c)) for a real d : k → ℝ (i.e. its spectrum, with
multiplicity, is the multiset {d c}), then for every g : ℝ → ℝ the spectral sum
∑ c, g(λᵢ(A)) equals ∑ c, g(d c).
The eigenvalue function hA.eigenvalues is Mathlib's sorted spectrum, so it is not equal to
d pointwise; only the multiset {λᵢ} equals {d c} (both are the charpoly root multiset, via
roots_charpoly_eq_eigenvalues and roots_prod). The spectral sum is permutation-invariant,
which is what lets us pass from the multiset equality to the sum equality (mapping by g ∘ re and
summing). This is the tool that sidesteps the eigenvalue-sorting subtlety.
The Kronecker product is unitarily similar to the diagonal of eigenvalue products.
With W := U_ρ ⊗ U_σ (the Kronecker of the eigenvector unitaries),
ρ ⊗ₖ σ = W · diagonal(λρ(p.1)·λσ(p.2)) · Wᴴ. From the two spectral theorems
ρ = U_ρ diag(λρ) U_ρᴴ, σ = U_σ diag(λσ) U_σᴴ, mul_kronecker_mul (×2), and
diagonal_kronecker_diagonal.
The Kronecker eigenvector-unitary is unitary: (U_ρ ⊗ U_σ)ᴴ · (U_ρ ⊗ U_σ) = 1. From
conjTranspose_kronecker, mul_kronecker_mul, one_kronecker_one.
The Kronecker spectrum (eigenvalue-product fact). The spectral sum of any g : ℝ → ℝ
over the eigenvalues of ρ ⊗ₖ σ equals the double sum over the products λρ(i)·λσ(j):
∑_c g(λ(ρ⊗σ)_c) = ∑_{i,j} g(λρ(i)·λσ(j)).
This is the load-bearing fact that discharges the heig hypothesis of
vonNeumannEntropy_kronecker_of_eigenvalues. Proof route: ρ⊗σ is unitarily similar to
diagonal(λρ·λσ) (kronecker_eq_conj_diagonal_eigenvalues), so its charpoly is
∏ p, (X − ↑(λρ(p.1)·λσ(p.2))) (charpoly_conj_unitary + charpoly_diagonal); the spectral sum
is then read off the charpoly root multiset by spectral_sum_eq_of_charpoly_prod, which is
permutation-invariant and so avoids matching Mathlib's sorted eigenvalues to the products
pointwise. No Kronecker spectral theorem is assumed; this is one (in spectral-sum form).
Unconditional additivity of the von Neumann entropy on tensor products:
S(ρ ⊗ σ) = S(ρ) + S(σ) for two density operators ρ, σ (PSD, unit trace). The
eigenvalue-product hypothesis of vonNeumannEntropy_kronecker_of_eigenvalues is discharged here
via the Kronecker spectrum spectral_sum_kronecker; the negMulLog-product algebra
(negMulLog_mul) and the ∑λ = ∑μ = 1 collapse close the argument.
This is K1-A.2 of specs/k1-plan.md, now done: additivity holds with no spectral hypothesis,
only the density conditions. (The conditional form
vonNeumannEntropy_kronecker_of_eigenvalues is retained for callers that already hold a sorted
eigenvalue-product witness.)
Entropy of a real-scalar (maximally-mixed) state #
A real-scalar multiple of the identity is Hermitian: (↑c)·I for c : ℝ. Via
diagonal_conjTranspose and star (↑c) = ↑c.
Entropy of a real-scalar identity. S((↑c)·I_N) = N · negMulLog c for c : ℝ.
Route: (↑c)·I = diagonal (fun _ => ↑c) has charpoly ∏ (X − ↑c), so its spectral
sum collapses by spectral_sum_eq_of_charpoly_prod (permutation-invariant, avoiding
the sorted-eigenvalue subtlety); the constant sum gives N · negMulLog c.
Maximally-mixed entropy saturates the max-entropy bound: S((1/N)·I) = log N
for N ≥ 1. Companion to vonNeumannEntropy_le_log_card (the ≤ log d bound); the
uniform state is the saturating case.
Entropy of a general diagonal state #
Entropy of a diagonal density. S(diagonal (fun i => ↑(d i))) = ∑ i, negMulLog (d i) for a
real diagonal d : n → ℝ (Hermitian witness supplied). The charpoly of diagonal (↑ ∘ d) is
∏ i, (X − ↑(d i)) (charpoly_diagonal), so the spectral sum collapses to ∑ i, negMulLog (d i)
by spectral_sum_eq_of_charpoly_prod (permutation-invariant, avoiding the sorted-eigenvalue
subtlety). Generalises vonNeumannEntropy_const_smul_one (the constant case d ≡ c).
Entropy is independent of the supplied Hermitian witness and transports across a matrix
equality: if ρ = σ then S(ρ) = S(σ) (the eigenvalue values are matrix-determined). The
proof-irrelevance / matrix-equality hinge used to move an entropy computation onto a diagonal
form.