TNT

If you haven't read this book, I highly recommend it.  I discovered it in high school and finally purchased my first copy at the now-gone Duthie Books in Kitsilano.  Without going into the details of the book, the author uses a simple Peano arithmetic called Typographical Number Theory  (TNT) to illustrate some of his points.

An example expression in TNT could look like this (from Wikipedia):

∀a:∀b:(a + b) = (b + a)

Which means "for every number a and every number b, a plus b equals b plus a"

I decided to write a simple ANTLR grammar for TNT, which you can find here.

Leave a Reply