Pasting identifications [01EH]

Fix A~\mathit {type} and u,v,w:A. Given p:u=_Av and q:v=_Aw we may define an identification p\cdot q:u=_Aw. The idea of the pasting operation is to use identification elimination to consider just the case where (v,p) \equiv (u,\mathsf {refl}_u); in that case we would have q:u=_Aw and so we may just return that. We first give an implicit definition of the pasting operation, and then we will show that it is well-defined by constructing an explicit definition:

\begin {aligned} & \mathsf {paste}: {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(u,v,w:A)}} \; u=_Av\to v=_Aw\to u=_Aw \\ & \mathsf {paste}~u~u~w~\mathsf {refl}_{u}~q :\equiv q \end {aligned}

Then we would define p\cdot q :\equiv \mathsf {paste}~u~v~w~p~q when u,v,w are understood.

In our implicit definition above, we have given an equation just for the case where the first two vertices are exactly the same and the first edge is the trivial one. The informal rule of thumb is that when you are binding a pair (v,p) of an identification p:u=_Av with one of its endpoints, you are free to collapse this data to (u,\mathsf {refl}_u); when both endpoints are fixed, you can’t do this. The collapsing move used above is justified by the identification elimination rule, which we can show by instantiating the above with an explicit definition.

\begin {aligned} & \mathsf {paste}: {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(u,v,w:A)}} \; u=_Av\to v=_Aw\to u=_Aw \\ & \mathsf {paste} :\equiv \lambda u,v,w,p\mathpunct {.} \mathsf {J}_{ y,z\mathpunct {.} y=_Aw\to u=_Aw }(p; \lambda q\mathpunct {.}{q}) \end {aligned}

We verify that the defining equation holds:

\begin {aligned} &\mathsf {paste}~u~u~w~\mathsf {refl}_u~q \\ &\quad \equiv \mathsf {J}_{y,z\mathpunct {.}y=_Aw\to u=_Aw}(\mathsf {refl}_u; \lambda q\mathpunct {.}{q}) ~q \\ &\quad \equiv (\lambda q\mathpunct {.}{q})~q \\ &\quad \equiv q \end {aligned}

If you are not yet confident in the use of implicit definitions, you should verify that this equation uniquely defines \mathsf {paste}. In particular, we might check for any f:{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(u,v,w:A)}}u=_Av\to v=_Aw\to u=_Aw satisfying f~u~u~w~\mathsf {refl}_u~q \equiv q we may find some family of identifications H_f: {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(u,v,w:A)}} {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(p:u=_Av)}} {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(q:v=_Aw)}} fuvwpq =_{u=_Aw} \mathsf {paste}~u~v~w~p~q \text {.}

For clarity, we give an implicit definition of H_f:

H_f~u~u~w~\mathsf {refl}_u~q :\equiv \mathsf {refl}_q

The corresponding explicit definition would be a more complicated instance of \mathsf {J}:

H_f :\equiv \lambda u,v,w,p\mathpunct {.} \mathsf {J}_{ y,z\mathpunct {.} {\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod } }_{(q:y=_Aw)}} fuywzq =_{u=_Aw} \mathsf {paste}~u~y~w~z~q }(p; \lambda q\mathpunct {.} \mathsf {refl}_q )

Context

Dependent types II › More on identifications [01J9]

Backlinks

Definition. Homotopy groups of a pointed type [01KJ]

Construction. Sums of retracts [01H3]

Lemma. Truncation levels › Propositions are (some) sets [01G4]

Related

Rule. Dependent types I › Identification types › Elimination [01EC]

Dependent types I › Explicit vs. implicit definitions of functions [01EF]