Chapter 1Foundationsnotes.en.pdf:25-26

Unary Natural Numbers

Build ℕ from one rule: 0, then keep wrapping s(…)

Def 2.1.1o-rule, s-ruleDef 2.1.3Unary natural numbersDef 2.1.4Successor / predecessor
Concept

Before we can talk about "natural numbers" with any precision, we have to
build them. The unary representation is the simplest construction:

  • o-rule: "0" is a representation of the number zero
  • s-rule: if "n" represents n, then "sn" represents n + 1

So the number 3 is represented as sss\texttt{sss} (three successor symbols
wrapping the zero symbol).

Why unary? Because the rules are so simple that we can prove things about
all numbers by induction — see the next topic.

Notation. We write 0,s(0),s(s(0)),s(s(s(0))),0, s(0), s(s(0)), s(s(s(0))), \dots for the natural
numbers, or just 0,1,2,3,0, 1, 2, 3, \dots once we have established enough machinery.

Animation — unary numbers
Transcript — click a line to jump12 cues
  1. 0.0sUnary Natural Numbers
  2. 0.9sCount with sticks — one mark per unit
  3. 2.1sFive tally marks appear in a row
  4. 3.6sAn orange slash groups them into a 5-group
  5. 4.6sA caption labels the ||||/ pattern
  6. 6.1sThe tally area clears; we write unary instead
  7. 6.8s0 = o, the seed of the naturals
  8. 8.0s1 = s(o), one successor wrap
  9. 9.1s2 = s(s(o)), one more wrap
  10. 10.2s3 = s(s(s(o))), keep wrapping
  11. 12.6sDecimal and unary side by side, 1, 2, 3
  12. 15.9sDecimal is compact; unary makes structure explicit
Practice — score 100% to advance
Multiple choice
Q1
What does the unary representation of 2 look like?
Q2
How many rules construct the unary naturals?
Q3
Why use unary representations at all?
Q4
If nn is the unary representation of 33, what is s(n)s(n)?
Q5
Which is true about the successor function ss?
Loading…