Pratik Patil

ConditionalGaussianGradient.lean

1module23public import SubentropyCertificates.ConditionalGradientChain4public import SubentropyCertificates.GaussianSpatialSign5public import SubentropyCertificates.GaussianFrechet67/-! The conditional gradient in Appendix B, including the trace-one constraint. -/8@[expose] public section9noncomputable section10set_option backward.isDefEq.respectTransparency false11open Matrix Filter12open scoped BigOperators ComplexOrder MatrixOrder Matrix.Norms.L2Operator Topology1314namespace SubentropyCertificates.ConditionalContinuity15open D5.S3.Quantum.Subentropy.Basic1617variable {X D : Type*} [Fintype X] [DecidableEq X] [Fintype D] [DecidableEq D]1819/-- The derivative matrix of the Gaussian entropy functional at a positive definite matrix. -/20theorem gaussianSlope_eq {M : Matrix D D ℂ} (hM : M.PosDef) :21    gaussianSlope M = (1 + gaussianLogMean M) • 1 + spatialSign M :=22  gaussianSlope_eq_of_integrable hM (gaussianSlope_integrable hM)2324/-- Along any matrix direction, the derivative is given by pairing with the spatial sign25matrix plus the scalar logarithmic moment. -/26theorem gaussianF_gradient {M : Matrix D D ℂ} (hM : M.PosDef) (H : Matrix D D ℂ) :27    HasDerivAt (fun s : ℝ ↦ gaussianF (M + s • H))28      ((((1 + gaussianLogMean M) • 1 + spatialSign M) * H).trace.re) 0 := by29  rw [← gaussianSlope_eq hM]30  exact gaussianF_hasDerivAt hM H3132/-- The derivative of the Gaussian extension of conditional subentropy for perturbations33of all the positive definite blocks simultaneously. -/34theorem conditionalGaussianF_hasDerivAt [Nonempty X] (A H : X → Matrix D D ℂ)35    (ha : ∀ x, (A x).PosDef) :36    HasDerivAt (fun s : ℝ ↦ conditionalGaussianF (fun x ↦ A x + s • H x))37      (∑ x, (((commonLogMean A • 1 + (spatialSign (∑ y, A y) - blockSpatialSign A x)) *38        H x).trace).re) 0 := by39  rw [← conditional_pairing A H (fun x ↦ (ha x).posSemidef)]40  have h := (gaussianF_gradient (sum_blocks_posDef A ha) (∑ x, H x)).sub41    (gaussianF_gradient (blocks_posDef A ha) (blockDiagonal H))42  convert h using 143  funext s44  have hb : blockDiagonal (fun x ↦ A x + s • H x) =45      blockDiagonal A + s • blockDiagonal H := by46    exact (blockDiagonal_add A (s • H)).trans (by rw [blockDiagonal_smul])47  simp only [conditionalGaussianF, Finset.sum_add_distrib, ← Finset.smul_sum, hb, Pi.sub_apply]4849/-- On the trace-one slice the scalar term disappears. This differentiates the paper's50conditional subentropy itself along every Hermitian direction of zero total trace. -/51theorem conditionalSubentropy_gradient [Nonempty X] (A H : X → Matrix D D ℂ)52    (ha : ∀ x, (A x).PosDef) (ht : (∑ x, A x).trace = 1)53    (hh : ∀ x, (H x).IsHermitian) (hz : (∑ x, H x).trace = 0) :54    HasDerivAt (fun s : ℝ ↦55      matrixSubentropy (blockDiagonal (fun x ↦ A x + s • H x)) -56      matrixSubentropy (∑ x, (A x + s • H x)))57      (∑ x, (((spatialSign (∑ y, A y) - blockSpatialSign A x) * H x).trace).re) 0 := by58  have h := conditionalGaussianF_hasDerivAt A H ha59  rw [common_scalar_cancels _ _ H hz] at h60  apply h.congr_of_eventuallyEq61  have hp : ∀ᶠ s : ℝ in 𝓝 0, ∀ x, (A x + s • H x).PosDef :=62    Filter.eventually_all.mpr (fun x ↦ eventually_posDef_line (ha x) (hh x))63  filter_upwards [hp] with s hs64  apply (conditionalGaussianF_eq_subentropy _ (fun x ↦ (hs x).posSemidef) _).symm65  rw [Finset.sum_add_distrib, ← Finset.smul_sum, trace_add, trace_smul, ht, hz, smul_zero, add_zero]6667end SubentropyCertificates.ConditionalContinuity

Axioms used

Choose a statement to see which axioms its proof uses.