ConditionalFrechet.lean
1module23public import SubentropyCertificates.ConditionalGaussianGradient4public import SubentropyCertificates.GaussianFrechet56/-! The real Fréchet derivative of conditional subentropy's Gaussian extension. -/7@[expose] public section8noncomputable section9open Matrix10open scoped BigOperators ComplexOrder MatrixOrder Matrix.Norms.L2Operator1112namespace SubentropyCertificates.ConditionalContinuity13open D5.S3.Quantum.Subentropy.Basic1415variable {X D : Type*} [Fintype X] [DecidableEq X] [Fintype D] [DecidableEq D]1617private abbrev marginalBlockMap : (X → Matrix D D ℂ) →L[ℝ] Matrix D D ℂ :=18 LinearMap.toContinuousLinearMap19 { toFun := fun H ↦ ∑ x, H x20 map_add' := fun _ _ ↦ by simp [Finset.sum_add_distrib]21 map_smul' := fun _ _ ↦ by simp [Finset.smul_sum] }2223private abbrev jointBlockMap : (X → Matrix D D ℂ) →L[ℝ] Matrix (D × X) (D × X) ℂ :=24 LinearMap.toContinuousLinearMap25 { toFun := blockDiagonal26 map_add' := blockDiagonal_add27 map_smul' := blockDiagonal_smul }2829/-- The real-linear functional obtained by pairing each perturbation with its block gradient. -/30def conditionalGradientCLM (A : X → Matrix D D ℂ) : (X → Matrix D D ℂ) →L[ℝ] ℝ :=31 ∑ x, (gradientPairingCLM32 (commonLogMean A • 1 + (spatialSign (∑ y, A y) - blockSpatialSign A x))).comp33 (ContinuousLinearMap.proj x)3435@[simp] theorem conditionalGradientCLM_apply (A H : X → Matrix D D ℂ) :36 conditionalGradientCLM A H =37 ∑ x, (((commonLogMean A • 1 + (spatialSign (∑ y, A y) - blockSpatialSign A x)) *38 H x).trace).re := by39 simp [conditionalGradientCLM]4041/-- At positive definite blocks the Gaussian extension is Fréchet differentiable with42respect to all blocks simultaneously. Its derivative acts by the stated block trace pairings. -/43theorem conditionalGaussianF_hasFDerivAt [Nonempty X] (A : X → Matrix D D ℂ)44 (ha : ∀ x, (A x).PosDef) :45 HasFDerivAt conditionalGaussianF (conditionalGradientCLM A) A := by46 have hm := (gaussianF_hasFDerivAt (sum_blocks_posDef A ha)).comp A marginalBlockMap.hasFDerivAt47 have hj := (gaussianF_hasFDerivAt (blocks_posDef A ha)).comp A jointBlockMap.hasFDerivAt48 apply (hm.sub hj).congr_fderiv49 ext H50 change ((gaussianSlope (∑ x, A x) * ∑ x, H x).trace).re -51 ((gaussianSlope (blockDiagonal A) * blockDiagonal H).trace).re = conditionalGradientCLM A H52 rw [gaussianSlope_eq (sum_blocks_posDef A ha), gaussianSlope_eq (blocks_posDef A ha),53 conditionalGradientCLM_apply]54 exact conditional_pairing A H (fun x ↦ (ha x).posSemidef)5556/-- On normalized positive semidefinite blocks, conditional subentropy has the same57Fréchet derivative within the state space at every family of positive definite blocks. -/58theorem conditionalSubentropy_hasFDerivWithinAt [Nonempty X] (A : X → Matrix D D ℂ)59 (ha : ∀ x, (A x).PosDef) (ht : (∑ x, A x).trace = 1) :60 HasFDerivWithinAt61 (fun B : X → Matrix D D ℂ ↦ matrixSubentropy (blockDiagonal B) - matrixSubentropy (∑ x, B x))62 (conditionalGradientCLM A) {B | (∀ x, (B x).PosSemidef) ∧ (∑ x, B x).trace = 1} A := by63 apply (conditionalGaussianF_hasFDerivAt A ha).hasFDerivWithinAt.congr'64 · exact fun B hB ↦ (conditionalGaussianF_eq_subentropy B hB.1 hB.2).symm65 · exact ⟨fun x ↦ (ha x).posSemidef, ht⟩6667end SubentropyCertificates.ConditionalContinuity
Axioms used
Choose a statement to see which axioms its proof uses.