SpatialSignOrder.lean
1module23public import SubentropyCertificates.BlockDeterminant4public import SubentropyCertificates.MatrixResolvent5public import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals67/-! Absolute convergence and the operator order in the block gradient of conditional8subentropy. We use the determinant integral for the spatial sign covariance matrix. -/9@[expose] public section10noncomputable section11set_option backward.isDefEq.respectTransparency false12open Matrix MeasureTheory Set Filter13open scoped BigOperators ComplexOrder MatrixOrder Matrix.Norms.L2Operator Topology1415namespace SubentropyCertificates.ConditionalContinuity16open SubentropyCertificates.DeterminantComparison17open SubentropyCertificates.ClassicalSSA1819variable {X D : Type*} [Fintype X] [DecidableEq X] [Fintype D] [DecidableEq D]2021/-- Integrand for the marginal spatial sign matrix. -/22def signKernel (M : Matrix D D ℂ) (t : ℝ) := reciprocalDet t M • signResolvent M t2324/-- Integrand for a diagonal block of the joint spatial sign matrix. -/25def blockSignKernel (A : X → Matrix D D ℂ) (x : X) (t : ℝ) :=26 reciprocalDet t (blockDiagonal A) • signResolvent (A x) t2728/-- The determinant integral defining K(M) in Section 4. -/29def spatialSign (M : Matrix D D ℂ) := ∫ t in Ioi (0 : ℝ), signKernel M t3031/-- The integral defining K_x(R), with the determinant of the full direct sum R. -/32def blockSpatialSign (A : X → Matrix D D ℂ) (x : X) :=33 ∫ t in Ioi (0 : ℝ), blockSignKernel A x t3435private theorem weight_pos {M : Matrix D D ℂ} (hM : M.PosSemidef) {t : ℝ} (ht : 0 ≤ t) :36 0 < reciprocalDet t M := by37 rw [reciprocalDet_spectral hM.isHermitian]38 exact kernel_pos ht hM.eigenvalues_nonneg3940private theorem weight_continuousAt {M : Matrix D D ℂ} (hM : M.PosSemidef) {t : ℝ} (ht : 0 ≤ t) :41 ContinuousAt (fun u ↦ reciprocalDet u M) t := by42 have hp := weight_pos hM ht43 have hd : (1 + t • M).det.re ≠ 0 := by44 intro h45 simp [reciprocalDet, h] at hp46 have hc : ContinuousAt (fun u : ℝ ↦ (1 + u • M).det.re) t := by fun_prop47 exact hc.inv₀ hd4849omit [DecidableEq X] [Fintype D] [DecidableEq D] in50private theorem sum_psd (A : X → Matrix D D ℂ) (hA : ∀ x, (A x).PosSemidef) :51 (∑ x, A x).PosSemidef := (Finset.sum_nonneg fun i _ ↦ (hA i).nonneg).posSemidef5253/-- Both factors of the block integrand are dominated by their marginal counterparts. -/54theorem blockSignKernel_order (A : X → Matrix D D ℂ) (hA : ∀ x, (A x).PosSemidef)55 (x : X) {t : ℝ} (ht : 0 < t) :56 0 ≤ blockSignKernel A x t ∧ blockSignKernel A x t ≤ signKernel (∑ y, A y) t := by57 have hw : 0 ≤ reciprocalDet t (blockDiagonal A) := by58 rw [reciprocalDet_blockDiagonal A hA]59 exact Finset.prod_nonneg fun i _ ↦ (weight_pos (hA i) ht.le).le60 have hx := (signResolvent_bounds (hA x) ht).161 have hle : A x ≤ ∑ i, A i :=62 Finset.single_le_sum (fun i _ ↦ (hA i).nonneg) (Finset.mem_univ x)63 refine ⟨smul_nonneg hw hx, ?_⟩64 exact (smul_le_smul_of_nonneg_right (reciprocalDet_blocks_le_sum A hA ht.le) hx).trans65 (smul_le_smul_of_nonneg_left (signResolvent_mono (hA x) (sum_psd A hA) hle ht.le)66 (weight_pos (sum_psd A hA) ht.le).le)6768/-- The marginal integral converges absolutely, including when the matrix is singular. -/69theorem signKernel_integrable {M : Matrix D D ℂ} (hM : M.PosSemidef) :70 IntegrableOn (signKernel M) (Ioi 0) := by71 by_cases hz : M = 072 · subst M73 have zero : signKernel (0 : Matrix D D ℂ) = 0 := by74 funext t75 simp [signKernel, signResolvent]76 rw [zero]77 exact integrable_zero _ _ _78 let mass := ∑ i, hM.isHermitian.eigenvalues i79 have hm : 0 < mass := by80 apply lt_of_le_of_ne (Finset.sum_nonneg fun i _ ↦ hM.eigenvalues_nonneg i)81 intro h82 have he := (Finset.sum_eq_zero_iff_of_nonneg (fun i _ ↦ hM.eigenvalues_nonneg i)).mp h.symm83 exact hz (hM.isHermitian.eigenvalues_eq_zero_iff.mp (funext fun i ↦ he i (Finset.mem_univ i)))84 have hc : ContinuousOn (signKernel M) (Ici 0) := fun t ht ↦85 ((weight_continuousAt hM ht).smul (signResolvent_continuousAt hM ht)).continuousWithinAt86 have htail : IntegrableOn (signKernel M) (Ioi 1) := by87 have hin := (integrableOn_Ioi_rpow_of_lt (by norm_num : (-2 : ℝ) < -1) one_pos).const_mul88 (mass⁻¹ * ‖(1 : Matrix D D ℂ)‖)89 apply hin.mono' ((hc.mono (fun t ht ↦ (zero_lt_one.trans ht).le)).aestronglyMeasurable90 measurableSet_Ioi)91 filter_upwards [ae_restrict_mem measurableSet_Ioi] with t ht92 have ht0 : 0 < t := zero_lt_one.trans ht93 have hw : reciprocalDet t M ≤ (mass * t)⁻¹ := by94 rw [reciprocalDet_spectral hM.isHermitian]95 exact (refinement ht0.le Finset.univ _ hM.eigenvalues_nonneg).trans96 (inv_anti₀ (mul_pos hm ht0) (by dsimp [mass]; linarith))97 have hres := signResolvent_bounds hM ht098 have hn := CStarAlgebra.norm_le_norm_of_le_of_nonneg hres.2 hres.199 rw [norm_smul, Real.norm_of_nonneg (inv_nonneg.mpr ht0.le)] at hn100 change ‖reciprocalDet t M • signResolvent M t‖ ≤ _101 rw [norm_smul, Real.norm_of_nonneg (weight_pos hM ht0.le).le]102 calc103 _ ≤ (mass * t)⁻¹ * (t⁻¹ * ‖(1 : Matrix D D ℂ)‖) :=104 mul_le_mul hw hn (norm_nonneg _) (inv_nonneg.mpr (mul_nonneg hm.le ht0.le))105 _ = _ := by rw [Real.rpow_neg ht0.le, Real.rpow_two, mul_inv, sq, mul_inv]; ring106 have hcompact : IntegrableOn (signKernel M) (Icc 0 1) :=107 (hc.mono Icc_subset_Ici_self).integrableOn_Icc108 exact ((hcompact.union htail).mono_set (fun t ht ↦ by109 by_cases h : t ≤ 1110 · exact Or.inl ⟨ht.le, h⟩111 · exact Or.inr (lt_of_not_ge h)))112113/-- The block integral converges absolutely. The proof also allows a zero block. -/114theorem blockSignKernel_integrable (A : X → Matrix D D ℂ) (hA : ∀ x, (A x).PosSemidef)115 (x : X) : IntegrableOn (blockSignKernel A x) (Ioi 0) := by116 have hc : ContinuousOn (blockSignKernel A x) (Ioi 0) := by117 intro t ht118 unfold blockSignKernel119 simp_rw [reciprocalDet_blockDiagonal A hA]120 have hw : ContinuousAt (fun u ↦ ∏ i, reciprocalDet u (A i)) t :=121 tendsto_finsetProd _ (fun i _ ↦ weight_continuousAt (hA i) ht.le)122 exact (hw.smul123 (signResolvent_continuousAt (hA x) ht.le)).continuousWithinAt124 apply Integrable.mono (signKernel_integrable (sum_psd A hA))125 (hc.aestronglyMeasurable measurableSet_Ioi)126 filter_upwards [ae_restrict_mem measurableSet_Ioi] with t ht127 obtain ⟨hp, hl⟩ := blockSignKernel_order A hA x ht128 exact CStarAlgebra.norm_le_norm_of_le_of_nonneg hl hp129130/-- In Loewner order the gradient correction B_x = K(A) - K_x(R) lies between zero131and the marginal spatial sign matrix, which is bounded by its operator norm times I. -/132theorem spatialSign_block_gradient_order (A : X → Matrix D D ℂ) (hA : ∀ x, (A x).PosSemidef)133 (x : X) :134 let K := spatialSign (∑ y, A y)135 let B := K - blockSpatialSign A x136 0 ≤ B ∧ B ≤ K ∧ K ≤ ‖K‖ • 1 := by137 have hp : 0 ≤ blockSpatialSign A x := by138 apply integral_nonneg_of_ae139 filter_upwards [ae_restrict_mem measurableSet_Ioi] with t ht140 exact (blockSignKernel_order A hA x ht).1141 have hl : blockSpatialSign A x ≤ spatialSign (∑ y, A y) := by142 apply integral_mono_ae (blockSignKernel_integrable A hA x)143 (signKernel_integrable (sum_psd A hA))144 filter_upwards [ae_restrict_mem measurableSet_Ioi] with t ht145 exact (blockSignKernel_order A hA x ht).2146 refine ⟨sub_nonneg.mpr hl, sub_le_self _ hp, ?_⟩147 simpa only [Algebra.algebraMap_eq_smul_one] using148 (hp.trans hl).isSelfAdjoint.le_algebraMap_norm_self149150end SubentropyCertificates.ConditionalContinuity
Axioms used
Choose a statement to see which axioms its proof uses.