Exact Lean source
Nonadditivity.AdjointPurity
Download original .lean · View on GitHub · Jump to source
Direct imports
Nonadditivity.EntropyMathlib.Analysis.Matrix.OrderdependencyMathlib.Analysis.CStarAlgebra.MatrixdependencyMathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.OrderdependencyMathlib.Data.Real.SqrtdependencyMathlib.Tactic.Linarithdependency
Imported by project modules
Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.
Declarations in this module
13 project constants, including generated, internal and private declarations.
13 declarations
Nonadditivity.AdjointPurity.abs_state_expectation_re_le_opNormNonadditivity.AdjointPurity.centered_hsLength_le_of_adjoint_certificateNonadditivity.AdjointPurity.channel_output_purity_and_entropyNonadditivity.AdjointPurity.hsLengthNonadditivity.AdjointPurity.hsLength_nonnegNonadditivity.AdjointPurity.hsLength_sqNonadditivity.AdjointPurity.hsLength_sq_of_isHermitianNonadditivity.AdjointPurity.norm_state_expectation_le_opNormNonadditivity.AdjointPurity.purity_and_entropy_of_adjoint_certificateNonadditivity.AdjointPurity.state_expectation_im_eq_zeroNonadditivity.AdjointPurity.state_expectation_re_le_opNormNonadditivity.AdjointPurity.trace_conjTranspose_mul_self_re_nonnegNonadditivity.AdjointPurity.trace_mul_nonneg
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.Entropy7import Mathlib.Analysis.Matrix.Order8import Mathlib.Analysis.CStarAlgebra.Matrix9import Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order10import Mathlib.Data.Real.Sqrt11import Mathlib.Tactic.Linarith1213/-!14# Concrete state expectations and the adjoint-to-purity bridge1516The norm on matrices in this file is the Euclidean operator norm. The17Hilbert--Schmidt length is defined by the actual matrix trace, independently18of the operator norm instance. The state expectation bound is proved from19positive semidefiniteness and trace normalization.20-/2122noncomputable section2324namespace Nonadditivity.AdjointPurity2526open Nonadditivity.Entropy27open scoped Matrix ComplexOrder MatrixOrder Matrix.Norms.L2Operator2829set_option backward.isDefEq.respectTransparency false3031variable {ι κ : Type*} [Fintype ι] [DecidableEq ι]32[Fintype κ] [DecidableEq κ]3334/-- Even though a product of positive matrices need not be positive,35its trace is nonnegative. -/36theorem trace_mul_nonneg {A B : Matrix ι ι ℂ}37(hA : A.PosSemidef) (hB : B.PosSemidef) : 0 ≤ (A * B).trace := by38have hQ : (CFC.sqrt A).conjTranspose = CFC.sqrt A :=39(Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg A)).isHermitian.eq40have htrace := (hB.conjTranspose_mul_mul_same (CFC.sqrt A)).trace_nonneg41rw [Matrix.trace_mul_cycle, hQ, CFC.sqrt_mul_sqrt_self A hA.nonneg] at htrace42exact htrace4344/-- A normalized density matrix evaluates every Hermitian observable below45its operator norm. This supplies the missing input-state estimate. -/46theorem state_expectation_re_le_opNorm (ρ : DensityMatrix ι)47(A : Matrix ι ι ℂ) (hA : A.IsHermitian) :48(ρ.matrix * A).trace.re ≤ ‖A‖ := by49letI : CStarAlgebra (Matrix ι ι ℂ) := { }50have hupper : A ≤ algebraMap ℝ (Matrix ι ι ℂ) ‖A‖ :=51IsSelfAdjoint.le_algebraMap_norm_self (A := Matrix ι ι ℂ) hA.isSelfAdjoint52have htrace := trace_mul_nonneg ρ.positive (Matrix.le_iff.mp hupper)53have hscalar : (ρ.matrix * algebraMap ℝ (Matrix ι ι ℂ) ‖A‖).trace = (‖A‖ : ℂ) := by54simp [Algebra.algebraMap_eq_smul_one, Matrix.trace_smul, ρ.normalized]55have hre : 0 ≤ (ρ.matrix * (algebraMap ℝ (Matrix ι ι ℂ) ‖A‖ - A)).trace.re :=56(RCLike.nonneg_iff.mp htrace).157rw [Matrix.mul_sub, Matrix.trace_sub, hscalar, Complex.sub_re, Complex.ofReal_re] at hre58linarith5960/-- The absolute state expectation estimate in the manuscript. -/61theorem abs_state_expectation_re_le_opNorm (ρ : DensityMatrix ι)62(A : Matrix ι ι ℂ) (hA : A.IsHermitian) :63|(ρ.matrix * A).trace.re| ≤ ‖A‖ := by64have hu := state_expectation_re_le_opNorm ρ A hA65have hl := state_expectation_re_le_opNorm ρ (-A) hA.neg66simp only [Matrix.mul_neg, Matrix.trace_neg, Complex.neg_re, norm_neg] at hl67exact abs_le.mpr ⟨by linarith, hu⟩6869/-- Hermitian state-observable trace pairings are real even when the two70matrices do not commute. -/71theorem state_expectation_im_eq_zero (ρ : DensityMatrix ι)72(A : Matrix ι ι ℂ) (hA : A.IsHermitian) : (ρ.matrix * A).trace.im = 0 := by73have hstar : star ((ρ.matrix * A).trace) = (ρ.matrix * A).trace := by74rw [← Matrix.trace_conjTranspose, Matrix.conjTranspose_mul,75hA.eq, ρ.positive.isHermitian.eq, Matrix.trace_mul_comm]76have him := congrArg Complex.im hstar77change -(ρ.matrix * A).trace.im = (ρ.matrix * A).trace.im at him78linarith7980/-- Literal complex absolute-value version of the normalized state bound. -/81theorem norm_state_expectation_le_opNorm (ρ : DensityMatrix ι)82(A : Matrix ι ι ℂ) (hA : A.IsHermitian) : ‖(ρ.matrix * A).trace‖ ≤ ‖A‖ := by83have hreal : (ρ.matrix * A).trace = ((ρ.matrix * A).trace.re : ℂ) := by84apply Complex.ext85· rfl86· simpa using state_expectation_im_eq_zero ρ A hA87rw [hreal, Complex.norm_real, Real.norm_eq_abs]88exact abs_state_expectation_re_le_opNorm ρ A hA8990/-- The actual Hilbert--Schmidt length computed by matrix multiplication. -/91def hsLength (A : Matrix ι ι ℂ) : ℝ :=92Real.sqrt ((A.conjTranspose * A).trace.re)9394omit [DecidableEq ι] in95theorem hsLength_nonneg (A : Matrix ι ι ℂ) : 0 ≤ hsLength A :=96Real.sqrt_nonneg _9798omit [DecidableEq ι] in99theorem trace_conjTranspose_mul_self_re_nonneg (A : Matrix ι ι ℂ) :1000 ≤ (A.conjTranspose * A).trace.re :=101(RCLike.nonneg_iff.mp (Matrix.posSemidef_conjTranspose_mul_self A).trace_nonneg).1102103omit [DecidableEq ι] in104theorem hsLength_sq (A : Matrix ι ι ℂ) :105hsLength A ^ 2 = (A.conjTranspose * A).trace.re :=106Real.sq_sqrt (trace_conjTranspose_mul_self_re_nonneg A)107108omit [DecidableEq ι] in109theorem hsLength_sq_of_isHermitian (A : Matrix ι ι ℂ) (hA : A.IsHermitian) :110hsLength A ^ 2 = (A * A).trace.re := by111rw [hsLength_sq, hA.eq]112113/-- The channel's matrix-trace adjoint certificate bounds the genuine114centered Hilbert--Schmidt length. The state expectation bound is a theorem115above, rather than an assumption in this statement. -/116theorem centered_hsLength_le_of_adjoint_certificate [Nonempty ι]117(ρ : DensityMatrix κ) (Y : DensityMatrix ι)118(adjoint : Matrix ι ι ℂ →ₗ[ℂ] Matrix κ κ ℂ) {t : ℝ} (ht : 0 ≤ t)119(hhermitian : ∀ A, A.IsHermitian → (adjoint A).IsHermitian)120(hduality : ∀ A, A.IsHermitian → A.trace = 0 →121(Y.matrix * A).trace = (ρ.matrix * adjoint A).trace)122(hcertificate : ∀ A, A.IsHermitian → A.trace = 0 →123‖adjoint A‖ ≤ t * hsLength A) : hsLength Y.centered ≤ t := by124have hHerm := Y.centered_isHermitian125have htrace := Y.centered_trace_zero126have hsq : hsLength Y.centered ^ 2 ≤ t * hsLength Y.centered := by127calc128hsLength Y.centered ^ 2 = (Y.centered * Y.centered).trace.re :=129hsLength_sq_of_isHermitian _ hHerm130_ = (Y.matrix * Y.centered).trace.re := by rw [Y.centered_trace_pairing]131_ = (ρ.matrix * adjoint Y.centered).trace.re := by rw [hduality _ hHerm htrace]132_ ≤ ‖adjoint Y.centered‖ :=133state_expectation_re_le_opNorm ρ _ (hhermitian _ hHerm)134_ ≤ t * hsLength Y.centered := hcertificate _ hHerm htrace135nlinarith [hsLength_nonneg Y.centered]136137/-- Both conclusions of Lemma `purity`, from a concrete matrix-trace adjoint138relation and a genuine operator-to-Hilbert--Schmidt norm certificate. -/139theorem purity_and_entropy_of_adjoint_certificate [Nonempty ι]140(ρ : DensityMatrix κ) (Y : DensityMatrix ι)141(adjoint : Matrix ι ι ℂ →ₗ[ℂ] Matrix κ κ ℂ) {t : ℝ} (ht : 0 ≤ t)142(hhermitian : ∀ A, A.IsHermitian → (adjoint A).IsHermitian)143(hduality : ∀ A, A.IsHermitian → A.trace = 0 →144(Y.matrix * A).trace = (ρ.matrix * adjoint A).trace)145(hcertificate : ∀ A, A.IsHermitian → A.trace = 0 →146‖adjoint A‖ ≤ t * hsLength A) :147Y.purity ≤ 1 / (Fintype.card ι : ℝ) + t ^ 2 ∧148Real.log (Fintype.card ι) - Real.log (1 + (Fintype.card ι : ℝ) * t ^ 2) ≤149Y.vonNeumann := by150have hlength := centered_hsLength_le_of_adjoint_certificate ρ Y adjoint ht151hhermitian hduality hcertificate152apply Y.purity_and_entropy_of_centered_bound t153rw [← hsLength_sq_of_isHermitian _ Y.centered_isHermitian]154exact pow_le_pow_left₀ (hsLength_nonneg Y.centered) hlength 2155156/-- Instantiation for ordinary complex linear maps with the standard trace157duality. The output is supplied as an actual normalized positive density158matrix, so no hidden output-positivity premise is used. -/159theorem channel_output_purity_and_entropy [Nonempty ι]160(channel : Matrix κ κ ℂ →ₗ[ℂ] Matrix ι ι ℂ)161(adjoint : Matrix ι ι ℂ →ₗ[ℂ] Matrix κ κ ℂ)162(ρ : DensityMatrix κ) (Y : DensityMatrix ι)163(houtput : channel ρ.matrix = Y.matrix) {t : ℝ} (ht : 0 ≤ t)164(hhermitian : ∀ A, A.IsHermitian → (adjoint A).IsHermitian)165(hduality : ∀ X A, (channel X * A).trace = (X * adjoint A).trace)166(hcertificate : ∀ A, A.IsHermitian → A.trace = 0 →167‖adjoint A‖ ≤ t * hsLength A) :168Y.purity ≤ 1 / (Fintype.card ι : ℝ) + t ^ 2 ∧169Real.log (Fintype.card ι) - Real.log (1 + (Fintype.card ι : ℝ) * t ^ 2) ≤170Y.vonNeumann := by171apply purity_and_entropy_of_adjoint_certificate ρ Y adjoint ht hhermitian _ hcertificate172intro A _ _173rw [← houtput]174exact hduality ρ.matrix A175176end Nonadditivity.AdjointPurity