Offline · exact source
Exact Lean source

PCTLocalChartAlgebra

formalization/Cloning/PCTLocalChartAlgebra.lean

Source hash: c37ede33f0cf1f2767978e9103701926d9b65d5b976071813f66060990b79c13

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.PCTTangentNormalization
2import Mathlib.Analysis.Normed.Algebra.MatrixExponential
3import Mathlib.Analysis.SpecialFunctions.Exponential
4import Mathlib.Analysis.Calculus.InverseFunctionTheorem.FDeriv
5import Mathlib.Topology.Algebra.Module.FiniteDimension
6 
7/-! A literal exponential chart around a simple-spectrum state. Hermitian
8tangent matrices are used as coordinates, making the derivative the identity.
9The usual diagonal and orbital coordinates are recovered by linear extraction. -/
10noncomputable section
11open scoped Matrix ComplexOrder Matrix.Norms.L2Operator InnerProductSpace Topology BigOperators
12open Matrix NormedSpace
13namespace Cloning.PCTLocalChart
14set_option backward.isDefEq.respectTransparency false
15set_option maxHeartbeats 1000000
16variable {A : Type*} [Fintype A] [DecidableEq A]
17 
18abbrev Hermitian (A : Type*) [Fintype A] [DecidableEq A] := selfAdjoint (Matrix A A ℂ)
19 
20def base (p : A → ℝ) : Matrix A A ℂ := Matrix.diagonal (fun a => (p a : ℂ))
21 
22def diagonalPart : Matrix A A ℂ →ₗ[ℝ] Matrix A A ℂ where
23  toFun H := Matrix.diagonal (fun a => H a a)
24  map_add' H K := by ext a b; by_cases hab : a = b <;> simp [Matrix.diagonal_apply, hab]
25  map_smul' r H := by ext a b; by_cases hab : a = b <;> simp [Matrix.diagonal_apply, hab]
26 
27/-- The skew generator dividing every off-diagonal tangent entry by its
28fixed spectral gap. -/
29def generator (p : A → ℝ) : Matrix A A ℂ →ₗ[ℝ] Matrix A A ℂ where
30  toFun H := fun a b => if a = b then 0 else H a b / ((p b - p a : ℝ) : ℂ)
31  map_add' H K := by
32    ext a b
33    by_cases h : a = b <;> simp [h, add_div]
34  map_smul' r H := by
35    ext a b
36    by_cases h : a = b <;> simp [h, Complex.real_smul, mul_div_assoc]
37 
38@[simp] lemma generator_apply (p : A → ℝ) (H : Matrix A A ℂ) (a b : A) :
39    generator p H a b = if a = b then 0 else H a b / ((p b - p a : ℝ) : ℂ) := rfl
40 
41@[simp] lemma generator_diagonal (p : A → ℝ) (H : Matrix A A ℂ) (a : A) :
42    generator p H a a = 0 := by simp
43 
44lemma generator_skew (p : A → ℝ) (H : Hermitian A) :
45    (generator p H)ᴴ = -generator p H := by
46  have hh : (H : Matrix A A ℂ)ᴴ = H := H.2
47  ext a b
48  have hh' := congrArg (fun M : Matrix A A ℂ => M a b) hh
49  simp only [Matrix.conjTranspose_apply] at hh'
50  by_cases hab : a = b
51  · subst b
52    simp
53  · have hba := Ne.symm hab
54    simp only [Matrix.conjTranspose_apply, generator_apply, if_neg hab, if_neg hba,
55      Matrix.neg_apply, star_div₀, Complex.star_def, Complex.conj_ofReal, hh']
56    rw [show ((p a - p b : ℝ) : ℂ) = -((p b - p a : ℝ) : ℂ) by push_cast; ring]
57    rw [div_neg]
58 
59/-- The commutator is exactly the off-diagonal part of the input tangent. -/
60theorem generator_commutator (p : A → ℝ) (hp : Function.Injective p) (H : Matrix A A ℂ) :
61    diagonalPart H + generator p H * base p - base p * generator p H = H := by
62  ext a b
63  simp only [Matrix.add_apply, Matrix.sub_apply, base, Matrix.mul_diagonal,
64    Matrix.diagonal_mul, diagonalPart, LinearMap.coe_mk, AddHom.coe_mk]
65  by_cases hab : a = b
66  · subst b
67    simp
68  · have hgap : ((p b - p a : ℝ) : ℂ) ≠ 0 := by
69      exact_mod_cast sub_ne_zero.mpr (fun h => hab (hp h).symm)
70    simp only [Matrix.diagonal_apply_ne _ hab, generator_apply, if_neg hab]
71    push_cast at hgap ⊢
72    field_simp [hgap]
73    <;> ring
74 
75lemma base_hermitian (p : A → ℝ) : (base p).IsHermitian := by
76  rw [base, Matrix.isHermitian_diagonal_iff]
77  intro a
78  change star (p a : ℂ) = (p a : ℂ)
79  simp
80 
81lemma diagonalPart_hermitian (H : Hermitian A) : (diagonalPart (H : Matrix A A ℂ)).IsHermitian := by
82  have hh : (H : Matrix A A ℂ)ᴴ = H := H.2
83  change (Matrix.diagonal (fun a => (H : Matrix A A ℂ) a a)).IsHermitian
84  rw [Matrix.isHermitian_diagonal_iff]
85  intro a
86  have ha := congrArg (fun M : Matrix A A ℂ => M a a) hh
87  exact ha
88 
89/-- The actual raw matrix chart, formed by matrix exponentials. -/
90def rawChart (p : A → ℝ) (H : Hermitian A) : Matrix A A ℂ :=
91  NormedSpace.exp (generator p H) * (base p + diagonalPart H) *
92    NormedSpace.exp (-generator p H) - base p
93 
94lemma rawChart_hermitian (p : A → ℝ) (H : Hermitian A) : (rawChart p H).IsHermitian := by
95  change (rawChart p H)ᴴ = rawChart p H
96  have he : (NormedSpace.exp (generator p H))ᴴ = NormedSpace.exp (-generator p H) := by
97    rw [← Matrix.exp_conjTranspose, generator_skew]
98  have he' : (NormedSpace.exp (-generator p H))ᴴ = NormedSpace.exp (generator p H) := by
99    rw [← Matrix.exp_conjTranspose, Matrix.conjTranspose_neg, generator_skew, neg_neg]
100  simp only [rawChart, Matrix.conjTranspose_sub, Matrix.conjTranspose_mul,
101    Matrix.conjTranspose_add, he, he', (base_hermitian p).eq,
102    (diagonalPart_hermitian H).eq, mul_assoc]
103 
104/-- The chart as a map of real Hermitian Banach spaces. -/
105def chart (p : A → ℝ) (H : Hermitian A) : Hermitian A :=
106  ⟨rawChart p H, rawChart_hermitian p H⟩
107 
108@[simp] lemma chart_coe (p : A → ℝ) (H : Hermitian A) :
109    (chart p H : Matrix A A ℂ) = rawChart p H := rfl
110 
111@[simp] lemma chart_zero (p : A → ℝ) : chart p 0 = 0 := by
112  apply Subtype.ext
113  simp [rawChart, chart, map_zero]
114 
115/-- The true chart eigenvalues are the base spectrum plus the tangent diagonal. -/
116theorem chart_trace (p : A → ℝ) (H : Hermitian A) :
117    Matrix.trace (chart p H : Matrix A A ℂ) = Matrix.trace (H : Matrix A A ℂ) := by
118  change Matrix.trace (_ - base p) = _
119  rw [Matrix.trace_sub, Matrix.trace_mul_cycle]
120  rw [← Matrix.exp_add_of_commute _ _ (Commute.refl (generator p H)).neg_left, neg_add_cancel,
121    exp_zero, one_mul, Matrix.trace_add]
122  simp [diagonalPart, Matrix.trace]
123 
124end Cloning.PCTLocalChart