CounterexampleDeterminants.lean
1module23public import SubentropyCertificates.CounterexampleState4public import SubentropyCertificates.CounterexampleIntegral56/-! Shifted determinants of the actual joint density and its partial traces. -/7@[expose] public section8noncomputable section9set_option autoImplicit false10set_option backward.isDefEq.respectTransparency false11open Matrix12open scoped BigOperators13namespace SubentropyCertificates.QuantumCounterexample14open D5.S3.Quantum.Foundation.FiniteStateChannel151617private theorem det_mixture {D : Type*} [Fintype D] [DecidableEq D]18 (V : Matrix D Bit ℂ) (t : ℝ) :19 (1 + t • mixture V).det = (1 + (t*(1/10 : ℝ)) • (V.conjTranspose*V)).det := by20 simpa only [mixture, smul_smul, Matrix.mul_smul, Matrix.smul_mul] using21 Matrix.det_one_add_mul_comm ((t*(1/10 : ℝ)) • V) V.conjTranspose2223private theorem det_diag {D : Type*} [Fintype D] [DecidableEq D] (w : D → ℝ) (t : ℝ) :24 (1 + t • diagonal (fun i => (w i : ℂ))).det = ↑(∏ i, (1+t*w i)) := by25 have h : (1 : Matrix D D ℂ) + t • diagonal (fun i => (w i : ℂ)) =26 diagonal (fun i => ((1+t*w i : ℝ) : ℂ)) := by27 ext i j28 by_cases hij : i=j29 · subst j; simp [Complex.real_smul]30 · simp [hij]31 rw [h, Matrix.det_diagonal, Complex.ofReal_prod]3233def shiftDet {D : Type*} [Fintype D] [DecidableEq D] (ρ : DensityState D) (t : ℝ) : ℂ :=34 (1 + t • (CStarMatrix.ofMatrix.symm ρ.1)).det3536/-- Polynomial identities hold for every real t, including zero. -/37theorem witness_determinants (t : ℝ) :38 shiftDet state t = (d0 t : ℂ) ∧ shiftDet stateB t = (d0 t : ℂ) ∧39 shiftDet stateAB t = (d1 t : ℂ) ∧ shiftDet stateBC t = (d2 t : ℂ) := by40 obtain ⟨hab,hb,hbc⟩ := marginal_matrices41 obtain ⟨hX,hY⟩ := signal_grams42 refine ⟨?_, ?_, ?_, ?_⟩43 · change (1 + t • mixture labelled).det = _44 rw [det_mixture, hX]45 change (1 + _ • diagonal (fun _ : Bit => ((5 : ℝ) : ℂ))).det = _46 rw [det_diag]47 apply congrArg Complex.ofReal48 simp only [Fin.prod_univ_two, d0]49 ring50 · unfold shiftDet51 rw [hb]52 rw [← show ((1/2 : ℝ) : ℂ) = (1/2 : ℂ) by norm_num]53 rw [det_diag]54 apply congrArg Complex.ofReal55 simp only [Fin.prod_univ_two, d0]56 ring57 · unfold shiftDet58 rw [hab, det_diag]59 apply congrArg Complex.ofReal60 simp [Fintype.prod_prod_type, Fin.prod_univ_two, abWeight, d1]61 ring62 · unfold shiftDet63 rw [hbc, det_mixture, hY, Matrix.det_fin_two]64 norm_num [Matrix.one_apply, Complex.real_smul, d2]65 ring6667def determinantGap (t : ℝ) :=68 (shiftDet stateB t).re⁻¹ + (shiftDet state t).re⁻¹ -69 (shiftDet stateAB t).re⁻¹ - (shiftDet stateBC t).re⁻¹7071theorem determinant_gap_eq (t : ℝ) : determinantGap t = gap t := by72 obtain ⟨h,hb,hab,hbc⟩ := witness_determinants t73 simp only [determinantGap,h,hb,hab,hbc,Complex.ofReal_re,gap,div_eq_mul_inv]74 ring7576end SubentropyCertificates.QuantumCounterexample
Axioms used
Choose a statement to see which axioms its proof uses.