Patterns with Set Pictures of Natural Numbers

Back to Puzzle Page


This page is about the representation of natural numbers as diagrams. In particular the focus is on a specialized way of constructing the natural numbers in axiomatic set theory. Sounds sort of grandiose for what was originally just some doodling on course notes... I'd kept the scribbles in my pile of 'recmath' papers and thought it might be interesting to translate them into a web page.

Peeling away some of the layers of representation involved here:

  • number in every day language: three apples, a seventeen acre property
  • the abstract concept of natural numbers: 0, 1, 2, 3, 4, 5 etc.
  • axiomatic set theory's construction of natural numbers: 0={} 1={{}} 2={{}{{}}} etc. Where successive sets contain as elements all of the previous sets in the sequence.
  • two-dimensional diagrams (the doodles) that represent the sequence of natural number sets
  • the representation of the diagrams as nests of tables (in HTML - not the type associated with elegant living)
  • the coding of a procedure to generate the HTML using Javascript
  • the browsers interpretation of the Javascript and display of the graphics on this page

The diagrams below represent the natural numbers from 0 to 6 - that's probably enough to get the picture. The significance of the two colours white and blue is only to help in distinguishing rectangles within rectangles - each successive nesting has colours reversed.

The number 0 is represented by an empty rectangle. 1 is a rectangle containing a single empty rectangle, 0. 2 contains two rectangles, 0 and 1. The outer blue rectangle of each number's diagram represents the 'container' set for that number. Each outer blue rectangle contains a number of white rectangles - the elements or members of the set.

For the natural number 3, the blue outer container has three white rectangle 'members' which represent the natural numbers 0, 1 and 2. The set representation for the natural number 3 is { {} { {} } { {} { {} } } }.