Offline · exact source
Exact Lean source

MatrixLiftedTrimming

formalization/Cloning/MatrixLiftedTrimming.lean

Source hash: 0ce1de72bb787213f52fe075ba4933c030dc77648574483785812129ff98d2dc

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.MatrixLiftedChannel
2import Cloning.MatrixFidelityDeletion
3import Cloning.MatrixFidelityAsymptotics
4 
5/-!
6# Removing individual sector transitions from actual matrix outputs
7 
8The mask acts on pairs of input and output sectors. Contributions with the
9same output sector may overlap: positivity of the discarded sum, rather than
10orthogonality of its summands, proves the needed matrix domination.
11-/
12 
13noncomputable section
14open scoped BigOperators Matrix MatrixOrder ComplexOrder Kronecker
15open Matrix
16open Cloning.Channels Cloning.MatrixFidelity Cloning.MatrixLiftedChannel
17 
18namespace Cloning.MatrixLiftedTrimming
19 
20set_option backward.isDefEq.respectTransparency false
21 
22variable {μ ν : Type*}
23 
24/-- Retained joint weights for a predicate on input/output sector pairs. -/
25def keptJoint (joint : μ → ν → ℝ) (keep : μ → ν → Prop) (i : μ) (j : ν) : ℝ := by
26  classical
27  exact if keep i j then joint i j else 0
28 
29/-- Discarded joint weights for the same predicate. -/
30def discardedJoint (joint : μ → ν → ℝ) (keep : μ → ν → Prop) (i : μ) (j : ν) : ℝ := by
31  classical
32  exact if keep i j then 0 else joint i j
33 
34theorem keptJoint_nonneg {joint : μ → ν → ℝ} (hjoint : ∀ i j, 0 ≤ joint i j)
35    (keep : μ → ν → Prop) : ∀ i j, 0 ≤ keptJoint joint keep i j := by
36  classical
37  intro i j
38  by_cases h : keep i j <;> simp [keptJoint, h, hjoint i j]
39 
40theorem discardedJoint_nonneg {joint : μ → ν → ℝ} (hjoint : ∀ i j, 0 ≤ joint i j)
41    (keep : μ → ν → Prop) : ∀ i j, 0 ≤ discardedJoint joint keep i j := by
42  classical
43  intro i j
44  by_cases h : keep i j <;> simp [discardedJoint, h, hjoint i j]
45 
46theorem keptJoint_le {joint : μ → ν → ℝ} (hjoint : ∀ i j, 0 ≤ joint i j)
47    (keep : μ → ν → Prop) (i : μ) (j : ν) : keptJoint joint keep i j ≤ joint i j := by
48  classical
49  by_cases h : keep i j <;> simp [keptJoint, h, hjoint i j]
50 
51theorem joint_sub_kept (joint : μ → ν → ℝ) (keep : μ → ν → Prop) (i : μ) (j : ν) :
52    joint i j - keptJoint joint keep i j = discardedJoint joint keep i j := by
53  classical
54  by_cases h : keep i j <;> simp [keptJoint, discardedJoint, h]
55 
56variable [Fintype μ]
57variable {α : μ → Type*} {β : ν → Type*}
58variable [∀ i, Fintype (α i)] [∀ j, Fintype (β j)]
59 
60/-- The difference of full and retained outputs is exactly the discarded
61positive sum, even if distinct transitions share one output sector. -/
62theorem transitionOutput_sub_kept
63    (Φ : ∀ i j, MatrixChannel (α i) (β j)) (ρ : ∀ i, State (α i))
64    (joint : μ → ν → ℝ) (keep : μ → ν → Prop) (j : ν) :
65    transitionOutput Φ ρ joint j - transitionOutput Φ ρ (keptJoint joint keep) j =
66      transitionOutput Φ ρ (discardedJoint joint keep) j := by
67  unfold transitionOutput
68  rw [← Finset.sum_sub_distrib]
69  apply Finset.sum_congr rfl
70  intro i _
71  rw [← sub_smul, joint_sub_kept]
72 
73theorem transitionOutput_sub_kept_posSemidef
74    (Φ : ∀ i j, MatrixChannel (α i) (β j)) (ρ : ∀ i, State (α i))
75    {joint : μ → ν → ℝ} (hjoint : ∀ i j, 0 ≤ joint i j)
76    (keep : μ → ν → Prop) (j : ν) :
77    (transitionOutput Φ ρ joint j - transitionOutput Φ ρ (keptJoint joint keep) j).PosSemidef := by
78  rw [transitionOutput_sub_kept]
79  exact transitionOutput_posSemidef Φ ρ (discardedJoint_nonneg hjoint keep) j
80 
81/-- The quantum mass discarded within one output sector equals the classical
82mass of the deleted input/output pairs. -/
83theorem transitionOutput_trace_difference
84    (Φ : ∀ i j, MatrixChannel (α i) (β j)) (ρ : ∀ i, State (α i))
85    (joint : μ → ν → ℝ) (keep : μ → ν → Prop) (j : ν) :
86    (transitionOutput Φ ρ joint j).trace.re -
87      (transitionOutput Φ ρ (keptJoint joint keep) j).trace.re =
88        ∑ i, discardedJoint joint keep i j := by
89  have h := congrArg (fun M : Matrix (β j) (β j) ℂ => M.trace.re)
90    (transitionOutput_sub_kept Φ ρ joint keep j)
91  simpa only [Matrix.trace_sub, Complex.sub_re, transitionOutput_trace_re] using h
92 
93variable [Fintype ν] [DecidableEq ν]
94variable {κ : ν → Type*} [∀ j, Fintype (κ j)]
95variable [∀ j, DecidableEq (β j)] [∀ j, DecidableEq (κ j)]
96 
97/-- Concrete retained-transition estimate: deleting joint mass `δ` changes
98the lifted fidelity by at most `√δ`, with canonical retained block states.
99The positive-domination premise is proved from the actual masked channel sum. -/
100theorem lifted_transition_trimming
101    (Φ : ∀ i j, MatrixChannel (α i) (β j))
102    (ρ : ∀ i, State (α i)) (σ : ∀ j, State (β j)) (τ : ∀ j, State (κ j))
103    {joint : μ → ν → ℝ} (hjoint : ∀ i j, 0 ≤ joint i j)
104    (keep : μ → ν → Prop) (p : ν → ℝ) (hp : ∀ j, 0 ≤ p j) (hpsum : ∑ j, p j = 1) :
105    |fidelity (liftedOutput Φ ρ τ joint)
106        (Matrix.blockDiagonal' (fun j => (p j • (σ j).matrix) ⊗ₖ (τ j).matrix)) -
107      ∑ j, Real.sqrt (∑ i, keptJoint joint keep i j) * Real.sqrt (p j) *
108        fidelity (normalizedBlock (transitionOutput Φ ρ (keptJoint joint keep) j))
109          (σ j).matrix| ≤ Real.sqrt (∑ j, ∑ i, discardedJoint joint keep i j) := by
110  have h := lifted_deletion_bound
111    (transitionOutput Φ ρ joint) (transitionOutput Φ ρ (keptJoint joint keep))
112    (fun j => (σ j).matrix) (fun j => (τ j).matrix) p
113    (transitionOutput_posSemidef Φ ρ hjoint)
114    (transitionOutput_posSemidef Φ ρ (keptJoint_nonneg hjoint keep))
115    (fun j => (σ j).positive) (fun j => (τ j).positive) hp
116    (transitionOutput_sub_kept_posSemidef Φ ρ hjoint keep)
117    (fun j => by rw [(σ j).trace_one]; rfl)
118    (fun j => by rw [(τ j).trace_one]; rfl) hpsum
119  simp_rw [transitionOutput_trace_difference] at h
120  simpa only [liftedOutput, transitionOutput_trace_re] using h
121 
122/-- The finite `η + 2√ε` estimate specialized to genuine channel transitions.
123The only sector hypothesis is the fidelity approximation on retained output
124states; positivity of the removed contribution is derived from the mask. -/
125theorem lifted_transition_factorization_bound
126    (Φ : ∀ i j, MatrixChannel (α i) (β j))
127    (ρ : ∀ i, State (α i)) (σ : ∀ j, State (β j)) (τ : ∀ j, State (κ j))
128    {joint : μ → ν → ℝ} (hjoint : ∀ i j, 0 ≤ joint i j)
129    (keep : μ → ν → Prop) (p : ν → ℝ) (c η : ℝ)
130    (hp : ∀ j, 0 ≤ p j) (hpsum : ∑ j, p j = 1)
131    (hjointmass : ∑ j, ∑ i, joint i j ≤ 1)
132    (hc0 : 0 ≤ c) (hc1 : c ≤ 1) (hη : 0 ≤ η)
133    (hsector : ∀ j, 0 < ∑ i, keptJoint joint keep i j →
134      |fidelity (normalizedBlock (transitionOutput Φ ρ (keptJoint joint keep) j))
135          (σ j).matrix - c| ≤ η) :
136    |fidelity (liftedOutput Φ ρ τ joint)
137        (Matrix.blockDiagonal' (fun j => (p j • (σ j).matrix) ⊗ₖ (τ j).matrix)) -
138      c * Cloning.BlockFidelity.classicalAffinity (fun j => ∑ i, joint i j) p| ≤
139      η + 2 * Real.sqrt (∑ j, ∑ i, discardedJoint joint keep i j) := by
140  have h := lifted_matrix_factorization_bound
141    (transitionOutput Φ ρ joint) (transitionOutput Φ ρ (keptJoint joint keep))
142    σ τ p c η (transitionOutput_posSemidef Φ ρ hjoint)
143    (transitionOutput_posSemidef Φ ρ (keptJoint_nonneg hjoint keep))
144    (transitionOutput_sub_kept_posSemidef Φ ρ hjoint keep) hp hpsum
145    (by simpa only [transitionOutput_trace_re] using hjointmass) hc0 hc1 hη
146    (by simpa only [transitionOutput_trace_re] using hsector)
147  simp_rw [transitionOutput_trace_difference] at h
148  simpa only [liftedOutput, transitionOutput_trace_re] using h
149 
150end Cloning.MatrixLiftedTrimming