3.2 Propositions as types?


Until now, we have been following the straightforward “propositions as types” philosophy described in §1.11 (http://planetmath.org/111propositionsastypes), according to which English phrases such as “there exists an x:A such that P(x)” are interpreted by corresponding types such as (x:A)P(x), with the proof of a statement being regarded as judging some specific element to inhabit that type. However, we have also seen some ways in which the “logic” resulting from this reading seems unfamiliar to a classical mathematician. For instance, in Theorem 2.15.7 (http://planetmath.org/215universalproperties#Thmprethm3) we saw that the statement

“If for all x:X there exists an a:A(x) such that P(x,a), then there exists a function g:(x:A)A(x) such that for all x:X we have P(x,g(x)),” (3.2.1)

which looks like the classical axiom of choiceMathworldPlanetmath, is always true under this reading. This is a noteworthy, and often useful, feature of the propositions-as-types logic, but it also illustrates how significantly it differs from the classical interpretationMathworldPlanetmathPlanetmath of logic, under which the axiom of choice is not a logical truth, but an additional “axiom”.

On the other hand, we can now also show that corresponding statements looking like the classical law of double negation and law of excluded middleMathworldPlanetmath are incompatible with the univalence axiom.

Theorem 3.2.2.

It is not the case that for all A:U we have ¬(¬A)A.

Proof.

Recall that ¬A(A𝟎). We also read “it is not the case that …” as the operator ¬. Thus, in order to prove this statement, it suffices to assume given some f:(A:𝒰)(¬¬AA) and construct an element of 𝟎.

The idea of the following proof is to observe that f, like any function in type theoryPlanetmathPlanetmath, is “continuousMathworldPlanetmathPlanetmath”. By univalence, this implies that f is natural with respect to equivalences of types. From this, and a fixed-point-free autoequivalence, we will be able to extract a contradictionMathworldPlanetmathPlanetmath.

Let e:𝟐𝟐 be the equivalence defined by e(1𝟐):0𝟐 and e(0𝟐):1𝟐, as in Example 3.1.9 (http://planetmath.org/31setsandntypes#Thmpreeg6). Let p:𝟐=𝟐 be the path corresponding to e by univalence, i.e. p:𝗎𝖺(e). Then we have f(𝟐):¬¬𝟐𝟐 and

𝖺𝗉𝖽f(p):𝗍𝗋𝖺𝗇𝗌𝗉𝗈𝗋𝗍A(¬¬AA)(p,f(𝟐))=f(𝟐).

Hence, for any u:¬¬𝟐, we have

𝗁𝖺𝗉𝗉𝗅𝗒(𝖺𝗉𝖽f(p),u):𝗍𝗋𝖺𝗇𝗌𝗉𝗈𝗋𝗍A(¬¬AA)(p,f(𝟐))(u)=f(𝟐)(u).

Now by (2.9.4) (http://planetmath.org/29pitypesandthefunctionextensionalityaxiom#S0.E3), transporting f(𝟐):¬¬𝟐𝟐 along p in the type family A(¬¬AA) is equal to the function which transports its argumentMathworldPlanetmath along p-1 in the type family A¬¬A, applies f(𝟐), then transports the result along p in the type family AA:

𝗍𝗋𝖺𝗇𝗌𝗉𝗈𝗋𝗍A(¬¬AA)(p,f(𝟐))(u)=𝗍𝗋𝖺𝗇𝗌𝗉𝗈𝗋𝗍AA(p,f(𝟐)(𝗍𝗋𝖺𝗇𝗌𝗉𝗈𝗋𝗍A¬¬A(p-1,u)))

However, any two points u,v:¬¬𝟐 are equal by function extensionality, since for any x:¬𝟐 we have u(x):𝟎 and thus we can derive any conclusionMathworldPlanetmath, in particular u(x)=v(x). Thus, we have 𝗍𝗋𝖺𝗇𝗌𝗉𝗈𝗋𝗍A¬¬A(p-1,u)=u, and so from 𝗁𝖺𝗉𝗉𝗅𝗒(𝖺𝗉𝖽f(p),u) we obtain an equality

𝗍𝗋𝖺𝗇𝗌𝗉𝗈𝗋𝗍AA(p,f(𝟐)(u))=f(𝟐)(u).

Finally, as discussed in §2.10 (http://planetmath.org/210universesandtheunivalenceaxiom), transporting in the type family AA along the path p𝗎𝖺(e) is equivalentMathworldPlanetmathPlanetmathPlanetmathPlanetmathPlanetmath to applying the equivalence e; thus we have

e(f(𝟐)(u))=f(𝟐)(u). (3.2.3)

However, we can also prove that

x:𝟐¬(e(x)=x). (3.2.4)

This follows from a case analysisMathworldPlanetmath on x: both cases are immediate from the definition of e and the fact that 0𝟐1𝟐 (Remark 2.12.6 (http://planetmath.org/212coproducts#Thmprermk1)). Thus, applying (3.2.4) to f(𝟐)(u) and (3.2.3), we obtain an element of 𝟎. ∎

Remark 3.2.5.

In particular, this implies that there can be no Hilbert-style “choice operator” which selects an element of every nonempty type. The point is that no such operator can be natural, and under the univalence axiom, all functions acting on types must be natural with respect to equivalences.

Remark 3.2.6.

It is, however, still the case that ¬¬¬A¬A for any A; see http://planetmath.org/node/87564Exercise 1.11.

Corollary 3.2.7.

It is not the case that for all A:U we have A+(¬A).

Proof.

Suppose we had g:(A:𝒰)(A+(¬A)). We will show that then (A:𝒰)(¬¬AA), so that we can apply Theorem 3.2.2 (http://planetmath.org/32propositionsastypes#Thmprethm1). Thus, suppose A:𝒰 and u:¬¬A; we want to construct an element of A.

Now g(A):A+(¬A), so by case analysis, we may assume either g(A)𝗂𝗇𝗅(a) for some a:A, or g(A)𝗂𝗇𝗋(w) for some w:¬A. In the first case, we have a:A, while in the second case we have u(w):𝟎 and so we can obtain anything we wish (such as A). Thus, in both cases we have an element of A, as desired. ∎

Thus, if we want to assume the univalence axiom (which, of course, we do) and still leave ourselves the option of classical reasoning (which is also desirable), we cannot use the unmodified propositions-as-types principle to interpret all informal mathematical statements into type theory, since then the law of excluded middle would be false. However, neither do we want to discard propositions-as-types entirely, because of its many good properties (such as simplicity, constructivity, and computability). We now discuss a modification of propositions-as-types which resolves these problems; in §3.10 (http://planetmath.org/310whenarepropositionstruncated) we will return to the question of which logic to use when.

Title 3.2 Propositions as types?
\metatable