I always come across this idea. It seems that constants can be considered nullary/$0$-arity functions. What is the intuition behind that?
Asked
Active
Viewed 617 times
4
-
1See the discussion is the post What is the “correct” reading of ⊥? – Mauro ALLEGRANZA Feb 08 '19 at 12:06
-
And yes; in first-order logic an individual constant $c$ can be seen as a $0$-ary function symbol. – Mauro ALLEGRANZA Feb 08 '19 at 12:09
2 Answers
9
A function of arity $n$ on the universe $A$ is a function $$ f \colon A^n \to A. $$
Of course $A^0$ has only one point, say $*$. So a function $$ f \colon A^0 \to A $$ is the constant function with value $f(*)$.

GEdgar
- 111,679
6
It makes sense if we consider an object to be a function of the least possible arity. Just as $x^3$ depends only on $x$ but not on $y$ so can be defined to have an arity of $1$ instead of $2$, a constant has arity $0$ (if we say so). You can think of it in programming terms (I'll use Python):
def arity_1_function(x): return x ** 3
def arity_0_function(): return 12
In general a function can have greater arity than this approach assumes, so we could think of a constant as having any non-negative arity; all we're doing here is identifying a constant with a minimum-arity function as a convention.

J.G.
- 115,835