I have this open formula in First Order Logic:
∃x p(x,y) or q(x)
The fact is i dont understand how is it different from
∃x ( p(x,y) or q(x))
For me, they are the same. In fact, in the first formula, once i find the x that satisfies p(x,y), i have to use it also for q. Infact p and q share the same variable x. Once it's defined for p , it's also defined for q. Why am i wrong ?
For simplicity, get rid of $y$ and consider:
Consider an interpretation with domain the set $\mathbb N$ of natural numbers, and interpret the predicate $Px$ with the property $x<0$ and the predicate $Qx$ with the property $x=0$.
In this case, the formula amounts to:
that is true in $\mathbb N$.
Now consider the formula:
and consider a variable assignment $v: \text{Var} \to \mathbb N$ such that $v(x)=1$.
In this case, the formula means:
that is false in $\mathbb N$.
What does a statement with a free variable, like e.g. $x=1$, mean?
We need a "context" (technically called: variable assignment function), i.e. a way to assign a "temporary meaning" to the free variables.
We can compare a free variable to a pronoun of natural language.
To assert "$x$ is red" is the same as "it is red": its meaning depends on what the context assigns to "it".
Consider the example where I'm at my desk: on top if it there are two pens: one red and one blue, and no books.
If I'm asserting:
my assertion is true: on my desk there is something red.
Consider now the different sentence:
What does it mean ? It depends on what "it" denotes. If I'm pointing with my finger at the blue pen, the sentence is false.