Matrix.PosSemidef.outer_self_conj
theoremverifiedformalizationimported Lean
Matrix.PosSemidef.outer_self_conj
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Matrix Matrix.PosSemidef in open BigOperators in variable {n ๐ : Type*} in variable [RCLike ๐] [DecidableEq n] in open scoped ComplexOrder MatrixOrder in open Kronecker in open scoped ComplexOrder in variable {m n ๐ : Type*} in variable [Fintype m] [Fintype n] in variable [RCLike ๐] [dn : DecidableEq n] in variable {A : Matrix m m ๐} {B : Matrix m m ๐} in variable (hA : A.PosSemidef) (hB : B.PosSemidef) in omit dn in open ComplexConjugate in theorem Matrix.PosSemidef.outer_self_conj (v : n โ ๐) : PosSemidef (vecMulVec v (conj v))
- Formalizes
- QuantumInfo, `Matrix.PosSemidef.outer_self_conj`
- 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.outer_self_conj← Matrix.PosSemidef.outer_self_conj (QuantumInfo/ForMathlib/Matrix.lean:180): verbatim
- Verified
- 17 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- RCLike.normSq_eq_conj_mul_selfRCLike.normSq_eq_conj_mul_self
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Matrix Matrix.PosSemidef in open BigOperators in variable {n ๐ : Type*} in variable [RCLike ๐] [DecidableEq n] in open scoped ComplexOrder MatrixOrder in open Kronecker in open scoped ComplexOrder in variable {m n ๐ : Type*} in variable [Fintype m] [Fintype n] in variable [RCLike ๐] [dn : DecidableEq n] in variable {A : Matrix m m ๐} {B : Matrix m m ๐} in variable (hA : A.PosSemidef) (hB : B.PosSemidef) in omit dn in open ComplexConjugate in theorem Matrix.PosSemidef.outer_self_conj (v : n โ ๐) : PosSemidef (vecMulVec v (conj v)) := by constructor ยท ext simp [vecMulVec_apply, mul_comm] ยท intro x rw [Finsupp.sum_fintype _ _ (by simp)] conv => enter [2, 2, i] rw [Finsupp.sum_fintype _ _ (by simp)] simp_rw [RCLike.star_def, vecMulVec_apply, mul_assoc, โ Finset.mul_sum, โ mul_assoc, โ Finset.sum_mul] change 0 โค (โ i : n, conj (x i) * v i) * โ i : n, conj (v i) * x i have : (โ i : n, conj (x i) * v i) = (โ i : n, conj (conj (v i) * x i)) := by simp only [mul_comm (conj (x _)) (v _), map_mul, RingHomCompTriple.comp_apply, RingHom.id_apply] rw [this, โ map_sum, โ RCLike.normSq_eq_conj_mul_self, RCLike.ofReal_nonneg] exact RCLike.normSq_nonneg _