PositiveBlockSegment.lean
1module23public import SubentropyCertificates.ConditionalFrechet4public import D5.S3.Quantum.Foundation.FiniteStateChannel56/-! Normalized CQ states and the derivative of conditional subentropy along their segment. -/7@[expose] public section8noncomputable section9set_option backward.isDefEq.respectTransparency false10open Matrix MeasureTheory Set11open scoped BigOperators ComplexOrder MatrixOrder Matrix.Norms.L2Operator Topology1213namespace SubentropyCertificates.ConditionalContinuity14open D5.S3.Quantum.Foundation.FiniteStateChannel15open D5.S3.Quantum.Subentropy.Basic16open SubentropyCertificates.Representations1718variable {X D : Type*} [Fintype X] [DecidableEq X] [Fintype D] [DecidableEq D]1920/-- The joint density with classical label x and subnormalized quantum blocks A x. -/21def blockDensity (A : X → Matrix D D ℂ) (ha : ∀ x, (A x).PosSemidef)22 (ht : (∑ x, A x).trace = 1) : DensityState (D × X) :=23 ⟨CStarMatrix.ofMatrix (blockDiagonal A),24 map_nonneg CStarMatrix.ofMatrixStarAlgEquiv (blocks_posSemidef A ha).nonneg,25 by26 change (blockDiagonal A).trace = 127 simpa only [trace_blockDiagonal, trace_sum] using ht⟩2829/-- Conditional subentropy written in terms of the subnormalized quantum blocks. -/30def blockConditionalQ (A : X → Matrix D D ℂ) : ℝ :=31 matrixSubentropy (blockDiagonal A) - matrixSubentropy (∑ x, A x)3233/-- The affine segment between two families of blocks. -/34def blockSegment (A B : X → Matrix D D ℂ) (s : ℝ) (x : X) : Matrix D D ℂ :=35 (1 - s) • A x + s • B x3637omit [Fintype X] [DecidableEq X] [Fintype D] [DecidableEq D] in38theorem blockSegment_posDef (A B : X → Matrix D D ℂ)39 (ha : ∀ x, (A x).PosDef) (hb : ∀ x, (B x).PosDef)40 {s : ℝ} (hs : s ∈ Icc 0 1) (x : X) : (blockSegment A B s x).PosDef := by41 rcases eq_or_lt_of_le hs.1 with he | hp42 · subst s43 simpa [blockSegment] using ha x44 · exact Matrix.PosDef.posSemidef_add ((ha x).posSemidef.smul (sub_nonneg.mpr hs.2))45 ((hb x).smul hp)4647omit [DecidableEq X] [DecidableEq D] in48theorem blockSegment_trace (A B : X → Matrix D D ℂ) (s : ℝ)49 (ha : (∑ x, A x).trace = 1) (hb : (∑ x, B x).trace = 1) :50 (∑ x, blockSegment A B s x).trace = 1 := by51 simp only [blockSegment, Finset.sum_add_distrib, ← Finset.smul_sum, trace_add, trace_smul,52 ha, hb, Complex.real_smul, mul_one, Complex.ofReal_sub, Complex.ofReal_one, sub_add_cancel]5354omit [Fintype X] [DecidableEq X] [Fintype D] [DecidableEq D] in55private theorem segment_shift (A B : X → Matrix D D ℂ) (s t : ℝ) (x : X) :56 blockSegment A B s x + (t - s) • (B x - A x) = blockSegment A B t x := by57 simp only [blockSegment, sub_smul, smul_sub, one_smul]58 abel5960/-- The derivative at parameter s uses the same Hermitian direction B−A for the full segment. -/61theorem blockSegment_hasDerivAt [Nonempty X] (A B : X → Matrix D D ℂ)62 (ha : ∀ x, (A x).PosDef) (hb : ∀ x, (B x).PosDef)63 (htrA : (∑ x, A x).trace = 1) (htrB : (∑ x, B x).trace = 1)64 {s : ℝ} (hs : s ∈ Icc 0 1) :65 HasDerivAt (fun t ↦ blockConditionalQ (blockSegment A B t))66 (∑ x, (((spatialSign (∑ y, blockSegment A B s y) - blockSpatialSign (blockSegment A B s) x) *67 (B x - A x)).trace).re) s := by68 let H := fun x ↦ B x - A x69 have hz : (∑ x, H x).trace = 0 := by70 simp only [H, Finset.sum_sub_distrib, trace_sub, htrA, htrB, sub_self]71 have hd := conditionalSubentropy_gradient (blockSegment A B s) H72 (blockSegment_posDef A B ha hb hs) (blockSegment_trace A B s htrA htrB)73 (fun x ↦ (hb x).isHermitian.sub (ha x).isHermitian) hz74 have hs' : HasDerivAt (fun t : ℝ ↦ t - s) 1 s := (hasDerivAt_id s).sub_const s75 simpa only [Function.comp_def, H, segment_shift, mul_one, blockConditionalQ] using76 hd.comp_of_eq s hs' (sub_self s).symm7778/-- The Gaussian normalized outer product has norm at most one, hence so does its expectation. -/79theorem spatialSign_norm_le_one {M : Matrix D D ℂ} (hm : M.PosSemidef) : ‖spatialSign M‖ ≤ 1 := by80 let : IsProbabilityMeasure (circularGaussian D) := by unfold circularGaussian; infer_instance81 rw [spatialSign_gaussian_expectation hm]82 calc83 _ ≤ ∫ g, ‖gaussianSign M g‖ ∂circularGaussian D := norm_integral_le_integral_norm _84 _ ≤ ∫ _ : V D, (1 : ℝ) ∂circularGaussian D := integral_mono (gaussianSign_integrable hm).norm85 (integrable_const _) (gaussianSign_norm_le_one hm)86 _ = 1 := by simp8788end SubentropyCertificates.ConditionalContinuity
Axioms used
Choose a statement to see which axioms its proof uses.