0

I am doing some reading about this and I have come across the definition of a free variable.

The free variables of a formula, $F V (\varphi)$, are defined by induction on the structure of $\varphi$: $$FV(\varphi \lor \psi) = FV(\varphi \land \psi) = FV(\varphi \supset \psi) = FV(\varphi) \cup FV(\psi)$$ I do not understand where this come from.

alexwlchan
  • 2,059
  • Similar topics were considered here, here and here. – dtldarek Dec 16 '14 at 13:11
  • 1
    It "comes from" from the inductive def of $\varphi$ ... If $\varphi$ is an atomic formula, it is like $x=0$ or $0 < 1$, with only terms (i.e. variables and constants) and predicate letters, i.e. no connectives and quantifiers. Thus, if some term in it has a variable "inside" it must be necessarily a free one. In $x=0$ there is an occurrence of the var $x$ and thus it is necessarily free. In $0 < 1$ there are no occurrences of vars, and thus no free vars in it. – Mauro ALLEGRANZA Dec 16 '14 at 15:09

1 Answers1

1

Formally it doesn't "come from" anywhere -- it is a definition.

Intuitively, the free variables in a formula are all the variables that appear in it, except that it doesn't count when variable appears within the scope of a quantifier that binds.

The symbolic definition simply makes precise what that intuition means. The case you quote is a shorthand for the three separate cases $$ \begin{align} \operatorname{FV}(\varphi\lor\psi) &=\operatorname{FV}(\varphi)\cup\operatorname{FV}(\psi) \\ \operatorname{FV}(\varphi\land\psi) &=\operatorname{FV}(\varphi)\cup\operatorname{FV}(\psi) \\ \operatorname{FV}(\varphi\supset\psi) &=\operatorname{FV}(\varphi)\cup\operatorname{FV}(\psi) \end{align} $$ You ought to have additional cases for the other forms of wff, as well as for terms.

  • Yeah I have a whole load of them for other forms. So it is just a case of learning them all. –  Dec 18 '14 at 11:42
  • @user99865: Instead of learning all of the rules by rote you should understand the intuition of what they do; you can then easily write down each particular rule when you need it. All the rules that are not about quantifiers simply say "ignore the connectives and take everything that is free in a subformula". The quantifier rules say "take everything that is free in the formula under the quantifier, except the variable the quantifier binds". Everything beyond this is just mindless fleshing-out of this principle to the particular syntax your logic has. – hmakholm left over Monica Dec 18 '14 at 11:58
  • ok, do you mind giving me an intuitive example of the example I put up please? –  Dec 18 '14 at 22:29
  • @user99865: I'm sorry, I don't understand which example you're speaking of. – hmakholm left over Monica Dec 18 '14 at 22:37
  • Oh sorry, I was referring to the example on the original post. Where it says...defined by induction on the structure of... –  Dec 19 '14 at 10:18
  • @user99865: Are you looking for something like $\operatorname{FV}(x\ne y\land \forall z[z>w\to x\ne z])$ is ${x,y,w}$ because $\operatorname{FV}(x\ne y)={x,y}$ and $\operatorname{FV}(\forall z[z>w\to x\ne z])={x,w}$? – hmakholm left over Monica Dec 19 '14 at 11:48
  • I am not sure, that seems quite difficult. Another example the teacher gave us is FV(t1=t2) = FV(t1) u FV(t2) How would you explain the intuition of this? (if I know how to do it for one I can do it for the others) thanks mate –  Dec 19 '14 at 14:57
  • @user99865: Ignoring quantifiers (which cannot appear in terms) the free variables in a formula are simply all the variables that appear anywhere in the formula. So if the formula looks like $t_1=t_2$, and $t_1$ and $t_2$ are terms, then the variables that appear anywhere are those that appear in $t_1$ together with those that appear in $t_2$. So, for example for the concrete formula $f(x,y)=g(x,z)$, the free variables are ${x,y,z}$ -- just all the variables. – hmakholm left over Monica Dec 19 '14 at 15:44
  • thank you mate. Great answer.Do you have any advice for studying logic? –  Dec 19 '14 at 22:02