cfahlgren1/math / lean /OAI /InformationTheory /Entanglement /FiniteInputInstrument.lean
cfahlgren1's picture
download
raw
4.51 kB
15
structure FiniteInputInstrument (n : Type) [Fintype n] (Ω : Type*) [MeasurableSpace Ω] where
body · 4 lines
  law : Mat n →ₗ[ℂ] ComplexMeasure Ω
  positive : ∀ (r : Type) [Fintype r] (A : Mat (r×n)), A.PosSemidef →
    ∀ s, MeasurableSet s → Matrix.PosSemidef (fun a b => law (fun i j => A (a,i) (b,j)) s)
  total : ∀ A, law A Set.univ=Matrix.trace A
23
def referenceLaw (A : Mat (e×n)) (hA : A.PosSemidef) : PositiveMatrixMeasure Ω e where
body · 2 lines
  entry a b := I.law (fun i j => A (a,i) (b,j))
  positive s hs := I.positive e A hA s hs
27
def purificationLaw (B : Matrix e n ℂ) : PositiveMatrixMeasure Ω e :=
body · 1 line
  I.referenceLaw (projector (fun p : e×n => B p.1 p.2)) (Matrix.posSemidef_vecMulVec_self_star _)
30
def rawProbe : PositiveMatrixMeasure Ω n :=
body · 1 line
  I.referenceLaw (projector (omega (n := n))) (Matrix.posSemidef_vecMulVec_self_star _)
32
lemma rawProbe_entry (a b : n) : I.rawProbe.entry a b=I.law (Matrix.single a b 1) := by
proof · 2 lines
  change I.law (fun i j => projector (omega (n := n)) (a,i) (b,j))=_
  rw [show (fun i j => projector (omega (n := n)) (a,i) (b,j))=Matrix.single a b 1 from omega_block a b]
35
lemma law_entries (A : Mat n) :
    I.law A=∑ i, ∑ j, A i j • I.law (Matrix.single i j 1) := by
proof · 3 lines
  conv_lhs => rw [Matrix.matrix_eq_sum_single A]
  simp only [map_sum,← map_smul]
  simp
42
theorem purificationLaw_eq_filter (B : Matrix e n ℂ) :
    I.purificationLaw B=I.rawProbe.filter B := by
proof · 6 lines
  apply PositiveMatrixMeasure.ext_entry_default
  funext a b
  change I.law (fun i j => B a i*star (B b j))=
    ∑ i, ∑ j, (B a i*star (B b j)) • I.rawProbe.entry i j
  erw [I.law_entries]
  simp only [I.rawProbe_entry]
51
lemma purificationLaw_total (B : Matrix e n ℂ) :
    (I.purificationLaw B).value Set.univ=B*Bᴴ := by
proof · 4 lines
  ext a b
  change I.law (fun i j => B a i*star (B b j)) Set.univ=_
  erw [I.total]
  simp only [Matrix.trace,Matrix.diag,Matrix.mul_apply,Matrix.conjTranspose_apply]
57
lemma rawProbe_total : I.rawProbe.value Set.univ=1 := by
proof · 6 lines
  ext a b
  change I.rawProbe.entry a b Set.univ=_
  erw [I.rawProbe_entry,I.total]
  by_cases h : a=b
  · subst b; simp [Matrix.trace, Matrix.diag, Matrix.single_apply]
  · simp [Matrix.trace, Matrix.diag, Matrix.single_apply,h,Ne.symm h]
65
theorem rawProbe_test (E : Mat n) (s : Set Ω) :
    Matrix.trace (E*I.rawProbe.value s)=I.law Eᵀ s := by
proof · 5 lines
  erw [I.law_entries]
  simp only [_root_.sum_apply,_root_.smul_apply,smul_eq_mul]
  simp only [Matrix.trace,Matrix.diag,Matrix.mul_apply,PositiveMatrixMeasure.value,
    I.rawProbe_entry,Matrix.transpose_apply]
  rw [Finset.sum_comm]
74
theorem referenceLaw_conjugation (A : Mat (e×n)) (hA : A.PosSemidef)
    (B : Matrix d e ℂ) :
    I.referenceLaw ((B ⊗ₖ (1 : Mat n))*A*(B ⊗ₖ (1 : Mat n))ᴴ)
      (hA.mul_mul_conjTranspose_same _)=(I.referenceLaw A hA).filter B := by
proof · 25 lines
  apply PositiveMatrixMeasure.ext_entry_default
  funext a b
  change I.law (fun i j => ((B ⊗ₖ (1 : Mat n))*A*(B ⊗ₖ (1 : Mat n))ᴴ) (a,i) (b,j))=
    ∑ u, ∑ v, (B a u*star (B b v)) • I.law (fun i j => A (u,i) (v,j))
  have hEntry : (fun i j => ((B ⊗ₖ (1 : Mat n))*A*(B ⊗ₖ (1 : Mat n))ᴴ) (a,i) (b,j))=
      ∑ u, ∑ v, (B a u*star (B b v)) • (fun i j => A (u,i) (v,j)) := by
    ext i j
    simp only [Finset.sum_apply,Pi.smul_apply,smul_eq_mul]
    simp only [Matrix.mul_apply,Matrix.conjTranspose_apply,Matrix.kroneckerMap_apply,
      Matrix.one_apply,Fintype.sum_prod_type,
      mul_one,mul_zero,ite_mul,zero_mul,apply_ite,star_zero]
    simp only [Finset.sum_ite_eq,Finset.mem_univ,ite_true,Finset.sum_mul]
    rw [Finset.sum_comm]
    apply Finset.sum_congr rfl
    intro u hu
    apply Finset.sum_congr rfl
    intro v hv
    ring
  erw [hEntry,map_sum]
  apply Finset.sum_congr rfl
  intro u hu
  erw [map_sum]
  apply Finset.sum_congr rfl
  intro v hv
  exact I.law.map_smul _ _

Xet Storage Details

Size:
4.51 kB
·
Xet hash:
c7f4d34c6fb3ca7126355a57686c51924fa1a550b33531f46d6b76ea3f6e9f4c

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.