Download data/lean/OAI/Computability/VertexCover/Analysis/SignAtom.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.56 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/VertexCover/Analysis/SignAtom.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/VertexCover/Analysis/SignAtom.lean
-
curl -L -o SignAtom.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/VertexCover/Analysis/SignAtom.lean
3.56 kB
| 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 | |