# Category Theory Interactive Demonstration and Text Adventure

August 27, 2008

If you know about sets, set products and ordered pairs, and how functions are represented as sets of pairs, you may enjoy my new interactive category theory demonstration.

There are three buttons on the Web page, and the middle button, the one labelled "Generate a product to show that many products exist", is the one relevant to this blog posting. The point is that in elementary mathematics, one is taught that two sets have a product. For example, the sets {a,b} and {x, y}, the textbooks will tell us, have the product {⟨a,x⟩, ⟨a,y⟩, ⟨b,x⟩, ⟨b,y⟩}.

But according to the category-theory view of the world, this is oversimplified. What matters about a mathematical structure — such as the product of two sets — is its relationship with the structures around it. To quote philosopher David Corfield's book Towards a Philosophy of Real Mathematics , itself quoted in Quantum Quandaries: A Category-Theoretic Perspective by mathematical physicist (and top-notch explainer) John Baez :

Category theory allows you to work on structures without the need first to pulverise them into set theoretic dust. To give an example from the field of architecture, when studying Notre Dame cathedral in Paris, you try to understand how the building relates to other cathedrals of the day, and then to earlier and later cathedrals, and other kinds of ecclesiastical building. What you don't do is begin by imagining it reduced to a pile of mineral fragments.

When you press the "Generate a product to show that many products exist"button, the demonstration will generate a set product that isn't the "usual" one, and show that despite this, it is a product. Which is because it relates to the structures around it in the same way as the "usual" product.

The demonstration ends with a few paragraphs where I've used text-adventure style imagery to convey this without graphics.

### More Insights

 To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.

# First C Compiler Now on Github

The earliest known C compiler by the legendary Dennis Ritchie has been published on the repository.

# HTML5 Mobile Development: Seven Good Ideas (and Three Bad Ones)

HTML5 Mobile Development: Seven Good Ideas (and Three Bad Ones)

# Building Bare Metal ARM Systems with GNU

All you need to know to get up and running... and programming on ARM

# Amazon's Vogels Challenges IT: Rethink App Dev

Amazon Web Services CTO says promised land of cloud computing requires a new generation of applications that follow different principles.

# How to Select a PaaS Partner

Eventually, the vast majority of Web applications will run on a platform-as-a-service, or PaaS, vendor's infrastructure. To help sort out the options, we sent out a matrix with more than 70 decision points to a variety of PaaS providers.

More "Best of the Web" >>