# Variables and Language

I've been thinking lately about the kind of language we use when doing math involving variables. Consider a typical variable defining statement:

"Let x = 2."

If we try to parse this statement literally, 'x' is the name of some object we are letting equal 2. However, if 'x' is already the name of something (even if we don't know the exact object it is the name of), we get nonsense. For example, if 'x' is the name of the country Canada, then the let statement becomes

which is nonsense. We could also try to interpret 'x' as the pronoun 'it,' which leads to

"Let it = 2,"

but this is also problematic because pronouns in the English language (to the best of my knowledge) are never bound explicitly (for example, in the sentence "I cannot remember this equation because it has too many terms," the pronoun 'it' gets bound by context to 'this equation').

There are numerous other places in mathematics where trying to interpret a variable literally as a noun or pronoun leads to problems. For instance, the sentence

"If $$x$$ increases, then $$x^{-1}$$ decreases,"

suggests that 'x' is the name of some object that is truly capable of change. However, objects like this do not exist in mathematics, e.g. the number 1 is always 1, has always been 1, and never ceases to be 1.

Further examples arise when trying to parse statements involving the quantifiers $$\forall$$ and $$\exists$$.

My question: (1) How exactly should we understand variables? Can we formalize any further our intuition that they are symbols that may stand for any object? (2) Given (1), how do we properly incorporate variables into our everyday language so that all of our mathematical statements have clear, unambiguous meanings?

• A variable $x$ occurring in a formula like $x=2$ acts as a pronoun in natural Language. When we assert "it is red", we assume that there is some context such that the listener can understand what "it" refers to: for example, pointing with my finger to the red pen on my desk. – Mauro ALLEGRANZA Mar 15 '19 at 7:37
• In the same way, the formula $x=2$ must be understood in the context. In math, it is often customary to omit the leading universal quantifiers (for example in stating axioms). If so, the formula is $\forall x (x=2)$. In the context of predicate logic, there are some "mechanism" (like e.g. variable assignment functions) to assign "temporary meaning" to free variables of formulas (i.e. a formal mechanism to provide a "context"). – Mauro ALLEGRANZA Mar 15 '19 at 7:40

(1) natural language doesn't really have variables. The nearest you can get to "let x = 2" is to say something like "let's think of the number 2 and, for convenience, let's refer to it as x". So after you've said that "x" acts as a noun denoting 2.

(2) In statements like "if $$x$$ increases then $$x^{-1}$$" decreases, we are using a standard mathematical convention whereby a formula like $$x$$ or $$x^{-1}$$ is interpreted as a function of the variable $$x$$ ($$x \mapsto x$$ or $$x \mapsto x^{-1}$$). It then makes sense to talk about the function as increasing or decreasing.

• I think the issue is that in natural language we rarely need to distinguish between how we denote an object and the object itself. In the present context, this means distinguishing between a variable (which is a symbol, such as 'x') and its value (the actual object the variable denotes). In "Let x = 2", it makes no sense to regard 'x' as being a name with a referent. However, if I write "Let the value of x = 2", then there is no ambiguity. In any sentence involving x, you could replace "x" by a phrase tantamount to "the value of x" and have a perfectly clear statement in natural language. – Fourier's Monster Mar 15 '19 at 0:00
• In natural and logical languages we always distinguish between denotations and the objects they denote: an elephant is not a word or a constant symbol. Natural languages don't really have anything like variables: the closest we get in English is pronouns, which act like variables but with a fixed repertoire of variable names "I", "you", "he", "she" etc. and with the denotation of the variable fixed by the context. If you write "let x = 2" or "let the value of x = 2". then you have moved outside natural language, and I think the best way of paraphrasing the meaning is as in my answer. – Rob Arthan Mar 16 '19 at 22:24

Variables are a way for us to abstract over things. If we can make a statement for all humans, instead of repeating the statement for each human, we can abstract over them with a variable and say "Let $$x$$ be a human, then [...]" in a succinct and clear way.

From the context in which one uses a variable it is clear what that variable ranges over. That range constitutes the domain of a variable. For example, in the previous statement it was clear (explicitly stated) that $$x$$ ranges over all humans ("Let $$x$$ be a human"). Sometimes, though, the domain is not explicitly stated. In those cases you can assume the most general domain that you can guess. In your example ("Let $$x = 2$$"), one guesses that $$x$$ is a number and can not be a cookie.

Regarding your 2nd question, in math we use nominal representation of variables: we represent variables with names, like "$$x$$", "$$y$$" or "$$it$$". In the nominal representation, there is no other way to avoid the problem you describe than to keep track of all the names of the variables that we have introduced in the context. Things can get complicated when variables have local scopes, which means that you can introduce a variable $$x$$ and later discharge it, allowing you to re-use the name $$x$$ for another variable later on.

Using names to represent variables, makes it easy for us to refer to variables: we just use their names. In the context of formal languages, another way to represent variables is by numbers (de Bruijn indices, nameless representation). If we would use such a representation in natural language (totally not recommended), referring to a variable would translate to something like "the first/second/... variable I introduced". This representation ensures that no common name between two different variables can occur, but it takes a lot of counting to refer to them and is not recommended for humans.