Skip to content

Commit 21283c3

Browse files
authored
Add ∃-rec and ∃-elim
1 parent db82256 commit 21283c3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Cubical/HITs/PropositionalTruncation/Properties.agda

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ rec3 Pprop f ∣ x ∣₁ ∣ y ∣₁ (squash₁ z w i) = Pprop (rec3 Pprop f
4646
rec3 Pprop f ∣ x ∣₁ (squash₁ y z i) w = Pprop (rec3 Pprop f ∣ x ∣₁ y w) (rec3 Pprop f ∣ x ∣₁ z w) i
4747
rec3 Pprop f (squash₁ x y i) z w = Pprop (rec3 Pprop f x z w) (rec3 Pprop f y z w) i
4848

49+
∃-rec : {B : A Type ℓ'} {P : Type ℓ} isProp P ( x B x P) ∃[ x ∈ A ] B x P
50+
∃-rec Pprop f = rec Pprop (uncurry f)
51+
4952
-- Old version
5053
-- rec2 : ∀ {P : Type ℓ} → isProp P → (A → A → P) → ∥ A ∥ → ∥ A ∥ → P
5154
-- rec2 Pprop f = rec (isProp→ Pprop) (λ a → rec Pprop (f a))
@@ -133,6 +136,10 @@ elimFin {m = suc m} {P = P} {B = B} isPropB untruncHyp x =
133136
λ x₀ xₛ subst B (funExt (λ { zero refl ; (suc i) refl}))
134137
(curriedish x₀ xₛ)
135138

139+
∃-elim : {B : A Type ℓ'} {P : ∃[ x ∈ A ] B x Type ℓ} (Pprop : s isProp (P s))
140+
( x y P ∣ x , y ∣₁) s P s
141+
∃-elim Pprop f = elim Pprop (uncurry f)
142+
136143
isPropPropTrunc : isProp ∥ A ∥₁
137144
isPropPropTrunc x y = squash₁ x y
138145

0 commit comments

Comments
 (0)