Pratik Patil

NonCQExampleSlope.lean

1module23public import SubentropyCertificates.NonCQExample4public import SubentropyCertificates.BinaryLogIntervals56/-! Right derivative and exact rational certificate for the violation at t=1/100. -/7@[expose] public section8noncomputable section9open Set Filter Matrix10open scoped Topology11namespace SubentropyCertificates.NonCQ12open SubentropyCertificates.BinarySpectra SubentropyCertificates.ClassicalCurve13open SubentropyCertificates.BinaryIntervals1415private theorem differentiable_fifth : DifferentiableAt ℝ (phi 0) (1/5) := by16  let f (u : ℝ) := -((1-u)^2 * Real.log (1-u) - u^2 * Real.log u)/(1-2*u)17  have hf : DifferentiableAt ℝ f (1/5) := by18    unfold f19    fun_prop (disch := norm_num)20  apply hf.congr_of_eventuallyEq21  filter_upwards [Ioo_mem_nhds (a := (0 : ℝ)) (b := 1/2) (by norm_num : 0 < (1/5 : ℝ))22    (by norm_num : (1/5:ℝ) < 1/2)] with u hu23  exact binary_curve_log hu2425theorem slope_exceeds_one : 1 < 1 + deriv (phi 0) (1/5) / 5 := by26  have hs := (phi_strictConcave 0).slope_lt_of_hasDerivAt27    (by norm_num : (1/5:ℝ) ∈ Icc 0 1) (by norm_num : (1/3:ℝ) ∈ Icc 0 1)28    (by norm_num) differentiable_fifth.hasDerivAt29  have hm := phi_strictMono 0 (by norm_num [uniformError] : (1/5:ℝ) ∈ Icc 0 (uniformError 0))30    (by norm_num [uniformError] : (1/3:ℝ) ∈ Icc 0 (uniformError 0)) (by norm_num)31  have hp : 0 < slope (phi 0) (1/5) (1/3) := by32    rw [slope_def_field]33    exact div_pos (sub_pos.mpr hm) (by norm_num)34  linarith3536theorem change_slope : Tendsto (fun t ↦ changeValue t/t) (𝓝[>] (0:ℝ))37    (𝓝 (1 + deriv (phi 0) (1/5) / 5)) := by38  have hlin : HasDerivAt (fun t : ℝ ↦ (1-t)/5) (-1/5) 0 := by39    convert ((hasDerivAt_const (0:ℝ) (1:ℝ)).sub (hasDerivAt_id 0)).div_const 5 using 1 <;> norm_num40  have hd : HasDerivAt (phi 0) (deriv (phi 0) (1/5)) ((1-(0:ℝ))/5) := by41    simpa only [sub_zero] using differentiable_fifth.hasDerivAt42  have hcomp := hd.comp 0 hlin43  have hbase := ((phi_hasDerivWithinAt_zero 0).add_const (phi 0 (1/5))).sub hcomp.hasDerivWithinAt44  have hh : HasDerivWithinAt changeValue (1 + deriv (phi 0) (1/5) / 5) (Ioi 0) 0 := by45    convert hbase using 1 <;> first | rfl | ring46  have hzero : changeValue 0 = 0 := by simp [changeValue, phi_zero]47  simpa only [slope_fun_def_field, hzero, sub_zero] using48    (hasDerivWithinAt_iff_tendsto_slope' (show (0:ℝ) ∉ Ioi 0 from lt_irrefl _)).mp hh4950/-- Strict rational endpoints for the change in conditional subentropy at t=1/100. -/51theorem change_at_one_percent :52    1045371079/100000000000 < changeValue (1/100) ∧53      changeValue (1/100) < 1045371080/100000000000 := by54  have h := binary_interval 22 7 (u:=1/100) (by norm_num) (by norm_num) (by norm_num)55  have g := binary_interval 22 3 (u:=1/5) (by norm_num) (by norm_num) (by norm_num)56  have k := binary_interval 22 3 (u:=99/500) (by norm_num) (by norm_num) (by norm_num)57  have bounds :58      (1045371079/100000000000:ℚ) < phiLo 22 7 (1/100) + phiLo 22 3 (1/5) - phiHi 22 3 (99/500) ∧59      phiHi 22 7 (1/100) + phiHi 22 3 (1/5) - phiLo 22 3 (99/500) < 1045371080/100000000000 := by60    decide +kernel61  have hl := (Rat.cast_lt (K := ℝ)).mpr bounds.162  have hu := (Rat.cast_lt (K := ℝ)).mpr bounds.263  push_cast at h g k hl hu64  rw [changeValue, show (1-(1/100:ℝ))/5 = 99/500 by norm_num]65  constructor <;> linarith [h.1,h.2,g.1,g.2,k.1,k.2]6667/-- At the paper's parameter the actual change exceeds the joint trace distance. -/68theorem two_qubit_violation :69    SubentropyCertificates.MixedQubit.traceDistance (state 0 (by norm_num)) (state (1/100) (by norm_num)) <70      conditional (1/100) (by norm_num) - conditional 0 (by norm_num) := by71  rw [distance, conditional_change]72  linarith [change_at_one_percent.1]7374/-- Every entry of the joint state is rational for every rational parameter. -/75theorem rational_entries (s : ℚ) (hs : (s:ℝ) ∈ Icc 0 1) (i j : Bit × Bit) :76    ∃ q : ℚ, densityMatrix (state s hs) i j = (q:ℂ) := by77  let v (u : Bit × Bit) : ℚ := if u=(0,0) then 2 else if u=(1,1) then 1 else 078  let w (u : Bit × Bit) : ℚ := if u=(1,0) then 1 else 079  refine ⟨((1-s)/5)*v i*v j + s*w i*w j, ?_⟩80  change sandwich (1-(s:ℝ)) (s:ℝ) i j = _81  obtain ⟨a,b⟩ := i82  obtain ⟨c,d⟩ := j83  fin_cases a <;> fin_cases b <;> fin_cases c <;> fin_cases d <;>84    norm_num [sandwich, pair, columns, Matrix.mul_apply, Matrix.conjTranspose_apply,85      Fin.sum_univ_two, Matrix.diagonal_apply, v, w, map_ofNat (starRingEnd ℂ) 2] <;> ring8687end SubentropyCertificates.NonCQ

Axioms used

Choose a statement to see which axioms its proof uses.