In this tutorial, we will show show how to prove in homotopy.io that every equivalence of 1-categories may be promoted to an adjoint equivalence.
You may use the Undo
and Redo
features at any point in the tutorial, by either clicking on the arrows on the centre-left or pressing U or Y.
The statement of the theorem requires the following generators in the signature:
- Two 0-cells
$C,D$ , the categories that are equivalent, - Two 1-cells
$F: C \to D,G: D \to C$ , the back-forth functors, - Two 2-cells
$\alpha: 1_C \to G \circ F,\beta: F \circ G \to 1_D$ , the invertible natural transformations that witness the equivalence.
So, let us start with the empty workspace viewed at homotopy.io.
If we click on the Signature
button (second on the left), we can see that it is currently empty, as expected. We will begin by constructing the signature we described above.
We start by adding two 0-cells. Click on the Add
button (bottom-left, keyboard shortcut A). The two new generators should now show-up in the signature and can be selected by clicking on them or by using numbers 1-9 on the keyboard. At this point, the workspace should look like this:
The workspace can be then cleared by clicking Clear
(bottom-left, keyboard shortcut C).
Clicking on the left of the generator name, we can edit the generator name to respectively
Now, to create the generating 1-cells, we need to tell the proof assistant their sources and targets. Let us start with
First, we select Source
(bottom-left, or clicking S).
Now the blue dot representing Target
(or T).
This will give a 1-cell, our
Clicking on our newly constructed
In this workspace view, we also have some slice-controls on the right, which we'll explain how to use later on. First, let us rename these 1-cells to
Adding the 2-cells
- Their sources and targets are not generating 1-cells, but composites of 1-cells.
- They have to be invertible.
Recall that Identity
(or I): the blue point gets promoted to a blue line that we may take as the Source
of our 2-dimensional
For the target, we select
Now, this composite diagram we just constructed has the same boundary as the identity on
For example, if we didn't compose Target
button would have caused an error.
Since in our case, the globularity check passes, we may construct
Now try to construct the dual diagram corresponding to
To make both 2-cells invertible, we can just click on the Directed/Invertible
toggle, which appears when trying to edit a generator name. When a generator is flagged as Invertible
, an (I) symbol will appear next to its name. In our case, this should only happen for
At this point, the signature should look like this:
We're done with our setup: the proof assistant has validated the let $C$ and $D$ be equivalent categories part of our theorem, and now we will turn to proving the rest of the statement.
Our theorem states that we may construct new 2-cells in this signature which satisfy the triangular equations, also called the snake equations, for an adjuction between
Let's choose to keep
Now, although we could prove the theorem by inserting this
Since we want something that will eventually replace
We now paste the inverse of
The workspace should now look like this:
We now need to close-off the right-most blue region to make the boundary of
Note that if at any point you selected the wrong attachment option, you may undo that by pressing U.
We have now constructed our candidate for Theorem
(bottom-left or keyboard shortcut H). This will add two generators to our signature:
- A cell called 'Theorem', which contains the newly-defined
$\beta'$ , - A cell called 'Proof', which contains the path taking the generator
$\beta'$ to the diagram we previously constructed.
Hence the 'Proof' cell is really our witness that to what the definition of
Let us rename the 'Theorem' generator to
Notice in particular that
We are now ready to prove that
After all this setup work, we're finally at the point where we can actually prove something in the tool. We will start by proving that we can contract down one of the snakes to the identity on
In theory we could start from either side of the equation, i.e. contract down the snake to the identity or, viceversa, build up the snake from the identity. However, in practice it is much easier to start with the most complex side of the equation and contract it down.
So, let us start by constructing our snake. It will need to have the same boundary as the identity on
We don't have that many options for how to construct a diagram fitting these requirements. The blue regions will need to come from
We now need to make the right-most region red. Clicking towards the right-edge, the tool will automatically attach the only matching diagram, which in this case is the identity on
We're almost there! To finish the snake we need to insert some kind of cup, which will close off the blue region on the right. If we click to attach on the top edge, we can choose to insert
Note that is does have the same boundary as the identity on
Now, we want to construct an homotopy from this diagram into the identity on Identity
or pressing I on the keyboard. Nothing should visibly change, as we are still seeing a 2d projection, but the view controls on the top-right corner should change to reflect the presence of this new dimension.
Although our view has not changed, whenever we do anything on the current diagram, the tool will compute its meaning as a 3d path. In other words, we can just try to simplify the current diagram into the identity on
Having taken the identity on the snake, our first step of the proof will be to unravel the definition of
We now drag up the left-most
At this point, we have successfully moved our SHIFT
key. This tells the tool that we intend to kill-off something by composing it with its inverse.
We can do the same thing again to eliminate the SHIFT
and drag either of
We have achieved our goal!
The great advantage of working in this diagrammatic way is that we can now ask the tool to render for us the entire proof we just constructed. To get into this view-from-the-top-dimension mode, we just have to click on the star symbol on the top-right corner. The diagram should look something like this:
The fact that proofs are geometric objects in themselves allows us to reason visually about them. For example, it is evident from the above diagram that our earlier proof was not really optimal, as there are two regions in which not much is happening. We could simplify them by performing contractions through dragging. As a challenge, try to reduce the proof down to this diagram:
Remember that we want to be careful not to over-contract our proofs: we still want to be able to tell what is going on, which is hard if the entire proof happens in a single step!
As we are done with this part of the proof, we can click Theorem
or press H to add this result to our signature. For clarity, we can rename the 'Theorem' cell to 'Snake 1', and the 'Proof' cell to 'Proof of Snake 1'.
We now construct the second snake and prove it contracts down to the identity on
For reference, recall that the identity on
We are again looking for a snake diagram sharing the same boundary. Let's select
We now need to make the left-most region red. We click towards the left-edge to attach an identity on
We finish the snake by attaching a
This finishes the construction of our snake. We now take the identity on this diagram and begin proving it contracts down to the identity on
Our first step of the proof will be again to expand out
At this point we do something different from the other proof. We need to break up the right part of the sock, by inserting a copy of
The resulting diagram is the broken sock:
We now drag down the left-most
Now that we have successfully transferred the inverse SHIFT
key.
We're almost at our goal: we're left with two pairs of
Now SHIFT
. This just leaves us with an
We squash the final bubble by dragging while holding SHIFT
again, reaching our goal:
Before we save our theorem, we want to simplify the whole proof, so we click on the star symbol on the top-right corner to get the following view:
As a final challenge, try to reduce the proof down to this diagram:
We're finally done with the proof, so we can click Theorem
or press H to add this result to our signature, and rename the 'Theorem' cell to 'Snake 2', and the 'Proof' cell to 'Proof of Snake 2'.
We can also display the whole proof in 3d or 4d by clicking on the right-most P symbols in the view controls, when looking at either the theorem or the proof of one of our snakes.
By clicking on the top-most button on the left, we can open the project view for our workspace. Here we can set the title, author and abstract of our workspace, with
The self-explanatory Import
and Export
buttons then allow for downloading and reimporting workspaces into the tool.
A final fact to mention is that every 2d or 3d diagram that can be displayed in the tool may be exported from the Image Export
panel, located as the third button on the top-left. A number of formats are supported depending on the dimension of the diagram. In particular, 2d diagrams may be exported to TikZ and SVG.