1

Which of the variables $x$ and $y$ are free and which are bound?

$\forall x : P (x, y) \to (\exists y : Q(x, y) \lor \exists x : R(x))$

The solution says that $y$ is free and both $x$ and $y$ are bound. But why isn't $x$ a free variable?

Ethan
  • 5,291
Rune
  • 21
  • 2

2 Answers2

2

$1.$ In logic a varible is free, if and only if it does not occur in the scope of a quantifier.
$2.$ A varible is bounded, if and only if it occurs in the scope of a quantifier.

That we have:

$$\color{orange}{∀x} \underset{\color{orange}{\text{bounded by x}}}{\underline{( P (\color{orange}x, \underset{\color{grey}{\text{free}}}{\underline{\color{grey}y}}) → (\underset{\color{red}{\text{bounded by y}}}{\underline{\color{red}{\color{red}{∃y}}~Q(\color{orange}x, \color{red}y)}} ∨ \underset{\color{blue}{\text{bounded by x}}}{\underline{\color{blue}{∃x}~(R\color{blue}x)}})}})$$

And I believe this is what you thought: $$\color{orange}{∀x} \underset{\color{orange}{\text{bounded by x}}}{\underline{( P (\color{orange}x, \underset{\color{grey}{\text{free}}}{\underline{\color{grey}y}})) }}→ (\underset{\color{red}{\text{bounded by y}}}{\underline{\color{red}{\color{red}{∃y}}~Q(\color{grey}x, \color{red}y)}} ∨ \underset{\color{blue}{\text{bounded by x}}}{\underline{\color{blue}{∃x}~(R\color{blue}x)}})$$

So we also have $x$ free in $Q(x,y),$ which is not what the question talking about $\dots$

Ethan
  • 5,291
  • That makes sense! But why are you allowed to put the whole expression into the scope of ∀ when there is no parentheses in the task? – Rune Nov 26 '19 at 11:44
  • @Rune For $\forall x,P(x)\rightarrow Q$, you can think this as $(\forall x,P(x))\rightarrow Q$ or $\forall x,(P(x)\rightarrow Q)$, but normally it means the second one, I think this is just some unwritten rules when people using those symbols. – Ethan Nov 26 '19 at 11:48
  • Ok, great! That's what I wanted to know! – Rune Nov 26 '19 at 11:50
0

A very confusing example.

HINT: If the author's intent was to MINIMIZE confusion, they should have written something like:

$\forall a: P(a,y) \implies (\exists b: Q(x,b) \lor \exists c: R(c))$

Here, $a$, $b$ and $c$ are bound variables; $x$ and $y$ are free variables.

Tip: I like to use the letters a-k for bound variables, the rest for free variables. If possible, you should avoid using the same variable as both free and bound in the same statement.