Pratik Patil

FourCellDeficit.lean

1module23public import SubentropyCertificates.FourCell4public import Mathlib.Analysis.Complex.Exponential5import Mathlib.Tactic.FieldSimp6import Mathlib.Tactic.LinearCombination7import Mathlib.Tactic.Ring89/-! Quantitative four-cell comparison for the two-qubit deficit. -/10@[expose] public section11noncomputable section12namespace SubentropyCertificates.FourCell1314/-- Retaining the cubic term as well as the quadratic term in the15four-cell numerator yields the factor needed after integration. -/16theorem numerator_cubic_lower_bound (a b c d t : ℝ)17    (ha : 0 ≤ a) (hb : 0 ≤ b) (hc : 0 ≤ c) (hd : 0 ≤ d)18    (hnorm : a+b+c+d = 1) (ht : 0 ≤ t) :19    E a b c d * t^2 * (1+t) ≤ numerator a b c d t := by20  have hu : 0 ≤ U a b c d := by unfold U; positivity21  have hv : 0 ≤ V a b c d := by unfold V; positivity22  have hw : 0 ≤ W a b c d := by unfold W; positivity23  have hx : 0 ≤ X a b c d := by unfold X; positivity24  have hy : 0 ≤ Y a b c d := by unfold Y; positivity25  have hx_e : X a b c d ≤ E a b c d := by26    unfold X E27    nlinarith only [mul_nonneg (mul_nonneg ha hd) (show 0 ≤ 1-b-c by linarith),28      mul_nonneg (mul_nonneg hb hc) (show 0 ≤ 1-a-d by linarith)]29  have hxy : 2 * Y a b c d ≤ X a b c d := by30    unfold X Y31    nlinarith only [mul_nonneg (mul_nonneg (mul_nonneg ha hb) hc) (show 0 ≤ 1-d by linarith),32      mul_nonneg (mul_nonneg (mul_nonneg ha hb) hd) (show 0 ≤ 1-c by linarith),33      mul_nonneg (mul_nonneg ha hc) hd, mul_nonneg (mul_nonneg hb hc) hd]34  have hxuv : X a b c d ≤ U a b c d * V a b c d := by35    rw [uv_identity a b c d hnorm]36    exact le_add_of_nonneg_right (sq_nonneg _)37  have hcoeff4 : 0 ≤ E a b c d - 2*X a b c d - Y a b c d + 2*U a b c d*V a b c d := by38    linarith only [hx_e, hxy, hxuv, hy]39  have hcoeff5 : 0 ≤ -X a b c d - 2*Y a b c d + 2*U a b c d*V a b c d := by40    linarith only [hxy, hxuv]41  have hcoeff6 : 0 ≤ -Y a b c d + U a b c d*V a b c d*W a b c d := by42    linarith only [xw_lower_bound a b c d ha hb hc hd hnorm,43      mul_le_mul_of_nonneg_right hxuv hw, hy]44  have htail : 0 ≤45      (E a b c d - 2*X a b c d - Y a b c d + 2*U a b c d*V a b c d) * t^4 +46      (-X a b c d - 2*Y a b c d + 2*U a b c d*V a b c d) * t^5 +47      (-Y a b c d + U a b c d*V a b c d*W a b c d) * t^6 +48      U a b c d*V a b c d*X a b c d * t^7 +49      U a b c d*V a b c d*Y a b c d * t^8 := by positivity50  unfold numerator51  nlinarith only [htail, mul_nonneg (sub_nonneg.mpr hx_e) (pow_nonneg ht 3)]5253theorem marginal_product_le_cross_mass (a b c d : ℝ)54    (ha : 0 ≤ a) (hb : 0 ≤ b) (hc : 0 ≤ c) (hd : 0 ≤ d)55    (hs : a+b+c+d = 1) : U a b c d * V a b c d ≤ E a b c d := by56  have had : a*d ≤ a := mul_le_of_le_one_right ha (by linarith)57  have hbc : b*c ≤ b := mul_le_of_le_one_right hb (by linarith)58  have hid := uv_identity a b c d hs59  unfold X E at *60  nlinarith only [hid, mul_nonneg (mul_nonneg ha hd) (show 0 ≤ 1-b-c-a*d by linarith),61    mul_nonneg (mul_nonneg hb hc) (show 0 ≤ 1-a-d-b*c by linarith),62    mul_nonneg (mul_nonneg ha hd) (mul_nonneg hb hc)]6364private theorem exp_product_bound (x y : ℝ) (hy : 0 ≤ y) :65    (1+x)*(1+y) ≤ Real.exp (x+y) := by66  rw [Real.exp_add]67  exact mul_le_mul (by linarith [Real.add_one_le_exp x]) (by linarith [Real.add_one_le_exp y])68    (by positivity : 0 ≤ 1+y) (Real.exp_nonneg _)6970/-- Pointwise lower bound at the paper's reciprocal-determinant parameter. -/71theorem four_cell_exponential_bound (a b c d t : ℝ)72    (ha : 0 ≤ a) (hb : 0 ≤ b) (hc : 0 ≤ c) (hd : 0 ≤ d)73    (hs : a+b+c+d = 1) (ht : 0 ≤ t) :74    U a b c d * V a b c d * t^2 * Real.exp (-(3*t)) ≤75      cellKernel a b c d t + 1/(1+t) - rowKernel a b c d t - columnKernel a b c d t := by76  let r := rowDen a b c d t77  let s := colDen a b c d t78  let p := cellDen a b c d t79  have hr : 0 < r := by dsimp [r, rowDen, U]; positivity80  have hs' : 0 < s := by dsimp [s, colDen, V]; positivity81  have hp : 0 < p := by dsimp [p, cellDen, W, X, Y]; positivity82  have hR : r = (1+(a+b)*t)*(1+(c+d)*t) := by83    dsimp [r, rowDen, U]; linear_combination -t * hs84  have hS : s = (1+(a+c)*t)*(1+(b+d)*t) := by85    dsimp [s, colDen, V]; linear_combination -t * hs86  have hP : p = (1+a*t)*(1+b*t)*(1+c*t)*(1+d*t) := by87    dsimp [p, cellDen, W, X, Y]; linear_combination -t * hs88  have heR : r ≤ Real.exp t := by89    calc r = _ := hR90         _ ≤ Real.exp ((a+b)*t+(c+d)*t) := exp_product_bound _ _ (by positivity)91         _ = _ := by congr 1; linear_combination t * hs92  have heS : s ≤ Real.exp t := by93    calc s = _ := hS94         _ ≤ Real.exp ((a+c)*t+(b+d)*t) := exp_product_bound _ _ (by positivity)95         _ = _ := by congr 1; linear_combination t * hs96  have heP : p ≤ Real.exp t := by97    rw [hP, mul_assoc ((1+a*t)*(1+b*t))]98    calc99      _ ≤ Real.exp (a*t+b*t) * Real.exp (c*t+d*t) :=100        mul_le_mul (exp_product_bound _ _ (by positivity)) (exp_product_bound _ _ (by positivity))101          (by positivity) (Real.exp_nonneg _)102      _ = _ := by rw [← Real.exp_add]; congr 1; linear_combination t * hs103  have hexp : r*s*p ≤ Real.exp (3*t) := by104    calc r*s*p ≤ (Real.exp t * Real.exp t) * Real.exp t :=105          mul_le_mul (mul_le_mul heR heS hs'.le (Real.exp_nonneg _)) heP hp.le (by positivity)106         _ = _ := by rw [← Real.exp_add, ← Real.exp_add]; congr 1; ring107  have hN := numerator_cubic_lower_bound a b c d t ha hb hc hd hs ht108  have hid := numerator_identity a b c d t109  change r*s*(1+t+p) - (1+t)*p*(r+s) = _ at hid110  have hz : 0 < 1+t := by positivity111  have hD : E a b c d * t^2 / (r*s*p) ≤ 1/p + 1/(1+t) - 1/r - 1/s := by112    field_simp [hr.ne', hs'.ne', hp.ne', hz.ne']113    -- All cleared factors are positive.114    nlinarith only [hid, hN]115  unfold cellKernel rowKernel columnKernel116  rw [← hP, ← hR, ← hS, Real.exp_neg, ← div_eq_mul_inv]117  refine le_trans ?_ hD118  exact div_le_div₀ (by unfold E; positivity)119    (mul_le_mul_of_nonneg_right (marginal_product_le_cross_mass a b c d ha hb hc hd hs) (sq_nonneg _))120    (by positivity) hexp121122end SubentropyCertificates.FourCell

Axioms used

Choose a statement to see which axioms its proof uses.