Consider this definition of a constant function found in Lee:

Definition. A map $f: X \to Y$ is called a constant map if there is some element $c \in Y$ such that $f(x) = c$ for every $x \in X$.

If $X = \varnothing$, then $f = \varnothing \subseteq X \times Y$. Taking an arbitrary $c \in Y$, we have $f(x) = c$. Therefore the empty function is constant. Am I right? What is the case if $Y = \emptyset$? This is rather confusing, but I would say the function $f: X \to \varnothing$ is non-constant.

  • $\begingroup$ See here, and this MSE-question. $\endgroup$ – Dietrich Burde Oct 1 '16 at 19:06
  • $\begingroup$ @DietrichBurde I've already seen this. Thanks. I've just wanted to study this particular definition in detail. $\endgroup$ – TheGeekGreek Oct 1 '16 at 19:07

Indeed, the empty graph is (by this definition) a constant map in a vacuous sense, so long as $Y$ is non-empty.

In particular: if $f:\emptyset \to Y$ is given by $f = \emptyset$, then we can fix an element $c \in Y$ and state for every $x \in \emptyset$, $f(x) = c$. It so happens that there aren't any elements of $\emptyset$, so the statement stands.

Notably, $Y$ cannot be empty. In particular, there must exist an element of $Y$ for the definition to apply.

Note also that the only function that maps to the empty set is $f:\emptyset \to \emptyset$ given by $f = \emptyset$. If $X$ is non-empty, then no relation $f:X \to \emptyset$ can be defined over its entire domain. That is, $f(x)$ is not defined for any $x \in X$, because there are no pairs $(x,y) \in f$. So, it's not that $f: X \to \emptyset$ fails to be a constant function, it fails to be a function at all.

  • 2
    $\begingroup$ Whether or not $\emptyset\to\emptyset$ is constant depends on the wording of the deifnition of "constant function". The OP uses $\exists c\in Y\colon\forall x\in X\colon f(x)=c$. If one uses $\forall x_1,x_2\in X\colon f(x_1)=f(x_2)$ instead, then $\emptyset\to\emptyset$ is constant (which seems to be more natural to me - for a non-constant function I'd much love to assume that it takes at least two values). Also, I am unhappy with the effect that constantness depends on the codomain chosen. $\endgroup$ – Hagen von Eitzen Oct 1 '16 at 19:14
  • $\begingroup$ @HagenvonEitzen I agree, though the OP is interested in this particular definition $\endgroup$ – Omnomnomnom Oct 1 '16 at 19:16
  • $\begingroup$ @HagenvonEitzen Oh very nice! That solves my problem why I am stating this question. I will just use the definition you've mentioned. Perfect. But I will accept this answer since it solves the question stated here. +1 $\endgroup$ – TheGeekGreek Oct 1 '16 at 19:17

Yes, the empty function $f \colon \emptyset \to Y$ is constant, for the very reason that you stated. On the other hand, there is no function $f \colon X \to \emptyset$ unless $X= \emptyset$ (and if $X = \emptyset$, then it is constant - see above). The reason that, for $X \neq \emptyset$, there is no function $f \colon X \to \emptyset$ lies in the definition of a function. Since $X \neq \emptyset$, there is some $x \in X$ and - by the definition of a function - there must then be a unique $y \in \emptyset$ such that $(x,y) \in f$. But this is absurd.

  • $\begingroup$ Thanks. But if $Y = \varnothing$, then I cannot choose an element $c \in Y$ and therefore $f: \emptyset \to \emptyset$ is non-constant? $\endgroup$ – TheGeekGreek Oct 1 '16 at 19:14
  • $\begingroup$ You just don't have to pick an element at all. For all $x \in X$ there must be a unique $y \in Y$ such that $(x,y) \in f$. If there is no $x \in X$, then you don't have to do anything (; $\endgroup$ – Stefan Mesken Oct 1 '16 at 19:16
  • 1
    $\begingroup$ @TheGeekGreek That depends on the exact wording of the definition (cf. my comment to the other answer) $\endgroup$ – Hagen von Eitzen Oct 1 '16 at 19:17
  • $\begingroup$ @HagenvonEitzen Yep, I read the comment. Good point. $\endgroup$ – Stefan Mesken Oct 1 '16 at 19:17
  • $\begingroup$ @Stefan Thanks for your answer. I think the definition Hagen mentioned is more appropriate. But good answer. +1 $\endgroup$ – TheGeekGreek Oct 1 '16 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.