Idea. Indefinite description in homotopy type theory [00B0]
Certain foundational systems for mathematics employ global choice or indefinite description operators; operators of this kind are assumed by Bourbaki, Isabelle/HOL, and Lean. Indefinite description is similar to the axiom of choice, but quite a bit stronger:
\frac { \Gamma , x:A \mid \phi {\mathopen {}\left (x\right )\mathclose {}} : \mathsf {prop} \qquad \Gamma \vdash \exists x : A. \top }{ \Gamma \mid {\mathopen {}\left (\epsilon x:A. \phi {\mathopen {}\left (x\right )\mathclose {}}\right )\mathclose {}} : A \qquad \Gamma ,z:A \mid \phi {\mathopen {}\left (z\right )\mathclose {}} \vdash \phi {\mathopen {}\left (\epsilon x:A.\phi {\mathopen {}\left (x\right )\mathclose {}}\right )\mathclose {}} }In the presence of subset types, indefinite description in the sense above is equivalent to the presence of a single global choice operator:
\frac { \Gamma \vdash \exists x : A. \top }{ \Gamma \mid \mathsf {some}_A : A }I believe that it is nonetheless possible to have the “best of both worlds” and elaborate a high-level language with indefinite descriptions to homotopy type theory with the axiom of choice. The idea has two main parts:
- First of all, we must interpret the “signatures” of top-level declarations as being fully abstract, taking place in the propositional truncation monad. For instance, a definitional extension \mathsf {def}\,t : A :\equiv u should be interpreted as producing an element of the truncation {\mathopen {}\left \lVert \mathchoice {\textstyle \sum _{{\mathopen {}\left (x:A\right )\mathclose {}}}}{\textstyle \sum _{{\mathopen {}\left (x:A\right )\mathclose {}}}}{\scriptstyle \sum _{{\mathopen {}\left (x:A\right )\mathclose {}}}}{\scriptscriptstyle \sum _{{\mathopen {}\left (x:A\right )\mathclose {}}}}x = u\right \rVert \mathclose {}}; subsequent declarations proceed by unpacking this truncation using the contractibility of singletons.
- Secondly, we shall elaborate an occurrence of \Gamma \vdash \mathsf {some}_A{\mathopen {}\left (u\right )\mathclose {}}:A given \Gamma \vdash u : {\mathopen {}\left \lVert A\right \rVert \mathclose {}} by unleashing a new top-level declaration \vartheta : \mathchoice {\textstyle \prod _{{\mathopen {}\left (\cdots :\Gamma \right )\mathclose {}}}}{\textstyle \prod _{{\mathopen {}\left (\cdots :\Gamma \right )\mathclose {}}}}{\scriptstyle \prod _{{\mathopen {}\left (\cdots :\Gamma \right )\mathclose {}}}}{\scriptscriptstyle \prod _{{\mathopen {}\left (\cdots :\Gamma \right )\mathclose {}}}}A, which (under the interpretation of top-level declarations via truncation) can be defined from \lambda \cdots .u using the ordinary axiom of choice. Then \mathsf {some}(u) is elaborated to \vartheta {\mathopen {}\left (\cdots \right )\mathclose {}}.
Thus we have a language for univalent foundations in which indefinite descriptions can be used. There is a minor trade-off in the proposed treatment, however: two occurrences of \mathsf {some}_A{\mathopen {}\left (u\right )\mathclose {}} will elaborate to different core language terms. It may be possible to get around this by means of some kind of caching, but I think that may be ultimately unnecessary in practice — as the entire point of an indefinite description is that it shall satisfy no properties except the specified one.