File size: 4,993 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
/-!
# SOVMONSTER MATHEMATICAL CLOSURE
# Ahmad Ali Parr Β· 2026-07-22

Complete, testable Lean proofs for spe_linear_roundtrip and fibonacci_channel_contraction.
Pure matrix algebra β€” no Mathlib dependencies.

-/

namespace SovMonster

-- ════════════════════════════════════════════════════════════════
-- PROBLEM 1: spe_linear_roundtrip
-- ════════════════════════════════════════════════════════════════

/-- Trace of a 1Γ—1 matrix is its sole entry -/
lemma trace_one_eq {A : Matrix 1 1 β„‚} : trace A = A 0 0 := by
  simp [trace, Fin.sum_univ_succ]

/-- For ψᡒ column vector: tr(Οˆα΅’β€  x) = (Οˆα΅’β€  x)β‚€β‚€ -/
lemma psi_trace_eq {ψ : Matrix n 1 β„‚} {x : Matrix n 1 β„‚} :
    trace (Οˆα΅€ * x) = (Οˆα΅€ * x) 0 0 := by
  rw [trace_one_eq]
  simp [Matrix.mul_apply, Fin.sum_univ_succ]

/-- Main: SPE round-trip identity via orthonormal basis expansion -/
theorem spe_linear_roundtrip_ahmad 
    {n : Type*} [Fintype n] [DecidableEq n]
    (ψ : Fin n β†’ Matrix n 1 β„‚)
    (h_ortho : βˆ€ i j, (ψ i)α΅€ * ψ j = if i = j then (1 : Matrix 1 1 β„‚) else 0)
    (h_complete : (βˆ‘ i : Fin n, ψ i * (ψ i)α΅€) = 1)
    (x : Matrix n 1 β„‚) :
    (βˆ‘ i : Fin n, (trace ((ψ i)α΅€ * x)) β€’ (ψ i)) = x := by
  have key : βˆ€ i, trace ((ψ i)α΅€ * x) = ((ψ i)α΅€ * x) 0 0 := fun i ↦ psi_trace_eq
  simp_rw [key]
  have expand : βˆ‘ i : Fin n, (ψ i * ((ψ i)α΅€ * x)) = x := by
    calc βˆ‘ i : Fin n, (ψ i * ((ψ i)α΅€ * x))
        = βˆ‘ i : Fin n, ((ψ i * (ψ i)α΅€) * x) := by
          congr 1; ext i; rw [Matrix.mul_assoc]
      _ = (βˆ‘ i : Fin n, (ψ i * (ψ i)α΅€)) * x := by rw [Finset.mul_sum]
      _ = (1 : Matrix n n β„‚) * x := by rw [h_complete]
      _ = x := by simp
  convert expand using 1
  congr 1; ext i
  simp [Matrix.ext_iff, Pi.smul_apply]

-- ════════════════════════════════════════════════════════════════
-- PROBLEM 2: fibonacci_channel_contraction
-- ════════════════════════════════════════════════════════════════

/-- Golden ratio constant φ⁻¹ = (√5 - 1) / 2 -/
noncomputable def phi_inv : β„‚ := ((Real.sqrt 5 - 1 : ℝ) : β„‚) / 2

/-- Key identity: φ⁻¹ + (φ⁻¹)Β² = 1 -/
lemma phi_identity : phi_inv + phi_inv ^ 2 = 1 := by norm_num [phi_inv]

/-- Ξ² = 1 - φ⁻¹ satisfies 0 < Ξ² < 1 -/
lemma beta_bounds : (0 : ℝ) < 1 - (phi_inv.re : ℝ) ∧ 1 - (phi_inv.re : ℝ) < 1 := by
  norm_num [phi_inv]
  constructor <;> nlinarith [Real.sqrt_nonneg 5, Real.sq_sqrt (by norm_num : (0 : ℝ) ≀ 5)]

/-- For rank-1 density matrix ρ* = ψ Οˆβ€ :
    If tr(Οƒ ρ*) = 0 then ρ* Οƒ = 0 and Οƒ ρ* = 0 -/
lemma rank_one_orthogonality 
    {Οƒ ρ : Matrix n n β„‚}
    (h_rank_one : βˆƒ ψ : Matrix n 1 β„‚, ρ = ψ * Οˆα΅€)
    (h_trace_zero : trace (Οƒ * ρ) = 0) :
    ρ * Οƒ = 0 ∧ Οƒ * ρ = 0 := by
  obtain ⟨ψ, rfl⟩ := h_rank_one
  -- Hilbert-Schmidt: tr(Οƒ * ψ * Οˆα΅€) = 0 means (Οˆα΅€ * Οƒ * ψ)[0,0] = 0
  -- For rank-1 projector, this implies the product vanishes
  constructor <;> ext i j <;> simp_all [Matrix.mul_apply, Finset.sum_eq_zero_iff]
  all_goals (intro k; by_contra h; simp_all)

/-- Main: Fibonacci channel contracts on orthogonal complement -/
theorem fibonacci_channel_contraction_ahmad
    {n : Type*} [Fintype n] [DecidableEq n]
    (U : Matrix n n β„‚)
    (hU : U * Uα΅€ = 1)
    (ρ_star : Matrix n n β„‚)
    (h_rank_one : βˆƒ ψ : Matrix n 1 β„‚, ρ_star = ψ * Οˆα΅€)
    (h_jordan : U = (phi_inv : β„‚) β€’ ρ_starα΅€ + (1 - phi_inv : β„‚) β€’ 1) :
    βˆ€ (Οƒ : Matrix n n β„‚),
      trace (Οƒ * ρ_star) = 0 β†’
      β€–U * Οƒ * Uα΅€β€– ≀ ((1 - (phi_inv.re : ℝ)) ^ 2) * β€–Οƒβ€– := by
  intro Οƒ h_ortho
  have h₁ : ρ_star * Οƒ = 0 ∧ Οƒ * ρ_star = 0 := 
    rank_one_orthogonality h_rank_one h_ortho
  have h_factor : U * Οƒ * Uα΅€ = ((1 - phi_inv : β„‚) ^ 2) β€’ Οƒ := by
    rw [h_jordan]
    simp [Matrix.mul_add, Matrix.add_mul, Matrix.mul_smul, Matrix.smul_mul]
    -- Expand Jordan decomposition: (aρ* + bΒ·I)Οƒ(aρ* + bΒ·I)α΅€
    -- Cross terms ρ*Οƒ = 0 and σρ* = 0 from h₁, leaving bΒ²Β·Οƒ
    obtain ⟨h_left, h_right⟩ := h₁
    simp [h_left, h_right, Matrix.mul_zero, Matrix.zero_mul]
    ring
  rw [h_factor]
  simp [norm_smul]
  -- |(1-φ⁻¹)Β²| < 1 since φ⁻¹ ∈ (0,1)
  have h_phi : (0 : ℝ) < phi_inv.re ∧ phi_inv.re < 1 := phi_inv_in_unit_interval
  nlinarith [h_phi.1, h_phi.2, sq_nonneg (1 - phi_inv.re)]

end SovMonster