Offline · exact source
Exact Lean source

WernerPhysicalOperator

formalization/Cloning/WernerPhysicalOperator.lean

Source hash: 554c7bba44f7310fa28d010c6b1af943b5b8e3cd962ad98d8afe5dfec001860f

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.GeneralSymmetricProjector
2import Cloning.GeneralSymmetricCounting
3import Cloning.GeneralSymmetricDimension
4import Cloning.WernerDimensionIdentity
5 
6/-! # Exact physical Werner output in arbitrary dimension
7 
8The fixed-slot projector is the computational tensor operator
9`|a⟩⟨a|^⊗n ⊗ I` (with an arbitrary specified set of `n` slots). We compute
10its compression by the actual symmetric projector and derive Werner's
11occupation eigenvalues from the proved fiber-counting identity.
12-/
13noncomputable section
14set_option synthInstance.maxHeartbeats 200000
15set_option maxHeartbeats 1000000
16open scoped BigOperators InnerProductSpace
17 
18namespace Cloning.GeneralSymmetricOccupation
19 
20/-- The tensor projector fixing the letter `a` on the specified input slots. -/
21def fixedSlotProjector {L d : ℕ} (a : Fin d) (S : Finset (Fin L)) :
22    TensorSpace L d →L[ℂ] TensorSpace L d :=
23  ∑ w ∈ Finset.univ.filter (fun w : Word L d => S ⊆ letterSlots w a),
24    InnerProductSpace.rankOne ℂ (lp.single 2 w 1) (lp.single 2 w 1)
25 
26/-- This is exactly the diagonal action of the physical product-input projector. -/
27theorem fixedSlotProjector_apply {L d : ℕ} (a : Fin d) (S : Finset (Fin L))
28    (v : TensorSpace L d) (w : Word L d) :
29    fixedSlotProjector a S v w = if S ⊆ letterSlots w a then v w else 0 := by
30  classical
31  simp only [fixedSlotProjector, ContinuousLinearMap.sum_apply, InnerProductSpace.rankOne_apply,
32    lp.inner_single_left, RCLike.inner_apply, map_one, mul_one,
33    lp.coeFn_sum, Finset.sum_apply, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul,
34    lp.single_apply, Pi.single_apply]
35  by_cases hw : S ⊆ letterSlots w a
36  · rw [if_pos hw, Finset.sum_eq_single w]
37    · simp
38    · intro z hz hn
39      simp [Ne.symm hn]
40    · simp [hw]
41  · rw [if_neg hw]
42    apply Finset.sum_eq_zero
43    intro z hz
44    have hn : w ≠ z := by
45      intro h
46      subst z
47      exact hw (Finset.mem_filter.mp hz).2
48    simp [hn]
49 
50private theorem sum_fixedSlot_column {L d : ℕ} (a : Fin d) (S : Finset (Fin L))
51    (q r : Occupation L d) :
52    (∑ w ∈ fiber r, fixedSlotProjector a S (column q) w) =
53      if r = q then ((accepted q a S).card : ℂ) *
54        (Real.sqrt (multiplicity q : ℝ) : ℂ)⁻¹ else 0 := by
55  classical
56  by_cases hr : r = q
57  · subst r
58    rw [if_pos rfl]
59    calc
60      _ = ∑ w ∈ fiber q, if S ⊆ letterSlots w a then
61          (Real.sqrt (multiplicity q : ℝ) : ℂ)⁻¹ else 0 := by
62        apply Finset.sum_congr rfl
63        intro w hw
64        rw [fixedSlotProjector_apply, column_apply, if_pos ((mem_fiber q w).mp hw)]
65      _ = _ := by rw [← Finset.sum_filter]; simp [accepted]
66  · rw [if_neg hr]
67    apply Finset.sum_eq_zero
68    intro w hw
69    have hn : label w ≠ q := by
70      rw [(mem_fiber r w).mp hw]
71      exact hr
72    rw [fixedSlotProjector_apply, column_apply, if_neg hn]
73    split_ifs <;> rfl
74 
75/-- Compressing a physical pure product input is diagonal in the full
76occupation basis; the eigenvalue is the exact accepted-fiber proportion. -/
77theorem compression_column {L d : ℕ} (a : Fin d) (S : Finset (Fin L))
78    (q : Occupation L d) :
79    projector L d (fixedSlotProjector a S (column q)) =
80      ((((accepted q a S).card : ℝ) / multiplicity q : ℝ) : ℂ) • column q := by
81  classical
82  ext w
83  rw [projector_coefficient]
84  change (multiplicity (label w) : ℂ)⁻¹ *
85      (∑ z ∈ fiber (label w), fixedSlotProjector a S (column q) z) = _
86  rw [sum_fixedSlot_column]
87  simp only [lp.coeFn_smul, Pi.smul_apply, smul_eq_mul, column_apply]
88  by_cases hw : label w = q
89  · rw [if_pos hw, if_pos hw, hw]
90    push_cast
91    ring
92  · rw [if_neg hw, if_neg hw]
93    simp
94 
95/-- The fixed-slot compression eigenvalue is the binomial ratio derived from
96computational tensor counting. -/
97theorem compression_column_binomial {L d : ℕ} (a : Fin d) (S : Finset (Fin L))
98    (q : Occupation L d) :
99    projector L d (fixedSlotProjector a S (column q)) =
100      ((((q.val a).choose S.card : ℝ) / L.choose S.card : ℝ) : ℂ) • column q := by
101  rw [compression_column, accepted_proportion]
102 
103/-- Actual symmetric compression equals the proved diagonal resolution. -/
104theorem compressed_operator_eq_sum {L d : ℕ} (a : Fin d) (S : Finset (Fin L)) :
105    projector L d * fixedSlotProjector a S * projector L d =
106      ∑ q : Occupation L d,
107        ((((q.val a).choose S.card : ℝ) / L.choose S.card : ℝ) : ℂ) •
108          InnerProductSpace.rankOne ℂ (column q) (column q) := by
109  apply ContinuousLinearMap.ext
110  intro v
111  change projector L d (fixedSlotProjector a S (projector L d v)) = _
112  rw [show projector L d v = ∑ q : Occupation L d, ⟪column q, v⟫_ℂ • column q
113    from projector_apply v]
114  simp only [map_sum, map_smul, compression_column_binomial,
115    ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply, InnerProductSpace.rankOne_apply]
116  apply Finset.sum_congr rfl
117  intro q hq
118  rw [smul_smul, smul_smul, mul_comm]
119 
120/-- Werner's formula on the physical tensor space, at a pure product input.
121The prefactor is the ratio of actual constructed symmetric-space dimensions. -/
122def wernerOutputOperator {L s : ℕ} (a : Fin (s + 1)) (S : Finset (Fin L)) :
123    TensorSpace L (s + 1) →L[ℂ] TensorSpace L (s + 1) :=
124  (((Fintype.card (Occupation S.card (s + 1)) : ℝ) /
125    Fintype.card (Occupation L (s + 1)) : ℝ) : ℂ) •
126      (projector L (s + 1) * fixedSlotProjector a S * projector L (s + 1))
127 
128/-- Exact arbitrary-dimensional physical Werner eigenvalues, including zero
129eigenvalues beyond the input-compatible occupation support. -/
130theorem wernerOutputOperator_column {L s : ℕ} (a : Fin (s + 1))
131    (S : Finset (Fin L)) (q : Occupation L (s + 1)) :
132    wernerOutputOperator a S (column q) =
133      ((((q.val a).choose S.card : ℝ) / (L + s).choose (S.card + s) : ℝ) : ℂ) • column q := by
134  have hSL : S.card ≤ L := by simpa using Finset.card_le_univ S
135  simp only [wernerOutputOperator, ContinuousLinearMap.smul_apply, ContinuousLinearMap.mul_apply,
136    projector_eq_self (column_mem_symmetric q), compression_column_binomial, smul_smul,
137    occupation_card]
138  rw [← Complex.ofReal_mul, Cloning.Occupation.werner_dimension_identity _ _ _ _ hSL]
139 
140/-- Operator-level equality of the original symmetric-projection formula
141and its occupation spectral decomposition. -/
142theorem wernerOutputOperator_eq_sum {L s : ℕ} (a : Fin (s + 1))
143    (S : Finset (Fin L)) :
144    wernerOutputOperator a S =
145      ∑ q : Occupation L (s + 1),
146        ((((q.val a).choose S.card : ℝ) / (L + s).choose (S.card + s) : ℝ) : ℂ) •
147          InnerProductSpace.rankOne ℂ (column q) (column q) := by
148  have hSL : S.card ≤ L := by simpa using Finset.card_le_univ S
149  rw [wernerOutputOperator, compressed_operator_eq_sum, Finset.smul_sum]
150  apply Finset.sum_congr rfl
151  intro q hq
152  rw [smul_smul, occupation_card, occupation_card, ← Complex.ofReal_mul,
153    Cloning.Occupation.werner_dimension_identity _ _ _ _ hSL]
154 
155end Cloning.GeneralSymmetricOccupation