Offline · exact source
Exact Lean source

InfiniteTraceClassBanach

formalization/Cloning/InfiniteTraceClassBanach.lean

Source hash: 7da8cc170d8efeb82ef372672a1e97877f29a4e6324fbd079c5097377184ecd8

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/Banach.lean.
8Upstream blob: 5ca39451b4b42bb0b1f76f3204588b67ab3f8745.
9Compatibility: Qualifies map application lemmas and uses the older tendsto_finset_sum name; split into space and completeness modules.
10-/
11import Cloning.InfiniteTraceClassSpace
12 
13/-! The genuine trace norm makes the trace-class subspace a complex Banach space. -/
14 
15namespace Cloning.InfiniteTraceClass.TraceClass
16 
17set_option backward.isDefEq.respectTransparency false
18 
19noncomputable section
20open scoped ComplexOrder InnerProductSpace Topology Filter
21open Filter
22variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
23 
24noncomputable instance instAddCommGroup : AddCommGroup (TraceClass H) :=
25  inferInstanceAs (AddCommGroup (traceClassSubmodule H))
26 
27noncomputable instance instModule : Module ℂ (TraceClass H) :=
28  inferInstanceAs (Module ℂ (traceClassSubmodule H))
29 
30lemma mem_iff {T : H →L[ℂ] H} : T ∈ traceClassSubmodule H ↔ IsTraceClass T := Iff.rfl
31 
32/-- The trace-class witness carried by an element of `TraceClass H`. -/
33lemma isTraceClass_coe (T : TraceClass H) : IsTraceClass T.1 := T.2
34 
35/-- The element of `TraceClass H` given by a trace-class operator. -/
36def ofOperator (T : H →L[ℂ] H) (hT : IsTraceClass T) : TraceClass H := ⟨T, hT⟩
37 
38@[simp] lemma ofOperator_coe (T : H →L[ℂ] H) (hT : IsTraceClass T) :
39    (ofOperator T hT).1 = T := rfl
40 
41/-- **The trace norm as an `AddGroupNorm`** on the trace-class submodule: nonnegativity, the
42triangle inequality (`traceNorm_add_le`), invariance under negation, and the zero-detection
43property (via `opNorm_le_traceNorm`). -/
44noncomputable def traceClassAddGroupNorm : AddGroupNorm (TraceClass H) where
45  toFun T := traceNorm T.1 (isTraceClass_coe T)
46  map_zero' := traceNorm_zero
47  neg' T := traceNorm_neg (isTraceClass_coe T) (isTraceClass_coe (-T))
48  add_le' T T' := traceNorm_add_le (isTraceClass_coe T) (isTraceClass_coe T')
49    (isTraceClass_coe (T + T'))
50  eq_zero_of_map_eq_zero' T hT0 := by
51    have hop : ‖T.1‖ ≤ traceNorm T.1 (isTraceClass_coe T) :=
52      opNorm_le_traceNorm (isTraceClass_coe T)
53    rw [hT0] at hop
54    have : T.1 = 0 := norm_le_zero_iff.mp hop
55    exact Subtype.ext this
56 
57/-- **The trace-class Banach space's `NormedAddCommGroup` instance**, with norm `traceNorm`. -/
58noncomputable instance instNormedAddCommGroup : NormedAddCommGroup (TraceClass H) :=
59  AddGroupNorm.toNormedAddCommGroup traceClassAddGroupNorm
60 
61lemma norm_eq_traceNorm (T : TraceClass H) :
62    ‖T‖ = traceNorm T.1 (isTraceClass_coe T) := rfl
63 
64/-- **The trace-class Banach space's `NormedSpace ℂ` instance**: scalar multiplication scales the
65trace norm exactly, by `traceNorm_smul`. -/
66noncomputable instance instNormedSpace : NormedSpace ℂ (TraceClass H) where
67  norm_smul_le c T := by
68    rw [norm_eq_traceNorm, norm_eq_traceNorm]
69    have hEq : ((c • T : TraceClass H)).1 = c • T.1 := rfl
70    have h := traceNorm_transport hEq (isTraceClass_coe (c • T))
71    rw [h]
72    exact le_of_eq (traceNorm_smul c (isTraceClass_coe T))
73 
74/-- **Lower semicontinuity of the trace norm.** An operator-norm limit of trace-class operators with
75trace norms bounded by `C` is trace class, with trace norm at most `C`. -/
76lemma isTraceClass_of_tendsto_of_traceNorm_bounded {Tn : ℕ → H →L[ℂ] H} {T : H →L[ℂ] H} {C : ℝ}
77    (hTn : ∀ n, IsTraceClass (Tn n)) (hbound : ∀ n, traceNorm (Tn n) (hTn n) ≤ C)
78    (htendsto : Tendsto Tn atTop (𝓝 T)) :
79    ∃ hT : IsTraceClass T, traceNorm T hT ≤ C := by
80  obtain ⟨w, b, _⟩ := exists_hilbertBasis ℂ H
81  set W : H →L[ℂ] H := Polar.polarFactor T with hWdef
82  have hWnorm : ‖W‖ ≤ 1 := Polar.polarFactor_opNorm_le T
83  have hcont : ∀ i : w, Tendsto (fun n => ‖⟪W (b i), Tn n (b i)⟫_ℂ‖) atTop
84      (𝓝 ‖⟪W (b i), T (b i)⟫_ℂ‖) := by
85    intro i
86    have h1 : Tendsto (fun n => Tn n (b i)) atTop (𝓝 (T (b i))) := by
87      have hev : Continuous (fun X : H →L[ℂ] H => X (b i)) :=
88        (ContinuousLinearMap.apply ℂ H (b i : H)).continuous
89      exact hev.continuousAt.tendsto.comp htendsto
90    have h2 : Tendsto (fun n => ⟪W (b i), Tn n (b i)⟫_ℂ) atTop
91        (𝓝 ⟪W (b i), T (b i)⟫_ℂ) :=
92      ((continuous_const.inner continuous_id).continuousAt.tendsto.comp h1
93        |>.congr (fun _ => rfl)).mono_left le_rfl
94    exact continuous_norm.continuousAt.tendsto.comp h2
95  have hFinset : ∀ u : Finset w, (∑ i ∈ u, ‖⟪W (b i), T (b i)⟫_ℂ‖) ≤ C := by
96    intro u
97    have hpt : ∀ n, (∑ i ∈ u, ‖⟪W (b i), Tn n (b i)⟫_ℂ‖) ≤ C := by
98      intro n
99      have hsum : Summable (fun i : w => ‖⟪W (b i), Tn n (b i)⟫_ℂ‖) :=
100        summable_norm_inner_contraction_of_isTraceClass (hTn n) hWnorm b
101      have hall : (∑' i : w, ‖⟪W (b i), Tn n (b i)⟫_ℂ‖) ≤ C :=
102        (tsum_norm_inner_contraction_le_traceNorm (hTn n) hWnorm b).trans (hbound n)
103      exact (hsum.sum_le_tsum u (fun i _ => norm_nonneg _)).trans hall
104    have hlim : Tendsto (fun n => ∑ i ∈ u, ‖⟪W (b i), Tn n (b i)⟫_ℂ‖) atTop
105        (𝓝 (∑ i ∈ u, ‖⟪W (b i), T (b i)⟫_ℂ‖)) :=
106      tendsto_finset_sum u (fun i _ => hcont i)
107    exact le_of_tendsto hlim (Eventually.of_forall hpt)
108  have hsummable : Summable (fun i : w => ‖⟪W (b i), T (b i)⟫_ℂ‖) :=
109    summable_of_sum_le (fun _ => norm_nonneg _) hFinset
110  have htsum_le : (∑' i : w, ‖⟪W (b i), T (b i)⟫_ℂ‖) ≤ C :=
111    Real.tsum_le_of_sum_le (fun _ => norm_nonneg _) hFinset
112  have hpoint : ∀ i : w, (⟪b i, CFC.abs T (b i)⟫_ℂ).re = ‖⟪W (b i), T (b i)⟫_ℂ‖ := by
113    intro i
114    have hval : ⟪b i, CFC.abs T (b i)⟫_ℂ = ⟪W (b i), T (b i)⟫_ℂ := by
115      have habs : CFC.abs T = star W * T := (Polar.star_polarFactor_mul_self T).symm
116      rw [habs, ContinuousLinearMap.star_eq_adjoint, ContinuousLinearMap.mul_def,
117        ContinuousLinearMap.comp_apply,
118        ContinuousLinearMap.adjoint_inner_right W (b i) (T (b i))]
119    have hpos : (CFC.abs T).IsPositive := (CFC.abs T).nonneg_iff_isPositive.mp (CFC.abs_nonneg T)
120    have hx := (ContinuousLinearMap.isPositive_iff_complex (CFC.abs T)).mp hpos (b i)
121    have h1 : ⟪CFC.abs T (b i), b i⟫_ℂ = ((⟪CFC.abs T (b i), b i⟫_ℂ).re : ℂ) := hx.1.symm
122    have hre : (⟪CFC.abs T (b i), b i⟫_ℂ).re = (⟪b i, CFC.abs T (b i)⟫_ℂ).re := by
123      rw [← inner_conj_symm (CFC.abs T (b i)) (b i)]; exact Complex.conj_re _
124    have heq : ⟪b i, CFC.abs T (b i)⟫_ℂ = ((⟪b i, CFC.abs T (b i)⟫_ℂ).re : ℂ) := by
125      calc
126        ⟪b i, CFC.abs T (b i)⟫_ℂ = (starRingEnd ℂ) ⟪CFC.abs T (b i), b i⟫_ℂ :=
127          (inner_conj_symm (b i) (CFC.abs T (b i))).symm
128        _ = (starRingEnd ℂ) ((⟪CFC.abs T (b i), b i⟫_ℂ).re : ℂ) := congrArg (starRingEnd ℂ) h1
129        _ = ((⟪CFC.abs T (b i), b i⟫_ℂ).re : ℂ) := by simp
130        _ = ((⟪b i, CFC.abs T (b i)⟫_ℂ).re : ℂ) := by rw [hre]
131    have hnonneg : 0 ≤ (⟪b i, CFC.abs T (b i)⟫_ℂ).re := by rw [← hre]; exact hx.2
132    rw [show ‖⟪W (b i), T (b i)⟫_ℂ‖ = ‖⟪b i, CFC.abs T (b i)⟫_ℂ‖ from by rw [hval],
133      heq, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg hnonneg, Complex.ofReal_re]
134  have hT : IsTraceClass T := ⟨w, b, by
135    apply hsummable.congr
136    exact fun i => (hpoint i).symm⟩
137  refine ⟨hT, ?_⟩
138  rw [traceNorm_eq_of_hilbertBasis hT b]
139  calc
140    (∑' i : w, (⟪b i, CFC.abs T (b i)⟫_ℂ).re) = ∑' i : w, ‖⟪W (b i), T (b i)⟫_ℂ‖ :=
141      tsum_congr hpoint
142    _ ≤ C := htsum_le
143 
144/-- **The trace-class operators form a Banach space.** The partial sums of an absolutely convergent
145series converge in operator norm, and lower semicontinuity bounds the trace norm of the tails. -/
146noncomputable instance instCompleteSpace : CompleteSpace (TraceClass H) := by
147  apply NormedAddCommGroup.completeSpace_of_summable_imp_tendsto
148  intro u hu
149  set psum : ℕ → ℝ := fun n => ∑ i ∈ Finset.range n, ‖u i‖ with hpartialdef
150  set M : ℝ := ∑' n, ‖u n‖ with hMdef
151  set Sn : ℕ → TraceClass H := fun n => ∑ i ∈ Finset.range n, u i with hSndef
152  set Tn : ℕ → H →L[ℂ] H := fun n => (Sn n).1 with hTndef
153  have hpartial_le_M : ∀ n, psum n ≤ M := fun n => hu.sum_le_tsum _ (fun i _ => norm_nonneg _)
154  have hpartial_tendsto : Tendsto psum atTop (𝓝 M) := hu.hasSum.tendsto_sum_nat
155  set tail : ℕ → ℝ := fun n => M - psum n with htaildef
156  have htail_tendsto : Tendsto tail atTop (𝓝 0) := by
157    have := hpartial_tendsto.const_sub M
158    simpa [htaildef] using this
159  have hSn_diff : ∀ n m : ℕ, n ≤ m → Sn m - Sn n = ∑ i ∈ Finset.Ico n m, u i := by
160    intro n m hnm
161    simp only [hSndef]
162    rw [Finset.sum_Ico_eq_sub _ hnm]
163  have hpsum_split : ∀ n m : ℕ, n ≤ m →
164      (∑ i ∈ Finset.Ico n m, ‖u i‖) = psum m - psum n := by
165    intro n m hnm
166    simp only [hpartialdef]
167    rw [Finset.sum_Ico_eq_sub _ hnm]
168  have htrace_tail_bound : ∀ n m : ℕ, n ≤ m → ‖Sn m - Sn n‖ ≤ tail n := by
169    intro n m hnm
170    rw [hSn_diff n m hnm]
171    calc ‖∑ i ∈ Finset.Ico n m, u i‖ ≤ ∑ i ∈ Finset.Ico n m, ‖u i‖ := norm_sum_le _ _
172      _ = psum m - psum n := hpsum_split n m hnm
173      _ ≤ tail n := by simp only [htaildef]; linarith [hpartial_le_M m]
174  have hSn_diff_coe : ∀ n m : ℕ, ((Sn m - Sn n : TraceClass H)).1 = Tn m - Tn n :=
175    fun n m => Submodule.coe_sub _ _ _
176  have htn_cauchy : CauchySeq Tn := by
177    apply cauchySeq_of_le_tendsto_0' tail _ htail_tendsto
178    intro n m hnm
179    rw [dist_eq_norm]
180    have heqop : Tn n - Tn m = -(Tn m - Tn n) := by abel
181    rw [heqop, norm_neg, ← hSn_diff_coe n m]
182    calc ‖((Sn m - Sn n : TraceClass H)).1‖ ≤ ‖(Sn m - Sn n : TraceClass H)‖ :=
183          opNorm_le_traceNorm (isTraceClass_coe (Sn m - Sn n))
184      _ ≤ tail n := htrace_tail_bound n m hnm
185  obtain ⟨S, hStendsto⟩ := cauchySeq_tendsto_of_complete htn_cauchy
186  have hSn_bound : ∀ n, traceNorm (Sn n).1 (isTraceClass_coe (Sn n)) ≤ M := by
187    intro n
188    show ‖Sn n‖ ≤ M
189    calc ‖Sn n‖ ≤ ∑ i ∈ Finset.range n, ‖u i‖ := by
190          simp only [hSndef]; exact norm_sum_le _ _
191      _ = psum n := rfl
192      _ ≤ M := hpartial_le_M n
193  obtain ⟨hS, -⟩ := isTraceClass_of_tendsto_of_traceNorm_bounded
194    (fun n => isTraceClass_coe (Sn n)) hSn_bound hStendsto
195  refine ⟨ofOperator S hS, ?_⟩
196  apply tendsto_iff_dist_tendsto_zero.mpr
197  have hbound_S : ∀ n, dist (Sn n) (ofOperator S hS : TraceClass H) ≤ tail n := by
198    intro n
199    rw [dist_eq_norm]
200    have hVtrace : ∀ m, IsTraceClass (Tn (n + m) - Tn n) := by
201      intro m
202      rw [← hSn_diff_coe n (n + m)]
203      exact isTraceClass_coe (Sn (n + m) - Sn n)
204    have hVbound : ∀ m, traceNorm (Tn (n + m) - Tn n) (hVtrace m) ≤ tail n := by
205      intro m
206      have h1 : traceNorm (Tn (n + m) - Tn n) (hVtrace m) =
207          traceNorm ((Sn (n + m) - Sn n : TraceClass H)).1
208            (isTraceClass_coe (Sn (n + m) - Sn n)) := by
209        have hEq : Tn (n + m) - Tn n = ((Sn (n + m) - Sn n : TraceClass H)).1 :=
210          (hSn_diff_coe n (n + m)).symm
211        exact traceNorm_transport hEq (hVtrace m)
212      rw [h1]
213      show ‖Sn (n + m) - Sn n‖ ≤ tail n
214      exact htrace_tail_bound n (n + m) (Nat.le_add_right n m)
215    have hVtendsto : Tendsto (fun m => Tn (n + m) - Tn n) atTop (𝓝 (S - Tn n)) := by
216      have h1 : Tendsto (fun m => Tn (n + m)) atTop (𝓝 S) := by
217        have h2 : Tendsto (fun m => Tn (m + n)) atTop (𝓝 S) :=
218          hStendsto.comp (tendsto_add_atTop_nat n)
219        simpa only [add_comm] using h2
220      exact h1.sub tendsto_const_nhds
221    obtain ⟨hSTn, hSTnbound⟩ := isTraceClass_of_tendsto_of_traceNorm_bounded hVtrace hVbound
222      hVtendsto
223    have heqfinal : ((ofOperator S hS : TraceClass H) - Sn n).1 = S - Tn n := rfl
224    have hnorm_eq : ‖(ofOperator S hS : TraceClass H) - Sn n‖ = traceNorm (S - Tn n) hSTn := by
225      have h3 : ‖(ofOperator S hS : TraceClass H) - Sn n‖ =
226          traceNorm ((ofOperator S hS : TraceClass H) - Sn n).1
227            (isTraceClass_coe ((ofOperator S hS : TraceClass H) - Sn n)) := rfl
228      rw [h3]
229      exact traceNorm_transport heqfinal (isTraceClass_coe ((ofOperator S hS : TraceClass H) - Sn
230          n))
231    rw [norm_sub_rev]
232    rw [hnorm_eq]
233    exact hSTnbound
234  exact squeeze_zero (fun n => dist_nonneg) hbound_S htail_tendsto
235 
236end
237end Cloning.InfiniteTraceClass.TraceClass