I have two examples of universal and existential quantifiers that I have seen and that I cannot understand why they work:
$\exists x \forall y R(x,y)$
$\exists x \forall y(R(x,y) \iff x=y)$
They are both true of the following pairs:
$\langle1, 1\rangle$ $\langle1, 2\rangle$ $\langle1, 3\rangle$ $\langle1, 4\rangle$ $\langle1, 5\rangle$ $\langle2, 5\rangle$ $\langle4, 1\rangle$ $\langle5, 5\rangle$
Whereas it is trivial to figure out why 1) holds since it would hold for pairs $\langle1, 1...5\rangle$, example 2) is not as straightforward. The way I understand it is that:
There is some $x$ where for all $y$ such that there is a pair relation of $x$ and $y$ is true iff $x$ equals $y$.
But if I have, for example $x = 1$, and I iterate through the whole domain, it is clear that universal quantifier only holds for $R(x, y)$ but not for $x = y$ biconditionally. For $R(1, 1) \iff 1 = 1$ it is indeed true, but $R(1, 2) \iff 1 = 2$ is already false (second step of universal iteration).
Does this mean that $R(x, y)$ scope is within the universal quantifier scope whereas identity statement $x = y$ under the existential quantifier? But why?
No issues with scopes: both quantifiers in 2. apply to the formula entire formula $(R(x,y) ↔ x = y)$.
The "solution" is $5$ because the only pairs that satisfy $x=y$ are $(1,1)$ and $(5,5)$. But for the first one we have that $R(1,2)$ holds while $1=2$ does not.
You can check it using a "pseudo truth table" entering as rows the pairs 5,1/5,2/.../5,5 and as columns $R(x,y)$ and $x=y$ respectively.
As you can see, we have that $R(5,5)$ and $5=5$ are both true, while $R(5,n)$ and $5=n$ are both false, for $n \ne 5$.
This means that $(R(5,y) ↔ 5 = y)$ is true for every value of $y$.