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
|