First order logic issue with the truth and scope of quantifiers

I have two examples of universal and existential quantifiers that I have seen and that I cannot understand why they work:

  1. $\exists x \forall y R(x,y)$

  2. $\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?


Statement 2. means "There is something which only stands in relation to itself". This should make it clear intuitively why the given structure is a model of the formula.
In terms of scope, since the existential quantifier comes first, $\exists$ has scope over $\forall$. So the $\forall$ statement only needs to apply for one element that is claimed to exist, which is satisfied by $v(x) = 5$. It is not said that every pair need to satisfy the biconditional, only that we can find at least one "subject" term (first argument to the relation) for which all "objects" (second argument) that it appears with are the same as the subject.


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$.