Pratik Patil

FixedMarginalTable.lean

1module23public import SubentropyCertificates.BinarySharpPriors4public import SubentropyCertificates.DeterminantRepresentation5import all SubentropyCertificates.BinarySharpPriors6import all SubentropyCertificates.CounterexampleDeterminants78/-! Moving mass from one label to another along a single eigenvector of a fixed marginal. -/9@[expose] public section10noncomputable section11open Matrix Set MeasureTheory12open scoped BigOperators13namespace SubentropyCertificates.ConditionalContinuity14open SubentropyCertificates.ClassicalCurve15open SubentropyCertificates.Continuity (totalVariation)16open SubentropyCertificates.Representations17open SubentropyCertificates.QuantumCounterexample (det_diag)1819variable {X D : Type*} [Fintype X] [DecidableEq X] [Fintype D] [DecidableEq D]2021/-- Move mass e from label a to b in spectral coordinate i, keeping every column sum fixed. -/22def splitTable (a b : X) (w : D → ℝ) (i : D) (e : ℝ) (x : X) (j : D) : ℝ :=23  if x = a then w j - (if j = i then e else 0)24  else if x = b ∧ j = i then e else 02526/-- The flattened joint spectrum, in the order of the CQ block direct sum. -/27def splitPrior (a b : X) (w : D → ℝ) (i : D) (e : ℝ) (z : D × X) : ℝ :=28  splitTable a b w i e z.2 z.12930omit [Fintype D] in31theorem splitTable_column (a b : X) (hab : a ≠ b) (w : D → ℝ) (i : D) (e : ℝ) (j : D) :32    ∑ x, splitTable a b w i e x j = w j := by33  rw [sum_on_pair a b hab _ (fun x ha hb ↦ by simp [splitTable, ha, hb])]34  by_cases h : j = i <;> simp [splitTable, hab.symm, h]3536theorem splitPrior_probability (a b : X) (hab : a ≠ b) {w : D → ℝ}37    (hw : w ∈ probabilitySimplex D) (i : D) {e : ℝ} (he : e ∈ Icc 0 (w i)) :38    splitPrior a b w i e ∈ probabilitySimplex (D × X) := by39  constructor40  · rintro ⟨j,x⟩41    by_cases hj : j = i42    · subst j43      by_cases ha : x = a <;> by_cases hb : x = b <;>44        simp [splitPrior, splitTable, ha, hb, hab.symm, he.1, he.2]45    · by_cases ha : x = a <;> simp [splitPrior, splitTable, ha, hj, hw.1]46  · simpa only [splitPrior, Fintype.sum_prod_type, splitTable_column a b hab] using hw.24748theorem splitPrior_distance (a b : X) (hab : a ≠ b) (w : D → ℝ) (i : D) {e : ℝ} (he : 0 ≤ e) :49    totalVariation (splitPrior a b w i 0) (splitPrior a b w i e) = e := by50  have row (j : D) : (∑ x, |splitTable a b w i 0 x j - splitTable a b w i e x j|) =51      if j = i then e + e else 0 := by52    rw [sum_on_pair a b hab _ (fun x ha hb ↦ by simp [splitTable, ha, hb])]53    by_cases h : j = i <;> simp [splitTable, hab.symm, h, abs_of_nonneg he]54  simp [totalVariation, splitPrior, Fintype.sum_prod_type, row]5556private theorem splitProduct (a b : X) (hab : a ≠ b) (w : D → ℝ) (i : D) (e t : ℝ) :57    (∏ z, (1+t*splitPrior a b w i e z)⁻¹) =58      (∏ j ∈ Finset.univ.erase i, (1+t*w j)⁻¹) * ((1+t*(w i-e))⁻¹ * (1+t*e)⁻¹) := by59  let f (j : D) (x : X) := (1+t*splitTable a b w i e x j)⁻¹60  have row (j : D) : (∏ x, f j x) = f j a * f j b := by61    calc62      _ = ∏ x ∈ ({a,b} : Finset X), f j x := by63        symm64        apply Finset.prod_subset (Finset.subset_univ _)65        intro x _ hx66        simp only [Finset.mem_insert, Finset.mem_singleton, not_or] at hx67        simp [f, splitTable, hx.1, hx.2]68      _ = _ := by simp [hab]69  change (∏ z : D × X, f z.1 z.2) = _70  rw [Fintype.prod_prod_type, ← Finset.prod_erase_mul _ _ (Finset.mem_univ i)]71  apply congrArg₂ (· * ·)72  · apply Finset.prod_congr rfl73    intro j hj74    rw [row]75    simp [f, splitTable, (Finset.mem_erase.mp hj).1, hab.symm]76  · rw [row]77    simp [f, splitTable, hab.symm]7879private theorem diagonal_integrand (p : D → ℝ) (t : ℝ) :80    determinantIntegrand (diagonal fun j ↦ (p j : ℂ)) t =81    (1/(1+t) - ∏ j, (1+t*p j)⁻¹) / t^2 := by82  simp only [determinantIntegrand, det_diag, Complex.ofReal_re, one_div, Finset.prod_inv_distrib]8384/-- Exact subentropy increment after splitting an eigenvalue; no full-rank assumption is needed. -/85theorem splitPrior_increment (a b : X) (hab : a ≠ b) {w : D → ℝ}86    (hw : w ∈ probabilitySimplex D) (i : D) {e : ℝ} (he : e ∈ Icc 0 (w i)) :87    classicalSubentropy (splitPrior a b w i e) - classicalSubentropy (splitPrior a b w i 0) =88      e * ∫ t in Ioi (0 : ℝ), (w i-e) / ((1+t*(w i-e))*(1+t*e)) * ∏ j, (1+t*w j)⁻¹ := by89  have h0 := diagonal_density (splitPrior_probability a b hab hw i (e := 0) ⟨le_rfl, hw.1 i⟩)90  have h1 := diagonal_density (splitPrior_probability a b hab hw i he)91  obtain ⟨hi0, hq0⟩ := reciprocal_determinant_integral _ h0.1 h0.292  obtain ⟨hi1, hq1⟩ := reciprocal_determinant_integral _ h1.1 h1.293  unfold classicalSubentropy94  rw [hq1, hq0, ← integral_sub hi1 hi0, ← integral_const_mul]95  apply setIntegral_congr_fun measurableSet_Ioi96  intro t ht97  simp only [diagonal_integrand, splitProduct a b hab, sub_zero, mul_zero, add_zero, inv_one,98    mul_one]99  rw [← Finset.prod_erase_mul _ (fun j ↦ (1+t*w j)⁻¹) (Finset.mem_univ i)]100  have h₁ : 0 < 1+t*(w i-e) := by nlinarith [mul_nonneg ht.le (sub_nonneg.mpr he.2)]101  have h₂ : 0 < 1+t*e := by nlinarith [mul_nonneg ht.le he.1]102  have h₃ : 0 < 1+t*w i := by nlinarith [mul_nonneg ht.le (hw.1 i)]103  have h₄ : 0 < 1+t := by linarith [show 0 < t from ht]104  generalize (∏ j ∈ Finset.univ.erase i, (1+t*w j)⁻¹) = k105  field_simp [h₁.ne', h₂.ne', h₃.ne', h₄.ne', ht.ne']106  ring107108end SubentropyCertificates.ConditionalContinuity

Axioms used

Choose a statement to see which axioms its proof uses.