Offline · exact source
Exact Lean source

InfiniteTraceClassNormBounds

formalization/Cloning/InfiniteTraceClassNormBounds.lean

Source hash: fdca74ea6b29fb54da6c33338321b08885219ef77b08717f0d767e26f5e7905b

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
1/-
2Copyright (c) 2026 Tom Ole Diem. All rights reserved.
3Released under Apache 2.0 license as described in PHYSLIB-LICENSE.txt.
4Authors: Tom Ole Diem
5 
6Adapted from Physlib commit f6e446ca99fd83b3a60743a61900cb2acb98f531,
7PhyslibAlpha/ProbabilisticTheory/HilbertSpace/TraceClass/IdealNorm.lean.
8Upstream blob: 0da9f718adea0c06df0f11d55e2bf2d211c61070.
9Compatibility: Qualifies the older map application lemmas.
10-/
11 
12import Cloning.InfiniteTraceClassIdeal
13 
14/-!
15 
16# Trace-norm estimates
17 
18## i. Overview
19 
20For a trace-class operator `A`, a contraction `W` and a Hilbert basis `{eᵢ}`, `∑ᵢ ‖⟪W eᵢ, A eᵢ⟫‖ ≤
21‖A‖₁`, with equality for the polar factor. From this the trace norm is subadditive and satisfies the
22two-sided ideal estimate `‖B T C‖₁ ≤ ‖B‖ ‖T‖₁ ‖C‖`.
23 
24## ii. Key results
25 
26- `tsum_norm_inner_contraction_le_traceNorm` : the duality bound against contractions.
27- `traceNorm_eq_tsum_norm_inner_polarFactor` : the bound is attained at the polar factor.
28- `traceNorm_add_le` : the trace norm is subadditive.
29- `traceNorm_mul_mul_le` : the two-sided ideal estimate.
30 
31-/
32 
33namespace Cloning.InfiniteTraceClass
34 
35set_option backward.isDefEq.respectTransparency false
36 
37noncomputable section
38 
39open scoped ComplexOrder InnerProductSpace
40open HilbertSchmidt
41 
42variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
43 
44/-- The trace norm of an operator only depends on the operator, not on the trace-class witness. -/
45lemma traceNorm_transport {X Y : H →L[ℂ] H} (hEq : X = Y) (hX : IsTraceClass X) :
46    traceNorm X hX = traceNorm Y (hEq ▸ hX) := by
47  subst hEq; rfl
48 
49/-- The Hilbert–Schmidt square sum of `√|A|` computes the trace norm, in every basis. -/
50lemma tsum_sqrt_abs_norm_sq_eq_traceNorm {A : H →L[ℂ] H} (hA : IsTraceClass A) {w : Set H}
51    (b : HilbertBasis w ℂ H) :
52    (∑' i : w, ‖CFC.sqrt (CFC.abs A) (b i)‖ ^ 2) = traceNorm A hA := by
53  rw [traceNorm_eq_of_hilbertBasis hA b]
54  refine tsum_congr (fun i => ?_)
55  set S : H →L[ℂ] H := CFC.sqrt (CFC.abs A) with hSdef
56  have hSself : IsSelfAdjoint S := .of_nonneg (CFC.sqrt_nonneg (CFC.abs A))
57  have hSS : S * S = CFC.abs A := CFC.sqrt_mul_sqrt_self (CFC.abs A) (CFC.abs_nonneg A)
58  have hinner : ⟪b i, CFC.abs A (b i)⟫_ℂ = ⟪S (b i), S (b i)⟫_ℂ := by
59    have hSstar : ContinuousLinearMap.adjoint S = S :=
60      (ContinuousLinearMap.star_eq_adjoint S).symm.trans hSself
61    rw [← hSS, ContinuousLinearMap.mul_def, ContinuousLinearMap.comp_apply,
62      ← ContinuousLinearMap.adjoint_inner_left S (S (b i)) (b i), hSstar]
63  rw [hinner, inner_self_eq_norm_sq_to_K]
64  norm_cast
65 
66/-- The contraction pairing `i ↦ ⟪W eᵢ, A eᵢ⟫` is absolutely summable, for trace-class `A` and any
67contraction `W`. -/
68lemma summable_norm_inner_contraction_of_isTraceClass {A W : H →L[ℂ] H} (hA : IsTraceClass A)
69    (hW : ‖W‖ ≤ 1) {w : Set H} (b : HilbertBasis w ℂ H) :
70    Summable (fun i : w => ‖⟪W (b i), A (b i)⟫_ℂ‖) := by
71  obtain ⟨hUS, hS, hfactor⟩ := isHilbertSchmidt_polarFactor_mul_sqrt_abs_and_sqrt_abs hA
72  set R : H →L[ℂ] H := Polar.polarFactor A * CFC.sqrt (CFC.abs A) with hRdef
73  set S : H →L[ℂ] H := CFC.sqrt (CFC.abs A) with hSdef
74  have hRstar : IsHilbertSchmidt (ContinuousLinearMap.adjoint R) := by
75    rcases hUS with ⟨w₀, b₀, hb₀⟩
76    exact ⟨w₀, b₀, summable_norm_sq_adjoint_of_summable_norm_sq b₀ hb₀⟩
77  have hRWb : Summable (fun i : w => ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) :=
78    summable_norm_sq_apply_of_hilbertBasis w b
79      (isHilbertSchmidt_mul_right_of_opNorm_le_one hW hRstar)
80  have hSb : Summable (fun i : w => ‖S (b i)‖ ^ 2) := summable_norm_sq_apply_of_hilbertBasis w b hS
81  have hpoint : ∀ i : w, ⟪W (b i), A (b i)⟫_ℂ =
82      ⟪(ContinuousLinearMap.adjoint R * W) (b i), S (b i)⟫_ℂ := by
83    intro i
84    rw [show A = R * S from hfactor.symm, ContinuousLinearMap.mul_def,
85      ContinuousLinearMap.comp_apply, ContinuousLinearMap.mul_def, ContinuousLinearMap.comp_apply,
86      ContinuousLinearMap.adjoint_inner_left R (S (b i)) (W (b i))]
87  have hprod : Summable (fun i : w =>
88      ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ * ‖S (b i)‖) :=
89    summable_norm_mul_of_square_sums _ _ hRWb hSb (fun i => norm_nonneg _) (fun i => norm_nonneg _)
90  apply Summable.of_nonneg_of_le (fun i => norm_nonneg _) (fun i => ?_) hprod
91  rw [hpoint i]
92  exact norm_inner_le_norm _ _
93 
94/-- **The duality bound**: for trace-class `A`, any contraction `W`, and any basis, the pairing
95`∑ᵢ ‖⟪W eᵢ, A eᵢ⟫‖` never exceeds `‖A‖₁`. This is the single quantitative estimate feeding
96subadditivity of the trace norm, and the general two-sided ideal estimate below. -/
97lemma tsum_norm_inner_contraction_le_traceNorm {A W : H →L[ℂ] H} (hA : IsTraceClass A)
98    (hW : ‖W‖ ≤ 1) {w : Set H} (b : HilbertBasis w ℂ H) :
99    (∑' i : w, ‖⟪W (b i), A (b i)⟫_ℂ‖) ≤ traceNorm A hA := by
100  obtain ⟨hUS, hS, hfactor⟩ := isHilbertSchmidt_polarFactor_mul_sqrt_abs_and_sqrt_abs hA
101  set R : H →L[ℂ] H := Polar.polarFactor A * CFC.sqrt (CFC.abs A) with hRdef
102  set S : H →L[ℂ] H := CFC.sqrt (CFC.abs A) with hSdef
103  have hRstar : IsHilbertSchmidt (ContinuousLinearMap.adjoint R) := by
104    rcases hUS with ⟨w₀, b₀, hb₀⟩
105    exact ⟨w₀, b₀, summable_norm_sq_adjoint_of_summable_norm_sq b₀ hb₀⟩
106  have hRWb : Summable (fun i : w => ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) :=
107    summable_norm_sq_apply_of_hilbertBasis w b
108      (isHilbertSchmidt_mul_right_of_opNorm_le_one hW hRstar)
109  have hSb : Summable (fun i : w => ‖S (b i)‖ ^ 2) := summable_norm_sq_apply_of_hilbertBasis w b hS
110  have hUSb : Summable (fun i : w => ‖R (b i)‖ ^ 2) :=
111    summable_norm_sq_apply_of_hilbertBasis w b hUS
112  have hpoint : ∀ i : w, ⟪W (b i), A (b i)⟫_ℂ =
113      ⟪(ContinuousLinearMap.adjoint R * W) (b i), S (b i)⟫_ℂ := by
114    intro i
115    rw [show A = R * S from hfactor.symm, ContinuousLinearMap.mul_def,
116      ContinuousLinearMap.comp_apply, ContinuousLinearMap.mul_def, ContinuousLinearMap.comp_apply,
117      ContinuousLinearMap.adjoint_inner_left R (S (b i)) (W (b i))]
118  have hprod : Summable (fun i : w =>
119      ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ * ‖S (b i)‖) :=
120    summable_norm_mul_of_square_sums _ _ hRWb hSb (fun i => norm_nonneg _) (fun i => norm_nonneg _)
121  have hLHSsummable : Summable (fun i : w => ‖⟪W (b i), A (b i)⟫_ℂ‖) := by
122    apply Summable.of_nonneg_of_le (fun i => norm_nonneg _) (fun i => ?_) hprod
123    rw [hpoint i]; exact norm_inner_le_norm _ _
124  have hle1 : (∑' i : w, ‖⟪W (b i), A (b i)⟫_ℂ‖) ≤
125      ∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ * ‖S (b i)‖ :=
126    hLHSsummable.tsum_le_tsum (fun i => by rw [hpoint i]; exact norm_inner_le_norm _ _) hprod
127  have hle2 : (∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ * ‖S (b i)‖) ≤
128      Real.sqrt (∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) *
129        Real.sqrt (∑' i : w, ‖S (b i)‖ ^ 2) :=
130    tsum_mul_le_sqrt_mul_sqrt hRWb hSb (fun i => norm_nonneg _) (fun i => norm_nonneg _)
131  have hRWSq : (∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) ≤
132      ∑' i : w, ‖R (b i)‖ ^ 2 := by
133    have hstep := tsum_norm_sq_mul_right_le_of_opNorm_le_one (X := ContinuousLinearMap.adjoint R)
134      hW hRstar b
135    have hadjR : (∑' i : w, ‖(ContinuousLinearMap.adjoint R) (b i)‖ ^ 2) =
136        ∑' i : w, ‖R (b i)‖ ^ 2 := (hasSum_norm_sq_apply_eq_adjoint b b hUSb).tsum_eq
137    rwa [hadjR] at hstep
138  have hRSq : (∑' i : w, ‖R (b i)‖ ^ 2) ≤ ∑' i : w, ‖S (b i)‖ ^ 2 := by
139    have hpt : ∀ i : w, ‖R (b i)‖ ^ 2 ≤ ‖S (b i)‖ ^ 2 := by
140      intro i
141      have hle : ‖R (b i)‖ ≤ ‖S (b i)‖ := by
142        rw [hRdef, ContinuousLinearMap.mul_def, ContinuousLinearMap.comp_apply]
143        calc ‖Polar.polarFactor A (S (b i))‖ ≤ ‖Polar.polarFactor A‖ * ‖S (b i)‖ :=
144              ContinuousLinearMap.le_opNorm _ _
145          _ ≤ 1 * ‖S (b i)‖ :=
146              mul_le_mul_of_nonneg_right (Polar.polarFactor_opNorm_le A) (norm_nonneg _)
147          _ = ‖S (b i)‖ := one_mul _
148      exact (sq_le_sq₀ (norm_nonneg _) (norm_nonneg _)).2 hle
149    exact hUSb.tsum_le_tsum hpt hSb
150  have hle3 : Real.sqrt (∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) ≤
151      Real.sqrt (∑' i : w, ‖S (b i)‖ ^ 2) := Real.sqrt_le_sqrt (hRWSq.trans hRSq)
152  have hnonneg : (0:ℝ) ≤ Real.sqrt (∑' i : w, ‖S (b i)‖ ^ 2) := Real.sqrt_nonneg _
153  calc
154    (∑' i : w, ‖⟪W (b i), A (b i)⟫_ℂ‖) ≤ ∑' i : w,
155        ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ * ‖S (b i)‖ := hle1
156    _ ≤ Real.sqrt (∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) *
157        Real.sqrt (∑' i : w, ‖S (b i)‖ ^ 2) := hle2
158    _ ≤ Real.sqrt (∑' i : w, ‖S (b i)‖ ^ 2) * Real.sqrt (∑' i : w, ‖S (b i)‖ ^ 2) :=
159        mul_le_mul_of_nonneg_right hle3 hnonneg
160    _ = ∑' i : w, ‖S (b i)‖ ^ 2 := Real.mul_self_sqrt (tsum_nonneg (fun i => sq_nonneg _))
161    _ = traceNorm A hA := tsum_sqrt_abs_norm_sq_eq_traceNorm hA b
162 
163/-- The trace-norm diagonal in the basis `b` equals the norm-diagonal pairing against `T`'s own
164polar factor: `⟪eᵢ, |T| eᵢ⟫ = ⟪(polarFactor T) eᵢ, T eᵢ⟫` exactly, and the latter is already a
165nonnegative real. -/
166lemma traceNorm_eq_tsum_norm_inner_polarFactor {T : H →L[ℂ] H} (hT : IsTraceClass T)
167    {w : Set H} (b : HilbertBasis w ℂ H) :
168    traceNorm T hT = ∑' i : w, ‖⟪Polar.polarFactor T (b i), T (b i)⟫_ℂ‖ := by
169  rw [traceNorm_eq_of_hilbertBasis hT b]
170  refine tsum_congr (fun i => ?_)
171  have hval : ⟪b i, CFC.abs T (b i)⟫_ℂ = ⟪Polar.polarFactor T (b i), T (b i)⟫_ℂ := by
172    have habs : CFC.abs T = star (Polar.polarFactor T) * T := (Polar.star_polarFactor_mul_self
173        T).symm
174    rw [habs, ContinuousLinearMap.star_eq_adjoint, ContinuousLinearMap.mul_def,
175      ContinuousLinearMap.comp_apply,
176      ContinuousLinearMap.adjoint_inner_right (Polar.polarFactor T) (b i) (T (b i))]
177  have hnonnegre : ‖⟪b i, CFC.abs T (b i)⟫_ℂ‖ = (⟪b i, CFC.abs T (b i)⟫_ℂ).re := by
178    have hpos : (CFC.abs T).IsPositive := (CFC.abs T).nonneg_iff_isPositive.mp (CFC.abs_nonneg T)
179    have hx := (ContinuousLinearMap.isPositive_iff_complex (CFC.abs T)).mp hpos (b i)
180    have h1 : ⟪CFC.abs T (b i), b i⟫_ℂ = ((⟪CFC.abs T (b i), b i⟫_ℂ).re : ℂ) := hx.1.symm
181    have hre : (⟪CFC.abs T (b i), b i⟫_ℂ).re = (⟪b i, CFC.abs T (b i)⟫_ℂ).re := by
182      rw [← inner_conj_symm (CFC.abs T (b i)) (b i)]; exact Complex.conj_re _
183    have heq : ⟪b i, CFC.abs T (b i)⟫_ℂ = ((⟪b i, CFC.abs T (b i)⟫_ℂ).re : ℂ) := by
184      calc
185        ⟪b i, CFC.abs T (b i)⟫_ℂ = (starRingEnd ℂ) ⟪CFC.abs T (b i), b i⟫_ℂ :=
186          (inner_conj_symm (b i) (CFC.abs T (b i))).symm
187        _ = (starRingEnd ℂ) ((⟪CFC.abs T (b i), b i⟫_ℂ).re : ℂ) := congrArg (starRingEnd ℂ) h1
188        _ = ((⟪CFC.abs T (b i), b i⟫_ℂ).re : ℂ) := by simp
189        _ = ((⟪b i, CFC.abs T (b i)⟫_ℂ).re : ℂ) := by rw [hre]
190    have hnonneg : 0 ≤ (⟪b i, CFC.abs T (b i)⟫_ℂ).re := by rw [← hre]; exact hx.2
191    rw [heq, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg hnonneg]
192    simp only [Complex.ofReal_re]
193  rw [← hnonnegre, hval]
194 
195/-- **The trace norm is subadditive.** -/
196lemma traceNorm_add_le {T T' : H →L[ℂ] H} (hT : IsTraceClass T) (hT' : IsTraceClass T')
197    (hTT' : IsTraceClass (T + T')) :
198    traceNorm (T + T') hTT' ≤ traceNorm T hT + traceNorm T' hT' := by
199  obtain ⟨w, b, _⟩ := exists_hilbertBasis ℂ H
200  set W : H →L[ℂ] H := Polar.polarFactor (T + T') with hWdef
201  have hWnorm : ‖W‖ ≤ 1 := Polar.polarFactor_opNorm_le (T + T')
202  have heq := traceNorm_eq_tsum_norm_inner_polarFactor hTT' b
203  have hpt : ∀ i : w, ‖⟪W (b i), (T + T') (b i)⟫_ℂ‖ ≤
204      ‖⟪W (b i), T (b i)⟫_ℂ‖ + ‖⟪W (b i), T' (b i)⟫_ℂ‖ := by
205    intro i
206    rw [ContinuousLinearMap.add_apply, inner_add_right]
207    exact norm_add_le _ _
208  have hT1 : Summable (fun i : w => ‖⟪W (b i), T (b i)⟫_ℂ‖) :=
209    summable_norm_inner_contraction_of_isTraceClass hT hWnorm b
210  have hT2 : Summable (fun i : w => ‖⟪W (b i), T' (b i)⟫_ℂ‖) :=
211    summable_norm_inner_contraction_of_isTraceClass hT' hWnorm b
212  have hsum : Summable (fun i : w =>
213      ‖⟪W (b i), T (b i)⟫_ℂ‖ + ‖⟪W (b i), T' (b i)⟫_ℂ‖) := hT1.add hT2
214  have hTT'sum : Summable (fun i : w => ‖⟪W (b i), (T + T') (b i)⟫_ℂ‖) :=
215    summable_norm_inner_contraction_of_isTraceClass hTT' hWnorm b
216  calc
217    traceNorm (T + T') hTT' = ∑' i : w, ‖⟪W (b i), (T + T') (b i)⟫_ℂ‖ := heq
218    _ ≤ ∑' i : w, (‖⟪W (b i), T (b i)⟫_ℂ‖ + ‖⟪W (b i), T' (b i)⟫_ℂ‖) :=
219      hTT'sum.tsum_le_tsum hpt hsum
220    _ = (∑' i : w, ‖⟪W (b i), T (b i)⟫_ℂ‖) + ∑' i : w, ‖⟪W (b i), T' (b i)⟫_ℂ‖ :=
221      hT1.tsum_add hT2
222    _ ≤ traceNorm T hT + traceNorm T' hT' :=
223      add_le_add (tsum_norm_inner_contraction_le_traceNorm hT hWnorm b)
224        (tsum_norm_inner_contraction_le_traceNorm hT' hWnorm b)
225 
226/-- **Quantitative master lemma**: the trace norm of a product of two Hilbert–Schmidt operators is
227bounded by the product of their Hilbert–Schmidt square-root sums, in any common basis. -/
228lemma traceNorm_mul_le_of_isHilbertSchmidt {R S : H →L[ℂ] H} (hR : IsHilbertSchmidt R)
229    (hS : IsHilbertSchmidt S) (hRS : IsTraceClass (R * S)) {w : Set H} (b : HilbertBasis w ℂ H) :
230    traceNorm (R * S) hRS ≤
231      Real.sqrt (∑' i : w, ‖R (b i)‖ ^ 2) * Real.sqrt (∑' i : w, ‖S (b i)‖ ^ 2) := by
232  set W : H →L[ℂ] H := Polar.polarFactor (R * S) with hWdef
233  have hWnorm : ‖W‖ ≤ 1 := Polar.polarFactor_opNorm_le (R * S)
234  have hRstar : IsHilbertSchmidt (ContinuousLinearMap.adjoint R) := by
235    rcases hR with ⟨w₀, b₀, hb₀⟩
236    exact ⟨w₀, b₀, summable_norm_sq_adjoint_of_summable_norm_sq b₀ hb₀⟩
237  have hRWb : Summable (fun i : w => ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) :=
238    summable_norm_sq_apply_of_hilbertBasis w b
239      (isHilbertSchmidt_mul_right_of_opNorm_le_one hWnorm hRstar)
240  have hSb : Summable (fun i : w => ‖S (b i)‖ ^ 2) := summable_norm_sq_apply_of_hilbertBasis w b hS
241  have hRb : Summable (fun i : w => ‖R (b i)‖ ^ 2) := summable_norm_sq_apply_of_hilbertBasis w b hR
242  have heq := traceNorm_eq_tsum_norm_inner_polarFactor hRS b
243  have hpoint : ∀ i : w, ⟪W (b i), (R * S) (b i)⟫_ℂ =
244      ⟪(ContinuousLinearMap.adjoint R * W) (b i), S (b i)⟫_ℂ := by
245    intro i
246    rw [ContinuousLinearMap.mul_def, ContinuousLinearMap.comp_apply, ContinuousLinearMap.mul_def,
247      ContinuousLinearMap.comp_apply,
248      ← ContinuousLinearMap.adjoint_inner_left R (S (b i)) (W (b i))]
249  have hprod : Summable (fun i : w =>
250      ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ * ‖S (b i)‖) :=
251    summable_norm_mul_of_square_sums _ _ hRWb hSb (fun i => norm_nonneg _) (fun i => norm_nonneg _)
252  have hle1 : (∑' i : w, ‖⟪W (b i), (R * S) (b i)⟫_ℂ‖) ≤
253      ∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ * ‖S (b i)‖ := by
254    apply Summable.tsum_le_tsum _ _ hprod
255    · intro i; rw [hpoint i]; exact norm_inner_le_norm _ _
256    · apply Summable.of_nonneg_of_le (fun i => norm_nonneg _) (fun i => ?_) hprod
257      rw [hpoint i]; exact norm_inner_le_norm _ _
258  have hle2 : (∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ * ‖S (b i)‖) ≤
259      Real.sqrt (∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) *
260        Real.sqrt (∑' i : w, ‖S (b i)‖ ^ 2) :=
261    tsum_mul_le_sqrt_mul_sqrt hRWb hSb (fun i => norm_nonneg _) (fun i => norm_nonneg _)
262  have hRWSq : (∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) ≤
263      ∑' i : w, ‖R (b i)‖ ^ 2 := by
264    have hstep := tsum_norm_sq_mul_right_le_of_opNorm_le_one (X := ContinuousLinearMap.adjoint R)
265      hWnorm hRstar b
266    have hadjR : (∑' i : w, ‖(ContinuousLinearMap.adjoint R) (b i)‖ ^ 2) =
267        ∑' i : w, ‖R (b i)‖ ^ 2 := (hasSum_norm_sq_apply_eq_adjoint b b hRb).tsum_eq
268    rwa [hadjR] at hstep
269  have hle3 : Real.sqrt (∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) ≤
270      Real.sqrt (∑' i : w, ‖R (b i)‖ ^ 2) := Real.sqrt_le_sqrt hRWSq
271  calc
272    traceNorm (R * S) hRS = ∑' i : w, ‖⟪W (b i), (R * S) (b i)⟫_ℂ‖ := heq
273    _ ≤ ∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ * ‖S (b i)‖ := hle1
274    _ ≤ Real.sqrt (∑' i : w, ‖(ContinuousLinearMap.adjoint R * W) (b i)‖ ^ 2) *
275        Real.sqrt (∑' i : w, ‖S (b i)‖ ^ 2) := hle2
276    _ ≤ Real.sqrt (∑' i : w, ‖R (b i)‖ ^ 2) * Real.sqrt (∑' i : w, ‖S (b i)‖ ^ 2) :=
277      mul_le_mul_of_nonneg_right hle3 (Real.sqrt_nonneg _)
278 
279/-- **The two-sided ideal estimate**: `‖A T B‖₁ ≤ ‖A‖ ‖T‖₁ ‖B‖`. -/
280lemma traceNorm_mul_mul_le {A B T : H →L[ℂ] H} (hT : IsTraceClass T)
281    (hABT : IsTraceClass (A * T * B)) :
282    traceNorm (A * T * B) hABT ≤ ‖A‖ * traceNorm T hT * ‖B‖ := by
283  obtain ⟨_, hS, hfactor⟩ := isHilbertSchmidt_polarFactor_mul_sqrt_abs_and_sqrt_abs hT
284  set R₀ : H →L[ℂ] H := Polar.polarFactor T * CFC.sqrt (CFC.abs T) with hR₀def
285  set S₀ : H →L[ℂ] H := CFC.sqrt (CFC.abs T) with hS₀def
286  have hUS : IsHilbertSchmidt R₀ :=
287    isHilbertSchmidt_mul_left_of_opNorm_le_one (Polar.polarFactor_opNorm_le T) hS
288  have hAR : IsHilbertSchmidt (A * R₀) := isHilbertSchmidt_mul_left hUS
289  have hSB : IsHilbertSchmidt (S₀ * B) := isHilbertSchmidt_mul_right hS
290  have heq : A * T * B = (A * R₀) * (S₀ * B) := by
291    rw [show T = R₀ * S₀ from hfactor.symm]; simp only [mul_assoc]
292  have hABT' : IsTraceClass ((A * R₀) * (S₀ * B)) := heq ▸ hABT
293  obtain ⟨w, b, _⟩ := exists_hilbertBasis ℂ H
294  have hbound := traceNorm_mul_le_of_isHilbertSchmidt hAR hSB hABT' b
295  have hARsq : (∑' i : w, ‖(A * R₀) (b i)‖ ^ 2) ≤ ‖A‖ ^ 2 * ∑' i : w, ‖R₀ (b i)‖ ^ 2 := by
296    have hR₀b : Summable (fun i : w => ‖R₀ (b i)‖ ^ 2) :=
297      summable_norm_sq_apply_of_hilbertBasis w b hUS
298    have hpt : ∀ i : w, ‖(A * R₀) (b i)‖ ^ 2 ≤ ‖A‖ ^ 2 * ‖R₀ (b i)‖ ^ 2 := by
299      intro i
300      have hle : ‖(A * R₀) (b i)‖ ≤ ‖A‖ * ‖R₀ (b i)‖ := by
301        rw [ContinuousLinearMap.mul_def, ContinuousLinearMap.comp_apply]
302        exact ContinuousLinearMap.le_opNorm _ _
303      calc ‖(A * R₀) (b i)‖ ^ 2 ≤ (‖A‖ * ‖R₀ (b i)‖) ^ 2 :=
304            (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (norm_nonneg _) (norm_nonneg _))).2 hle
305        _ = ‖A‖ ^ 2 * ‖R₀ (b i)‖ ^ 2 := by ring
306    calc (∑' i : w, ‖(A * R₀) (b i)‖ ^ 2) ≤ ∑' i : w, ‖A‖ ^ 2 * ‖R₀ (b i)‖ ^ 2 :=
307          (summable_norm_sq_apply_of_hilbertBasis w b hAR).tsum_le_tsum hpt (hR₀b.mul_left _)
308      _ = ‖A‖ ^ 2 * ∑' i : w, ‖R₀ (b i)‖ ^ 2 := tsum_mul_left
309  have hSBsq : (∑' i : w, ‖(S₀ * B) (b i)‖ ^ 2) ≤ ‖B‖ ^ 2 * ∑' i : w, ‖S₀ (b i)‖ ^ 2 := by
310    have hS₀b : Summable (fun i : w => ‖S₀ (b i)‖ ^ 2) :=
311      summable_norm_sq_apply_of_hilbertBasis w b hS
312    by_cases hB0 : ‖B‖ = 0
313    · have hBzero : B = 0 := norm_eq_zero.mp hB0
314      simp [hBzero]
315    · have hBcontr : ‖(‖B‖⁻¹ : ℂ) • B‖ ≤ 1 := by
316        rw [norm_smul, norm_inv, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (norm_nonneg B),
317          inv_mul_cancel₀ hB0]
318      have hstep := tsum_norm_sq_mul_right_le_of_opNorm_le_one
319        (X := S₀) (W := (‖B‖⁻¹ : ℂ) • B) hBcontr hS b
320      have heqB : (fun i : w => ‖(S₀ * ((‖B‖⁻¹ : ℂ) • B)) (b i)‖ ^ 2) =
321          fun i : w => ‖B‖⁻¹ ^ 2 * ‖(S₀ * B) (b i)‖ ^ 2 := by
322        funext i
323        have h1 : (S₀ * ((‖B‖⁻¹ : ℂ) • B)) (b i) = (‖B‖⁻¹ : ℂ) • (S₀ * B) (b i) := by
324          rw [ContinuousLinearMap.mul_def, ContinuousLinearMap.comp_apply,
325            ContinuousLinearMap.smul_apply, map_smul, ContinuousLinearMap.mul_def,
326            ContinuousLinearMap.comp_apply]
327        rw [h1, norm_smul, norm_inv, Complex.norm_real, Real.norm_eq_abs,
328          abs_of_nonneg (norm_nonneg B), mul_pow]
329      rw [heqB] at hstep
330      have htsum_smul : (∑' i : w, ‖B‖⁻¹ ^ 2 * ‖(S₀ * B) (b i)‖ ^ 2) =
331          ‖B‖⁻¹ ^ 2 * ∑' i : w, ‖(S₀ * B) (b i)‖ ^ 2 := tsum_mul_left
332      rw [htsum_smul] at hstep
333      have hfinal : ‖B‖⁻¹ ^ 2 * (∑' i : w, ‖(S₀ * B) (b i)‖ ^ 2) ≤ ∑' i : w, ‖S₀ (b i)‖ ^ 2 := hstep
334      calc (∑' i : w, ‖(S₀ * B) (b i)‖ ^ 2)
335          = ‖B‖ ^ 2 * (‖B‖⁻¹ ^ 2 * ∑' i : w, ‖(S₀ * B) (b i)‖ ^ 2) := by field_simp
336        _ ≤ ‖B‖ ^ 2 * ∑' i : w, ‖S₀ (b i)‖ ^ 2 := mul_le_mul_of_nonneg_left hfinal (sq_nonneg _)
337  have hS₀Sq : (∑' i : w, ‖S₀ (b i)‖ ^ 2) = traceNorm T hT :=
338    tsum_sqrt_abs_norm_sq_eq_traceNorm hT b
339  calc
340    traceNorm (A * T * B) hABT = traceNorm ((A * R₀) * (S₀ * B)) hABT' :=
341      (traceNorm_transport heq hABT).trans traceNorm_congr
342    _ ≤ Real.sqrt (∑' i : w, ‖(A * R₀) (b i)‖ ^ 2) * Real.sqrt (∑' i : w, ‖(S₀ * B) (b i)‖ ^ 2) :=
343        hbound
344    _ ≤ Real.sqrt (‖A‖ ^ 2 * ∑' i : w, ‖R₀ (b i)‖ ^ 2) *
345        Real.sqrt (‖B‖ ^ 2 * ∑' i : w, ‖S₀ (b i)‖ ^ 2) :=
346        mul_le_mul (Real.sqrt_le_sqrt hARsq) (Real.sqrt_le_sqrt hSBsq) (Real.sqrt_nonneg _)
347          (Real.sqrt_nonneg _)
348    _ = ‖A‖ * Real.sqrt (∑' i : w, ‖R₀ (b i)‖ ^ 2) *
349        (‖B‖ * Real.sqrt (∑' i : w, ‖S₀ (b i)‖ ^ 2)) := by
350        rw [Real.sqrt_mul (sq_nonneg _), Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq (norm_nonneg A),
351          Real.sqrt_sq (norm_nonneg B)]
352    _ ≤ ‖A‖ * Real.sqrt (traceNorm T hT) * (‖B‖ * Real.sqrt (∑' i : w, ‖S₀ (b i)‖ ^ 2)) := by
353        gcongr
354        · calc (∑' i : w, ‖R₀ (b i)‖ ^ 2) ≤ ∑' i : w, ‖S₀ (b i)‖ ^ 2 := by
355                have hS₀b : Summable (fun i : w => ‖S₀ (b i)‖ ^ 2) :=
356                  summable_norm_sq_apply_of_hilbertBasis w b hS
357                have hpt : ∀ i : w, ‖R₀ (b i)‖ ^ 2 ≤ ‖S₀ (b i)‖ ^ 2 := by
358                  intro i
359                  have hle : ‖R₀ (b i)‖ ≤ ‖S₀ (b i)‖ := by
360                    rw [hR₀def, ContinuousLinearMap.mul_def, ContinuousLinearMap.comp_apply]
361                    calc ‖Polar.polarFactor T (S₀ (b i))‖ ≤ ‖Polar.polarFactor T‖ * ‖S₀ (b i)‖ :=
362                          ContinuousLinearMap.le_opNorm _ _
363                      _ ≤ 1 * ‖S₀ (b i)‖ :=
364                          mul_le_mul_of_nonneg_right (Polar.polarFactor_opNorm_le T)
365                            (norm_nonneg _)
366                      _ = ‖S₀ (b i)‖ := one_mul _
367                  exact (sq_le_sq₀ (norm_nonneg _) (norm_nonneg _)).2 hle
368                exact (summable_norm_sq_apply_of_hilbertBasis w b hUS).tsum_le_tsum hpt hS₀b
369            _ = traceNorm T hT := hS₀Sq
370    _ = ‖A‖ * Real.sqrt (traceNorm T hT) * (‖B‖ * Real.sqrt (traceNorm T hT)) := by rw [hS₀Sq]
371    _ = ‖A‖ * traceNorm T hT * ‖B‖ := by
372        rw [show ‖A‖ * Real.sqrt (traceNorm T hT) * (‖B‖ * Real.sqrt (traceNorm T hT)) =
373            ‖A‖ * ‖B‖ * (Real.sqrt (traceNorm T hT) * Real.sqrt (traceNorm T hT)) by ring,
374          Real.mul_self_sqrt (traceNorm_nonneg T hT)]
375        ring
376 
377end
378 
379 
380end Cloning.InfiniteTraceClass