Channels ▼

Jocelyn Paine

Dr. Dobb's Bloggers

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.


Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips 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.