Example: Examples of Variables in a Logical Calculus

(related to Definition: Variable in a Logical Calculus)

Example 1

Let $s$ be the string "$x+2=5$", let $U$ be the domain of discourse of natural numbers $0,1,2,\ldots$ and let $I(s)$ be the interpretation of $s$ assigning it a meaning of adding natural numbers in $U$. Clearly, "$x$" is a substring of $s$. Also "$2$", "$5$" and "$+$" are substrings of $s$, but the interpretation $I$ means that only $x$ is a variable, since $2,5$ are interpreted as constant natural numbers and "$+$" is interpreted as the addition sign. Then the variable $x$ represents any of the (infinitely) many natural numbers $0,1,2,\ldots$. But only for one of these infinitely many possible meanings of $x$ the string $s$ will be valued as true: $[[s]]_I=1$ only for $x=3$.

Example 2

Take real numbers as the domain of discourse, and consider the \(\epsilon-\delta\) definition of continuous real functions:

"A real function \(f:D\to\mathbb R\) is continuous at the point \(a\in D\), if for every \(\epsilon > 0\) there is a \(\delta > 0\) such that \(|f(x)-f(a)| < \epsilon\) for all \(x\in D\) with \(|x-a| < \delta.\)"

This proposition can be codified using a string like this:

"$\forall\epsilon\,(\epsilon > 0)\,\exists\delta\,(\delta > 0)\,\forall x\,(x\in D)\,(|x-a|<\delta\Longrightarrow|f(x)-f(a)|<\epsilon).$"

In this string, the substrings \("x"\), \("\delta"\), \("\epsilon"\) and \("a"\) are variables, since they represent real numbers.


Thank you to the contributors under CC BY-SA 4.0!

Github:
bookofproofs