Chapter 1Foundationsnotes.en.pdf:25-26
Unary Natural Numbers
Build ℕ from one rule: 0, then keep wrapping s(…)
Def 2.1.1 — o-rule, s-ruleDef 2.1.3 — Unary natural numbersDef 2.1.4 — Successor / 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 (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 for the natural
numbers, or just once we have established enough machinery.
Animation — unary numbers
Transcript — click a line to jump12 cues
- 0.0sUnary Natural Numbers
- 0.9sCount with sticks — one mark per unit
- 2.1sFive tally marks appear in a row
- 3.6sAn orange slash groups them into a 5-group
- 4.6sA caption labels the ||||/ pattern
- 6.1sThe tally area clears; we write unary instead
- 6.8s0 = o, the seed of the naturals
- 8.0s1 = s(o), one successor wrap
- 9.1s2 = s(s(o)), one more wrap
- 10.2s3 = s(s(s(o))), keep wrapping
- 12.6sDecimal and unary side by side, 1, 2, 3
- 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 is the unary representation of , what is ?
Q5
Which is true about the successor function ?
Loading…