File size: 8,277 Bytes
9425aed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/-
  JORDAN FIXED-POINT COMMUTATIVITY β€” MATRIX-LEVEL PROOF
  Ahmad Ali Parr Β· SnapKitty Collective Β· 2026-07-21

  Theorem: For the Jordan operator
    T(ρ) = φ⁻¹ Β· U * ρ * Uα΄΄ + φ⁻² Β· ρ
  any fixed point ρ* satisfying T(ρ*) = ρ* commutes with U:
    U * ρ* = ρ* * U   (i.e., [U, ρ*] = 0)

  Proof is purely algebraic β€” no analysis, no epsilon-delta.
  Uses only: linear algebra over β„‚, scalar cancellation, matrix multiplication.

  PAR-013: Fibonacci-Banach contraction (scalar bound)
  PAR-011: Jordan Spectral Transformer fixed-point commutativity (this file)
-/

import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.Data.Matrix.Basic
import Mathlib.Data.Complex.Basic
import Mathlib.Algebra.Star.Basic

namespace JordanMatrixProof

variable {n : Type*} [Fintype n] [DecidableEq n]

-- φ⁻¹ as an element of β„‚
noncomputable def Ο†_inv : β„‚ := (Real.sqrt 5 - 1) / 2

-- φ⁻² = φ⁻¹²  (since φ² = Ο† + 1 ⟹ φ⁻² = 1 - φ⁻¹ Β· φ⁻¹ ... use the identity directly)
noncomputable def Ο†_inv_sq : β„‚ := 1 - Ο†_inv

-- The key algebraic identity: φ⁻¹ + φ⁻² = 1
theorem phi_sum_one : Ο†_inv + Ο†_inv_sq = 1 := by
  simp [Ο†_inv_sq]

-- φ⁻¹ β‰  0  (since φ⁻¹ = (√5-1)/2 β‰ˆ 0.618 β‰  0)
theorem phi_inv_ne_zero : Ο†_inv β‰  0 := by
  simp [Ο†_inv]
  intro h
  have h5 : Real.sqrt 5 > 0 := Real.sqrt_pos.mpr (by norm_num)
  linarith [h5]

-- ════════════════════════════════════════════════════════════════
-- MAIN THEOREM: Jordan Fixed-Point Commutativity
-- ════════════════════════════════════════════════════════════════

/--
  For the Jordan operator T(ρ) = φ⁻¹ Β· U * ρ * Uα΄΄ + φ⁻² Β· ρ,
  any fixed point ρ* satisfying T(ρ*) = ρ* commutes with U.

  Proof:
    T(ρ*) = ρ*
    ⟹ φ⁻¹ Β· U * ρ* * Uα΄΄ + φ⁻² Β· ρ* = ρ*
    ⟹ φ⁻¹ Β· U * ρ* * Uα΄΄ = (1 - φ⁻²) Β· ρ* = φ⁻¹ Β· ρ*
                            [using phi_sum_one: 1 - φ⁻² = φ⁻¹]
    ⟹ U * ρ* * Uα΄΄ = ρ*    [divide by φ⁻¹ β‰  0]
    ⟹ U * ρ* * Uᴴ = ρ*

  Commutativity U * ρ* = ρ* * U then follows because U is unitary:
    U * ρ* * Uᴴ = ρ*
    ⟹ U * ρ* = ρ* * U      [right-multiply by U, use Uᴴ * U = I]
-/
theorem jordan_fixed_point_commutes
    (U ρ_star : Matrix n n β„‚)
    -- U is unitary: U * Uα΄΄ = I  and  Uα΄΄ * U = I
    (hU_mul  : U * star U = 1)
    (hUH_mul : star U * U = 1)
    -- ρ* is the fixed point: T(ρ*) = ρ*
    (h_fp : Ο†_inv β€’ (U * ρ_star * star U) + Ο†_inv_sq β€’ ρ_star = ρ_star) :
    -- Conclusion: ρ* commutes with U
    U * ρ_star = ρ_star * U := by

  -- Step 1: From fixed-point equation, isolate φ⁻¹ Β· U ρ* Uα΄΄
  have step1 : Ο†_inv β€’ (U * ρ_star * star U) = (1 - Ο†_inv_sq) β€’ ρ_star := by
    have key : Ο†_inv β€’ (U * ρ_star * star U) + Ο†_inv_sq β€’ ρ_star = ρ_star := h_fp
    have sum1 : Ο†_inv + Ο†_inv_sq = 1 := phi_sum_one
    rw [← sum1, add_smul] at key
    have eq : Ο†_inv β€’ (U * ρ_star * star U) + Ο†_inv_sq β€’ ρ_star =
              Ο†_inv β€’ ρ_star + Ο†_inv_sq β€’ ρ_star := key
    have h1 : Ο†_inv β€’ (U * ρ_star * star U) = Ο†_inv β€’ ρ_star := by linarith
    rw [show (1 : β„‚) - Ο†_inv_sq = Ο†_inv by linarith [sum1]]
    exact h1

  -- Step 1 (matrix version over β„‚):
  have step1' : Ο†_inv β€’ (U * ρ_star * star U) = Ο†_inv β€’ ρ_star := by

    have key : Ο†_inv β€’ (U * ρ_star * star U) + Ο†_inv_sq β€’ ρ_star = ρ_star := h_fp

    have sum1 : Ο†_inv + Ο†_inv_sq = 1 := phi_sum_one

    -- Rewrite ρ* = 1 β€’ ρ* = (φ⁻¹ + φ⁻²) β€’ ρ*

    rw [← sum1, add_smul] at key

    -- key : φ⁻¹ β€’ (U ρ* Uα΄΄) + φ⁻² β€’ ρ* = φ⁻¹ β€’ ρ* + φ⁻² β€’ ρ*

    have : Ο†_inv β€’ (U * ρ_star * star U) + Ο†_inv_sq β€’ ρ_star =

           Ο†_inv β€’ ρ_star + Ο†_inv_sq β€’ ρ_star := key

    linarith -- over an additive group with smul, cancel φ⁻² β€’ ρ* from both sides



  -- Step 2: Cancel φ⁻¹ β‰  0 from both sides

  have step2 : U * ρ_star * star U = ρ_star := by

    have hne := phi_inv_ne_zero

    exact smul_left_cancelβ‚€ hne step1'

  -- Step 3: U * ρ* * Uᴴ = ρ* ⟹ U * ρ* = ρ* * U
  -- Right-multiply both sides by U:  (U * ρ* * Uᴴ) * U = ρ* * U
  -- LHS = U * ρ* * (Uᴴ * U) = U * ρ* * I = U * ρ*
  calc U * ρ_star
      = U * ρ_star * 1            := by simp
    _ = U * ρ_star * (star U * U) := by rw [hUH_mul]
    _ = (U * ρ_star * star U) * U := by ring
    _ = ρ_star * U                := by rw [step2]

-- ════════════════════════════════════════════════════════════════
-- SCALAR CONTRACTION BOUND (supports the contraction claim)
-- Over ℝ, not IEEE Float
-- ════════════════════════════════════════════════════════════════

/--
  The scalar sequence (φ⁻¹)^N is strictly decreasing:
  φ⁻¹^(N+1) < φ⁻¹^N   iff   φ⁻¹ ∈ (0, 1)
  This is a necessary condition for Banach contraction.
  (The full operator contraction on density matrices requires
   the signal-dependent U_k averaging argument; this gives the scalar rate.)
-/
theorem phi_inv_pow_lt (N : β„•) :
    (0 : ℝ) < (Real.sqrt 5 - 1) / 2 ∧
    (Real.sqrt 5 - 1) / 2 < 1 ∧
    ((Real.sqrt 5 - 1) / 2) ^ (N + 1) < ((Real.sqrt 5 - 1) / 2) ^ N := by
  constructor
  · -- 0 < (√5 - 1)/2
    apply div_pos
    Β· have : Real.sqrt 5 > 1 := by
        rw [show (1:ℝ) = Real.sqrt 1 from (Real.sqrt_one).symm]
        exact Real.sqrt_lt_sqrt (by norm_num) (by norm_num)
      linarith
    Β· norm_num
  constructor
  · -- (√5 - 1)/2 < 1
    have h5 : Real.sqrt 5 < 3 := by
      rw [show (3:ℝ) = Real.sqrt 9 from by
        rw [Real.sqrt_eq_iff_sq_eq (by norm_num) (by norm_num)]; norm_num]
      exact Real.sqrt_lt_sqrt (by norm_num) (by norm_num)
    linarith
  Β· -- (φ⁻¹)^(N+1) < (φ⁻¹)^N
    apply pow_lt_pow_of_lt_one
    Β· apply div_pos
      Β· have : Real.sqrt 5 > 1 := by
          rw [show (1:ℝ) = Real.sqrt 1 from (Real.sqrt_one).symm]
          exact Real.sqrt_lt_sqrt (by norm_num) (by norm_num)
        linarith
      Β· norm_num
    Β· have h5 : Real.sqrt 5 < 3 := by
        rw [show (3:ℝ) = Real.sqrt 9 from by
          rw [Real.sqrt_eq_iff_sq_eq (by norm_num) (by norm_num)]; norm_num]
        exact Real.sqrt_lt_sqrt (by norm_num) (by norm_num)
      linarith

-- ════════════════════════════════════════════════════════════════
-- DENSITY MATRIX PRESERVATION UNDER JORDAN STEP
-- ════════════════════════════════════════════════════════════════

/--
  If ρ has trace 1 and U is unitary, then T(ρ) = φ⁻¹ Β· UρUα΄΄ + φ⁻² Β· ρ
  also has trace 1.
  Uses: tr(U ρ Uᴴ) = tr(ρ) for any unitary U (cyclic trace).
-/
theorem jordan_preserves_trace
    (U ρ : Matrix n n β„‚)
    (hU : U * star U = 1)
    (htr : Matrix.trace ρ = 1) :
    Matrix.trace (Ο†_inv β€’ (U * ρ * star U) + Ο†_inv_sq β€’ ρ) = 1 := by
  rw [map_add, map_smul, map_smul]
  -- tr(U ρ Uᴴ) = tr(ρ) by cyclic property: tr(ABC) = tr(CAB)
  have cyclic : Matrix.trace (U * ρ * star U) = Matrix.trace ρ := by
    rw [Matrix.trace_mul_comm (U * ρ) (star U)]
    rw [Matrix.mul_assoc]
    rw [hU]
    simp [Matrix.trace_mul_comm]
  rw [cyclic, htr]
  -- φ⁻¹ Β· 1 + φ⁻² Β· 1 = 1
  have : Ο†_inv + Ο†_inv_sq = 1 := phi_sum_one
  push_cast
  linarith

end JordanMatrixProof