# Dealing with undefined expressions in predicate logic

Suppose we're working in the first-order language of the real numbers, and we write

$$\forall x (x > 0 \;\rightarrow\; 1/x > 0)$$

We want this to be true, however I feel like it doesn't quite work, because by the principle of universal instantiation, it follows that we can set $x=0$ in order to obtain

$$0 > 0 \;\rightarrow\; 1/0 > 0$$

or in other words

$$\mathrm{FALSE} \;\rightarrow\; \mathrm{UNDEF}.$$

Now we wish this statement to be true, and you may argue, "Well false implies everything, so it's true," however I don't think this technically works, because false implies both true and false, but we've never specified how false interacts with undef. My question is, how do people deal with this issue, and does the solution involve a third truthvalue called "UNDEF" or some such.

-
You should first of all ask what the expression $1 / x$ is. If $1 / (-)$ is a function symbol in your language, then $1 / x$ is defined no matter what $x$ is. – Zhen Lin Sep 19 '12 at 9:42

I would definitely not introduce any third truth value or other concept of "UNDEF". Here is how I might deal with the issue if it came up in a logic class. I would ask everyone to think of their favorite real number but not tell anyone else. That number is their own definition of 1/0. Now a sentence like $\forall x (x>0 \rightarrow 1/x>0)$ will make sense and be true in everybody's model, while sentences like $\exists x (1/x=0)$ and $\forall x (1/x = 1 \rightarrow x=1)$ might be true in some people's models and not in others.
We get some junk like $\exists x (x\cdot 1/x = 0)$ that happens to be true even though it would make the calculus teacher frown. But I don't think that's a problem, and the language will allow a lot of junk like $\forall x (2+2=3 \rightarrow 1+1=2)$ anyway.
The actual question, "how do people deal with this issue", would require a huge answer because lots of people have come up with lots of ideas, some more reasonable than others. Let me therefore just describe how the issue is handled in the standard semantics of first-order logic. Here, as Zhen Lin commented, it is required that function symbols be interpreted as total functions. So, if your formula involving $1/x$ is to be syntactically correct, any structure in which it is interpreted must provide values for the reciprocals of all its elements. In particular, the "usual" interpretation of the real number system, in which $1/0$ is (quite reasonably) undefined, is not a structure for this first-order language, and so it does not make sense to ask for the truth value that it gives your sentence.
As I said, there have been many alternative approaches. You might look at Dana Scott's paper "Identity and Existence in Intuitionistic Logic" [in "Applications of Sheaves", Springer Lecture Notes in Math 753 (1979) 660-696]. The relevance of intuitionistic logic to this issue is that it prevents you from making functions artificially total by devices like "$1/x$ when $x\neq0$ and (arbitrarily) 0 when $x=0$", because you can't assume that $x\neq0$ or $x=0$.