If $a$ and $b$ are definitionally equal terms of type $A$ - i.e., $a$ and $b$ can be $\beta \eta$ reduced to identical terms - what follows about the structure of the identity type $a=_A b$? For example, are both $\mbox{refl}_a$ and $\mbox{refl}_b$ objects of type $a=_A b$? And are $\mbox{refl}_a$ and $\mbox{refl}_b$ themselves definitionally equal in virtue of $a$ and $b$ being definitionally equal?
-
The answer should be yes to both – IsAdisplayName Dec 10 '22 at 16:41
-
Yes, I was expecting affirmative answers. But in virtue of what is $\mbox{refl}_a$ an element of the identity type in question, for example? – user142857 Dec 10 '22 at 16:43
-
In virtue of the definitional equality? I'm not entirely sure what you're asking. Are you asking how to derive the judgement $refl_a : a=b$? – IsAdisplayName Dec 10 '22 at 16:45
-
Yes, that's what I want (under the assumption that $a$ and $b$ are definitionally equal.) – user142857 Dec 10 '22 at 16:52
-
1To formally do this, you'll need to use the structural rules of the type theory. These can be found in the back of the hott book. When working informally, you can kinda treat definitionally equal terms as identical – IsAdisplayName Dec 10 '22 at 16:56
1 Answers
Yes.
If $a \doteq b$ (by which I mean $a$ and $b$ are definitionally equal) then the types
- $a = b$
- $a = a$
- $b = b$
are all definitionally equal. Moreover, we have a definitional equality $\text{refl}_a \doteq \text{refl}_b$ in this type.
These follow from the "substitution rules" in section $1.3$ of Egbert Rijke's new book Introduction to Homotopy Type Theory. For completeness, here are the relevant rules:
$$ \frac{\Gamma \vdash a \doteq a' : A \quad \Gamma, x:A, \Delta \vdash B \text{ type}}{\Gamma, \Delta[a/x] \vdash B[a/x] \doteq B[a'/x] \text{ type}} $$
$$ \frac{\Gamma \vdash a \doteq a' : A \quad \Gamma, x:A, \Delta \vdash b:B}{\Gamma, \Delta[a/x] \vdash b[a/x] \doteq b[a'/x] : B[a/x]} $$
The first rule tells us that all of our types are definitionally equal. The second tells us that the terms $\text{refl}_a$ and $\text{refl}_b$ are definitionally equal.
If you're worried about the fact that a term seems to have multiple possible types, we show this is ok in exercise $1.1$ of this same book, which asks us to derive the "element conversion rule":
$$ \frac{\Gamma \vdash A \doteq A' \text{ type} \quad \Gamma \vdash a : A}{\Gamma \vdash a : A'} $$
This is a kind of weird exercise (especially to make the first exercise in the book), and you can find a proof here. The key idea is to use the "varianble conversion rules"
$$ \frac{\Gamma \vdash A \doteq A' \text{ type} \quad \Gamma, x:A, \Delta \vdash \mathcal{J}}{\Gamma, x : A', \Delta \vdash \mathcal{J}} $$
which hold for any judgement $\mathcal{J}$.
I hope this helps ^_^
- 42,257
-
1Do you mean the variable conversion rules? (I don't see variable presentation rules.) I don't see how the definitional equality of the types you list follows from the variable conversion rules. Do you mean the substitution rules that are stated on the next page? – user142857 Dec 10 '22 at 17:05
-
-
1Thanks. The fact that a term can have multiple types doesn't seem like a worry, as long as we regard definitionally equal types as the 'same'. Then terms don't have multiple types, merely the same type described differently. – user142857 Dec 10 '22 at 17:12
-