What is the truth value if any for $f(x)=y$ when $x$ is outside of the domain of $f$? Could it be false or undefined?
What is the truth value if any for $f(x)=y$ when $x$ is outside of the domain of $f$?
269 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
In set theory, where a function is simply a set of ordered pairs satisfying a uniqueness condition, $f(x)= y$ is syntactic sugar defined to mean $(x,y)\in f$. Thus the statement is false if $x \notin \operatorname{domain}(f)$.
In programming, the “truth value” of the 11th element of a 10-element Boolean array is undefined, and trying to access it will raise an index out of bounds exception in languages that perform bounds checking; it would yield garbage in languages that don’t (for example, C).
On
Answering my own question after much thought, from Terence Tao's, "Analysis I," p. 49, we have the definition:
Definition 3.3.1 (Functions). Let $X$, $Y$ be sets, and let $P(x,y)$ be a property pertaining to an object $x \in X$ and an object $y \in Y$, such that for every $x \in X$, there is exactly one $y \in Y$ for which $P(x,y)$ is true (this is sometimes known as the vertical line test). Then we define the function $f : X \to Y$ defined by $P$ on the domain $X$ and range $Y$ to be the object which, given any input $x \in X$, assigns a output $f(x) \in Y$, defined to be the unique object $f(x)$ for which $P(x, f(x))$ is true. Thus, for any $x \in X$ and $y \in Y$, $$y = f(x) \iff P(x,y)\,\text{is true.}$$
Rather than a predicate $P(x,y)$, I prefer to use a graph set $G \subseteq X\times Y.$ In the notation of set theory, we can then define the standard "$f(x)$" functional notation as follows:
$\qquad\forall\ G, X, Y:[G\subseteq X\times Y \ \land\ \forall x\in X: \exists! \ y\in Y: (x,y)\in G \\\quad\ \implies \ \exists f: \ \forall x\in X: \forall y\in Y:[y=f(x) \iff (x,y)\in G]]$
From this, we can infer that
$\qquad\forall x\in X : f(x)\in Y$
$\qquad\forall x\in X: (x,f(x))\in G$
Thus $f(x)$ will be undefined outside of its domain of definition $X$.
(Though Tao doesn't hint at it, the above definition should perhaps require that the domain $X$ and codomain/range $Y$ be non-empty. Otherwise, it may be impossible to infer anything about $f$.)
The natural way to look at it is that the expression is ill-formed and so it doesn't make sense to ask its truth value. This is the case in type-theory-based formalisms.
In something like first-order set theory, though, syntax like $f(x)$ comes from extension by definitions, so your equation is shorthand for a well-formed sentence that does have a truth value. Whether it's true or false depends on technical details that "shouldn't matter" because they don't affect the truth value when the notation is used in the intended way, i.e. when the function argument is an element of the function's domain.