13

I have been thinking about mathematical operations, and I was trying to ponder what an operation simpler than addition would be. I started thinking about what each operation did (exponents: repeated multiplication, multiplication: repeated addition). I figured that addition was repeated something, and I came up with a unary operation, 4 = 1 + 1 + 1 + 1, where each number is the input, and its value is the output. That would mean that our number system's numerals are just shorthand for repeated addition of one. (To extend this to negative numbers, we could define this unary function's opposite: -4 = -1 - 1 - 1 - 1.) I am an eighth grader taking high school geometry, and this sort of shocked me. Am I totally wrong, or is every integer just the value of a unary operation: itself?

  • You seem to be asking two questions here. Are you asking whether integers are defined by repeatedly adding or subtracting $1$, or are you adding if integers are operations on themselves? – GFauxPas Apr 03 '15 at 14:51
  • 1
    while you're thinking of this you may find tetration interesting; it is the next more complicated thing after exponentiation. There is actually an infinite sequence of 'hyperoperations' starting from addition.

    http://en.wikipedia.org/wiki/Tetration

    – Ryan Vitale Apr 03 '15 at 14:53
  • @rVitale Interestingly enough, the reason I was trying to think about a more basic operation is because I was attempting to get a better understanding of them, so I could think about operations more complex than exponentiation. Once again, my idea has already been thought of! – DrMankowitz Apr 03 '15 at 15:12
  • You can "map" integers to unary operations in many ways. For instance a monomial $f_k(x) = x^k$ is a mapping from non-negative integers $k$ to a set of unary functions of $x$. So the integers are not unary operations or functions themselves, but they are in many cases practical to "map" to functions or operations. – mathreadler Apr 04 '15 at 09:35
  • 1
    Instead of the monomials above you can map an integer $k$ to the function $S_k(x) = S(S_{k-1}(x))$ where $S_1 = S$ is the successor function of integers (which adds 1). That way you get a mapping between the integers and the unary operations "addition with an integer constant". – mathreadler Apr 04 '15 at 09:46

6 Answers6

18

No, it is incorrect to say "an integer is a unary operation". What the other answers so far are actually saying instead is that any integer is the result of repeatedly applying a unary operation, which is quite different.

The true statement I think you are after is that any given integer is (or can be identified with) a nullary operation, specifically the operation taking no arguments and returning itself. See this math.SE thread for example.

Zev Chonoles
  • 129,973
  • Would another way of saying that be 'its just an identity function'? – David says Reinstate Monica Apr 04 '15 at 04:16
  • 5
    No, that's not right either - at any rate, it's not clear to me what you intend the pronoun "it" to refer to in your sentence. The term "identity function" has a very specific meaning: given a set $X$, the identity function of $X$ is the function $f:X\to X$ defined by the rule $f(x)=x$ for all $x\in X$. By contrast, interpreting an element $x\in X$ as a nullary operation means considering the function $f:X^0\to X$ (note: $X^0 = {\varnothing}$) defined by the rule $f(\varnothing)=x$. Identity functions are unrelated to this. – Zev Chonoles Apr 04 '15 at 04:24
11

The Peano axioms start with a unary operation called $S$ and intended as successor. In fact we define $1=S(0), 2=S(S(0)),$ etc. as $1,2,$ etc. are not part of the language. Then there are axioms that define addition and multiplication to make them work the way they should.

Ross Millikan
  • 374,822
5

No, an integer is not a unary operation, it is a $0$-ary operation. A unary operation is essentially a function, it requires one input, for example, negation $x\to-x$ is a unary operation. The operation "5" requires zero operands, it has a constant value.

On the other hand, as pointed out in the other answers, the successor operation $x\to x+1$ is unary, and addition is repeated succession.

Jack M
  • 27,819
  • 7
  • 63
  • 129
  • That distinction doesn't really hold up very well. A function is a unary operation, yes, but you can also treat it as a $0$-ary operation. That's always possible, you basically just choose not to do something you perhaps could. – leftaroundabout Apr 04 '15 at 01:01
3

You've discovered Church numerals. Almost.

In Church encoding, numbers are in fact defined as operations. Actually, a bit more involved: the $n$-th Church numeral is a function that takes a function, and returns the $n$-fold composition of that function with itself. Written in lambda calculus, the first few numbers look thus: $$ 0 = \backslash f\ x\mapsto x $$ $$ 1 = \backslash f\ x\mapsto f\,x $$ $$ 2 = \backslash f\ x\mapsto f(f\,x) $$ $$ 3 = \backslash f\ x\mapsto f\bigl(f(f\,x)\bigr) $$ etc. In other branches of maths, these would be written rather something like $$ 0(f,x) = x $$ $$ 1(f,x) = f(x) $$ $$ 2(f,x) = f\bigl(f(x)) $$ $$ \ldots $$ Now you might ask, are these the natural numbers, or is it just some particular encoding for the naturals? But that's a philosophical question. The church numerals are a model satisfying the Peano axioms, so basically whenever you see numbers used it's possible to put in these definitions, it won't change the meaning.

2

Yes, you may see this in some more advanced course. Say $S$ is the unary operation "add 1". Then addition may be defined recursively in terms of $S$. $$ x+0 := x; \\ x+Sy := S(x+y) $$

Why not define multiplication next? $$ x*0 := 0 \\ x*Sy := (x*y)+x $$

Can you do powers $x^y$?

Look for "Peano's axioms" for more.

GEdgar
  • 111,679
2

While is is true that to every integer $k$ one can associate a unary operation $n\mapsto n+k$ of adding$~k$ (which you can see as a function $\Bbb Z\to\Bbb Z$, or in case $k\in\Bbb N$ as a function $\Bbb N\to\Bbb N$) and this correspondence is injective (different integers give different unary operations), it would be wrong to define integers as such operations, and fairly confusing even to identify integers with such operations.

The problem is, these operations have to act on something, namely on integers, but if you want to define the integers as those operations, the integers that they must act upon have not been defined yet. So you end up with a circular definition.

You might want to define integers first, and then the operations on the integers, and then identify $k$ with the operation $n\mapsto n+k$. This would be similar to how one defines the integers, then the rational numbers in therms of them (a somewhat subtle affair), after which (for the purposes of arithmetic) the integer $k$ is identified with the rational number$~\frac k1$. This is not logically inconsistent, and would allow you to write $1(1)=2$ or even $1\circ 1=2$ instead of $1+1=2$, but there is not too much to be gained by this, and it would be less clear than what is usually done. Also it is fairly arbitrary: why identify $k$ with $n\mapsto n+k$ rather than with $n\mapsto nk$ o something else yet?

  • While you are right about not being able to define integers as unary operations on integers, since it would be circular, the Church numerals indeed are a way of representing or interpreting natural numbers and we recover addition of $k$ by applying them to the successor function. It is not at all arbitrary since it is the cleanest way of motivating axioms for arithmetic without basing it on intuition about physical addition. The facts about repeating procedures remain true even if addition in the real world were non-associative and non-commutative. In fact, mixing chemicals is like that! – user21820 Apr 04 '15 at 10:09
  • 1
    @user21820: The question was not about constructing natural numbers inside the lambda calculus; the Church numerals are fine for that. The lambda calculus has its own difficulties, since any extensional view of lambda terms will have to interpret them as functions from lambda terms to lambda terms, with circularity problems of the same type that my answer mentions. But apart from that, OP does not want to define integers as the Church numerals, but as Church numerals applied to the successor function. The fact that Church numerals abstract away from what is being iterated is important. – Marc van Leeuwen Apr 04 '15 at 13:20
  • Well my point was precisely that perhaps the asker was trying to abstract out the repetition but not being able to do so correctly because he didn't know higher-order functions. – user21820 Apr 04 '15 at 14:20