Offline · exact source
Exact Lean source

TensorGibbsState

formalization/Cloning/TensorGibbsState.lean

Source hash: c0f0d7d45434b7cec933eb731abe44fb8203cd081e880f7a851c67c6006a09c5

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
1import Cloning.TensorCyclicSectorCovariance
2import Cloning.InfiniteTraceClassSeries
3import Cloning.InfiniteTraceClassPositive
4 
5/-! The actual diagonal tensor density restricted to a physical cyclic sector.
6Positivity, nonzero partition function and normalization are derived from the
7literal tensor action; no spectral or tail conclusion is assumed. -/
8noncomputable section
9open scoped BigOperators InnerProductSpace Matrix ComplexOrder
10namespace Cloning.TensorLie
11open Cloning.PCT Cloning.InfiniteTraceClass
12set_option maxHeartbeats 1200000
13set_option backward.isDefEq.respectTransparency false
14variable {n d : ℕ}
15 
16local instance : FiniteDimensional ℂ (TensorRegister n (Fin d)) :=
17  (registerBasis (Fin n → Fin d)).toOrthonormalBasis.toBasis.finiteDimensional_of_finite
18 
19/-- A simultaneous physical Cartan eigenvector has the expected literal
20diagonal tensor eigenvalue, including negative formal weights of zero vectors. -/
21theorem tensorOperator_diagonal_weight
22    (D : Fin d → ℂ) (x : TensorRegister n (Fin d)) (κ : Fin d → ℤ)
23    (hx : ∀ a, collectiveGenerator n a a x = (κ a : ℂ) • x) :
24    tensorOperator n (Matrix.diagonal D) x = (∏ a, D a ^ κ a) • x := by
25  ext w
26  rw [tensorOperator_diagonal_apply]
27  simp only [lp.coeFn_smul, Pi.smul_apply, smul_eq_mul]
28  by_cases hw : x w = 0
29  · simp [hw]
30  · have hc (a : Fin d) : (occupancy w a : ℤ) = κ a := by
31      have he := congrArg (fun y : TensorRegister n (Fin d) => y w) (hx a)
32      simp only [collectiveGenerator_diagonal, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul] at he
33      have hh := mul_right_cancel₀ hw he
34      apply Int.cast_injective (α := ℂ)
35      simpa only [Int.cast_natCast] using hh
36    rw [word_product_eq_occupancy]
37    congr 1
38    apply Finset.prod_congr rfl
39    intro a _
40    rw [← hc a, zpow_natCast]
41 
42variable (Ω : TensorRegister n (Fin d)) (mu : Fin d → ℕ)
43    (hweight : ∀ a, collectiveGenerator n a a Ω = (mu a : ℂ) • Ω)
44    (hraise : ∀ a b, a < b → collectiveGenerator n a b Ω = 0)
45 
46theorem cyclicTensorOperator_star (X : Matrix (Fin d) (Fin d) ℂ) :
47    cyclicTensorOperator Ω (fun a => (mu a : ℂ)) hweight hraise Xᴴ =
48      (cyclicTensorOperator Ω (fun a => (mu a : ℂ)) hweight hraise X).adjoint := by
49  apply (ContinuousLinearMap.eq_adjoint_iff _ _).mpr
50  intro x y
51  change ⟪tensorOperator n Xᴴ (x : TensorRegister n (Fin d)),
52      (y : TensorRegister n (Fin d))⟫_ℂ =
53    ⟪(x : TensorRegister n (Fin d)), tensorOperator n X y⟫_ℂ
54  rw [tensorOperator_star, ContinuousLinearMap.adjoint_inner_left]
55 
56/-- The literal diagonal tensor operator on its physical cyclic Hilbert space. -/
57def sectorGibbsOperator (p : Fin d → ℝ) : cyclicSector Ω →L[ℂ] cyclicSector Ω :=
58  cyclicTensorOperator Ω (fun a => (mu a : ℂ)) hweight hraise
59    (Matrix.diagonal (fun a => (p a : ℂ)))
60 
61theorem sectorGibbsOperator_nonneg (p : Fin d → ℝ) (hp : ∀ a, 0 ≤ p a) :
62    0 ≤ sectorGibbsOperator Ω mu hweight hraise p := by
63  let S : Matrix (Fin d) (Fin d) ℂ := Matrix.diagonal (fun a => (Real.sqrt (p a) : ℂ))
64  have hS : Sᴴ * S = Matrix.diagonal (fun a => (p a : ℂ)) := by
65    simp only [S, Matrix.diagonal_conjTranspose, Complex.conj_ofReal,
66      Matrix.diagonal_mul_diagonal]
67    congr 1
68    funext a
69    simp [Complex.star_def, ← Complex.ofReal_mul, Real.mul_self_sqrt (hp a)]
70  unfold sectorGibbsOperator
71  rw [← hS, cyclicTensorOperator_mul, cyclicTensorOperator_star]
72  simpa only [ContinuousLinearMap.star_eq_adjoint] using
73    (star_mul_self_nonneg (cyclicTensorOperator Ω (fun a => (mu a : ℂ)) hweight hraise S))
74 
75/-- The highest tensor is an exact positive eigenvector of this operator. -/
76theorem sectorGibbsOperator_highest (p : Fin d → ℝ) :
77    sectorGibbsOperator Ω mu hweight hraise p
78      ⟨Ω, highest_mem_cyclicSector Ω⟩ =
79      ((∏ a, p a ^ mu a : ℝ) : ℂ) • (⟨Ω, highest_mem_cyclicSector Ω⟩ : cyclicSector Ω) := by
80  apply Subtype.ext
81  have h := tensorOperator_diagonal_weight (fun a => (p a : ℂ)) Ω
82    (fun a => (mu a : ℤ)) (by simpa using hweight)
83  simpa only [sectorGibbsOperator, cyclicTensorOperator_coe_apply, Submodule.coe_smul,
84    zpow_natCast, Complex.ofReal_prod, Complex.ofReal_pow] using h
85 
86/-- Finite dimensionality makes the actual sector operator trace class. -/
87def sectorGibbsWeight (p : Fin d → ℝ) : TraceClass (cyclicSector Ω) :=
88  TraceClass.ofOperator (sectorGibbsOperator Ω mu hweight hraise p)
89    (isTraceClass_of_finiteDimensional _)
90 
91theorem sectorGibbsWeight_nonneg (p : Fin d → ℝ) (hp : ∀ a, 0 ≤ p a) :
92    0 ≤ (sectorGibbsWeight Ω mu hweight hraise p).1 :=
93  sectorGibbsOperator_nonneg Ω mu hweight hraise p hp
94 
95theorem sectorGibbsWeight_ne_zero (hΩ : ‖Ω‖ = 1)
96    (p : Fin d → ℝ) (hp : ∀ a, 0 < p a) :
97    sectorGibbsWeight Ω mu hweight hraise p ≠ 0 := by
98  intro he
99  have hop : sectorGibbsOperator Ω mu hweight hraise p = 0 := congrArg Subtype.val he
100  have h := sectorGibbsOperator_highest Ω mu hweight hraise p
101  rw [hop, ContinuousLinearMap.zero_apply] at h
102  have hc : ((∏ a, p a ^ mu a : ℝ) : ℂ) ≠ 0 := by
103    exact_mod_cast (Finset.prod_pos (fun a _ => pow_pos (hp a) _)).ne'
104  have hz : (⟨Ω, highest_mem_cyclicSector Ω⟩ : cyclicSector Ω) = 0 :=
105    (smul_eq_zero.mp h.symm).resolve_left hc
106  have hz' : Ω = 0 := congrArg Subtype.val hz
107  simp [hz'] at hΩ
108 
109/-- The partition function is the actual analytic trace of the positive
110restricted tensor power, expressed as its equal trace norm. -/
111def sectorPartitionFunction (p : Fin d → ℝ) : ℝ :=
112  ‖sectorGibbsWeight Ω mu hweight hraise p‖
113 
114theorem sectorPartitionFunction_pos (hΩ : ‖Ω‖ = 1)
115    (p : Fin d → ℝ) (hp : ∀ a, 0 < p a) :
116    0 < sectorPartitionFunction Ω mu hweight hraise p :=
117  norm_pos_iff.mpr (sectorGibbsWeight_ne_zero Ω mu hweight hraise hΩ p hp)
118 
119theorem trace_sectorGibbsWeight (p : Fin d → ℝ) (hp : ∀ a, 0 ≤ p a) :
120    traceCLM (sectorGibbsWeight Ω mu hweight hraise p) =
121      (sectorPartitionFunction Ω mu hweight hraise p : ℂ) :=
122  trace_eq_traceNorm_of_nonneg (sectorGibbsWeight_nonneg Ω mu hweight hraise p hp) _
123 
124theorem sectorPartitionFunction_eq_linearMapTrace (p : Fin d → ℝ) (hp : ∀ a, 0 ≤ p a) :
125    sectorPartitionFunction Ω mu hweight hraise p =
126      (LinearMap.trace ℂ (cyclicSector Ω)
127        (sectorGibbsOperator Ω mu hweight hraise p).toLinearMap).re := by
128  have h := trace_sectorGibbsWeight Ω mu hweight hraise p hp
129  change trace (sectorGibbsOperator Ω mu hweight hraise p) _ = _ at h
130  rw [trace_eq_linearMap_trace_of_finiteDimensional] at h
131  exact (congrArg Complex.re h).symm
132 
133/-- The real sector density used in mixed-state LAN. -/
134def sectorGibbsState (hΩ : ‖Ω‖ = 1) (p : Fin d → ℝ) (hp : ∀ a, 0 < p a) :
135    DensityState (cyclicSector Ω) where
136  op := (((sectorPartitionFunction Ω mu hweight hraise p)⁻¹ : ℝ) : ℂ) •
137    sectorGibbsOperator Ω mu hweight hraise p
138  positive := by
139    apply (ContinuousLinearMap.nonneg_iff_isPositive _).mpr
140    apply ((ContinuousLinearMap.nonneg_iff_isPositive _).mp
141      (sectorGibbsOperator_nonneg Ω mu hweight hraise p (fun a => (hp a).le))).smul_of_nonneg
142    exact_mod_cast inv_nonneg.mpr (sectorPartitionFunction_pos Ω mu hweight hraise hΩ p hp).le
143  traceClass := isTraceClass_of_finiteDimensional _
144  trace_one := by
145    rw [trace_smul]
146    change (((sectorPartitionFunction Ω mu hweight hraise p)⁻¹ : ℝ) : ℂ) *
147      traceCLM (sectorGibbsWeight Ω mu hweight hraise p) = 1
148    rw [trace_sectorGibbsWeight Ω mu hweight hraise p (fun a => (hp a).le)]
149    exact_mod_cast inv_mul_cancel₀ (sectorPartitionFunction_pos Ω mu hweight hraise hΩ p hp).ne'
150 
151end Cloning.TensorLie