Matrix.PosSemidef.traceRight
theoremverifiedformalizationimported Lean
Matrix.PosSemidef.traceRight
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Matrix in open BigOperators in variable {n 𝕜 : Type*} in variable [RCLike 𝕜] [DecidableEq n] in open scoped ComplexOrder MatrixOrder in variable [AddCommMonoid R] [Fintype d] in open ComplexOrder in variable {d₁ d₂ : Type*} {A : Matrix (d₁ × d₂) (d₁ × d₂) 𝕜} in variable [Fintype d₂] [Fintype d₁] in theorem Matrix.PosSemidef.traceRight [DecidableEq d₂] (hA : A.PosSemidef) : A.traceRight.PosSemidef
- Formalizes
- QuantumInfo, `Matrix.PosSemidef.traceRight`
- Lean proof
- By Alex Meiburg, from github.com/leanprover-community/physlib at
e411c6e89692(Copyright (c) 2025 Alex Meiburg. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.Matrix.PosSemidef.traceRight← Matrix.PosSemidef.traceRight (QuantumInfo/ForMathlib/Matrix.lean:671): verbatim
- Verified
- 17 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- Matrix.traceRightMatrix.traceRight
- Matrix.IsHermitian.traceRightMatrix.IsHermitian.traceRight
- Used by 1
- is_channel_jamiolkowskiA matrix J on H_A tensor H_B is the Jamiołkowski matrix of a quantum channel if its partial transpose on the input space is positive…
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Matrix in open BigOperators in variable {n 𝕜 : Type*} in variable [RCLike 𝕜] [DecidableEq n] in open scoped ComplexOrder MatrixOrder in variable [AddCommMonoid R] [Fintype d] in open ComplexOrder in variable {d₁ d₂ : Type*} {A : Matrix (d₁ × d₂) (d₁ × d₂) 𝕜} in variable [Fintype d₂] [Fintype d₁] in theorem Matrix.PosSemidef.traceRight [DecidableEq d₂] (hA : A.PosSemidef) : A.traceRight.PosSemidef := by rw [Matrix.posSemidef_iff_dotProduct_mulVec] at hA ⊢ constructor · exact hA.1.traceRight · intro x convert Finset.sum_nonneg (s := .univ) (fun (i : d₂) _ ↦ hA.2 (fun (j,k) ↦ if i = k then x j else 0)) simp_rw [Matrix.traceRight, dotProduct_mulVec] simpa [dotProduct, vecMul_eq_sum, ite_apply, Fintype.sum_prod_type, Finset.mul_sum, Finset.sum_mul, apply_ite] using Finset.sum_comm_cycle