# Squishy Equivalence with Homotopy

In topology, we always talk about the idea of continuous deformation. For example, we say that two spaces are equivalent if you can squish one into the other – if your space was made of clay, you could reshape it into the other just by squishing and molding, without ever tearing or gluing edges.

That’s a really nice intuition. But it’s a very informal intuition. And it suffers from the usual problem with informal intuition: it’s imprecise. There’s a reason why math is formal: because it needs to be! Intuition is great, as far as it goes, but if you really want to be able to understand what a concept means, you need to go beyond just intuition. That’s what math is all about!

We did already talk about what topological equivalence really is, using homeomorphism. But homeomorphism is not the easiest idea, and it’s really hard to see just how it connects back to the idea of continuous deformation.

What we’re going to do in this post is look at a related concept, called homotopy. Homotopy captures the idea of continuous deformation in a formal way, and using it, we can define a form of homotopic equivalence. It’s not quite equivalent to homeomorphism: if two spaces are homeomorphic, they’re always homotopy equivalent; but there are homotopy equivalent spaces that aren’t homeomorphic.

How can we capture the idea of continuous transformation? We’ll start by looking at it in functions: suppose I’ve got two functions, $f$ and $g$. Both $f$ and $g$ map from points in a topological space $A$ to a topological space $B$. What does it mean to say that the function $f$ can be continuously transformed to $g$?

We can do it using a really neat trick. We’ll take the unit interval space – the topological space using the difference metric over the interval from 0 to 1. Call it $U = [0, 1]$.

$f$ can be continuously deformed into $g$ if, and only if, there is a continuous function $t: A \times U \rightarrow B$, where $\forall a \in A: t(a, 0) = f(a) \land t(a, 1) = g(a)$.

If that’s true, then we say $t$ is a homotopy between $f$ and $g$, and that $f$ and $g$ are homotopic.

That’s just the first step. Homotopy, the way we just defined it, doesn’t say anything about topological spaces. We’ve got two spaces, but we’re not looking at how to transform one space into the other; we’re just looking at functions that map between the spaces. Homotopy says when two functions between two spaces are loosely equivalent, because one can be continuously deformed into the other.

To get from there to the idea of transformability of spaces, we need to think about what we’re trying to say. We want to say that a space $A$ can be transformed into a space $B$B. What does that really mean?

One way to say it would be that if I’ve got $A$, I can mush it into a shape $B$, and then much it back to $A$, without ever tearing or gluing anything. Putting that in terms of functions instead of squishies, that means that there’s a continous function $f$ from $A$ to $B$, and then a continous function $g$ back from $B$ to $A$. It’s not enough just to have that pair of functions: if you apply $f$ to map $A$ to $B$, and then apply $g$ to map back, you need to get back something that’s indistinguishable from what you started with.

Formally, if $A$ and $B$ are topological spaces, and $f: A \rightarrow B$ and $g: B \rightarrow A$ are continuous functions, then the spaces $A$ and $B$ are homotopically equivalent – equivalent over squishing and remolding, but not tearing or gluing – if $f \circ g$ is homotopic with the id function on $A$, and $g \circ f$ is homotopic with the id function on $B$.

That captures exactly the notion of continuous transformation that we tried to get with the intuition at the start. Only now it’s complete and precise – we’ve gotten rid of the fuzziness of intuition.