Martin Escardo 24th January 2019
Size matters.
\begin{code}
{-# OPTIONS --without-K --exact-split --safe #-}
open import SpartanMLTT
module LiftingSize (π£ : Universe) where
open import UF-Subsingletons
open import UF-Size
open import UF-Equiv
open import UF-Univalence
open import UF-FunExt
open import UF-UA-FunExt
open import UF-EquivalenceExamples
open import Lifting π£
open import LiftingIdentityViaSIP
\end{code}
As one can see from the definition of π, we have that π lives in a
universe strictly higher than that of X in general:
\begin{code}
the-universe-of-π : {X : π€ Μ } β universe-of (π X) β‘ π£ βΊ β π€
the-universe-of-π = refl
\end{code}
However, if the argument is in π£ βΊ β π€, then the size doesn't
increase:
\begin{code}
π-universe-preservation : {X : π£ βΊ β π€ Μ } β universe-of (π X) β‘ universe-of X
π-universe-preservation = refl
\end{code}
In particular, after the first application of π, further applications
don't increase the size:
\begin{code}
the-universe-of-ππ : {X : π€ Μ } β universe-of (π (π X)) β‘ universe-of (π X)
the-universe-of-ππ = refl
\end{code}
As a particular case of the above, if π£ and π€ are the same universe,
then the first application of π has its result in the next universe π£βΊ.
\begin{code}
the-universe-of-π' : {X : π£ Μ } β universe-of (π X) β‘ π£ βΊ
the-universe-of-π' = refl
\end{code}
But if π€ is taken to be the successor π£ βΊ of π£ then it is preserved by π:
\begin{code}
the-universe-of-πβΊ : {X : π£ βΊ Μ } β universe-of (π X) β‘ universe-of X
the-universe-of-πβΊ = refl
\end{code}
With weak propositional resizing (any proposition of any universe has
a logically equivalent copy in any universe), π preserves all
universes except the first, i.e., all successor universes π€ βΊ.
\begin{code}
π-resize : is-univalent π£ β is-univalent π€ β Propositional-resizing
β (X : π€ βΊ Μ ) β (π X) has-size (π€ βΊ)
π-resize {π€} ua ua' Ο X = L , e
where
L : π€ βΊ Μ
L = Ξ£ P κ π€ Μ , (P β X) Γ is-prop P
e : L β π X
e = qinveq Ο (Ξ³ , Ξ³Ο , ΟΞ³)
where
Ο : L β π X
Ο (P , f , i) = resize Ο P i , f β from-resize Ο P i , resize-is-prop Ο P i
Ξ³ : π X β L
Ξ³ (Q , g , j) = resize Ο Q j , g β from-resize Ο Q j , resize-is-prop Ο Q j
ΟΞ³ : (l : π X) β Ο (Ξ³ l) β‘ l
ΟΞ³ (Q , g , j) = β-gives-β‘ π£ ua (a , b)
where
a : resize Ο (resize Ο Q j) (resize-is-prop Ο Q j) β Q
a = qinveq (from-resize Ο Q j β from-resize Ο (resize Ο Q j) (resize-is-prop Ο Q j))
(to-resize Ο (resize Ο Q j) (resize-is-prop Ο Q j) β to-resize Ο Q j ,
(Ξ» r β resize-is-prop Ο (resize Ο Q j) (resize-is-prop Ο Q j) _ r) ,
(Ξ» q β j _ q))
b : g β from-resize Ο Q j β from-resize Ο (resize Ο Q j) (resize-is-prop Ο Q j) β‘ g β β a β
b = ap (g β_) (dfunext (univalence-gives-funext ua) (Ξ» r β j _ (β a β r)))
Ξ³Ο : (m : L) β Ξ³ (Ο m) β‘ m
Ξ³Ο (P , f , i) = β-gives-β‘ π€ ua' (a , b)
where
a : resize Ο (resize Ο P i) (resize-is-prop Ο P i) β P
a = qinveq (from-resize Ο P i β from-resize Ο (resize Ο P i) (resize-is-prop Ο P i))
(to-resize Ο (resize Ο P i) (resize-is-prop Ο P i) β to-resize Ο P i ,
(Ξ» r β resize-is-prop Ο (resize Ο P i) (resize-is-prop Ο P i) _ r) ,
(Ξ» q β i _ q))
b : f β from-resize Ο P i β from-resize Ο (resize Ο P i) (resize-is-prop Ο P i) β‘ f β β a β
b = ap (f β_) (dfunext (univalence-gives-funext ua') (Ξ» r β i _ (β a β r)))
\end{code}
TODO. The above proof can be simplified.
NB. With a more careful treatment everywhere (including the structure
identity principle), we can relax the assumption that π£ and π€ are
univalent to the assumption that π£ satisfies propositional and
functional extensionality. But this is probably not worth the trouble,
as it would imply developing a copy of the SIP with this different
assumption.
Added 8th Feb 2019.
\begin{code}
π-resizingβ : Ξ©-resizingβ π£ β (X : π£ Μ ) β (π X) has-size π£
π-resizingβ (Ξ©β , eβ) X = (Ξ£ p κ Ξ©β , (up p holds β X)) , β-comp d e
where
up : Ξ©β β Ξ© π£
up = β eβ β
up-is-equiv : is-equiv up
up-is-equiv = ββ-is-equiv eβ
d : (Ξ£ p κ Ξ©β , (up p holds β X)) β (Ξ£ p κ Ξ© π£ , (p holds β X))
d = Ξ£-change-of-variable (Ξ» p β p holds β X) up up-is-equiv
e : (Ξ£ p κ Ξ© π£ , (p holds β X)) β π X
e = qinveq (Ξ» ((P , i) , f) β P , f , i)
((Ξ» (P , f , i) β (P , i) , f) ,
(Ξ» _ β refl) ,
(Ξ» _ β refl))
\end{code}
Added 15th Feb 2019. The proof is literally the same, the assumption is
more parsimonious.
\begin{code}
π-resizing : Ξ©-resizing π£ β (X : π£ Μ ) β (π X) has-size π£
π-resizing (O , Ξ΅) X = (Ξ£ p κ O , (up p holds β X)) , β-comp d e
where
up : O β Ξ© π£
up = β Ξ΅ β
up-is-equiv : is-equiv up
up-is-equiv = ββ-is-equiv Ξ΅
d : (Ξ£ p κ O , (up p holds β X)) β (Ξ£ p κ Ξ© π£ , (p holds β X))
d = Ξ£-change-of-variable (Ξ» p β p holds β X) up up-is-equiv
e : (Ξ£ p κ Ξ© π£ , (p holds β X)) β π X
e = qinveq (Ξ» ((P , i) , f) β P , f , i)
((Ξ» (P , f , i) β (P , i) , f) ,
(Ξ» _ β refl) ,
(Ξ» _ β refl))
\end{code}