@@ -10,6 +10,7 @@ open import Cubical.Foundations.Equiv
1010open import Cubical.Foundations.Equiv.PathSplit
1111open import Cubical.Foundations.Equiv.Properties
1212open import Cubical.Foundations.Univalence
13+ open import Cubical.Functions.FunExtEquiv
1314
1415open import Cubical.Modalities.Modality
1516
@@ -22,6 +23,34 @@ open import Cubical.HITs.Nullification.Base
2223open Modality
2324open isPathSplitEquiv
2425
26+ private
27+ variable
28+ ℓα ℓs ℓ ℓ' : Level
29+
30+ isNull≡ : {A : Type ℓα} {S : A → Type ℓs} {X : Type ℓ} (nX : isNull S X) {x y : X} → isNull S (x ≡ y)
31+ isNull≡ {A = A} {S = S} nX {x = x} {y = y} α =
32+ fromIsEquiv (λ p _ i → p i)
33+ (isEquiv[equivFunA≃B∘f]→isEquiv[f] (λ p _ → p) funExtEquiv (isEquivCong (const , toIsEquiv _ (nX α))))
34+
35+ isNullΠ : {A : Type ℓα} {S : A → Type ℓs} {X : Type ℓ} {Y : X → Type ℓ'} → ((x : X) → isNull S (Y x)) →
36+ isNull S ((x : X) → Y x)
37+ isNullΠ {S = S} {X = X} {Y = Y} nY α = fromIsEquiv _ (snd e)
38+ where
39+ flipIso : Iso ((x : X) → S α → Y x) (S α → (x : X) → Y x)
40+ Iso.fun flipIso f = flip f
41+ Iso.inv flipIso f = flip f
42+ Iso.rightInv flipIso f = refl
43+ Iso.leftInv flipIso f = refl
44+
45+ e : ((x : X) → Y x) ≃ (S α → ((x : X) → Y x))
46+ e =
47+ ((x : X) → Y x)
48+ ≃⟨ equivΠCod (λ x → const , (toIsEquiv _ (nY x α))) ⟩
49+ ((x : X) → (S α → Y x))
50+ ≃⟨ isoToEquiv flipIso ⟩
51+ (S α → ((x : X) → Y x))
52+ ■
53+
2554rec : ∀ {ℓα ℓs ℓ ℓ'} {A : Type ℓα} {S : A → Type ℓs} {X : Type ℓ} {Y : Type ℓ'}
2655 → (nB : isNull S Y) → (X → Y) → Null S X → Y
2756rec nB g ∣ x ∣ = g x
@@ -83,6 +112,26 @@ module _ {ℓα ℓs ℓ ℓ'} {A : Type ℓα} {S : A → Type ℓs} {X : Type
83112 (λ i → elim nY g (p s i))
84113 q₂ j i = toPathP⁻ (λ j → Y (≡spoke p s j i)) (λ j → q₁ j i) j
85114
115+ NullRecIsPathSplitEquiv : ∀ {ℓα ℓs ℓ ℓ'} {A : Type ℓα} {S : A → Type ℓs} {X : Type ℓ} {Y : Type ℓ'} → (isNull S Y) →
116+ isPathSplitEquiv {A = (Null S X) → Y} (λ f → f ∘ ∣_∣)
117+ sec (NullRecIsPathSplitEquiv nY) = rec nY , λ _ → refl
118+ secCong (NullRecIsPathSplitEquiv nY) f f' = (λ p → funExt (elim (λ _ → isNull≡ nY) (funExt⁻ p))) , λ _ → refl
119+
120+ NullRecIsEquiv : ∀ {ℓα ℓs ℓ ℓ'} {A : Type ℓα} {S : A → Type ℓs} {X : Type ℓ} {Y : Type ℓ'} → (isNull S Y) →
121+ isEquiv {A = (Null S X) → Y} (λ f → f ∘ ∣_∣)
122+ NullRecIsEquiv nY = toIsEquiv _ (NullRecIsPathSplitEquiv nY)
123+
124+ NullRecEquiv : ∀ {ℓα ℓs ℓ ℓ'} {A : Type ℓα} {S : A → Type ℓs} {X : Type ℓ} {Y : Type ℓ'} → (isNull S Y) →
125+ ((Null S X) → Y) ≃ (X → Y)
126+ NullRecEquiv nY = (λ f → f ∘ ∣_∣) , (NullRecIsEquiv nY)
127+
128+
129+ NullPreservesProp : ∀ {ℓα ℓs ℓ} {A : Type ℓα} {S : A → Type ℓs} {X : Type ℓ} →
130+ (isProp X) → isProp (Null S X)
131+
132+ NullPreservesProp {S = S} pX u = elim (λ v' → isNull≡ (isNull-Null S))
133+ (λ y → elim (λ u' → isNull≡ (isNull-Null S) {x = u'}) (λ x → cong ∣_∣ (pX x y)) u)
134+
86135-- nullification is a modality
87136
88137NullModality : ∀ {ℓα ℓs ℓ} {A : Type ℓα} (S : A → Type ℓs) → Modality (ℓ-max ℓ (ℓ-max ℓα ℓs))
0 commit comments