Skip to content

Commit

Permalink
Add Separated for Π and ×
Browse files Browse the repository at this point in the history
  • Loading branch information
dolio committed Aug 9, 2023
1 parent d698387 commit a108c18
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Cubical/Relation/Nullary/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ Separated→isSet = PStable≡→isSet ∘ Separated→PStable≡
Separated→ : Separated B -> Separated (A B)
Separated→ Bs f g e i x = Bs (f x) (g x) (λ k e (k ∘ cong (λ f f x))) i

SeparatedΠ : ( x Separated (P x)) -> Separated ((x : A) -> P x)
SeparatedΠ Ps f g e i x = Ps x (f x) (g x) (λ k e (k ∘ cong (λ f f x))) i

Separated× : Separated A -> Separated B -> Separated (Σ A (const B))
Separated× As Bs p q e i = λ where
.fst As (fst p) (fst q) (λ k e λ r k (cong fst r)) i
.snd Bs (snd p) (snd q) (λ k e λ r k (cong snd r)) i

-- Proof of Hedberg's theorem: a type with decidable equality is an h-set
Discrete→Separated : Discrete A Separated A
Discrete→Separated d x y = Dec→Stable (d x y)
Expand Down

0 comments on commit a108c18

Please sign in to comment.