CyclicSpectra.lean
1module23public import SubentropyCertificates.CyclicSignals4public import SubentropyCertificates.NonzeroSpectrum5import all D5.S3.Quantum.Subentropy.ClassicalQuantumGram67/-! The spectra of the uniform three-signal ensemble and its conditional subentropy. -/8@[expose] public section9noncomputable section10set_option autoImplicit false11set_option backward.isDefEq.respectTransparency false12open Matrix13open scoped BigOperators ComplexOrder14namespace SubentropyCertificates.Cyclic15open SubentropyCertificates.BinarySpectra SubentropyCertificates.ClassicalCurve16open SubentropyCertificates.Discrimination SubentropyCertificates.PinchingEquality17open D5.S3.Quantum.Subentropy.Basic D5.S3.Quantum.Subentropy.ClassicalQuantumGram18open D5.S3.Quantum.Information.OrthogonalRecordEntropy1920theorem average_matrix (lam : Three → ℝ) (hp : ∀ j, 0 ≤ lam j) (hs : ∑ j, lam j = 1) :21 densityMatrix (mixtureState prior prior_nonneg prior_sum (signalState lam hp hs)) =22 diagonal (fun j ↦ (lam j : ℂ)) := by23 change (∑ k : Three, (1/3 : ℝ) • projector (signal lam k)) = _24 rw [← Finset.smul_sum]25 unfold signal26 rw [wave_projector_sum, ← diagonal_smul]27 congr 128 funext j29 simp only [Pi.smul_apply, Complex.real_smul, ← Complex.ofReal_pow, Real.sq_sqrt (hp _)]30 push_cast31 ring3233private def inclusion (lam : Three → ℝ) : Matrix (Three × Three) Three ℂ :=34 fun u k ↦ if u.1 = k then signal lam k u.2 else 03536private theorem inclusion_isometry (lam : Three → ℝ) (hp : ∀ j, 0 ≤ lam j)37 (hs : ∑ j, lam j = 1) : (inclusion lam).conjTranspose * inclusion lam = 1 := by38 ext i j39 by_cases hij : i=j40 · subst j41 simpa [inclusion, Matrix.mul_apply, Matrix.conjTranspose_apply, Fintype.sum_prod_type,42 amplitude, dotProduct] using signal_normalized lam hp hs i43 · simp [inclusion, Matrix.mul_apply, Matrix.conjTranspose_apply, Fintype.sum_prod_type, hij, Ne.symm hij,44 apply_ite, ite_mul]4546private theorem joint_matrix (lam : Three → ℝ) (hp : ∀ j, 0 ≤ lam j) (hs : ∑ j, lam j = 1) :47 densityMatrix (recordState prior prior_nonneg prior_sum (signalState lam hp hs)) =48 inclusion lam * diagonal (fun _ : Three ↦ (1/3 : ℂ)) * (inclusion lam).conjTranspose := by49 ext ⟨x,i⟩ ⟨y,j⟩50 rw [show densityMatrix _ (x,i) (y,j) = _ from51 record_entries prior prior_nonneg prior_sum (signalState lam hp hs) (x,i) (y,j)]52 by_cases h : x=y53 · subst y54 change (if x=x then ((1/3 : ℝ) : ℂ) * (signal lam x i * star (signal lam x j)) else 0) = _55 simp [Matrix.mul_apply, Matrix.conjTranspose_apply, inclusion, apply_ite, ite_mul]56 ring57 · simp [h, Matrix.mul_apply, Matrix.conjTranspose_apply, inclusion, apply_ite, ite_mul]5859/-- The joint state has exactly three nonzero eigenvalues, each equal to one third. -/60theorem joint_spectrum (lam : Three → ℝ) (hp : ∀ j, 0 ≤ lam j) (hs : ∑ j, lam j = 1) :61 nonzeroSpectrum (densityMatrix (recordState prior prior_nonneg prior_sum (signalState lam hp hs))) =62 3 • ({1/3} : Multiset ℂ) := by63 rw [joint_matrix, nonzeroSpectrum_mul_comm, ← Matrix.mul_assoc, inclusion_isometry lam hp hs,64 Matrix.one_mul]65 unfold nonzeroSpectrum66 rw [Matrix.charpoly_diagonal]67 norm_num [ZMod.card, Polynomial.roots_pow, Polynomial.roots_X_sub_C, succ_nsmul,68 Multiset.filter_add, Multiset.filter_singleton]6970/-- Equation (cyclic-conditional), including probability vectors with zero entries. -/71theorem cyclic_conditional_subentropy (lam : Three → ℝ) (hp : ∀ j, 0 ≤ lam j)72 (hs : ∑ j, lam j = 1) :73 conditionalSubentropy prior prior_nonneg prior_sum (signalState lam hp hs) =74 Real.log 3 - (harmonic 3 : ℝ) + 1 - classicalSubentropy lam := by75 change matrixSubentropy (densityMatrix (recordState _ _ _ _)) -76 matrixSubentropy (densityMatrix (mixtureState _ _ _ _)) = _77 rw [joint_matrix, average_matrix, matrixSubentropy_isometric_embedding _ _ (inclusion_isometry lam hp hs)]78 have hu := classical_subentropy_uniform (ι := Three) (by simp [ZMod.card])79 have hu' : matrixSubentropy (diagonal (fun _ : Three ↦ (1/3 : ℂ))) =80 Real.log 3 - (harmonic 3 : ℝ) + 1 := by81 simpa [classicalSubentropy, ZMod.card] using hu82 rw [hu']83 rfl8485end SubentropyCertificates.Cyclic86
Axioms used
Choose a statement to see which axioms its proof uses.