# How does first-order logic treat objects that do not exist?

Take for example the statement, "If $$x>2$$, then $$f(x)>5$$." The problem is, this $$f$$ is not defined on the whole real line. Say $$f(10)$$ does not exist. Then what is the truth value of $$f(10)>5$$? I am tempted to say it is false, but exactly how does first-order logic treat cases like this? The order axioms on the real number presuppose that $$>$$ is being applied to real numbers, yet that is not what we have here.

I ask this because when I do $$\epsilon$$-$$\delta$$ proofs in analysis, I always write something like "For all $$\epsilon>0$$, there is a $$\delta>0$$ such that for all $$x\in D$$, $$0<|x-x_0|<\delta\implies|f(x)-f(x_0)|<\epsilon$$," where $$D$$ is the domain of the function. I wonder if it is necessary for me to always stipulate that $$x\in D$$. If I do not, and we happen to have an $$x$$ for which the function is undefined, will $$|f(x)-f(x_0)|<\epsilon$$ be false? Or will it be true?

• If $x$ is not in the domain of $f$, we cannot write $f(x)$. For example, if $f(x)=\frac 1x$, we cannot write $f(0)>5$. May 15 at 15:57
• I'd say (and your milage may vary) that when we are talking of $x$ that our universe only consists of the Domain. Referring to an $x$ where $x$ is not in the domain is as invalid as referring to $x$ where $x$ is a unicorn, or an ear of corn, or a contract for a 30-year mortgage. May 15 at 16:00
• Also, and now I'm really talking without any expertise, I'd say the truth value of $f(10) > 5$ is vacuously true.... but it's a fascinating question. I'd be interested in knowing an official answer. May 15 at 16:04
• Possible duplicate: math.stackexchange.com/questions/4509760
– Karl
May 15 at 16:19
• Hello. Are you asking this question because you're learning about logic, or because you're worried about day-to-day "real-life" proof-writing? It is possible to give a technical answer to your question about the truth value of $f(10) > 5$ (in the usual set-theoretical framework, in fact it depends on how you defined function application), but this should have absolutely no bearing on how you present your actual proofs, since you cannot expect your readers to be familiar with these types of obscure implementation details in first-order logic. May 15 at 16:43

In first-order logic itself, there are no partial functions: if $$f$$ is a function symbol, then it can be applied to any element of the domain of discourse to yield another element of the domain of discourse.

However, note that ZF set theory (the usual foundation for analysis) is built on top of first-order logic, and has no function symbols (as a first-order theory)! Formally, a function in ZF set theory is an element of a function set $$A \to B$$ (where $$A$$, $$B$$ are sets), which consists of a set of pairs that encodes a total functional relation: for every $$x \in A$$, there is a unique $$y$$ such that $$(x, y) \in f$$. Every time we write $$f(x)$$, we are silently invoking this condition and referring to $$y$$. Under this perspective, if $$x$$ is an arbitrary set that may or may not be in $$A$$, then there is no reason for functionality to apply to it, so the expression $$f(x)$$ is meaningless and your statement does not have a truth value. You can also consider the case where $$f$$ is a partial function by dropping the totality requirement, in which case $$x$$ has to be in some subset of $$A$$.

This is, however, a very materialist approach to mathematics; a more structuralist approach is possible, based on type theory: there, $$f$$ would be an inhabitant of a function type $$f : A \to B$$, and the term $$f(x)$$ would only be well-typed if $$x : A$$.

To summarise, if you are working in ZF set theory and want to be fully formal, you should say "for all $$x \in D$$". However, in informal mathematical practice, it is usually implied that an argument to a function has to live in its domain, as otherwise the application has no meaning.

• I think that usually in set theory, when we write $\phi(f(x))$ this is a shorthand for $\exists y((x, y) \in f \land \phi(y))$ (or $\forall y((x, y) \in f \rightarrow \phi(y))$). In that case I would contend that $f(10) > 5$ does have a truth value (vacuously false with the first convention, true with the second). I think it's fair to say that it's "meaningless" as in "this is not a situation where we care about the semantics, because we always avoid this situation when formalising proofs into set theory". May 15 at 16:50
• Yeah, that sounds right. May 15 at 17:00
• So in the type theory part, say for example that $f : [2, 5] \to \mathbb{R}$. Then since you don't have $10 : [2, 5]$, you can't conclude $f(10) : \mathbb{R}$. And therefore, you can't conclude $f(10) > 5$ is a valid proposition. (So, to paraphrase Feynman, "$f(10) > 5$ isn't even wrong." It's just a type error.) May 15 at 17:27

I think you are inventing a problem. The example in your question does not require an answer to the question in the title.

When writing $$\epsilon - \delta$$ proofs your job is to convince the reader that a statement about limits is correct. It's rarely necessary that your argument be literally correct as formal logic. When you need to make explicit that $$x$$ is in the domain of a function $$f$$ then say so. If that's implicit and not a problem, don't clutter up your prose.

@NaïmFavier provides an answer to the question in the title.