Tom de Jong, 1 and 4 April 2022.
\begin{code}
{-# OPTIONS --safe --without-K #-}
module Ordinals.Taboos where
open import MLTT.Plus-Properties
open import MLTT.Spartan hiding (π ; β ; β)
open import Ordinals.Equivalence
open import Ordinals.Maps
open import Ordinals.Notions
open import Ordinals.Type
open import Ordinals.Underlying
open import UF.DiscreteAndSeparated hiding (π-is-discrete)
open import UF.Equiv
open import UF.EquivalenceExamples
open import UF.ClassicalLogic
open import UF.FunExt
open import UF.PropTrunc
open import UF.Size
open import UF.Subsingletons
open import UF.UA-FunExt
open import UF.Univalence
\end{code}
We show that two classically true statements about ordinals are constructively
unacceptable, because each of them implies excluded middle.
The first statement is that every discrete ordinal is trichotomous. Classically,
this is trivial, because every ordinal is trichotomous (and discrete).
Constructively, the converse (trichotomous implies discrete) *does* hold.
The second statement is that the supremum of a family of trichotomous ordinals
indexed by a discrete type is again discrete.
\begin{code}
Every-Discrete-Ordinal-Is-Trichotomous : (π€ : Universe) β π€ βΊ Μ
Every-Discrete-Ordinal-Is-Trichotomous π€ =
((Ξ± : Ordinal π€) β is-discrete β¨ Ξ± β©
β is-trichotomous-order (underlying-order Ξ±))
module suprema-of-ordinals-assumptions
(pt : propositional-truncations-exist)
(sr : Set-Replacement pt)
(ua : Univalence)
where
open import Ordinals.OrdinalOfOrdinalsSuprema ua
open suprema pt sr public
Sups-Of-Discretely-Indexed-Trichotomous-Ordinals-Are-Discrete :
(π€ : Universe) β π€ βΊ Μ
Sups-Of-Discretely-Indexed-Trichotomous-Ordinals-Are-Discrete π€ =
(I : π€ Μ ) β is-discrete I β (Ξ± : I β Ordinal π€)
β ((i : I) β is-trichotomous-order (underlying-order (Ξ± i)))
β is-discrete β¨ sup Ξ± β©
\end{code}
In showing that the first statement implies excluded middle, the two-element
type in some fixed but arbitrary universe π€ will be useful.
\begin{code}
module _ {π€ : Universe} where
π : π€ Μ
π = π {π€} + π {π€}
pattern β = inl β
pattern β = inr β
π-is-discrete : is-discrete π
π-is-discrete = +-is-discrete π-is-discrete π-is-discrete
\end{code}
We now work towards proving that excluded middle follows from the assertion that
every discrete ordinal is trichotomous.
The outline of the proof is given here:
(1) Fix a type P and construct a transitive and well-founded relation βΊ on π
involving P.
(2) If P is a proposition, then βΊ is prop-valued.
(3) If ¬¬ P holds, then ⺠is extensional.
(4) Hence, if P is a proposition such that ¬¬ P holds, then (π , βΊ) is a
(discrete) ordinal.
(5) The order βΊ is trichotomous if and only if P holds.
Hence, if every discrete ordinal is trichotomous, then ¬¬ P β P for every
proposition P, which is equivalent to excluded middle.
\begin{code}
module discrete-trichotomous-taboo-construction
(P : π€ Μ )
where
_βΊ_ : π {π€} β π {π€} β π€ Μ
β βΊ β = π
β βΊ β = P
β βΊ β = π
β βΊ β = π
βΊ-is-prop-valued : is-prop P β is-prop-valued _βΊ_
βΊ-is-prop-valued i β β = π-is-prop
βΊ-is-prop-valued i β β = i
βΊ-is-prop-valued i β β = π-is-prop
βΊ-is-prop-valued i β β = π-is-prop
βΊ-is-transitive : transitive _βΊ_
βΊ-is-transitive β β β u v = v
βΊ-is-transitive β β β u v = u
βΊ-is-transitive β β z u v = π-elim u
βΊ-is-transitive β β z u v = π-elim u
βΊ-well-founded-lemma : (y : π) β y βΊ β β is-accessible _βΊ_ y
βΊ-well-founded-lemma β l = π-elim l
βΊ-well-founded-lemma β l = π-elim l
βΊ-is-well-founded : is-well-founded _βΊ_
βΊ-is-well-founded β = acc βΊ-well-founded-lemma
βΊ-is-well-founded β = acc Ξ³
where
Ξ³ : (y : π) β y βΊ β β is-accessible _βΊ_ y
Ξ³ β l = acc βΊ-well-founded-lemma
βΊ-is-extensional : ¬¬ P β is-extensional _βΊ_
βΊ-is-extensional h β β u v = refl
βΊ-is-extensional h β β u v = refl
βΊ-is-extensional h β β u v = π-elim (h Ξ³)
where
Ξ³ : Β¬ P
Ξ³ p = π-elim (v β p)
βΊ-is-extensional h β β u v = π-elim (h Ξ³)
where
Ξ³ : Β¬ P
Ξ³ p = π-elim (u β p)
πβΊ-ordinal : is-prop P β ¬¬ P β Ordinal π€
πβΊ-ordinal i h = π , _βΊ_ , βΊ-is-prop-valued i , βΊ-is-well-founded
, βΊ-is-extensional h , βΊ-is-transitive
βΊ-trichotomous-characterization : is-trichotomous-order _βΊ_ β P
βΊ-trichotomous-characterization = β¦
ββ¦ , β¦
ββ¦
where
β¦
ββ¦ : P β is-trichotomous-order _βΊ_
β¦
ββ¦ p β β = inr (inl refl)
β¦
ββ¦ p β β = inl p
β¦
ββ¦ p β β = inr (inr p)
β¦
ββ¦ p β β = inr (inl refl)
β¦
ββ¦ : is-trichotomous-order _βΊ_ β P
β¦
ββ¦ t = lemma (t β β)
where
lemma : (β βΊ β) + (β οΌ β) + (β βΊ β) β P
lemma (inl p) = p
lemma (inr (inl e)) = π-elim (+disjoint e)
lemma (inr (inr l)) = π-elim l
\end{code}
The above construction quickly yields the first promised result.
\begin{code}
DNE-if-Every-Discrete-Ordinal-Is-Trichotomous :
Every-Discrete-Ordinal-Is-Trichotomous π€
β DNE π€
DNE-if-Every-Discrete-Ordinal-Is-Trichotomous h P P-is-prop not-not-P =
lr-implication βΊ-trichotomous-characterization
(h (πβΊ-ordinal P-is-prop not-not-P) (π-is-discrete))
where
open discrete-trichotomous-taboo-construction P
EM-if-Every-Discrete-Ordinal-Is-Trichotomous :
funext π€ π€β
β Every-Discrete-Ordinal-Is-Trichotomous π€
β EM π€
EM-if-Every-Discrete-Ordinal-Is-Trichotomous fe h =
DNE-gives-EM fe (DNE-if-Every-Discrete-Ordinal-Is-Trichotomous h)
\end{code}
It is somewhat more involved to get a taboo from the assertion that
discretely-indexed suprema of trichotomous ordinals are discrete.
The first step is fairly straightforward however and once again involves
constructing an ordinal that depends on a proposition P. What matters is that:
(1) the constructed ordinal is trichotomous;
(2) an initial segment of the ordinal is equivalent to P.
\begin{code}
module _
(fe : FunExt)
where
open import Ordinals.Arithmetic fe
open import Ordinals.WellOrderArithmetic
module discrete-sup-taboo-construction-I
(P : π€ Μ )
(P-is-prop : is-prop P)
where
P' : Ordinal π€
P' = prop-ordinal P P-is-prop +β πβ
P'-is-trichotomous : is-trichotomous-order (underlying-order P')
P'-is-trichotomous = trichotomy-preservation (prop.trichotomous P P-is-prop)
(prop.trichotomous π π-is-prop)
where
open plus (prop.order P P-is-prop) (prop.order π π-is-prop)
\end{code}
Next, we turn to the second part of our construction, which defines a
discretely-indexed family of trichotomous ordinals. To work with (suprema of)
ordinals, we need additional assumptions and imports.
\begin{code}
module _
(pt : propositional-truncations-exist)
(sr : Set-Replacement pt)
(ua : Univalence)
where
open suprema-of-ordinals-assumptions pt sr ua
private
fe : FunExt
fe = Univalence-gives-FunExt ua
open import NotionsOfDecidability.Decidable
open import Ordinals.Arithmetic fe
open import Ordinals.OrdinalOfOrdinals ua
open import Ordinals.WellOrderArithmetic
open import UF.Embeddings
open import UF.ImageAndSurjection pt
module discrete-sup-taboo-construction-II
(P : π€ Μ )
(P-is-prop : is-prop P)
where
open discrete-sup-taboo-construction-I fe P P-is-prop
I : π€ Μ
I = π {π€}
Ξ± : I β Ordinal π€
Ξ± β = P'
Ξ± β = πβ +β πβ
Ξ±-is-trichotomous : (i : I) β is-trichotomous-order (underlying-order (Ξ± i))
Ξ±-is-trichotomous β = P'-is-trichotomous
Ξ±-is-trichotomous β = trichotomy-preservation trichotomous trichotomous
where
open prop π π-is-prop
open plus (underlying-order πβ) (underlying-order πβ)
\end{code}
We will derive decidability of P from the assumption that the supremum of Ξ± is
discrete.
The idea of the proof is captured by NBβ and NBβ below. We will decide P by
deciding whether (Ξ± β β inr β) and (Ξ± β β inr β) are equivalent ordinals.
This, in turn, is decidable, because both ordinals are images of an embedding
e : β¨ sup Ξ± β© β Ordinal π€ and β¨ sup Ξ± β© is discrete by assumption.
\begin{code}
fact-I : β¨ Ξ± β β inr β β© β P
fact-I (inl p , _) = p
NBβ : β¨ Ξ± β β inr β β© β P
NBβ = qinveq f (g , Ξ· , Ξ΅)
where
f : β¨ Ξ± β β β β© β P
f = fact-I
g : P β β¨ Ξ± β β β β©
g p = (inl p , β)
Ξ· : g β f βΌ id
Ξ· (inl p , _) = to-subtype-οΌ (Ξ» x β Prop-valuedness P' x β) refl
Ξ΅ : f β g βΌ id
Ξ΅ p = P-is-prop (f (g p)) p
NBβ : β¨ Ξ± β β inr β β© β π{π€}
NBβ = singleton-β-π (x , c)
where
x : β¨ Ξ± β β inr β β©
x = (inl β , β)
c : is-central (β¨ Ξ± β β inr β β©) (β , β)
c (inl β , β) = refl
fact-II : P β (Ξ± β β inr β) ββ (Ξ± β β inr β)
fact-II p = f , (f-order-pres , f-is-equiv , g-order-pres)
where
f : β¨ Ξ± β β inr β β© β β¨ Ξ± β β inr β β©
f _ = inl β , β
g : β¨ Ξ± β β inr β β© β β¨ Ξ± β β inr β β©
g _ = inl p , β
f-order-pres : is-order-preserving (Ξ± β β inr β) (Ξ± β β inr β) f
f-order-pres (inl p , _) (inl q , _) l = π-elim l
g-order-pres : is-order-preserving (Ξ± β β inr β) (Ξ± β β inr β) g
g-order-pres (inl β , _) (inl β , _) l = π-elim l
f-is-equiv : is-equiv f
f-is-equiv = qinvs-are-equivs f (g , Ξ· , Ξ΅)
where
Ξ΅ : f β g βΌ id
Ξ΅ (inl β , _) = refl
Ξ· : g β f βΌ id
Ξ· (inl q , _) = to-subtype-οΌ (Ξ» x β Prop-valuedness P' x β)
(ap inl (P-is-prop p q))
fact-III : (Ξ± β β inr β) ββ (Ξ± β β inr β) β P
fact-III e = fact-I (ββ-to-funβ»ΒΉ (Ξ± β β inr β) (Ξ± β β inr β) e (inl β , β))
decidability-if-sup-of-Ξ±-discrete : is-discrete β¨ sup Ξ± β© β is-decidable P
decidability-if-sup-of-Ξ±-discrete Ξ΄ = decidable-β (fact-III , fact-II) dec
where
r : image (sum-to-ordinals Ξ±) β Ordinal π€
r = restriction (sum-to-ordinals Ξ±)
c : (Ξ£ i κ I , β¨ Ξ± i β©) β image (sum-to-ordinals Ξ±)
c = corestriction (sum-to-ordinals Ξ±)
Ο : β¨ sup Ξ± β© β image (sum-to-ordinals Ξ±)
Ο = sup-is-image-of-sum-to-ordinals Ξ±
f : (Ξ£ i κ I , β¨ Ξ± i β©) β β¨ sup Ξ± β©
f = β Ο ββ»ΒΉ β c
e : β¨ sup Ξ± β© β Ordinal π€
e = r β β Ο β
e-is-embedding : is-embedding e
e-is-embedding =
β-is-embedding (equivs-are-embeddings β Ο β (ββ-is-equiv Ο))
(restrictions-are-embeddings (sum-to-ordinals Ξ±))
e-after-f-lemma : e β f βΌ sum-to-ordinals Ξ±
e-after-f-lemma (i , x) =
(r β β Ο β β β Ο ββ»ΒΉ β c) (i , x) οΌβ¨ h β©
r (c (i , x)) οΌβ¨reflβ©
sum-to-ordinals Ξ± (i , x) β
where
h = ap r (inverses-are-sections β Ο β (ββ-is-equiv Ο) (c (i , x)))
dec : is-decidable ((Ξ± β β inr β) ββ (Ξ± β β inr β))
dec = decidable-cong Ξ³ (Ξ΄ (f (β , inr β)) (f (β , inr β)))
where
Ξ³ = (f (β , inr β) οΌ f (β , inr β)) ββ¨ β¦
1β¦ β©
(e (f (β , inr β)) οΌ e (f (β , inr β))) ββ¨ β¦
2β¦ β©
((Ξ± β β inr β) οΌ (Ξ± β β inr β)) ββ¨ β¦
3β¦ β©
((Ξ± β β inr β) ββ (Ξ± β β inr β)) β
where
β¦
1β¦ = β-sym (embedding-criterion-converse e e-is-embedding
(f (β , inr β)) (f (β , inr β)))
β¦
2β¦ = οΌ-cong _ _ (e-after-f-lemma (β , inr β))
(e-after-f-lemma (β , inr β))
β¦
3β¦ = UAβ-β (ua π€) (fe _ _) (Ξ± β β inr β) (Ξ± β β inr β)
\end{code}
Finally, we derive excluded middle from the assumption that discretely-indexed
suprema of trichotomous ordinals are discrete, as announced at the top of this
file.
\begin{code}
EM-if-Sups-Of-Discretely-Indexed-Trichotomous-Ordinals-Are-Discrete :
Sups-Of-Discretely-Indexed-Trichotomous-Ordinals-Are-Discrete π€
β EM π€
EM-if-Sups-Of-Discretely-Indexed-Trichotomous-Ordinals-Are-Discrete h P i =
decidability-if-sup-of-Ξ±-discrete Ξ³
where
open discrete-sup-taboo-construction-II P i
Ξ³ : is-discrete β¨ sup Ξ± β©
Ξ³ = h π π-is-discrete Ξ± Ξ±-is-trichotomous
\end{code}