PinchingAlternatives.lean
1module2public import SubentropyCertificates.PinchingRank3public import SubentropyCertificates.QuantumEquality45/-! Equality for pure decompositions, including the zero-gain alternative. -/6@[expose] public section7noncomputable section8set_option backward.isDefEq.respectTransparency false9open Matrix10open scoped BigOperators MatrixOrder ComplexOrder11namespace SubentropyCertificates.PinchingEquality12open D5.S3.Quantum.Subentropy.ClassicalQuantumGram13open D5.S3.Quantum.Subentropy.PinchingGap14open SubentropyCertificates.ClassicalCurve15open SubentropyCertificates.QuantumEquality16variable {X B I : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B] [Fintype I]1718theorem pure_gain_zero_iff_single_block (v : X × B → ℂ) (hv : amplitude v v = 1) :19 gain (projector v) = 0 ↔ ∃ x, ∀ k : X × B, k.1 ≠ x → v k = 0 := by20 constructor21 · let r x := ∑ b, Complex.normSq (v (x,b))22 have hr : r ∈ probabilitySimplex X := by23 refine ⟨fun x => Finset.sum_nonneg (fun _ _ => Complex.normSq_nonneg _), ?_⟩24 have hc : ((∑ x, r x : ℝ) : ℂ) = 1 := by25 simpa only [amplitude, dotProduct, Pi.star_apply, r, Complex.ofReal_sum, Fintype.sum_prod_type,26 Complex.normSq_eq_conj_mul_self, starRingEnd_apply] using hv27 exact_mod_cast hc28 have hval : gain (projector v) = classicalSubentropy r := (pure_block_pinching v hv).129 intro hz30 obtain ⟨x, hx⟩ := (classical_zero_iff_pointMass r hr).mp (hval.symm.trans hz)31 refine ⟨x, ?_⟩32 rintro ⟨a,b⟩ ha33 have hsum : ∑ j, Complex.normSq (v (a,j)) = 0 := by34 simpa only [pointMass, ite_eq_right ha] using congrFun hx a35 exact Complex.normSq_eq_zero.mp36 ((Finset.sum_eq_zero_iff_of_nonneg (fun j _ => Complex.normSq_nonneg (v (a,j)))).mp hsum b (Finset.mem_univ _))37 · rintro ⟨x, hx⟩38 have hfix : blockPinch (projector v) = projector v := by39 apply Matrix.ext40 intro i j41 by_cases hij : i.1 = j.142 · simp [blockPinch, hij]43 · by_cases hi : i.1 = x44 · have hj : j.1 ≠ x := fun h => hij (hi.trans h.symm)45 simp [blockPinch, hij, projector, vecMulVec, hx j hj]46 · simp [blockPinch, hij, projector, vecMulVec, hx i hi]47 simp [gain, hfix]4849theorem pinching_equality_iff (i₀ : X × B) (w : I → ℝ) (hw : ∀ i, 0 ≤ w i)50 (hs : ∑ i, w i = 1) (v : I → X × B → ℂ) (hv : ∀ i, amplitude (v i) (v i) = 1) :51 gain (∑ i, w i • projector (v i)) = ∑ i, w i * gain (projector (v i)) ↔52 (∀ i, 0 < w i → ∃ x, ∀ k : X × B, k.1 ≠ x → v i k = 0) ∨53 (∃ k, 0 < w k ∧ ∀ j, 0 < w j → projector (v j) = projector (v k)) := by54 let A i := projector (v i)55 let T := ∑ i, w i • A i56 have hp i : (A i).PosSemidef := Matrix.posSemidef_vecMulVec_self_star _57 have ht i : (A i).trace = 1 := by58 change (∑ k, v i k * star (v i k)) = 159 simpa only [amplitude, dotProduct, Pi.star_apply, mul_comm] using hv i60 have hdom := (actual_pinching_gap_laws i₀).161 have hT := hdom.1.sum_mem (fun i _ => hw i) hs (fun i _ => And.intro (hp i) (ht i))62 have hnon : 0 ≤ gain T := (actual_pinching_gap_laws i₀).2 _ hT.1 hT.263 have hle : gain T ≤ ∑ i, w i * gain (A i) := hdom.map_sum_le64 (fun i _ => hw i) hs (fun i _ => And.intro (hp i) (ht i))65 have hterm i : 0 ≤ w i * gain (A i) := mul_nonneg (hw i)66 ((actual_pinching_gap_laws i₀).2 _ (hp i) (ht i))67 constructor68 · intro he69 by_cases hpos : 0 < gain T70 · exact Or.inr (common_projector_of_positive_gain_equality i₀ w hw hs v hv hpos he)71 · left72 have hz := le_antisymm (le_of_not_gt hpos) hnon73 have hsum : ∑ i, w i * gain (A i) = 0 := he.symm.trans hz74 intro i hi75 have h := (Finset.sum_eq_zero_iff_of_nonneg (fun j _ => hterm j)).mp hsum i (Finset.mem_univ _)76 exact (pure_gain_zero_iff_single_block _ (hv i)).mp ((mul_eq_zero.mp h).resolve_left hi.ne')77 · rintro (h | ⟨k, _, h⟩)78 · have hz : ∑ i, w i * gain (A i) = 0 := by79 apply Finset.sum_eq_zero80 intro i _81 by_cases hi : w i = 082 · rw [hi, zero_mul]83 · exact mul_eq_zero_of_right _ ((pure_gain_zero_iff_single_block _ (hv i)).mpr84 (h i (lt_of_le_of_ne (hw i) (Ne.symm hi))))85 exact le_antisymm hle (hz.trans_le hnon)86 · have hM i : w i • A i = w i • A k := by87 by_cases hi : w i = 088 · simp [hi]89 · exact congrArg (w i • ·) (h i (lt_of_le_of_ne (hw i) (Ne.symm hi)))90 have hC i : w i * gain (A i) = w i * gain (A k) := by91 by_cases hi : w i = 092 · simp [hi]93 · exact congrArg (fun M => w i * gain M) (h i (lt_of_le_of_ne (hw i) (Ne.symm hi)))94 change gain (∑ i, w i • A i) = ∑ i, w i * gain (A i)95 simp_rw [hM, hC]96 rw [← Finset.sum_smul, ← Finset.sum_mul, hs, one_smul, one_mul]9798end SubentropyCertificates.PinchingEquality
Axioms used
Choose a statement to see which axioms its proof uses.