2.1.7: Free Variables and Sentences
The free occurrences of a variable in a formula are defined inductively as follows:
- \(\indcaseA{A}{$A$ is atomic}\) all variable occurrences in \(\indfrm\) are free.
- \(\indcase{A}{\lnot B}\) the free variable occurrences of \(\indfrm\) are exactly those of \(B\) .
- \(\indcase{A}{(B \ast C)}\) the free variable occurrences of \(\indfrm\) are those in \(B\) together with those in \(C\) .
- \(\indcase{A}{\lforall{x}{B}}\) the free variable occurrences in \(\indfrm\) are all of those in \(B\) except for occurrences of \(x\) .
- \(\indcase{A}{\lexists{x}{B}}\) the free variable occurrences in \(\indfrm\) are all of those in \(B\) except for occurrences of \(x\) .
An occurrence of a variable in a formula \(A\) is bound if it is not free.
Give an inductive definition of the bound variable occurrences along the lines of Definition \(\PageIndex{1}\) .
If \(\lforall{x}{B}\) is an occurrence of a subformula in a formula \(A\) , then the corresponding occurrence of \(B\) in \(A\) is called the scope of the corresponding occurrence of \(\lforall{x}{}\) . Similarly for \(\lexists{x}{}\) .
If \(B\) is the scope of a quantifier occurrence \(\lforall{x}{}\) or \(\lexists{x}{}\) in \(A\) , then the free occurrences of \(x\) in \(B\) are bound in \(\lforall{x}{B}\) and \(\lexists{x}{B}\) . We say that these occurrences are bound by the mentioned quantifier occurrence.
Consider the following formula: \[\lexists{\Obj v_0}{\underbrace{\Atom{\Obj A^2_0}{\Obj v_0,\Obj v_1}}_{B}}\nonumber\] \(B\) represents the scope of \(\lexists{\Obj v_0}{}\) . The quantifier binds the occurence of \(\Obj v_0\) in \(B\) , but does not bind the occurence of \(\Obj v_1\) . So \(\Obj v_1\) is a free variable in this case.
We can now see how this might work in a more complicated formula \(A\) : \[\lforall{\Obj v_0}{\underbrace{(\Atom{\Obj A^1_0}{\Obj v_0} \lif \Atom{\Obj A^2_0}{\Obj v_0, \Obj v_1})}_{B}} \lif \lexists{\Obj v_1}{\underbrace{(\Atom{\Obj A^2_1}{\Obj v_0, \Obj v_1} \lor \lforall{\Obj v_0}{\overbrace{\lnot \Atom{\Obj A^1_1}{\Obj v_0}}^{D}})}_{C}}\nonumber\] \(B\) is the scope of the first \(\lforall{\Obj v_0}{}\) , \(C\) is the scope of \(\lexists{\Obj v_1}{}\) , and \(D\) is the scope of the second \(\lforall{\Obj v_0}{}\) . The first \(\lforall{\Obj v_0}{}\) binds the occurrences of \(\Obj v_0\) in \(B\) , \(\lexists{\Obj v_1}{}\) the occurrence of \(\Obj v_1\) in \(C\) , and the second \(\lforall{\Obj v_0}{}\) binds the occurrence of \(\Obj v_0\) in \(D\) . The first occurrence of \(\Obj v_1\) and the fourth occurrence of \(\Obj v_0\) are free in \(A\) . The last occurrence of \(\Obj v_0\) is free in \(D\) , but bound in \(C\) and \(A\) .
A formula \(A\) is a sentence iff it contains no free occurrences of variables.