cfahlgren1/math / lean /OAI /InformationTheory /Entanglement /MatrixTraceMeasure.lean
cfahlgren1's picture
download
raw
4.38 kB
14
def traceSigned : SignedMeasure Ω := ComplexMeasure.re (∑ i, W.entry i i)
15
lemma traceSigned_apply (s : Set Ω) : W.traceSigned s=(Matrix.trace (W.value s)).re := by
proof · 2 lines
  change ((∑ i, W.entry i i) s).re=_
  simp only [_root_.sum_apply,value,Matrix.trace,Matrix.diag]
18
lemma traceSigned_nonneg : 0 ≤[Set.univ] W.traceSigned := by
proof · 6 lines
  apply VectorMeasure.restrict_le_restrict_of_subset_le
  intro s hs _
  change 0≤W.traceSigned s
  rw [W.traceSigned_apply]
  exact
    (Complex.nonneg_iff.mp (W.positive s hs).trace_nonneg).1
26
def traceMeasure : Measure Ω :=
body · 1 line
  W.traceSigned.toMeasureOfZeroLE Set.univ MeasurableSet.univ W.traceSigned_nonneg
28
instance : IsFiniteMeasure W.traceMeasure := SignedMeasure.toMeasureOfZeroLE_finite _ _ _
29
lemma traceMeasure_real {s : Set Ω} (hs : MeasurableSet s) :
    W.traceMeasure.real s=(Matrix.trace (W.value s)).re := by
proof · 2 lines
  rw [traceMeasure,SignedMeasure.toMeasureOfZeroLE_real_apply _ _ _ hs,Set.univ_inter,
    W.traceSigned_apply]
33
lemma trace_domination {μ : Measure Ω} (h : W.traceMeasure≪μ) :
    ∀ s, MeasurableSet s → μ s=0 → (Matrix.trace (W.value s)).re=0 := by
proof · 2 lines
  intro s hs hz
  rw [← W.traceMeasure_real hs,measureReal_def,h hz,ENNReal.toReal_zero]
38
def positiveDensity (μ : Measure Ω) (x : Ω) : Mat n :=
body · 1 line
  if (W.density μ x).PosSemidef then W.density μ x else 0
40
lemma positiveDensity_psd (μ : Measure Ω) (x : Ω) : (W.positiveDensity μ x).PosSemidef := by
proof · 4 lines
  unfold positiveDensity
  split
  · assumption
  · exact Matrix.PosSemidef.zero
45
lemma positiveDensity_measurable [DecidableEq n] (μ : Measure Ω) :
    Measurable (W.positiveDensity μ) := by
proof · 4 lines
  apply (W.density_measurable (μ := μ)).ite _ measurable_const
  simpa only [Matrix.nonneg_iff_posSemidef] using
    measurableSet_le (show Measurable (fun _ : Ω => (0 : Mat n)) from measurable_const)
      (W.density_measurable (μ := μ))
51
lemma positiveDensity_ae_eq {μ : Measure Ω} [SigmaFinite μ] (h : W.traceMeasure≪μ) :
    W.positiveDensity μ=ᵐ[μ] W.density μ := by
proof · 2 lines
  filter_upwards [W.density_ae_psd (W.trace_domination h)] with x hx
  exact ite_eq_left hx
55
lemma positiveDensity_integrable {μ : Measure Ω} [SigmaFinite μ] (h : W.traceMeasure≪μ)
    (i j : n) : Integrable (fun x => W.positiveDensity μ x i j) μ := by
proof · 3 lines
  refine (W.density_integrable i j).congr ?_
  filter_upwards [W.positiveDensity_ae_eq h] with x hx
  exact (congrArg (fun M : Mat n => M i j) hx).symm
60
lemma positiveDensity_setIntegral {μ : Measure Ω} [SigmaFinite μ] (h : W.traceMeasure≪μ)
    {s : Set Ω} (hs : MeasurableSet s) (i j : n) :
    (∫ x in s, W.positiveDensity μ x i j ∂μ)=W.value s i j := by
proof · 3 lines
  rw [integral_congr_ae (ae_restrict_of_ae (W.positiveDensity_ae_eq h |>.mono
    (fun x hx => congrArg (fun M : Mat n => M i j) hx)))]
  exact W.density_setIntegral (W.trace_domination h) hs i j
66
lemma positiveDensity_trace_integrable {μ : Measure Ω} [SigmaFinite μ] (h : W.traceMeasure≪μ) :
    Integrable (fun x => (Matrix.trace (W.positiveDensity μ x)).re) μ := by
proof · 1 line
  exact (integrable_finsetSum _ fun i _ => W.positiveDensity_integrable h i i).re
69
lemma positiveDensity_trace_setIntegral {μ : Measure Ω} [SigmaFinite μ] (h : W.traceMeasure≪μ)
    {s : Set Ω} (hs : MeasurableSet s) :
    (∫ x in s, (Matrix.trace (W.positiveDensity μ x)).re ∂μ)=W.traceMeasure.real s := by
proof · 8 lines
  rw [W.traceMeasure_real hs]
  change (∫ x in s, RCLike.re (Matrix.trace (W.positiveDensity μ x)) ∂μ)=_
  have hi : Integrable (fun x => Matrix.trace (W.positiveDensity μ x)) μ :=
    integrable_finsetSum Finset.univ (fun i _ => W.positiveDensity_integrable h i i)
  rw [integral_re hi.integrableOn]
  exact congrArg Complex.re ((integral_finsetSum Finset.univ
    (fun i _ => (W.positiveDensity_integrable h i i).integrableOn)).trans
    (Finset.sum_congr rfl (fun i _ => W.positiveDensity_setIntegral h hs i i)))

Xet Storage Details

Size:
4.38 kB
·
Xet hash:
16c152be5938aae328a58e2120c550d7385fef6502f6f7bf6f7b95bac4e95522

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