BlockDeterminant.lean
1module23public import SubentropyCertificates.DiagonalDeterminant4import all D5.S3.Quantum.Subentropy.DensityKernel56/-! The determinant factors in the block order of Theorem 14. Diagonalize each7block and apply the determinant comparison to the Gram matrix of all columns. -/8@[expose] public section9noncomputable section10set_option backward.isDefEq.respectTransparency false11open Matrix12open scoped BigOperators ComplexOrder MatrixOrder1314namespace SubentropyCertificates.ConditionalContinuity15open SubentropyCertificates.DeterminantComparison16open SubentropyCertificates.ClassicalSSA17open D5.S3.Quantum.Subentropy.DensityKernel (det_spectral)1819variable {X D : Type*} [Fintype X] [DecidableEq X] [Fintype D] [DecidableEq D]2021/-- The reciprocal determinant of the direct sum factors over the label blocks. -/22theorem reciprocalDet_blockDiagonal (A : X → Matrix D D ℂ) (hA : ∀ x, (A x).PosSemidef)23 (t : ℝ) : reciprocalDet t (blockDiagonal A) = ∏ x, reciprocalDet t (A x) := by24 have hs : (1 : Matrix (D × X) (D × X) ℂ) + t • blockDiagonal A =25 blockDiagonal (1 + t • A) := by26 rw [blockDiagonal_add, blockDiagonal_one, blockDiagonal_smul]27 simp only [reciprocalDet, hs, det_blockDiagonal, Pi.add_apply, Pi.one_apply, Pi.smul_apply]28 simp_rw [det_spectral (hA _).isHermitian, ← Complex.ofReal_prod, Complex.ofReal_re]29 rw [Finset.prod_inv_distrib]3031/-- The inverse determinant of the joint block matrix is at most that of the sum32of the blocks for every nonnegative parameter, including singular or zero blocks. -/33theorem reciprocalDet_blocks_le_sum (A : X → Matrix D D ℂ) (hA : ∀ x, (A x).PosSemidef)34 {t : ℝ} (ht : 0 ≤ t) :35 reciprocalDet t (blockDiagonal A) ≤ reciprocalDet t (∑ x, A x) := by36 let U (x : X) : Matrix.unitaryGroup D ℂ := (hA x).isHermitian.eigenvectorUnitary37 let d (x : X) := diagonal (fun i ↦ ((hA x).isHermitian.eigenvalues i : ℂ))38 let W (x : X) := CFC.sqrt (A x) * (U x : Matrix D D ℂ)39 have hs (x : X) : (CFC.sqrt (A x)).conjTranspose = CFC.sqrt (A x) :=40 (CFC.sqrt_nonneg (A x)).isSelfAdjoint.star_eq41 have hu (x : X) : (U x : Matrix D D ℂ) * (U x : Matrix D D ℂ).conjTranspose = 1 :=42 Unitary.coe_mul_star_self _43 have hv (x : X) : (U x : Matrix D D ℂ).conjTranspose * (U x : Matrix D D ℂ) = 1 :=44 Unitary.coe_star_mul_self _45 have row (x : X) : W x * (W x).conjTranspose = A x := by46 simp only [W, conjTranspose_mul, hs, mul_assoc, ← mul_assoc (U x : Matrix D D ℂ), hu, one_mul]47 exact CFC.sqrt_mul_sqrt_self _ (hA x).nonneg48 have col (x : X) : (W x).conjTranspose * W x = d x := by49 have spec : A x = (U x : Matrix D D ℂ) * d x * (U x : Matrix D D ℂ).conjTranspose :=50 (hA x).isHermitian.spectral_theorem51 dsimp only [W]52 rw [Matrix.conjTranspose_mul, hs, Matrix.mul_assoc, ← Matrix.mul_assoc (CFC.sqrt _),53 CFC.sqrt_mul_sqrt_self _ (hA x).nonneg, spec]54 simp only [mul_assoc, hv, mul_one, ← mul_assoc (U x : Matrix D D ℂ).conjTranspose, one_mul]55 let V : Matrix D (X × D) ℂ := fun i j ↦ W j.1 i j.256 have hrow : V * V.conjTranspose = ∑ x, A x := by57 ext i j58 change (∑ k : X × D, W k.1 i k.2 * star (W k.1 j k.2)) = _59 rw [Fintype.sum_prod_type, Matrix.sum_apply]60 exact Finset.sum_congr rfl (fun x _ ↦ congrArg (fun M : Matrix D D ℂ ↦ M i j) (row x))61 have hdiag (j : X × D) : ((V.conjTranspose * V) j j).re = (hA j.1).isHermitian.eigenvalues j.2 :=62 by63 change (((W j.1).conjTranspose * W j.1) j.2 j.2).re = _64 rw [col]65 simp [d]66 have h := diagonal_kernel_le_reciprocalDet (Matrix.posSemidef_conjTranspose_mul_self V) ht67 have hd := Matrix.det_one_add_mul_comm (t • V) V.conjTranspose68 simp only [Matrix.smul_mul, Matrix.mul_smul, hrow] at hd69 rw [← show reciprocalDet t (∑ x, A x) = reciprocalDet t (V.conjTranspose * V) from70 congrArg (fun z : ℂ ↦ z.re⁻¹) hd] at h71 rw [reciprocalDet_blockDiagonal A hA]72 simp_rw [reciprocalDet_spectral (hA _).isHermitian]73 simpa only [kernel, Fintype.prod_prod_type, hdiag] using h7475end SubentropyCertificates.ConditionalContinuity
Axioms used
Choose a statement to see which axioms its proof uses.