Category Archives: Good Math

Topological Products Redux: Categories to the rescue!

This is going to be a short but sweet post on topology. Remember way back when I started writing about category theory? I said that the reason for doing that was because it’s such a useful tool for talking about other things. Well, today, I’m going to show you a great example of that.
Last friday, I went through a fairly traditional approach to describing the topological product. The traditional approach not *very* difficult, but it’s not particularly easy to follow either. The construction isn’t really that difficult, but it’s not easy to work out just what it all really means.
There is another approach to presenting it using category theory, and to me at least, it makes it a *whole* lot easier to grasp. To make the diagrams easier to draw, I’ll adopt one shorthand: instead of writing (T,τ) for topological spaces, I’ll use a single symbol, like **X**, with the understanding that **X** represents the *pair* of the set and the topology that form the topological space.
Suppose we have a set topological spaces, **E**1, **E**2, …, **E**n. The product **P** = Πi=1..n**E**i is the *only* topological space with projection functions pi : **P** → **E**i, such that
for any other topological spaces **S**, if **S** has continuous functions fi : **S** → **E**i to each of the elements of the product, then there is *exactly one* continuous function g : **S** → **P** such that the following diagram commutes:

product.jpg

That’s really just a repetition of the definition of categorical product, just made specific to the category **Top**. Everything I said in fridays post about what forms the open sets of the topological product space is directly implied by this categorical definition. The property of the open sets of the product topology being the coarsest structure of sets that maintains the structural properties of the product element topologies – that’s implied by the categorical description.
To me, this is the real beauty of category theory, and the whole reason why I spent all that time explaining it. Being able to describe structures in the language of category theory makes things much easier to understand.

Worlds Greatest Pathological Language: TECO

I’ve got a real treat for you pathological programming fans!
Today, we’re going to take a quick look at the worlds most *useful* pathological programming language: TECO.
TECO is one of the most influential pieces of software ever written. If, by chance, you’ve ever heard of a little editor called “emacs”; well, that was originally a set of editor macros for TECO (EMACS = Editor MACroS).
As a language, it’s both wonderful and awful. On the good side, The central concept of the language is wonderful: it’s a powerful language for processing text, which works by basically repeatedly finding text that matches some kind of pattern, taking some kind of action when it finds it, and then selecting the next pattern to look for. That’s a very natural, easy to understand way of writing programs to do text processing. On the bad side, it’s got the most god-awful hideous syntax ever imagined.

Continue reading

Topological Products

product-intro.jpg
One of the really neat things you can do in topology is play games with dimensions. Topology can give you ways of measuring dimensions, and projecting structures with many dimensions into lower-dimensional spaces. One of the keys to doing this is understanding how to combine different topologies to create new structures. This is done using the *topological product*.

Continue reading

Should we miss BASIC?

Over in my post accepting my victory as the biggest geek on ScienceBlogs, an interesting discussion about beginners learning to program got started in the comments. It was triggered by someone mentioning David Brin’s article in Salon about how terrible it is that computers no longer come with basic. The discussion was interesting; I think it’s interesting enough to justify a top-level post.
A few days ago in Salon, David Brin published an article (no link, because Salon is a pay-site), lamenting the fact that computers no longer come with BASIC interpreters, and how that was going to wreck the next generation of up-and-coming programmers:
>Only, quietly and without fanfare, or even any comment or notice by software
>pundits, we have drifted into a situation where almost none of the millions of
>personal computers in America offers a line-programming language simple enough
>for kids to pick up fast. Not even the one that was a software lingua franca on
>nearly all machines, only a decade or so ago. And that is not only a problem
>for Ben and me; it is a problem for our nation and civilization.
Yes indeedy, the lack of built-in BASIC interpreters is a problem for our very civilization!
There are two contradictory threads running through the article. One is the idea that “back in the good old days”, everyone had the same programming language, a “lingua franca” which everyone spoke. The other is that the “line-oriented” BASIC was a better tool for beginners learning to program than anything that we have now.
I think both of these are utter nonsense.

Topological Subspaces

Just like you can define a sub-set of a set, or a sub-object of an object in a category, you can define a sub-*space* of a topological space. It’s a pretty easy thing to understand; interestingly, a sub-space of a topological space works in pretty much exactly the same way as a sub-sets and sub-object. In fact, the topological definition of a sub-space is *identical* to the categorical definition of a sub-object when we’re looking at the category of topologies, **Top**.
Today, I’m going to explain what a subspace is, and show you how the categorical sub-object corresponds to the topological subspace. Read on beneath the fold.

Continue reading

More Minimal Masochism: Pathological Programming in OISC

Expanding on last weeks theme of minimalism, this week, we’ve got OISC: the One Instruction Set Computer. This is a machine-code level primitive language with exactly one instruction. There are actually a few variants on this, but my favorite is the “subleq” OISC, which I’ll describe beneath the fold.

Continue reading

Shapes, Boundaries, and Interiors

When we talk about topology, in general, the way we talk about it is in terms of *shapes*: geometric objects and spaces, surfaces, bodies that enclose things, etc. We talk about the topology of a *torus*, or a *coffee mug*, or a *sphere*.
But the topology we’ve talked about so far doesn’t talk about shapes or surfaces. It talks about open sets and closed sets, about neighborhoods, even about filters; but we haven’t touched on how this relates to our *intuitive* notion of shape.
Today, we’ll make a start on the idea of surface and shape by defining what *interior* and *boundary* mean in a topological space.

Continue reading

Pathological Programming: The Worlds Smallest Programming Language

For todays dose of pathological programming, we’re going to hit the worlds simplest language. A Turing-complete programming language with exactly *two* characters, no variables, and no numbers. It’s called [Iota][iota]. And rather than bothering with the rather annoying Iota compiler, we’ll just use an even more twisted language called [Lazy-K][lazyk], which can run Iota programs, Unlambda programs, as well as its own syntax.
[unlambda]: http://scienceblogs.com/goodmath/2006/08/friday_pathological_programmin_3.php
[lazyk]: http://esoteric.sange.fi/essie2/download/lazy-k/
[Iota]: http://ling.ucsd.edu/~barker/Iota/

Continue reading

Neighborhoods (Updated)

The past couple of posts on continuity and homeomorphism actually glossed over one really important point. I’m actually surprised no one called me on it; either you guys have learned to trust me, or else no one is reading this.
What I skimmed past is what a *neighborhood* is. The intuition for a
neighborhood is based on metric spaces: in a metric space, the neighborhood of a
point p is the points that are *close to* p, where close to is defined in terms of the distance metric. But not all topological spaces are metric spaces. So what’s a neighborhood in a non-metric topological space?

Continue reading

Topological Equivalence: Introducing Homeomorphisms

With continuity under our belts (albeit with some bumps along the way), we can look at something that many people consider *the* central concept of topology: homeomorphisms.
A homeomorphism is what defines the topological concept of *equivalence*. Remember the clay mug/torus metaphor from from my introduction: in topology, two topological spaces are equivalent if they can be bent, stretched, smushed, twisted, or glued to form the same shape *without* tearing.
The rest is beneath the fold.

Continue reading