We want to show that it is not the case that there only finitely many primes. Suppose there are finitely many primes. We shall show that this assumption leads to a contradiction. Let $p_1,\dots,p_n$ be all the primes there are. Let $x=p_1\cdots p_n$ be their product and let $y=x+1$. Then $y\in\mathbb N$ and $y\ne1$, so there is a prime $q$ such that $q\mid y$. Now $q$ must be one of $p_1,\dots,p_n$ since these are all primes that there are. Hence $q\mid x$. Since $q\mid y$ and $q\mid x$, $q\mid y−x$. But $y-x=1$. Thus $q\mid1$. But since q is prime, $q\ge2$. Hence $q$ does not divide 1. Thus we have reached a contradiction. Hence our assumption that there are only finitely many primes must be wrong. Therefore there must be infinitely many primes.
In this proof, what is the guarantee that there is no prime number say $m$ between $p_n$ and $y$ such that $m\mid y$ ?