Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Pure states, finite mixtures and the entropy of an equal mixture

Definition
UnphysicalHilbert_StateSpace

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

inner-product-spacequantum-mechanicsvon-neumann-entropy

Let HHH be a complex inner product space (not necessarily complete), with inner product ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle⟨⋅,⋅⟩ linear in the second argument.

  1. Rank-one operator. For ψ∈H\psi\in Hψ∈H, ∣ψ⟩⟨ψ∣|\psi\rangle\langle\psi|∣ψ⟩⟨ψ∣ is the linear map x↦⟨ψ,x⟩ ψx\mapsto\langle\psi,x\rangle\,\psix↦⟨ψ,x⟩ψ.
  2. Mixture. For a finite family of vectors (ψi)i∈I(\psi_i)_{i\in I}(ψi​)i∈I​ and real weights (ai)i∈I(a_i)_{i\in I}(ai​)i∈I​,
mixture(a,ψ)=∑i∈Iai ∣ψi⟩⟨ψi∣.\mathrm{mixture}(a,\psi)=\sum_{i\in I} a_i\,|\psi_i\rangle\langle\psi_i| .mixture(a,ψ)=i∈I∑​ai​∣ψi​⟩⟨ψi​∣.
  1. Strictly convex weights. (ai)(a_i)(ai​) are strictly convex weights if ai>0a_i>0ai​>0 for all iii and ∑iai=1\sum_i a_i=1∑i​ai​=1. A family (ψi)(\psi_i)(ψi​) is normalized if ∥ψi∥=1\|\psi_i\|=1∥ψi​∥=1 for all iii.
  2. Finite-rank density operator. A linear map ρ:H→H\rho:H\to Hρ:H→H is a finite-rank density operator if ρ=∑i=1nai∣ψi⟩⟨ψi∣\rho=\sum_{i=1}^n a_i|\psi_i\rangle\langle\psi_i|ρ=∑i=1n​ai​∣ψi​⟩⟨ψi​∣ for some nnn, strictly convex weights aaa and normalized vectors ψ1,…,ψn\psi_1,\dots,\psi_nψ1​,…,ψn​.
  3. Von Neumann entropy (finite dimension). For a self-adjoint operator TTT on a finite-dimensional complex inner product space with eigenvalues λ1,…,λd\lambda_1,\dots,\lambda_dλ1​,…,λd​ (with multiplicity), S(T)=−∑kλklog⁡λkS(T)=-\sum_k \lambda_k\log\lambda_kS(T)=−∑k​λk​logλk​, with 0log⁡0=00\log 0=00log0=0.
  4. Entropy of an equal mixture. For ψ,ϕ∈H\psi,\phi\in Hψ,ϕ∈H let ρψϕ=12∣ψ⟩⟨ψ∣+12∣ϕ⟩⟨ϕ∣\rho_{\psi\phi}=\tfrac12|\psi\rangle\langle\psi|+\tfrac12|\phi\rangle\langle\phi|ρψϕ​=21​∣ψ⟩⟨ψ∣+21​∣ϕ⟩⟨ϕ∣ and
I(ψ,ϕ)=S(ρψϕ∣span⁡{ψ,ϕ}).I(\psi,\phi)=S\bigl(\rho_{\psi\phi}\big|_{\operatorname{span}\{\psi,\phi\}}\bigr).I(ψ,ϕ)=S(ρψϕ​​span{ψ,ϕ}​).

These are the objects of the paper's Appendix A (eq. (11) for III).

Formalization Note Item 4 encodes "density operator of finite rank" as a finite strictly convex combination of pure states; by the spectral theorem these are exactly the positive, trace-one, finite-rank operators. In item 6, ρψϕ\rho_{\psi\phi}ρψϕ​ maps span⁡{ψ,ϕ}\operatorname{span}\{\psi,\phi\}span{ψ,ϕ} into itself and vanishes on its orthogonal complement, so the restriction has the same nonzero spectrum as ρψϕ\rho_{\psi\phi}ρψϕ​ and the entropy is well defined even when HHH is infinite-dimensional or incomplete. The entropy function returns 000 on non-self-adjoint input, which never occurs here.

Definition code
import Mathlib

/-!
# Unphysicality of Hilbert spaces — mixtures of pure states and their entropy

Definitions used by the statements of Propositions 7–10 of
G. Carcassi, C. A. Aidala, F. Calderón, *The unphysicality of Hilbert spaces*,
arXiv:2308.06669v3, Appendix A.
-/

namespace UnphysicalHilbert

open scoped InnerProductSpace

variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H]

/-- The rank-one operator `|ψ⟩⟨ψ|`, i.e. `x ↦ ⟨ψ, x⟩ ψ`. -/
noncomputable def ketBra (ψ : H) : H →ₗ[ℂ] H :=
  (innerₛₗ ℂ ψ).smulRight ψ

/-- The weighted sum `∑ᵢ aᵢ |ψᵢ⟩⟨ψᵢ|` of rank-one operators. -/
noncomputable def mixture {ι : Type*} [Fintype ι] (a : ι → ℝ) (ψ : ι → H) : H →ₗ[ℂ] H :=
  ∑ i, (a i : ℂ) • ketBra (ψ i)

/-- `a` is a family of strictly positive weights summing to `1`
(the coefficients of a strictly convex combination). -/
def IsStrictConvexWeights {ι : Type*} [Fintype ι] (a : ι → ℝ) : Prop :=
  (∀ i, 0 < a i) ∧ ∑ i, a i = 1

/-- `ψ` is a family of normalized vectors. -/
def IsNormalizedFamily {ι : Type*} (ψ : ι → H) : Prop :=
  ∀ i, ‖ψ i‖ = 1

/-- A density operator of finite rank: a strictly convex combination of finitely many
pure states `|ψᵢ⟩⟨ψᵢ|` with `‖ψᵢ‖ = 1`. (By the spectral theorem, these are exactly the
positive, finite-rank, trace-one operators.) -/
def IsFiniteRankDensityOperator (ρ : H →ₗ[ℂ] H) : Prop :=
  ∃ (n : ℕ) (a : Fin n → ℝ) (ψ : Fin n → H),
    IsStrictConvexWeights a ∧ IsNormalizedFamily ψ ∧ ρ = mixture a ψ

/-- Von Neumann entropy `S(T) = -∑ λ log λ` (sum over the eigenvalues of `T`, counted with
multiplicity, using the convention `0 log 0 = 0`) of a self-adjoint operator on a
finite-dimensional complex inner product space. Returns `0` on non-self-adjoint input
(never used). -/
noncomputable def vonNeumannEntropyFin {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℂ E]
    [FiniteDimensional ℂ E] (T : E →ₗ[ℂ] E) : ℝ :=
  open Classical in
  if h : T.IsSymmetric then ∑ i, Real.negMulLog (h.eigenvalues rfl i) else 0

/-- The equal mixture `½|ψ⟩⟨ψ| + ½|ϕ⟩⟨ϕ|` of two pure states. -/
noncomputable def equalMixture (ψ ϕ : H) : H →ₗ[ℂ] H :=
  (1 / 2 : ℂ) • (ketBra ψ + ketBra ϕ)

/-- The two-dimensional (at most) subspace spanned by `ψ` and `ϕ`. -/
def pairSpan (ψ ϕ : H) : Submodule ℂ H :=
  Submodule.span ℂ {ψ, ϕ}

noncomputable instance pairSpan.finiteDimensional (ψ ϕ : H) :
    FiniteDimensional ℂ (pairSpan ψ ϕ) :=
  FiniteDimensional.span_of_finite ℂ (Set.toFinite _)

/-- The equal mixture maps the span of `ψ` and `ϕ` into itself. -/
theorem equalMixture_mapsTo (ψ ϕ : H) :
    ∀ x ∈ pairSpan ψ ϕ, equalMixture ψ ϕ x ∈ pairSpan ψ ϕ := by
  intro x _
  have hψ : ψ ∈ pairSpan ψ ϕ := Submodule.subset_span (by simp)
  have hϕ : ϕ ∈ pairSpan ψ ϕ := Submodule.subset_span (by simp)
  simp only [equalMixture, ketBra, LinearMap.smul_apply, LinearMap.add_apply,
    LinearMap.smulRight_apply]
  exact Submodule.smul_mem _ _ (Submodule.add_mem _ (Submodule.smul_mem _ _ hψ)
    (Submodule.smul_mem _ _ hϕ))

/-- `I(ψ, ϕ) = S(½|ψ⟩⟨ψ| + ½|ϕ⟩⟨ϕ|)`: the von Neumann entropy of the equal mixture of two
pure states (paper, eq. (11)). The operator vanishes on the orthogonal complement of
`span {ψ, ϕ}` and maps that span into itself, so its entropy is computed from its
restriction to this finite-dimensional subspace. -/
noncomputable def equalMixtureEntropy (ψ ϕ : H) : ℝ :=
  vonNeumannEntropyFin ((equalMixture ψ ϕ).restrict (equalMixture_mapsTo ψ ϕ))

end UnphysicalHilbert
Source
G. Carcassi, C. A. Aidala, F. Calderón, *The unphysicality of Hilbert spaces*, arXiv:2308.06669v3 [quant-ph], 22 Dec 2024, https://arxiv.org/abs/2308.06669, Appendix A, pp. 8–10 (Propositions 7–10, eq. (11))
Human review
  • Endorsed by Shuze Chen · Oct 13, 2026

    Confirmed by the moderator at approval.

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