[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"NfLZzOXehv":3},"# 1. selberg-sieve\n\nThe aim of this project is to formally verify the fundamental theorem of the Selberg sieve and prove some of its direct consequences. It was ported from [this repo](https://github.com/FLDutchmann/selberg-sieve).\n\n# 2. Build Instructions \nTODO\n\n# 3. Goals\nI try to state the most important results and goals in `MainResults.lean` as I work on them.\n\n\nWe prove the following version of the Fundamental Theorem of the Selberg sieve as adapted from [Heath-Brown](https://arxiv.org/abs/math/0209360).\n\n## Fundamental Theorem \nLet $\\mathcal{A} = (a_n)$ be a finitely supported sequence of nonnegative real numbers, $\\mathcal{P}$ a squarefree number repersenting a finite set of primes, and $y\\ge 1$ a real number. \n\nSuppose we can write $\\sum_{d \\mid i} a_i = X \\nu(d) + R_d$ where $\\nu$ is multiplicative and $0 \u003C \\nu(p) \u003C 1$ for every prime $p \\in \\mathcal{P}$.\n\nThen \n$$\\sum_{(i,\\mathcal{P})=1}a_i\\le \\frac{X}{S} + \\sum_{d \\\\mid \\mathcal{P}, d\\le y} 3^{\\omega(d)}\\left|R_d\\right|$$\nwhere \n$$\\omega(d) := \\sum_{p\\mid d} 1, ~~~~ S := \\sum_{l\\mid \\mathcal{P}, l \\le \\sqrt{y}} g(l)$$\nwith\n$$g(d) = \\nu(d)\\prod_{p\\mid d}(1-\\nu(p))^{-1}.$$\nAnd to get a better handle on $S$ we also show that if $\\nu$ is completely multiplicative and all primes less than $y$ divide $\\mathcal{P}$ then \n$$S \\ge \\sum_{1 \\le m \\le \\sqrt{y}} \\nu(m)$$\n\n\n## Prime counting function\nTo test this result, we prove that \n$$ \\pi(x) \\ll \\frac{x}{\\log x} $$\nAnd in fact, with little addition effort we are able to prove the Brun-Titchmarsh type bound \n$$ \\pi(x+y) - \\pi(x) \\le 2\\frac{y}{\\log{z}} + 6z(1+\\log{z})^3$$\n\n\nWe hope to later use this result to prove\n\n## Brun's Theorem\nLet $\\pi_2(x)$ denote the number of twin primes at most $x$. Then \n$$\\pi_2(x) \\ll \\frac{x}{\\log(x)^2}$$\nand as a corollary\n$$\\sum_{\\text{twin prime} p} \\frac{1}{p} \u003C \\infty.$$\n",1780113393585]