Offline · exact source
Exact Lean source

InfiniteDensityState

formalization/Cloning/InfiniteDensityState.lean

Source hash: 27947b86c16a427efd7edd9bce67aa75cd8d66251252ec04826738b997bee02b

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/RankOne.lean.
8The positive trace-basis theorem replaces the more general polar-decomposition dependency.
9The DensityState structure and constructors below are local additions.
10-/
11 
12import Cloning.InfiniteTraceClass
13 
14/-!
15 
16# Rank-one positive operators
17 
18## i. Overview
19 
20The positive rank-one operator `|x⟩⟨x|` is trace class, with trace and trace norm `‖x‖²`. This is
21the normalization of vector states.
22 
23## ii. Key results
24 
25- `isTraceClass_rankOne_self` : `|x⟩⟨x|` is trace class.
26- `trace_rankOne_self`, `traceNorm_rankOne_self` : its trace and trace norm are `‖x‖²`.
27 
28-/
29 
30namespace Cloning.InfiniteTraceClass
31 
32set_option backward.isDefEq.respectTransparency false
33 
34noncomputable section
35 
36open scoped ComplexOrder InnerProductSpace
37 
38variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
39 
40omit [CompleteSpace H] in
41lemma rankOne_self_diagonal {x : H} {w : Set H}
42    (b : HilbertBasis w ℂ H) (i : w) :
43    (⟪b i, (InnerProductSpace.rankOne ℂ x x) (b i)⟫_ℂ).re =
44      ‖⟪x, b i⟫_ℂ‖ ^ 2 := by
45  simp only [InnerProductSpace.rankOne_apply]
46  rw [inner_smul_right]
47  rw [← inner_conj_symm x (b i), RCLike.conj_mul]
48  norm_num [Complex.ofReal, pow_two, Complex.mul_re, norm_inner_symm]
49 
50lemma isTraceClass_rankOne_self (x : H) :
51    IsTraceClass (InnerProductSpace.rankOne ℂ x x) := by
52  apply isTraceClass_iff.mpr
53  intro w b
54  rw [CFC.abs_of_nonneg _ ((InnerProductSpace.rankOne ℂ x x).nonneg_iff_isPositive.mpr
55    (InnerProductSpace.isPositive_rankOne_self x))]
56  have h := (hasSum_norm_sq_inner_basis b x).summable
57  apply h.congr
58  intro i
59  simp only [rankOne_self_diagonal, ← inner_conj_symm x (b i), RCLike.norm_conj]
60 
61lemma trace_rankOne_self (x : H) :
62    trace (InnerProductSpace.rankOne ℂ x x) (isTraceClass_rankOne_self x) =
63      (‖x‖ ^ 2 : ℝ) := by
64  obtain ⟨w, b, _⟩ := exists_hilbertBasis ℂ H
65  rw [trace_eq_of_hilbertBasis_of_nonneg
66    ((InnerProductSpace.rankOne ℂ x x).nonneg_iff_isPositive.mpr
67      (InnerProductSpace.isPositive_rankOne_self x)) (isTraceClass_rankOne_self x) b]
68  have h := hasSum_norm_sq_inner_basis b x
69  have hdiag : (fun i : w =>
70      ⟪b i, (InnerProductSpace.rankOne ℂ x x) (b i)⟫_ℂ) =
71      (fun i : w => ((‖⟪b i, x⟫_ℂ‖ ^ 2 : ℝ) : ℂ)) := by
72    funext i
73    simp only [InnerProductSpace.rankOne_apply]
74    rw [inner_smul_right]
75    rw [← inner_conj_symm x (b i), RCLike.conj_mul]
76    norm_cast
77  rw [hdiag]
78  exact (Complex.hasSum_ofReal.mpr h).tsum_eq
79 
80lemma traceNorm_rankOne_self (x : H) :
81    traceNorm (InnerProductSpace.rankOne ℂ x x) (isTraceClass_rankOne_self x) =
82      ‖x‖ ^ 2 := by
83  obtain ⟨w, b, _⟩ := exists_hilbertBasis ℂ H
84  rw [traceNorm_eq_of_hilbertBasis (isTraceClass_rankOne_self x) b]
85  have h := hasSum_norm_sq_inner_basis b x
86  have hdiag : (fun i : w =>
87      (⟪b i, CFC.abs (InnerProductSpace.rankOne ℂ x x) (b i)⟫_ℂ).re) =
88      (fun i : w => ‖⟪b i, x⟫_ℂ‖ ^ 2) := by
89    funext i
90    rw [CFC.abs_of_nonneg _ ((InnerProductSpace.rankOne ℂ x x).nonneg_iff_isPositive.mpr
91      (InnerProductSpace.isPositive_rankOne_self x))]
92    simp only [rankOne_self_diagonal, ← inner_conj_symm x (b i), RCLike.norm_conj]
93  rw [hdiag]
94  exact h.tsum_eq
95 
96/-- A density operator on a possibly infinite-dimensional Hilbert space, using the
97analytic trace-class trace rather than the finite-dimensional linear-algebra trace. -/
98structure DensityState (H : Type*) [NormedAddCommGroup H] [InnerProductSpace ℂ H]
99    [CompleteSpace H] where
100  op : H →L[ℂ] H
101  positive : 0 ≤ op
102  traceClass : IsTraceClass op
103  trace_one : trace op traceClass = 1
104 
105/-- Every unit vector gives an actual positive trace-class density operator. -/
106def DensityState.pure (x : H) (hx : ‖x‖ = 1) : DensityState H where
107  op := InnerProductSpace.rankOne ℂ x x
108  positive := (InnerProductSpace.rankOne ℂ x x).nonneg_iff_isPositive.mpr
109    (InnerProductSpace.isPositive_rankOne_self x)
110  traceClass := isTraceClass_rankOne_self x
111  trace_one := by rw [trace_rankOne_self, hx]; norm_num
112 
113/-- The analytic density-state definition contains ordinary finite-dimensional states. -/
114def DensityState.ofFiniteDimensional [FiniteDimensional ℂ H] (T : H →L[ℂ] H)
115    (hT : 0 ≤ T) (htrace : LinearMap.trace ℂ H T.toLinearMap = 1) : DensityState H where
116  op := T
117  positive := hT
118  traceClass := isTraceClass_of_finiteDimensional T
119  trace_one := (trace_eq_linearMap_trace_of_finiteDimensional T _).trans htrace
120 
121end
122end Cloning.InfiniteTraceClass
123