I am learning universal quantifiers and existential quantifiers and I am still at the beginner level. I found a question in my lecture slides as following
$$\left\{\;x~|~x\in\Bbb N_1~\land~x\leq50~\land~(\;\forall y~[(y\in \{2,\dots,x/2\})\implies(x\not\equiv0\pmod y)]\;)\;\right\}$$
and the answer was given as
$$\{1,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47\}$$
$\Bbb N_1$ means NAT1 which means natural numbers which are starting from $1$ ($1$ inclusive).
Unfortunately, I don't understand how does that answer come. So any help with a step by step explanation is greatly appreciated.
Let us decompose the whole expression step by step. First, we have our intial declaration of what type of things we are even looking for to collect in our set
So we are looking for natural numbers $x$(starting by $1$). But they have to met some other conditions too, denoted by conjunction $\land$. Second, we have a restriction concerning their size
Now, a new variable comes into play: $y$. In contrast to $x$ its not clearly mentioned that we also have $y\in\Bbb N_1$ as all of our $y$ are defined to belong to the list $2,3,\dots,x/2-1,x/2$, or to put it in a slightly different way: we have $y\in\{2,3,\dots,x/2-1,x/2\}$. We demand that for every $y\in\{2,3,\dots,x/2-1,x/2\}$ it holds that $x\not\equiv0\mod y$ simultaneously. This is encoded by the formula
The role $\forall y$ plays here is to ensure the aforementioned simultaneity. Translating this into more familiar notions: we want to have that our number $x\in\Bbb N_1$ which is not divisble by any of the preceding numbers up to $x/2$ (we exclude all $y$ such that $x/2\leq y\leq x$ as they trivially fulfill this condition); that are precisely the primes (and $1$)!
Now, take a look at our complete set description
We conclude that by $(1)$ and $(2)$ that we are looking for natural numbers $x\leq50$ and by $(3)$ such that they are not divisble by any of the preceding numbers. These are precisely the primes $\leq50$ expanded by $1$. So our solution set is