Skip to content

Commit

Permalink
add proof that Sigma preserves null types (#1085)
Browse files Browse the repository at this point in the history
awswan authored Dec 5, 2023
1 parent bd6f5de commit a35231d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Cubical/HITs/Nullification/Properties.agda
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ open import Cubical.Modalities.Modality
open import Cubical.Functions.FunExtEquiv
open import Cubical.HITs.Localization renaming (rec to Localize-rec)
open import Cubical.Data.Unit
open import Cubical.Data.Sigma

open import Cubical.HITs.Nullification.Base

@@ -51,6 +52,21 @@ isNullΠ {S = S} {X = X} {Y = Y} nY α = fromIsEquiv _ (snd e)
(S α ((x : X) Y x))

isNullΣ : {A : Type ℓα} {S : A Type ℓs} {X : Type ℓ} {Y : X Type ℓ'} (isNull S X) ((x : X) isNull S (Y x))
isNull S (Σ X Y)
isNullΣ {S = S} {X = X} {Y = Y} nX nY α = fromIsEquiv _ (snd e)
where
e : Σ X Y ≃ (S α Σ X Y)
e =
Σ X Y
≃⟨ Σ-cong-equiv-snd (λ x pathSplitToEquiv (_ , (nY x α))) ⟩
Σ[ x ∈ X ] (S α Y x)
≃⟨ Σ-cong-equiv-fst (pathSplitToEquiv (_ , (nX α))) ⟩
Σ[ f ∈ (S α X) ] ((z : S α) Y (f z))
≃⟨ isoToEquiv (invIso Σ-Π-Iso) ⟩
(S α Σ X Y)

rec : {ℓα ℓs ℓ ℓ'} {A : Type ℓα} {S : A Type ℓs} {X : Type ℓ} {Y : Type ℓ'}
(nB : isNull S Y) (X Y) Null S X Y
rec nB g ∣ x ∣ = g x

0 comments on commit a35231d

Please sign in to comment.