Examples of bound and free variable

254 Views Asked by At

Thinking about variables, I came around bound and free variables. I've read the wikipedia and thought of creating a singular example that elementarily, in the mathematical context, demonstrates both of the concepts.

So, the intuition of a free variable comes from the case where the truth value of a proposition, or the value of function, depends on the value of a variable.

For example, in both the examples below, $n$ is a free variable with domain of discourse $\mathbb{N}$

$$P(n): n \text{ is an even number}$$ $$\sum_{i=1}^{3}i^{n}$$

For both of these, different values of $n$ from $\mathbb{N}$ change the resulting evaluations:

$P(n)$ is false for $n=5$ but true for $n=4.$

Similarly, for $n=1, \sum_{i=1}^{3}i^{n}=6$ and for $n=2,\sum_{i=1}^{3}i^{n}=14$


Bound Variable:

I am getting the idea of a bound variable, in a mathematical sense, that of, let's say, a dummy variable which stands for a "cosmetic" purpose. For example,

$S:$ Set of primes greater than 2.

$Q(x): x$ is odd.

$$\forall x \in S,Q(x)$$

This (true) statement says that an arbitrary prime above 2 is odd, or in a generalized sense, that all primes above 2 are odd. Therefore, the suggestive use of $x$ here, as in $\forall x \in S,$ is that of dummy variable. If instead we had said $\forall y \in S,Q(y),$ then statement would still have remained true. No change in truth value.

Interestingly, in the proof of $\forall x \in S,Q(x)$, we let $x$ represent an arbitrary element of $S$ and then deduce that it's odd. What $x$ does is basically to represent, in an abstract way, the general element of $S$ and use its properties in the proof.

Similarly as in dummy use, $i$ is a bound variable here : $$\sum_{i=1}^{3}i^{n}$$

Example of both:

let the domain of $y$ be $\mathbb{N}$ and the domain of $x$ be $\mathbb{R}$.

$P(x,y) : x+y=x$ $$ \forall x \in \mathbb{R}, P(x,y) $$

$x$ is the bound variable here, and y is the free variable. The truth value of the above statement depends on the value of $y$. If $y=0$, it is true, but if $y \neq 0$, then it's false.

Questions:

  1. Is my understanding, in the mathematical context, fine ?
  2. When we say that a variable is bound, we often highlight it being quantified, but I am still not sure. Is it like this ? When we say $\forall x Q(x)$, $x$ being "bounded" means that $x$ has been assigned a set of values, and that it now stands as way of speaking about any general element of the domain.

In general please do extend in what it means for $x$ to be bounded by a quantifier, does it mean to be assigned a fixed value/a set of values, or something else ?

In the existential case, we have $x=3$ and we make a true statement that $\exists x (x+2=5)$. Here, we say $x$ is bounded in the sense of being given a fixed value which makes the statement [$\exists x (x+2=5)$] true. The role of $x$ here is not about being substituted by any element from its domain. Truth value of this statement depends simply on existence.

Please help !