Vlorbik's Diner

son of owen's cooking show

exercises at random

Posted by vlorbik on December 3, 2009

D1: 0
0:=[]

D2: ^
s^:=su[s]

D3: 1
1 := 0^

T: 1=[0].
P:
1=
0^=
[]^=
[]u[[]]=
[[]]=
[0]
.

D4: 2
2:=1^

T: 2=[0,1].
P:
2=
1^=
[0]^=
[0]u[[0]]=
[0,[0]]=
[0,1]
.

Exercise.
i. Define the symbol “3”
appropriately and show
that 3=[0,1,2].
ii. Do it again another way.
iii. Close the book
and check that
3=[[],[[]],[[],[[]]]].

hint: lay out your
work on the page
systematically to
keep track of parens
and commas better.
(every keystroke is
life or death.)
it’s actually easier
with a keypad since
you can cut and paste
and wipe out spaces
& whatnot. yep.
extra credit.
find the bug in the code.

4=[[],[[]],[[],[[]]],[[],[[],[[],[[]]]]]

Advertisements

2 Responses to “exercises at random”

  1. vlorbik said

    http://bryangoodrich.wordpress.com/2009/03/21/how-to-create-everything-from-nothing/

  2. vlorbik said

    the link in the previous comment has rotted away.
    as i recall, it was some darn good exposition on
    the “construct the natural numbers using elementary
    set theory” thing that my post deals with here
    (as sort of an exercise in minimalism). hmm.

    as usual, w’edia is pretty good.

    (but “counting numbers” for {0, 1, 2, …}?
    never in any other source i can recall.)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: