Jon Sterling, started 27th Sep 2022 Andrew Swan, 7th Februrary 2024, definition of Ξ£-closed subuniverse added \begin{code} {-# OPTIONS --safe --without-K #-} module Modal.Subuniverse where open import MLTT.Spartan open import UF.Subsingletons open import UF.Equiv open import UF.Univalence subuniverse : (π€ π₯ : Universe) β (π€ β π₯)βΊ Μ subuniverse π€ π₯ = Ξ£ P κ (π€ Μ β π₯ Μ ), Ξ A κ π€ Μ , is-prop (P A) subuniverse-contains : subuniverse π€ π₯ β π€ Μ β π₯ Μ subuniverse-contains P A = prβ P A subuniverse-member : subuniverse π€ π₯ β π€ βΊ β π₯ Μ subuniverse-member P = Ξ£ (subuniverse-contains P) reflection-candidate : subuniverse π€ π₯ β π€ Μ β π€ βΊ β π₯ Μ reflection-candidate P A = Ξ£ A' κ subuniverse-member P , (A β prβ A') is-reflection : (P : subuniverse π€ π₯) β (A : π€ Μ) β reflection-candidate P A β π€ βΊ β π₯ Μ is-reflection P A (A' , Ξ·) = (B : _) β subuniverse-contains P B β is-equiv Ξ» (f : prβ A' β B) β f β Ξ· subuniverse-reflects : subuniverse π€ π₯ β π€ Μ β π€ βΊ β π₯ Μ subuniverse-reflects P A = Ξ£ A' κ reflection-candidate P A , is-reflection P A A' subuniverse-is-reflective : subuniverse π€ π₯ β π€ βΊ β π₯ Μ subuniverse-is-reflective P = Ξ (subuniverse-reflects P) subuniverse-is-replete : subuniverse π€ π₯ β π€ βΊ β π₯ Μ subuniverse-is-replete P = (A B : _) β A β B β subuniverse-contains P B β subuniverse-contains P A univalence-implies-subuniverse-is-replete : (ua : is-univalent π€) β (P : subuniverse π€ π₯) β subuniverse-is-replete P univalence-implies-subuniverse-is-replete ua P A B e = transportβ»ΒΉ (subuniverse-contains P) (eqtoid ua A B e) subuniverse-is-sigma-closed : (P : subuniverse π€ π₯) β π€ βΊ β π₯ Μ subuniverse-is-sigma-closed P = (A : _) β (B : A β _) β prβ P A β ((a : A) β prβ P (B a)) β prβ P (Ξ£ B) \end{code}