Offline · exact source
Exact Lean source

PCTRankPurificationGeneralEmbedding

formalization/Cloning/PCTRankPurificationGeneralEmbedding.lean

Source hash: 81c4b9f91d5f1f1ec56cc8fd214345e2820282ad8ed58b6dffe129621204b4ea

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.PhysicalFlatGrassmannEmbedding
2 
3/-! Every actual density of rank at most r factors through an r-dimensional
4physical system. The support embedding and the internal state are constructed
5from the density's spectral theorem, including states of smaller rank. -/
6noncomputable section
7open scoped BigOperators Matrix ComplexOrder
8namespace Cloning.PCTRankPurification
9open Cloning.MatrixFidelity Cloning.PCTPhysicalState Cloning.PhysicalFlatGrassmann
10set_option maxHeartbeats 1200000
11set_option backward.isDefEq.respectTransparency false
12 
13/-- Positivity and the literal matrix-rank bound force all ordered
14spectral values past the first r positions to vanish. -/
15theorem orderedEigenvalues_zero_of_rank_le {r k : ℕ}
16    (ρ : State (Fin (r+k))) (hrank : ρ.matrix.rank≤r)
17    (i : Fin (r+k)) (hi : r≤ i.val) : orderedEigenvalues ρ i=0 := by
18  classical
19  by_contra hne
20  have hpos : 0<orderedEigenvalues ρ i :=
21    lt_of_le_of_ne (ρ.positive.eigenvalues_nonneg _) (Ne.symm hne)
22  let f : Fin (r+1) → {j : Fin (r+k) // ρ.positive.isHermitian.eigenvalues j≠0} :=
23    fun a => ⟨orderedIndex (r+k) ⟨a.val,by omega⟩,by
24      have hle : (⟨a.val,by omega⟩ : Fin (r+k))≤ i := by simpa using (show a.val≤ i.val by omega)
25      have hp := hpos.trans_le (orderedEigenvalues_antitone ρ hle)
26      exact ne_of_gt hp⟩
27  have hf : Function.Injective f := by
28    intro a b hab
29    have h := (orderedIndex (r+k)).injective (congrArg Subtype.val hab)
30    exact Fin.ext (congrArg (fun x : Fin (r+k)=>x.val) h)
31  have hc := Fintype.card_le_of_injective f hf
32  rw [Fintype.card_fin,← ρ.positive.isHermitian.rank_eq_card_non_zero_eigs] at hc
33  omega
34 
35/-- Coordinate inclusion of a smaller diagonal matrix is zero on every
36unsupported coordinate. -/
37theorem coordinateInclusion_diagonal (r k : ℕ) (p : Fin r→ℂ) :
38    coordinateInclusion r k * Matrix.diagonal p * (coordinateInclusion r k)ᴴ =
39      Matrix.diagonal (Fin.append p (fun _ : Fin k=>0)) := by
40  classical
41  have hcross (a : Fin r) (b : Fin k) : Fin.castAdd k a≠Fin.natAdd r b := by
42    intro h
43    have hv := congrArg Fin.val h
44    simp only [Fin.val_castAdd,Fin.val_natAdd] at hv
45    omega
46  ext i j
47  induction i using Fin.addCases <;> induction j using Fin.addCases <;>
48    simp [coordinateInclusion,Matrix.mul_apply,Matrix.conjTranspose_apply,
49      Matrix.diagonal_apply,hcross,eq_comm] <;> split_ifs <;> simp_all
50 
51/-- Literal rank at most r, with no support or diagonalization witness in
52the assumptions, yields an isometric density-matrix factorization. -/
53theorem exists_density_isometric_factor (r k : ℕ)
54    (ρ : State (Fin (r+k))) (hrank : ρ.matrix.rank≤r) :
55    ∃ J : Matrix (Fin (r+k)) (Fin r) ℂ, Jᴴ*J=1 ∧
56      ∃σ : State (Fin r),ρ.matrix=J*σ.matrix*Jᴴ := by
57  classical
58  let p : Fin r→ℝ := fun i=>orderedEigenvalues ρ (Fin.castAdd k i)
59  have hp : ∀i,0≤p i := fun i=>ρ.positive.eigenvalues_nonneg _
60  have hz (i : Fin k) : orderedEigenvalues ρ (Fin.natAdd r i)=0 :=
61    orderedEigenvalues_zero_of_rank_le ρ hrank _ (by simp)
62  have hsum : ∑i,p i=1 := by
63    have h := orderedEigenvalues_sum ρ
64    rw [Fin.sum_univ_add] at h
65    simpa only [hz,Finset.sum_const_zero,add_zero,p] using h
66  let σ : State (Fin r) :=
67    ⟨Matrix.diagonal (fun i=>(p i:ℂ)),Matrix.PosSemidef.diagonal (fun i=>by change (0:ℂ)≤(p i:ℂ); exact_mod_cast hp i),by
68      rw [Matrix.trace_diagonal,← Complex.ofReal_sum,hsum,Complex.ofReal_one]⟩
69  let U := orderedUnitary ρ
70  let J := (U : Matrix (Fin (r+k)) (Fin (r+k)) ℂ)*coordinateInclusion r k
71  have hU : (U : Matrix (Fin (r+k)) (Fin (r+k)) ℂ)ᴴ*(U : Matrix (Fin (r+k)) (Fin (r+k)) ℂ)=1 :=
72    Unitary.star_mul_self_of_mem U.property
73  have hJ : Jᴴ*J=1 := by
74    dsimp only [J]
75    rw [Matrix.conjTranspose_mul]
76    calc
77      _=(coordinateInclusion r k)ᴴ*(U.valᴴ*U.val)*coordinateInclusion r k := by simp only [Matrix.mul_assoc]
78      _=1 := by rw [hU,Matrix.mul_one,coordinateInclusion_isometry]
79  refine ⟨J,hJ,σ,?_⟩
80  have he : (fun i=>(orderedEigenvalues ρ i:ℂ))=
81      Fin.append (fun i=>(p i:ℂ)) (fun _ : Fin k=>0) := by
82    funext i
83    induction i using Fin.addCases <;> simp [p,hz]
84  rw [orderedUnitary_diagonalizes,he,← coordinateInclusion_diagonal]
85  simp only [J,σ,U,Matrix.conjTranspose_mul,Matrix.mul_assoc]
86 
87local instance generalEmbedding_neZeroAmbient (r k : ℕ) [NeZero r] : NeZero (r+k) := ⟨by have := NeZero.ne r; omega⟩
88 
89/-- The matrix factorization also identifies the actual physical state. -/
90theorem exists_embedded_density (r k : ℕ) [NeZero r]
91    (ρ : State (Fin (r+k))) (hrank : ρ.matrix.rank≤r) :
92    ∃ J : Matrix (Fin (r+k)) (Fin r) ℂ,∃ hJ : Jᴴ*J=1,
93      ∃σ : State (Fin r),ρ=Cloning.PCTRankAdapted.embeddedState J hJ σ := by
94  obtain ⟨J,hJ,σ,he⟩ := exists_density_isometric_factor r k ρ hrank
95  refine ⟨J,hJ,σ,?_⟩
96  cases ρ
97  cases σ
98  simpa only [Cloning.PCTRankAdapted.embeddedState,State.mk.injEq] using he
99 
100end Cloning.PCTRankPurification