What is the precise definition of a free and a bound variable?

237 Views Asked by At

I've only recently started learning this topic and I'm confused about these definitions:

I found two definitions for each type of variable which seemed to make sense:


Free variable 1: In mathematics, a free variable is a variable that specifies places in an expression where substitution may take place

Free variable 2: a variable, x, is free iff the variable does not occur in the scope of a quantifier.


Bound variable 1:A bound variable is a variable that was previously free, but has been bound to a specific value or set of values called domain of discourse or universe.

Bound variable 2: a variable, x, is bound iff the variable occurs in the scope of a quantifier.


I myself prefer the second definitions. However, there are examples where I cannot decide which type of variable I'm dealing with:

enter image description here

Based on the first definitions k should be a bound variable and n should be a free variable. But, based on the second ones, am I to say that they are of neither type, since a quantifier hasn't been used (If so, what kind of variable are they?)?