Martin Escardo
21-25 December 2020.

In collaboration with  Marc Bezem, Thierry Coquand, Peter Dybjer.

The Burali-Forti argument in HoTT/UF in Agda notation

Abstract. We use the Burali-Forti argument to show that, in HoTT/UF,
the embedding

    𝓀 β†’ 𝓀⁺.

of a universe 𝓀 into its successor 𝓀⁺ is not equivalence.

Similarly, the embedding hSet 𝓀 β†’ hSet 𝓀⁺ of the type of sets of 𝓀
into that of 𝓀⁺ in not an equivalence either.  We also establish this
for the types of magmas, monoids and groups, where the case of groups
requires considerable more work (invoked here but performed in the
modules FreeGroup.lagda and FreeGroupOfLargeLocallySmallSet.lagda).

We work with ordinals as defined in the HoTT book for that purpose.


Univalence is used three times (at least):

    1. to know that the type of ordinals is a 0-type and hence all
       ordinals in a universe form an ordinal in the next universe,

    2. to develop the Burali-Forti argument that no ordinal in the
       universe 𝓀 is equivalent to the ordinal of ordinals in 𝓀.

    3. to resize down the values of the order relation of the ordinal
       of ordinals, to conclude that the ordinal of ordinals is large.

There are also a number of uses of univalence via functional and
propositional extensionality.

Propositional resizing is not needed, thanks to (3).

An ordinal in a universe 𝓀 is a type X : 𝓀 equipped with a relation

    _β‰Ί_ : X β†’ X β†’ 𝓀

required to be

    1. proposition-valued,

    2. transitive,

    3. extensional (any two points with same lower set are the same),

    4. well founded (every element is accessible, or, equivalently,
       the principle of transfinite induction holds).

The HoTT book additionally requires X to be a set, but this follows
automatically from the above requirements for the order.

We denote by

    Ordinal 𝓀

the type of ordinals in a universe 𝓀.

The underlying type of an ordinal α is denoted by ⟨ α ⟩ and its order
relation is denoted by _β‰ΊβŸ¨ Ξ± ⟩_.

Equivalence of ordinals,

    _≃ₒ_ : Ordinal 𝓀 β†’ Ordinal π“₯ β†’ 𝓀 βŠ” π“₯,

means that that there is an equivalence of the underlying types that
preserves and reflects order.

For ordinals Ξ± and Ξ² in the *same* universe, their identity type Ξ± ≑ Ξ²
is canonically equivalent to the ordinal-equivalence type Ξ± ≃ₒ Ξ²,
by univalence.

The lower set of a point x : ⟨ Ξ± ⟩ is written Ξ± ↓ x, and is itself an
ordinal under the inherited order. The ordinals in a universe 𝓀 form
an ordinal in the successor universe 𝓀⁺, denoted by

    OrdinalOfOrdinals 𝓀 : Ordinal 𝓀⁺.

Its order relation is denoted by _⊲_ and is defined by

    Ξ± ⊲ Ξ² = Ξ£ b κž‰ ⟨ Ξ² ⟩ , Ξ± ≑ (Ξ² ↓ b).

This order has type

    _⊲_ : Ordinal 𝓀 β†’ Ordinal 𝓀 β†’ 𝓀⁺,

as required for it to make the type Ordinal 𝓀 into an ordinal in the
next universe.

But, by univalence, it is pointwise equivalent to the "resized down"

    _⊲⁻_ : Ordinal 𝓀 β†’ Ordinal 𝓀 β†’ 𝓀

defined by

    Ξ± ⊲⁻ Ξ² = Ξ£ b κž‰ ⟨ Ξ² ⟩ , Ξ± ≃₀ (Ξ² ↓ b).

The existence of such a resized-down order is crucial for the
corollaries of Burali-Forti, but not for Burali-Forti itself.

Agda formulation of the Burali-Forti argument and its corollaries


{-# OPTIONS --without-K --exact-split --safe #-}


As discussed above, we assume univalence as a hypothesis:


open import UF-Univalence

module BuraliForti
       (ua : Univalence)

open import UF-Base
open import UF-Subsingletons
open import UF-Retracts
open import UF-Equiv hiding (_β‰…_)
open import UF-EquivalenceExamples
open import UF-UniverseEmbedding
open import UF-UA-FunExt
open import UF-FunExt
open import UF-Size

 fe : FunExt
 fe = Univalence-gives-FunExt ua

open import SpartanMLTT
open import OrdinalNotions
open import OrdinalsType
open import OrdinalsWellOrderTransport
open import OrdinalOfOrdinals ua
open import OrdinalArithmetic fe


Our version of Burali-Forti says that there is no ordinal in the
universe 𝓀 equivalent to the ordinal of all ordinals in the universe 𝓀.


Burali-Forti : Β¬ (Ξ£ Ξ± κž‰ Ordinal 𝓀 , Ξ± ≃ₒ OO 𝓀)
Burali-Forti {𝓀} (Ξ± , 𝕗) = Ξ³
  a : OO 𝓀 ≃ₒ Ξ±
  a = ≃ₒ-sym Ξ± (OO 𝓀) 𝕗

  b : Ξ± ≃ₒ (OO 𝓀 ↓ Ξ±)
  b = ordinals-in-OO-are-lowersets-of-OO Ξ±

  c : OO 𝓀 ≃ₒ (OO 𝓀 ↓ Ξ±)
  c = ≃ₒ-trans (OO 𝓀) Ξ± (OO 𝓀 ↓ Ξ±) a b

  d : OO 𝓀 ≑ (OO 𝓀 ↓ Ξ±)
  d = eqtoidβ‚’ (OO 𝓀) (OO 𝓀 ↓ Ξ±) c

  e : OO 𝓀 ⊲ OO 𝓀
  e = Ξ± , d

  γ : 𝟘
  Ξ³ = irreflexive _⊲_ (OO 𝓀) (⊲-is-well-founded (OO 𝓀)) e


Some corollaries follow.

The main work in the first one, which says that the type of all
ordinals is large, happens in the function transfer-structure, which
is developed in the module OrdinalsWellOrderTransport, where the
difficulties are explained.

As discussed above, the type OO 𝓀 of ordinals in the
universe 𝓀 lives in the next universe 𝓀⁺. We say that a type in the
universe 𝓀⁺ is small if it is equivalent to some type in 𝓀, and large
otherwise. This is defined in the module UF-Size.

Our first corollary of Burali-Forti is that the type of ordinals is
large, as expected:


the-type-of-ordinals-is-large : is-large (Ordinal 𝓀)
the-type-of-ordinals-is-large {𝓀} (X , 𝕗) = Ξ³
  Ξ΄ : Ξ£ s κž‰ OrdinalStructure X , (X , s) ≃ₒ OO 𝓀
  Ξ΄ = transfer-structure fe X (OO 𝓀)
       𝕗 (_⊲⁻_ , ⊲-is-equivalent-to-⊲⁻)

  γ : 𝟘
  Ξ³ = Burali-Forti ((X , pr₁ Ξ΄) , prβ‚‚ Ξ΄)


It is crucial in the above proof, in order to be able to transfer the
ordinal structure of the ordinal of ordinals to the type X along the
hypothetical equivalence 𝕗 : X ≃ Ordinal 𝓀, that the order _⊲_ has a
resized-down version _⊲⁻_ , as mentioned above.

By a *universe embedding* we mean a map

    f : 𝓀 β†’ π“₯

of universes such that

    f X ≃ X.

Of course, any two universe embeddings are equal, by univalence, so
that there is at most one universe embedding.

Moreover, universe embeddings are automatically type embeddings
(meaning that they have subsingleton fibers), as shown in the module

So the following says that the universe 𝓀⁺ is strictly larger than the
universe 𝓀:


successive-universe-embeddings-dont-have-sections : (f : 𝓀 Μ‡ β†’ 𝓀 ⁺ Μ‡ )
                                                  β†’ is-universe-embedding f
                                                  β†’ Β¬ has-section f
successive-universe-embeddings-dont-have-sections {𝓀} f i (s , Ξ·) = Ξ³
  X : 𝓀 Μ‡
  X = s (Ordinal 𝓀)

  p : f X ≑ Ordinal 𝓀
  p = Ξ· (Ordinal 𝓀)

  e : X ≃ Ordinal 𝓀
  e = transport (X ≃_) p (≃-sym (i X))

  γ : 𝟘
  Ξ³ = the-type-of-ordinals-is-large (X , e)

successive-universe-embeddings-are-not-equivs : (f : 𝓀 Μ‡ β†’ 𝓀 ⁺ Μ‡ )
                                              β†’ is-universe-embedding f
                                              β†’ Β¬ is-equiv f
successive-universe-embeddings-are-not-equivs f i j =
  successive-universe-embeddings-dont-have-sections f i
   (equivs-have-sections f j)


In particular, we have the following, where

  Lift {𝓀} (𝓀 ⁺) : 𝓀 β†’ 𝓀⁺

is the canonical embedding of the universe 𝓀 into the successor
universe 𝓀⁺, defined in the module UF-UniverseEmbedding:


Lift-doesnt-have-section : Β¬ has-section (Lift {𝓀} (𝓀 ⁺))
Lift-doesnt-have-section {𝓀} h =
   (Lift (𝓀 ⁺)) (Ξ» X β†’ Lift-is-universe-embedding (𝓀 ⁺) X) h

Lift-is-not-equiv : Β¬ is-equiv (Lift {𝓀} (𝓀 ⁺))
Lift-is-not-equiv {𝓀} e = Lift-doesnt-have-section
                           (equivs-have-sections (Lift (𝓀 ⁺)) e)

For a universe 𝓀, we define the type

    hSet 𝓀 : 𝓀⁺

of sets in the universe 𝓀 by

    hSet 𝓀 = Ξ£ A κž‰ 𝓀 Μ‡ , is-set A.

By an *hSet embedding* we mean a map

    f : hSet 𝓀 β†’ hSet π“₯

such that the underlying type of f 𝕏 is equivalent to the
underlying type of 𝕏, that is,

    pr₁ (f 𝕏) ≃ pr₁ 𝕏,

for all 𝕏 : hSet 𝓀.

Any hSet-embedding is a type embedding, and any two hSet-embeddings
are equal by univalence. The map

    Lift-hSet {𝓀} π“₯ : hSet 𝓀 β†’ hSet (𝓀 βŠ” π“₯)

is the unique hSet embedding, given by

    Lift-hSet π“₯ (X , i) = Lift π“₯ X , Lift-is-set X i)


    Lift-is-set X i : is-set (Lift π“₯ X)

is derived from the fact that Lift π“₯ X ≃ X using i : is-set X.


Lift-hSet-doesnt-have-section : Β¬ has-section (Lift-hSet {𝓀} (𝓀 ⁺))
Lift-hSet-doesnt-have-section {𝓀} (s , Ξ·) = Ξ³
  𝕐 : hSet (𝓀 ⁺)
  𝕐 = (Ordinal 𝓀 , the-type-of-ordinals-is-a-set)

  𝕏 : hSet 𝓀
  𝕏 = s 𝕐

  X : 𝓀 Μ‡
  X = pr₁ 𝕏

  have : (Lift (𝓀 ⁺) X , _) ≑ 𝕐
  have = Ξ· 𝕐

  p : Lift (𝓀 ⁺) X ≑ Ordinal 𝓀
  p = ap pr₁ (Ξ· 𝕐)

  d : X ≃ Lift (𝓀 ⁺) X
  d = ≃-sym (Lift-is-universe-embedding (𝓀 ⁺) X)

  e : X ≃ Ordinal 𝓀
  e = transport (X ≃_) p d

  γ : 𝟘
  Ξ³ = the-type-of-ordinals-is-large (X , e)


Finally, the following says that the type of sets in 𝓀⁺ is strictly
larger than that of sets in 𝓀, as we wanted to show:


Lift-hSet-is-not-equiv : Β¬ is-equiv (Lift-hSet {𝓀} (𝓀 ⁺))
Lift-hSet-is-not-equiv {𝓀} e = Lift-hSet-doesnt-have-section
                                (equivs-have-sections (Lift-hSet (𝓀 ⁺)) e)

This doesn't show that Β¬ (hSet 𝓀 ≃ hSet 𝓀⁺), as in principle there may
be an equivalence that is not an hSet embedding in the sense defined
above, which we leave as an open problem. Notice that excluded middle,
which is not assumed but is consistent, implies that there is an
automorphism of hSet 𝓀 that swaps the empty set 𝟘 and the one-point
set πŸ™ and leaves all the other sets unchanged, so that potentially
there are automorphisms of hSet 𝓀 that are not hSet embeddings. We
don't know whether such a rogue equivalence hSet 𝓀 ≃ hSet 𝓀⁺ exists,
but this shouldn't be the case, of course.

Similarly, the above also doesn't show that Β¬ (𝓀 ≃ 𝓀⁺), but we know
that this is the case by a different argument, which generalizes
Thierry Coquand's "paradox of trees", developed in the module

We also wish to know that e.g. the types of groups in the universes 𝓀
and 𝓀⁺ are not equivalent.

Marc Bezem conjectures that Β¬ (Ξ£ A : 𝓀 Μ‡ , A ≃ βˆ₯ 𝓀 Μ‡ βˆ₯β‚€), that is, there
is no type in 𝓀 equivalent to the set truncation of 𝓀.

Added 18th January 2021. The following generalizes

In the following, A generalizes is-set, and A-lifts generalizes the
fact that the lift of a set is a set.


module _ (A : {𝓀 : Universe} β†’ 𝓀 Μ‡ β†’ 𝓀 Μ‡ )
         (A-lifts : βˆ€ {𝓀} π“₯ {X : 𝓀 Μ‡ } β†’ A X β†’ A (Lift π“₯ X))
         (type-of-ordinals-is-A : {𝓀 : Universe} β†’ A (Ordinal 𝓀))

 𝓐 : (𝓀 : Universe) β†’ 𝓀 ⁺ Μ‡
 𝓐 𝓀 = Ξ£ X κž‰ 𝓀 Μ‡ , A X

 Lift-𝓐 : βˆ€ {𝓀} π“₯ β†’ 𝓐 𝓀 β†’ 𝓐 (𝓀 βŠ” π“₯)
 Lift-𝓐 {𝓀} π“₯ (X , a) = Lift π“₯ X , A-lifts π“₯ a

 Lift-𝓐-doesnt-have-section : Β¬ has-section (Lift-𝓐 {𝓀} (𝓀 ⁺))
 Lift-𝓐-doesnt-have-section {𝓀} (s , Ξ·) = Ξ³
   𝕐 : 𝓐 (𝓀 ⁺)
   𝕐 = (Ordinal 𝓀 , type-of-ordinals-is-A)

   𝕏 : 𝓐 𝓀
   𝕏 = s 𝕐

   X : 𝓀 Μ‡
   X = pr₁ 𝕏

   have : (Lift (𝓀 ⁺) X , _) ≑ 𝕐
   have = Ξ· 𝕐

   p : Lift (𝓀 ⁺) X ≑ Ordinal 𝓀
   p = ap pr₁ (Ξ· 𝕐)

   d : X ≃ Lift (𝓀 ⁺) X
   d = ≃-sym (Lift-is-universe-embedding (𝓀 ⁺) X)

   e : X ≃ Ordinal 𝓀
   e = transport (X ≃_) p d

   γ : 𝟘
   Ξ³ = the-type-of-ordinals-is-large (X , e)

 Lift-𝓐-is-not-equiv : Β¬ is-equiv (Lift-𝓐 {𝓀} (𝓀 ⁺))
 Lift-𝓐-is-not-equiv {𝓀} e = Lift-𝓐-doesnt-have-section
                               (equivs-have-sections (Lift-𝓐 (𝓀 ⁺)) e)

Examples of the above situation include hSets, pointed types,
∞-magmas, magmas and monoids:


module examples where


hSet again:


 Lift-hSet-is-not-equiv-bis : Β¬ is-equiv (Lift-hSet {𝓀} (𝓀 ⁺))
 Lift-hSet-is-not-equiv-bis {𝓀} = Lift-𝓐-is-not-equiv
                                    (Ξ» π“₯ {X} β†’ Lift-is-set π“₯ X)

Pointed types:


 PointedType : (𝓀 : Universe) β†’ 𝓀 ⁺ Μ‡
 PointedType 𝓀 = Ξ£ X κž‰ 𝓀 Μ‡ , X

 Lift-PointedType : βˆ€ {𝓀} π“₯ β†’ PointedType 𝓀 β†’ PointedType (𝓀 βŠ” π“₯)
 Lift-PointedType {𝓀} π“₯ (X , x) = Lift π“₯ X , lift π“₯ x


In the following, A is the identity function, and to prove that the
ordinal or ordinals is pointed, we choose the ordinal zero:


 Lift-PointedType-is-not-equiv : Β¬ is-equiv (Lift-PointedType {𝓀} (𝓀 ⁺))
 Lift-PointedType-is-not-equiv {𝓀} = Lift-𝓐-is-not-equiv id lift πŸ˜β‚’



In the following, A is magma structure:


 ∞-Magma-structure : 𝓀 Μ‡ β†’ 𝓀 Μ‡
 ∞-Magma-structure X = X β†’ X β†’ X

 ∞-Magma : (𝓀 : Universe) β†’ 𝓀 ⁺ Μ‡
 ∞-Magma 𝓀 = Ξ£ X κž‰ 𝓀 Μ‡ , ∞-Magma-structure X

 lift-∞-Magma-structure : βˆ€ π“₯ {X : 𝓀 Μ‡ }
                        β†’ ∞-Magma-structure X
                        β†’ ∞-Magma-structure (Lift π“₯ X)
 lift-∞-Magma-structure π“₯ _Β·_ x y = lift π“₯ (lower x Β· lower y)

 Lift-∞-Magma : βˆ€ {𝓀} π“₯ β†’ ∞-Magma 𝓀 β†’ ∞-Magma (𝓀 βŠ” π“₯)
 Lift-∞-Magma {𝓀} π“₯ (X , _Β·_) = Lift π“₯ X , lift-∞-Magma-structure π“₯ _Β·_

 Lift-∞-Magma-is-not-equiv : Β¬ is-equiv (Lift-∞-Magma {𝓀} (𝓀 ⁺))
 Lift-∞-Magma-is-not-equiv {𝓀} = Lift-𝓐-is-not-equiv



 Magma-structure : 𝓀 Μ‡ β†’ 𝓀 Μ‡
 Magma-structure X = is-set X Γ— (X β†’ X β†’ X)

 Magma : (𝓀 : Universe) β†’ 𝓀 ⁺ Μ‡
 Magma 𝓀 = Ξ£ X κž‰ 𝓀 Μ‡ , Magma-structure X

 lift-Magma-structure : βˆ€ π“₯ {X : 𝓀 Μ‡ }
                        β†’ Magma-structure X
                        β†’ Magma-structure (Lift π“₯ X)
 lift-Magma-structure π“₯ {X} (X-is-set , _Β·_) = Lift-is-set π“₯ X X-is-set ,
                                               Ξ» x y β†’ lift π“₯ (lower x Β· lower y)

 Lift-Magma : βˆ€ {𝓀} π“₯ β†’ Magma 𝓀 β†’ Magma (𝓀 βŠ” π“₯)
 Lift-Magma {𝓀} π“₯ (X , _Β·_) = Lift π“₯ X , lift-Magma-structure π“₯ _Β·_

 Lift-Magma-structure-is-not-equiv : Β¬ is-equiv (Lift-Magma {𝓀} (𝓀 ⁺))
 Lift-Magma-structure-is-not-equiv {𝓀} =
    (the-type-of-ordinals-is-a-set , _+β‚’_)




 open import OrdinalArithmetic-Properties ua

 monoid-structure : 𝓀 Μ‡ β†’ 𝓀 Μ‡
 monoid-structure X = (X β†’ X β†’ X) Γ— X

 monoid-axioms : (X : 𝓀 Μ‡ ) β†’ monoid-structure X β†’ 𝓀 Μ‡
 monoid-axioms X (_Β·_ , e) = is-set X
                           Γ— left-neutral  e _Β·_
                           Γ— right-neutral e _Β·_
                           Γ— associative     _Β·_


We will consider A = Monoid-structure (with capital M), and
𝓐 = Monoid.


 Monoid-structure : 𝓀 Μ‡ β†’ 𝓀 Μ‡
 Monoid-structure X = Ξ£ s κž‰ monoid-structure X , monoid-axioms X s

 Monoid : (𝓀 : Universe) β†’ 𝓀 ⁺ Μ‡
 Monoid 𝓀 = Ξ£ X κž‰ 𝓀 Μ‡ , Monoid-structure X

 lift-Monoid-structure : βˆ€ π“₯ {X : 𝓀 Μ‡ }
                       β†’ Monoid-structure X
                       β†’ Monoid-structure (Lift π“₯ X)
 lift-Monoid-structure π“₯ {X} ((_Β·_ , e) , X-is-set , l , r , a) = Ξ³
   X' = Lift π“₯ X

   _Β·'_ : X' β†’ X' β†’ X'
   x' Β·' y' = lift π“₯ (lower x' Β· lower y')

   e' : X'
   e' = lift π“₯ e

   l' : left-neutral e' _Β·'_
   l' x' = ap (lift π“₯) (l (lower x'))

   r' : right-neutral e' _Β·'_
   r' x' = ap (lift π“₯) (r (lower x'))

   a' : associative _Β·'_
   a' x' y' z' = ap (lift π“₯) (a (lower x') (lower y') (lower z'))

   Ξ³ : Monoid-structure (Lift π“₯ X)
   Ξ³ = (_Β·'_ , e') , Lift-is-set π“₯ X X-is-set , l' , r' , a'

 Lift-Monoid : βˆ€ {𝓀} π“₯ β†’ Monoid 𝓀 β†’ Monoid (𝓀 βŠ” π“₯)
 Lift-Monoid {𝓀} π“₯ (X , _Β·_) = Lift π“₯ X , lift-Monoid-structure π“₯ _Β·_

 type-of-ordinals-has-Monoid-structure : {𝓀 : Universe} β†’ Monoid-structure (Ordinal 𝓀)
 type-of-ordinals-has-Monoid-structure {𝓀} = (_+β‚’_ , πŸ˜β‚’) ,
                                             the-type-of-ordinals-is-a-set ,
                                             πŸ˜β‚’-left-neutral ,
                                             πŸ˜β‚’-right-neutral ,

 Lift-Monoid-structure-is-not-equiv : Β¬ is-equiv (Lift-Monoid {𝓀} (𝓀 ⁺))
 Lift-Monoid-structure-is-not-equiv {𝓀} = Lift-𝓐-is-not-equiv

Added 18 Feb 2021. The same is true for groups, using the following
fact and a fact proved in the module FreeGroupOfLargeLocallySmallSet.
We need to assume that propositional truncations exist.


the-type-of-ordinals-is-locally-small : is-locally-small (Ordinal 𝓀)
the-type-of-ordinals-is-locally-small Ξ± Ξ² = (Ξ± ≃ₒ Ξ²) , ≃-sym (UAβ‚’-≃ Ξ± Ξ²)

open import FreeGroupOfLargeLocallySmallSet
open import Groups
open import UF-PropTrunc

module _ (pt : propositional-truncations-exist) where

 there-is-a-large-group : Ξ£ F κž‰ Group (𝓀 ⁺) , ((G : Group 𝓀) β†’ Β¬ (G β‰… F))
 there-is-a-large-group {𝓀} = large-group-with-no-small-copy pt ua
                               (Ordinal 𝓀 ,
                                the-type-of-ordinals-is-a-set ,
                                the-type-of-ordinals-is-large ,

And from this it of course follows that the embedding of the type of
groups of one universe into that of its successor universe is not an


 Lift-Group-structure-is-not-equiv : Β¬ is-equiv (Lift-Group {𝓀} (𝓀 ⁺))
 Lift-Group-structure-is-not-equiv {𝓀} e = Ξ³ there-is-a-large-group
   Lower-Group : Group (𝓀 ⁺) β†’ Group 𝓀
   Lower-Group = inverse (Lift-Group (𝓀 ⁺)) e

   Ξ³ : (Ξ£ F κž‰ Group (𝓀 ⁺) , ((G : Group 𝓀) β†’ Β¬ (G β‰… F))) β†’ 𝟘
   Ξ³ (F , Ο•) = Ο• G i
      G : Group 𝓀
      G = Lower-Group F

      F' : Group (𝓀 ⁺)
      F' = Lift-Group (𝓀 ⁺) G

      p : F' ≑ F
      p = inverses-are-sections (Lift-Group (𝓀 ⁺)) e F

      j : G β‰… F'
      j = β‰…-sym F' G (Lifted-Group-is-isomorphic G)

      i : G β‰… F
      i = transport (G β‰…_) p j