Pratik Patil

SSAMarginalValues.lean

1module23public import SubentropyCertificates.QuantumSSACounterexample4public import SubentropyCertificates.EqualPriorSubentropy5public import D5.S3.Quantum.Subentropy.UniformValues6import all SubentropyCertificates.EqualPriorSubentropy7import all SubentropyCertificates.CounterexampleDeterminants89/-! The individual subentropies and repeated-node evaluation in the proof of Proposition 23. -/10@[expose] public section11noncomputable section12open Matrix MeasureTheory Set13open scoped BigOperators ComplexOrder14namespace SubentropyCertificates.QuantumCounterexample15open D5.S3.Quantum.Subentropy.Basic16open D5.S3.Quantum.Subentropy.UniformValues17open SubentropyCertificates.BinarySpectra1819private theorem log_ten : Real.log 10 = Real.log 2 + Real.log 5 := by20  rw [← Real.log_mul (by norm_num) (by norm_num)]21  norm_num2223private theorem log_nine : Real.log 9 = 2 * Real.log 3 := by24  have h := Real.log_pow (3 : ℝ) 225  norm_num at h26  exact h2728private theorem spectrum_mixture {D : Type*} [Fintype D] [DecidableEq D]29    (V : Matrix D Bit ℂ) : nonzeroSpectrum (mixture V) =30      nonzeroSpectrum ((1/10 : ℝ) • (V.conjTranspose * V)) := by31  rw [mixture, ← Matrix.smul_mul, nonzeroSpectrum_mul_comm, Matrix.mul_smul]3233/-- The nonzero eigenvalues of the state and of its three marginals, with multiplicities. -/34theorem witness_nonzero_spectra :35    nonzeroSpectrum (CStarMatrix.ofMatrix.symm state.1) = {(1/2 : ℂ),1/2} ∧36    nonzeroSpectrum (CStarMatrix.ofMatrix.symm stateB.1) = {(1/2 : ℂ),1/2} ∧37    nonzeroSpectrum (CStarMatrix.ofMatrix.symm stateAB.1) = {(2/5 : ℂ),2/5,1/10,1/10} ∧38    nonzeroSpectrum (CStarMatrix.ofMatrix.symm stateBC.1) = {(9/10 : ℂ),1/10} := by39  obtain ⟨hab, hb, hbc⟩ := marginal_matrices40  rw [hab, hb, hbc]41  have hhalf : nonzeroSpectrum (diagonal (fun _ : Bit ↦ (1/2 : ℂ))) = {1/2,1/2} := by42    norm_num [nonzeroSpectrum, Matrix.charpoly_diagonal, Fin.prod_univ_two,43      Polynomial.roots_mul, Polynomial.X_sub_C_ne_zero, two_nsmul, Multiset.singleton_add,44      Multiset.filter_cons, Multiset.filter_singleton]45  refine ⟨?_, hhalf, ?_, ?_⟩46  · change nonzeroSpectrum (mixture labelled) = _47    rw [spectrum_mixture, signal_grams.1, ← Matrix.diagonal_smul]48    convert hhalf using 149    congr 250    ext i51    norm_num [Complex.real_smul]52  · norm_num [nonzeroSpectrum, Matrix.charpoly_diagonal, Fintype.prod_prod_type, Fin.prod_univ_two,53      abWeight, Polynomial.roots_mul, Polynomial.X_sub_C_ne_zero, Multiset.filter_singleton, Multiset.cons_swap]54    simp only [← Multiset.singleton_add]55    abel56  · rw [spectrum_mixture, signal_grams.2]57    let G : Matrix Bit Bit ℂ := (1/10 : ℝ) • (fun i j ↦ if i=j then 5 else 4 : Matrix Bit Bit ℂ)58    let L := diagonal ![((9/10 : ℝ) : ℂ),((1/10 : ℝ) : ℂ)]59    have hG : G = !![1/2,2/5;2/5,1/2] := by60      ext i j61      fin_cases i <;> fin_cases j <;> norm_num [G, Matrix.smul_apply, Complex.real_smul]62    have same : G.charpoly = L.charpoly := by63      rw [hG, Matrix.charpoly_fin_two, Matrix.charpoly_fin_two]64      norm_num [L, Matrix.det_fin_two, Matrix.trace, Fin.sum_univ_two]65    change nonzeroSpectrum G = _66    have h := congrArg (fun f : Polynomial ℂ ↦ f.roots.filter (· ≠ 0)) same67    change nonzeroSpectrum G = nonzeroSpectrum L at h68    rw [h]69    unfold L70    rw [diagonal_pair_spectrum]71    norm_num [Multiset.filter_singleton, Multiset.filter_cons]7273/-- The four individual matrix subentropies in the proof of Proposition 23. -/74theorem witness_marginal_values :75    subentropy stateAB = Real.log 5 - 121/135 * Real.log 2 - 13/18 ∧76    subentropy stateBC = Real.log 10 - 81/40 * Real.log 3 ∧77    subentropy stateB = Real.log 2 - 1/2 ∧ subentropy state = Real.log 2 - 1/2 := by78  have hb : subentropy stateB = Real.log 2 - 1/2 := by79    unfold subentropy80    rw [marginal_matrices.2.1]81    simpa using subentropy_uniformTwo (ι := Bit) (by decide)82  have he : subentropy state = subentropy stateB := by83    apply setIntegral_congr_fun measurableSet_Ioi84    intro s _85    change _ - ((shiftDet state s⁻¹).re)⁻¹ = _ - ((shiftDet stateB s⁻¹).re)⁻¹86    rw [(witness_determinants _).1, (witness_determinants _).2.1]87  let p : Bit → ℝ := ![1 - (1/10), 1/10]88  have hdet (t : ℝ) :89      (1 + t • diagonal (fun i ↦ (p i : ℂ))).det = shiftDet stateBC t := by90    rw [det_diag, (witness_determinants t).2.2.2]91    apply congrArg Complex.ofReal92    norm_num [p, Fin.prod_univ_two, d2]93    ring94  have hbcDiag : subentropy stateBC = matrixSubentropy (diagonal (fun i ↦ (p i : ℂ))) := by95    apply setIntegral_congr_fun measurableSet_Ioi96    intro s _97    change _ - (shiftDet stateBC s⁻¹).re⁻¹ = _ - _ 98    rw [← hdet s⁻¹]99  have hpdiag : (fun i ↦ (p i : ℂ)) = ![((1-1/10 : ℝ) : ℂ),((1/10 : ℝ) : ℂ)] := by100    funext i101    fin_cases i <;> rfl102  have hbc : subentropy stateBC = Real.log 10 - 81/40 * Real.log 3 := by103    rw [hbcDiag, hpdiag, pair_subentropy, binary_curve_log (by norm_num [Set.mem_Ioo])]104    rw [show (1 - 1/10 : ℝ) = 9/10 by norm_num, Real.log_div (by norm_num) (by norm_num),105      Real.log_div (by norm_num) (by norm_num), Real.log_one, log_nine]106    ring107  refine ⟨?_, hbc, hb, he.trans hb⟩108  have h := quantum_ssa_counterexample.1109  unfold deficit at h110  rw [hbc, he, hb, log_ten] at h111  linarith112113/-- The repeated-spectrum expression with a=2/5, b=1/10 evaluates to the actual Q(AB). -/114theorem repeated_spectrum_marginal_evaluation :115    let a := (2/5 : ℝ)116    let b := (1/10 : ℝ)117    let f := fun z : ℝ ↦ z^4 * Real.log z118    subentropy stateAB = -(deriv f a + deriv f b)/(a-b)^2 + 2*(f a-f b)/(a-b)^3 := by119  dsimp only120  have df (z : ℝ) (hz : 0 < z) :121      deriv (fun y : ℝ ↦ y^4 * Real.log y) z =122        4 * z^3 * Real.log z + z^4 * z⁻¹ := by123    exact ((hasDerivAt_pow 4 z).mul (Real.hasDerivAt_log hz.ne')).deriv124  rw [witness_marginal_values.1, df _ (by norm_num), df _ (by norm_num),125    Real.log_div (by norm_num) (by norm_num), Real.log_div (by norm_num) (by norm_num),126    Real.log_one, log_ten]127  ring128129end SubentropyCertificates.QuantumCounterexample130

Axioms used

Choose a statement to see which axioms its proof uses.