I was reading chapter 1.5 in A Friendly Introduction to Mathematical Logic when I encountered the following formula in an exercise problem. $$\forall y (x = y) \lor (\forall x)(x < 0)$$ In this formula, is it true that the first occurrence of x is free and the third x is bounded? What about the second x?
I am just confused about $x$ being free in some occurrences and bounded in others. Does the formula mean exactly the same as $\forall y (x = y) \lor (\forall z)(z < 0)$?
More generally, if a variable is bounded by quantifier $Q_n$ in the formula $\varphi_n$, and all the $Q_1x\varphi_1$ are disjoint subformulas of a formula, would replacing all $x$s in $\varphi_n$ to another variable $x_n$ keep the formula the same?
Yes, there is no quantifier binding the first occurence of $x$, so it's free. Yes, the third occurence is bounded. The second ocurrence is neither free nor bounded, it's the quantifier itself, and maybe one could, half-seriously, call it a binding occurence
Yes, it does. Can you figure out why? (Hint: it's not really about 'meaning', but rather about 'use', or "what sorts of formulas can one use this one to infer?")
Sometimes things get complicated: try to read a bit about "variable capture/capturing"