Exact Lean source
MatrixTraceOrder
formalization/Cloning/MatrixTraceOrder.lean
Source hash: 68d6c62028e4e6fef81dfae5f7fdc65e04e86685954902eb22c2025108f80422
Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.
The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.
Declarations in this module
theorem
Cloning.MatrixFidelity.trace_mul_re_nonnegtheorem Cloning.MatrixFidelity.trace_mul_im_zerotheorem Cloning.MatrixFidelity.trace_mul_re_mono_righttheorem Cloning.MatrixFidelity.trace_mul_re_mono_lefttheorem Cloning.MatrixFidelity.matrix_inv_antitonetheorem Cloning.MatrixFidelity.sqrt_inv_antitonetheorem Cloning.MatrixFidelity.trace_mul_sqrt_inv_antitone1import Cloning.MatrixFidelity
2import Mathlib.Analysis.CStarAlgebra.Matrix
3import Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order
4import Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.Rpow.Order
5
6/-!
7# Positive trace pairings and inverse square-root order
8
9All assertions concern actual finite complex matrices. Positivity of a
10trace pairing follows from positivity of the square-root sandwich. Inverse
11antitonicity follows from the C*-algebra inverse-order theorem.
12-/
13
14noncomputable section
15open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator
16
17namespace Cloning.MatrixFidelity
18
19set_option backward.isDefEq.respectTransparency false
20set_option maxHeartbeats 1000000
21
22variable {n : Type*} [Fintype n] [DecidableEq n]
23
24/-- Positive matrices have a nonnegative real trace pairing even when they
25do not commute. -/
26theorem trace_mul_re_nonneg {A B : Matrix n n ℂ}
27 (hA : A.PosSemidef) (hB : B.PosSemidef) :
28 0 ≤ (Matrix.trace (A * B)).re := by
29 have h := trace_re_nonneg (sandwich_posSemidef hB A)
30 rw [Matrix.trace_mul_cycle, sqrt_mul_self hA] at h
31 exact h
32
33/-- Positive trace pairings are real. -/
34theorem trace_mul_im_zero {A B : Matrix n n ℂ}
35 (hA : A.PosSemidef) (hB : B.PosSemidef) :
36 (Matrix.trace (A * B)).im = 0 := by
37 have h := trace_im_zero (sandwich_posSemidef hB A)
38 rw [Matrix.trace_mul_cycle, sqrt_mul_self hA] at h
39 exact h
40
41/-- Pairing against a positive matrix preserves Loewner order. -/
42theorem trace_mul_re_mono_right {A B C : Matrix n n ℂ}
43 (hA : A.PosSemidef) (hBC : B ≤ C) :
44 (Matrix.trace (A * B)).re ≤ (Matrix.trace (A * C)).re := by
45 have h := trace_mul_re_nonneg hA (show (C - B).PosSemidef from hBC)
46 simpa only [Matrix.mul_sub, Matrix.trace_sub, Complex.sub_re, sub_nonneg] using h
47
48/-- The trace pairing is also monotone in the first argument. -/
49theorem trace_mul_re_mono_left {A B C : Matrix n n ℂ}
50 (hA : A.PosSemidef) (hBC : B ≤ C) :
51 (Matrix.trace (B * A)).re ≤ (Matrix.trace (C * A)).re := by
52 rw [Matrix.trace_mul_comm B A, Matrix.trace_mul_comm C A]
53 exact trace_mul_re_mono_right hA hBC
54
55/-- Inversion reverses the Loewner order on positive definite matrices.
56The inverses here are the usual matrix nonsingular inverses. -/
57theorem matrix_inv_antitone {X Y : Matrix n n ℂ}
58 (hX : X.PosDef) (hY : Y.PosDef) (hXY : X ≤ Y) : Y⁻¹ ≤ X⁻¹ := by
59 letI : CStarAlgebra (Matrix n n ℂ) := {}
60 obtain ⟨u, rfl⟩ := hX.isUnit
61 obtain ⟨v, rfl⟩ := hY.isUnit
62 have h := CStarAlgebra.inv_le_inv (a := u) (b := v) hX.posSemidef.nonneg hXY
63 simpa only [Matrix.coe_units_inv] using h
64
65/-- Inverse square roots reverse the Loewner order on positive definite matrices. -/
66theorem sqrt_inv_antitone {X Y : Matrix n n ℂ}
67 (hX : X.PosDef) (hY : Y.PosDef) (hXY : X ≤ Y) :
68 (CFC.sqrt Y)⁻¹ ≤ (CFC.sqrt X)⁻¹ := by
69 letI : CStarAlgebra (Matrix n n ℂ) := {}
70 exact matrix_inv_antitone
71 (Matrix.isStrictlyPositive_iff_posDef.mp hX.isStrictlyPositive.sqrt)
72 (Matrix.isStrictlyPositive_iff_posDef.mp hY.isStrictlyPositive.sqrt)
73 (CFC.sqrt_le_sqrt X Y hXY)
74
75/-- The trace-weighted form needed for square-root trace subadditivity. -/
76theorem trace_mul_sqrt_inv_antitone {A X Y : Matrix n n ℂ}
77 (hA : A.PosSemidef) (hX : X.PosDef) (hY : Y.PosDef) (hXY : X ≤ Y) :
78 (Matrix.trace (A * (CFC.sqrt Y)⁻¹)).re ≤
79 (Matrix.trace (A * (CFC.sqrt X)⁻¹)).re :=
80 trace_mul_re_mono_right hA (sqrt_inv_antitone hX hY hXY)
81
82end Cloning.MatrixFidelity