2.2 Functions are functors
Now we wish to establish that functions behave functorially on paths. In traditional type theory, this is equivalently the statement that functions respect equality. Topologically, this corresponds to saying that every function is “continuous”, i.e. preserves paths.
Lemma 2.2.1.
The notation can be read either as the application of to a path, or as the action on paths of .
First proof.
Let be the type family defined by
Then we have
By path induction, we obtain . The computation rule implies for each . ∎
Second proof.
By induction, it suffices to assume is . In this case, we may define . ∎
We will often write as simply . This is strictly speaking ambiguous, but generally no confusion arises. It matches the common convention in category theory of using the same symbol for the application of a functor to objects and to morphisms.
We note that behaves functorially, in all the ways that one might expect.
Lemma 2.2.2.
For functions and and paths and , we have:
-
1.
.
-
2.
.
-
3.
.
-
4.
.
Proof.
Left to the reader. ∎
Now we wish to establish that functions behave functorially on paths. In traditional type theory, this is equivalently the statement that functions respect equality. Topologically, this corresponds to saying that every function is “continuous”, i.e. preserves paths.
Lemma 2.2.3.
Suppose that is a function. Then for any there is an operation
Moreover, for each we have .
The notation can be read either as the application of to a path, or as the action on paths of .
First proof.
Let be the type family defined by
Then we have
By path induction, we obtain . The computation rule implies for each . ∎
Second proof.
By induction, it suffices to assume is . In this case, we may define . ∎
We will often write as simply . This is strictly speaking ambiguous, but generally no confusion arises. It matches the common convention in category theory of using the same symbol for the application of a functor to objects and to morphisms.
We note that behaves functorially, in all the ways that one might expect.
Lemma 2.2.4.
For functions and and paths and , we have:
-
1.
.
-
2.
.
-
3.
.
-
4.
.
Proof.
Left to the reader. ∎
As was the case for the equalities in Lemma 2.1.4 (http://planetmath.org/21typesarehighergroupoids#Thmlem3), those in Lemma 2.2.2 (http://planetmath.org/22functionsarefunctors#Thmlem2) are themselves paths, which satisfy their own coherence laws (which can be proved in the same way), and so on.
Title | 2.2 Functions are functors |
---|---|
\metatable |