File size: 3,558 Bytes
92416a2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | import Mathlib
namespace OAI
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
section
namespace VertexCover.AntiConcentration
noncomputable section
def centralProbability (n : ℕ) : ℝ := (n.centralBinom : ℝ) / 4^n
theorem centralProbability_nonneg (n : ℕ) : 0 ≤ centralProbability n := by
unfold centralProbability
positivity
theorem centralProbability_step (n : ℕ) :
centralProbability (n+1) = centralProbability n * ((2*(n:ℝ)+1)/(2*(n:ℝ)+2)) := by
have hn : (n : ℝ) + 1 ≠ 0 := by positivity
have hn2 : 2*(n : ℝ)+2 ≠ 0 := by positivity
have h4 : (4 : ℝ)^n ≠ 0 := by positivity
have hrec := congrArg (fun k : ℕ => (k : ℝ)) (Nat.succ_mul_centralBinom_succ n)
push_cast at hrec
have hc : ((n+1).centralBinom : ℝ) = 2*(2*(n:ℝ)+1)*(n.centralBinom : ℝ)/((n:ℝ)+1) := by
apply (eq_div_iff hn).mpr
nlinarith [hrec]
unfold centralProbability
rw [hc, pow_succ]
field_simp
; ring
theorem centralProbability_sq (n : ℕ) :
centralProbability n ^ 2 * ((n : ℝ)+1) ≤ 1 := by
induction n with
| zero => norm_num [centralProbability]
| succ n ih =>
have hn : 0 ≤ (n : ℝ) := Nat.cast_nonneg _
have hden : 0 < (2*(n : ℝ)+2)^2 := by positivity
have hstep : ((2*(n : ℝ)+1)/(2*(n : ℝ)+2))^2 * ((n : ℝ)+2) ≤ (n : ℝ)+1 := by
rw [div_pow, div_mul_eq_mul_div, div_le_iff₀ hden]
nlinarith
rw [centralProbability_step]
push_cast
calc
_ = centralProbability n ^2 *
((((2*(n:ℝ)+1)/(2*(n:ℝ)+2))^2) * ((n:ℝ)+2)) := by ring
_ ≤ centralProbability n ^2 * ((n:ℝ)+1) :=
mul_le_mul_of_nonneg_left hstep (sq_nonneg _)
_ ≤ 1 := ih
theorem centralProbability_le (n : ℕ) :
centralProbability n ≤ 1 / Real.sqrt ((n : ℝ)+1) := by
have hs : 0 < Real.sqrt ((n : ℝ)+1) := Real.sqrt_pos.mpr (by positivity)
apply (le_div_iff₀ hs).mpr
have hsq : (centralProbability n * Real.sqrt ((n : ℝ)+1))^2 ≤ (1:ℝ)^2 := by
rw [mul_pow, Real.sq_sqrt (by positivity)]
simpa only [one_pow] using centralProbability_sq n
exact (sq_le_sq₀ (mul_nonneg (centralProbability_nonneg n) hs.le) zero_le_one).mp hsq
theorem centralProbability_lt (n : ℕ) (hn : 0 < n) :
centralProbability n < Real.sqrt 2 / Real.sqrt (2*(n : ℝ)) := by
have hnR : 0 < (n : ℝ) := Nat.cast_pos.mpr hn
have hnS : 0 < Real.sqrt (n : ℝ) := Real.sqrt_pos.mpr hnR
have hs2 : 0 < Real.sqrt (2:ℝ) := Real.sqrt_pos.mpr (by norm_num)
have hstrict : 1 / Real.sqrt ((n : ℝ)+1) < 1 / Real.sqrt (n : ℝ) := by
exact one_div_lt_one_div_of_lt hnS (Real.sqrt_lt_sqrt hnR.le (by linarith))
have heq : 1 / Real.sqrt (n : ℝ) = Real.sqrt 2 / Real.sqrt (2*(n : ℝ)) := by
rw [Real.sqrt_mul (by norm_num : (0:ℝ) ≤ 2)]
field_simp
exact lt_of_le_of_lt (centralProbability_le n) (hstrict.trans_eq heq)
theorem sign_atom_le (n v : ℕ) :
((2*n).choose v : ℝ) / 2^(2*n) ≤ centralProbability n := by
have hb : (2 : ℝ)^(2*n) = (4 : ℝ)^n := by rw [pow_mul]; norm_num
rw [hb]
exact div_le_div_of_nonneg_right (Nat.cast_le.mpr (Nat.choose_le_centralBinom v n)) (by positivity)
end
end VertexCover.AntiConcentration
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end OAI
|