Skip to content

Commit 296c3d8

Browse files
committed
chore: add hlevel instance for singletons, simplify prop!
1 parent 68ba831 commit 296c3d8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/1Lab/Reflection/HLevel.agda

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,12 @@ instance
191191
h-level-is-prop : {ℓ} {A : Type ℓ} {n : Nat} ⦃ _ : 1 ≤ n ⦄ H-Level (is-prop A) n
192192
h-level-is-prop ⦃ s≤s _ ⦄ = hlevel-instance (is-prop→is-hlevel-suc is-prop-is-prop)
193193

194+
H-Level-Singleton : {ℓ} {A : Type ℓ} {a : A} {n : Nat} H-Level (Singleton a) n
195+
H-Level-Singleton {n = n} = hlevel-instance (is-contr→is-hlevel n (contr _ Singleton-is-contr))
196+
194197
{-# INCOHERENT H-Level-projection #-}
195198
{-# OVERLAPPING h-level-is-prop #-}
199+
{-# OVERLAPPING H-Level-Singleton #-}
196200

197201
open Data.Nat.Base using (0≤x ; s≤s' ; x≤x ; x≤sucy) public
198202

@@ -278,8 +282,7 @@ prop-ext! = prop-ext (hlevel 1) (hlevel 1)
278282
prop!
279283
: {ℓ} {A : I Type ℓ} ⦃ aip : {i} H-Level (A i) 1 ⦄ {x y}
280284
PathP (λ i A i) x y
281-
prop! {A = A} {x} {y} =
282-
is-prop→pathp (λ i coe0→i (λ j is-prop (A j)) i (hlevel 1)) x y
285+
prop! {A = A} {x} {y} = is-prop→pathp (λ i hlevel 1) x y
283286

284287
injective→is-embedding!
285288
: {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} ⦃ bset : H-Level B 2 ⦄ {f : A B}

0 commit comments

Comments
 (0)