I realize this is a bit pedantic, but I am not sure if there is a term for a function which maps from an empty domain to a range of size one. I am a programmer, and not a mathematician, but was thinking of a general case for a single variable. So something like,
f(x) = x
int f(int x) { returns x; }
is a linear mapping of the integer domain to the integer codomain. If I had:
g(x) = 4
int g(int x) { returns 4; }
that is again a linear mapping of the integer domain to the integer codomain, with range of size 1. I am not sure if this is mathematically correct to say so but if I had:
h() = 5
int h() { return 5; }
that takes no input, thus there an empty domain, but the codomain is still integers and the range is of size 1. Is there a special term for this?
this is coming from the idea that:
int i = 5;
and
int h() { return 5; }
are the 'same'. Thus if there is a term to describe the function h, it can describe what 'i' is.
Some background, I became interested in this question when I realized (though the definition of tensors can vary) that singular numbers are tensors of rank 0 (scalars). I want to know if singular numbers can also be described as a special case of functions.
The domain of your
his not really the empty set. If it were so, it would be impossible to get a function value out of it.Rather, the domain of
his a set with exactly one element, and that element is the empty tuple(). (Or some other abstract representation of "here are all the $0$ arguments given in the call).(Functional languages like ML or Haskell make this more explicit and orthogonal than typical imperative or OO languages.)
I don't think there is any particular word for such functions in mathematics. The closest mathematical expression of the situation would be to say that the function space $1\to X$ is naturally in bijection with $X$, or with different notation $X^1\cong X$ -- but those do not provide a word for the function.