cfahlgren1/math / lean /OAI /InformationTheory /Entanglement /HilbertMeasureEmbedding.lean
cfahlgren1's picture
download
raw
3.71 kB
15
lemma hilbertTrace_real_smul (b : HilbertBasis ι ℂ H) (c : ℝ) (A : H →L[ℂ] H) :
    hilbertTrace b ((c : ℂ) • A)=c*hilbertTrace b A := by
proof · 2 lines
  simp only [hilbertTrace,_root_.smul_apply,inner_smul_right,Complex.mul_re,
    Complex.ofReal_re,Complex.ofReal_im,zero_mul,sub_zero,tsum_mul_left]
20
lemma hilbertCompress_smul (v : n → H) (c : ℂ) (A : H →L[ℂ] H) :
    hilbertCompress v (c • A)=c • hilbertCompress v A := by
proof · 2 lines
  ext i j
  simp only [hilbertCompress,_root_.smul_apply,inner_smul_right,Matrix.smul_apply,smul_eq_mul]
25
lemma hilbertErase_real_smul (b : HilbertBasis ι ℂ H) (v : n → H) (i₀ : n)
    (c : ℝ) (A : H →L[ℂ] H) :
    hilbertErase b v i₀ ((c : ℂ) • A)=(c : ℂ) • hilbertErase b v i₀ A := by
proof · 3 lines
  simp only [hilbertErase,hilbertCompress_smul,hilbertTrace_real_smul,Matrix.trace_smul,
    smul_eq_mul,Complex.mul_re,Complex.ofReal_re,Complex.ofReal_im,zero_mul,sub_zero,
    ← mul_sub,Complex.ofReal_mul,smul_add,smul_smul]
31
lemma finitePositiveTrace_real_smul (b : HilbertBasis ι ℂ H) (c : ℝ) (hc : 0≤c)
    {A : H →L[ℂ] H} (hA : HasFinitePositiveTrace b A) :
    HasFinitePositiveTrace b ((c : ℂ) • A) := by
proof · 6 lines
  refine ⟨?_,?_⟩
  · have he : (c : ℂ) • A=c • A := by ext x; simp
    rw [he]
    exact smul_nonneg hc hA.1
  · simpa only [_root_.smul_apply,inner_smul_right,Complex.mul_re,
      Complex.ofReal_re,Complex.ofReal_im,zero_mul,sub_zero] using hA.2.mul_left c
42
lemma ext_entry {V W : PositiveMatrixMeasure T n} (h : V.entry=W.entry) : V=W := by
proof · 4 lines
  cases V
  cases W
  cases h
  rfl
47
def hilbertEmbedding (W : PositiveMatrixMeasure T n) (b : HilbertBasis ι ℂ H)
    (v : n → H) (hv : Orthonormal ℂ v) : PositiveHilbertMeasure T H b where
body · 14 lines
  value s := hilbertEmbed v (W.value s)
  coeff x y := ∑ i, ∑ j, (inner ℂ x (v i)*inner ℂ (v j) y) • W.entry i j
  coeff_value x y s hs := by
    simp only [_root_.sum_apply,_root_.smul_apply,smul_eq_mul,hilbertEmbed_apply,inner_sum,
      inner_smul_right,PositiveMatrixMeasure.value]
    apply Finset.sum_congr rfl
    intro i _
    apply Finset.sum_congr rfl
    intro j _
    ring
  positive s hs := hilbertEmbed_psd_finite b v (W.positive s hs)
  traceMeasure := W.traceMeasure
  traceFinite := inferInstance
  trace_value s hs := by rw [hilbertEmbed_trace b v hv,W.traceMeasure_real hs]
63
lemma hilbertEmbedding_recovered (W : PositiveMatrixMeasure T n) (b : HilbertBasis ι ℂ H)
    (v : n → H) (hv : Orthonormal ℂ v) (i₀ : n) :
    (W.hilbertEmbedding b v hv).erase v hv i₀=W := by
proof · 9 lines
  have he : ((W.hilbertEmbedding b v hv).erase v hv i₀).entry=W.entry := by
    funext i j
    apply VectorMeasure.ext
    intro s hs
    have h := PositiveHilbertMeasure.erase_value (W.hilbertEmbedding b v hv) v hv i₀ hs
    change _=hilbertErase b v i₀ (hilbertEmbed v (W.value s)) at h
    rw [hilbertErase_embed b v hv i₀] at h
    exact congrArg (fun A : Mat n => A i j) h
  exact ext_entry he

Xet Storage Details

Size:
3.71 kB
·
Xet hash:
46b69a58daa9065ceb36fac4d8010dd9569c9782052b0d7539da90ee9a0bae3f

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