sov-kernel-monster / lean /JordanMatrixProof.lean
SNAPKITTYWEST's picture
chore: push full sov-kernel-monster content from local build
9425aed verified
Raw
History Blame Contribute Delete
8.28 kB
/-
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