3.9 The principle of unique choice

Lemma 3.9.1.

If P is a mere proposition, then P≃∥P∥.

Proof.

Of course, we have P→∥P∥ by definition.
And since P is a mere proposition, the universal property of ∥P∥ applied to 𝗂𝖽P:P→P yields ∥P∥→P.
These functions are quasi-inverses by Lemma 3.3.3 (http://planetmath.org/33merepropositions#Thmprelem2).
∎

Proof.

The corollary also encapsulates a very useful technique of reasoning.
Namely, suppose we know that ∥A∥, and we want to use this to construct an element of some other type B.
We would like to use an element of A in our construction of an element of B, but this is allowed only if B is a mere proposition, so that we can apply the induction principle for the propositional truncation ∥A∥; the most we could hope to do in general is to show ∥B∥.
Instead, we can extend B with additional data which characterizes uniquely the object we wish to construct.
Specifically, we define a predicateQ:B→𝒰 such that ∑(x:B)Q⁢(x) is a mere proposition.
Then from an element of A we construct an elementb:B such that Q⁢(b), hence from ∥A∥ we can construct ∥∑(x:B)Q⁢(x)∥, and because ∥∑(x:B)Q⁢(x)∥ is equivalent to ∑(x:B)Q⁢(x) an element of B may be projected from it.
An example can be found in http://planetmath.org/node/87853Exercise 3.19.

A similar issue arises in set-theoretic mathematics, although it manifests slightly
differently. If we are trying to define a function f:A→B, and depending on an
element a:A we are able to prove mere existence of some b:B, we are not done yet
because we need to actually pinpoint an element of B, not just prove its existence.
One option is of course to refine the argument to unique existence of b:B, as we did in type theory. But in set theory the problem can often be avoided more simply by an application of the axiom of choice, which picks the required elements for us.
In homotopy type theory, however, quite apart from any desire to avoid choice, the available forms of choice are simply less applicable, since they require that the domain of choice be a set.
Thus, if A is not a set (such as perhaps a universe𝒰), there is no consistent form of choice that will allow us to simply pick an element of B for each a:A to use in defining f⁢(a).