Skip to content

Commit c26b5c4

Browse files
committed
chore: make level arguments explicit pt 1
1 parent d0a016f commit c26b5c4

File tree

20 files changed

+106
-111
lines changed

20 files changed

+106
-111
lines changed

Cubical/CW/Instances/Lift.agda

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ private
2121

2222
module _ (ℓ : Level) where
2323
CWskelLift : CWskel ℓA CWskel (ℓ-max ℓA ℓ)
24-
fst (CWskelLift sk) n = Lift {j = ℓ} (fst sk n)
24+
fst (CWskelLift sk) n = Lift (fst sk n)
2525
fst (snd (CWskelLift sk)) = CWskel-fields.card sk
2626
fst (snd (snd (CWskelLift sk))) n (x , a) =
2727
lift (CWskel-fields.α sk n (x , a))
@@ -33,15 +33,15 @@ module _ (ℓ : Level) where
3333
(pushoutEquiv _ _ _ _ (idEquiv _)
3434
LiftEquiv (idEquiv _) refl refl))
3535

36-
hasCWskelLift : {A : Type ℓA} hasCWskel A hasCWskel (Lift {j = ℓ} A)
36+
hasCWskelLift : {A : Type ℓA} hasCWskel A hasCWskel (Lift A)
3737
fst (hasCWskelLift (sk , e)) = CWskelLift sk
3838
snd (hasCWskelLift (sk , e)) =
3939
compEquiv (invEquiv LiftEquiv)
4040
(compEquiv e
4141
(invEquiv (isoToEquiv (SeqColimLift {ℓ = ℓ} _))))
4242

4343
CWLift : CW ℓA CW (ℓ-max ℓA ℓ)
44-
fst (CWLift (A , sk)) = Lift {j = ℓ} A
44+
fst (CWLift (A , sk)) = Lift A
4545
snd (CWLift (A , sk)) = PT.map hasCWskelLift sk
4646

4747
finCWskelLift : {n} finCWskel ℓA n finCWskel (ℓ-max ℓA ℓ) n
@@ -52,12 +52,12 @@ module _ (ℓ : Level) where
5252
(compEquiv (_ , snd (snd sk) k) LiftEquiv) .snd
5353

5454
hasFinCWskelLift : {A : Type ℓA}
55-
hasFinCWskel A hasFinCWskel (Lift {j = ℓ} A)
55+
hasFinCWskel A hasFinCWskel (Lift A)
5656
fst (hasFinCWskelLift (dim , sk , e)) = dim
5757
fst (snd (hasFinCWskelLift (dim , sk , e))) = finCWskelLift sk
5858
snd (snd (hasFinCWskelLift c)) =
5959
hasCWskelLift (hasFinCWskel→hasCWskel _ c) .snd
6060

6161
finCWLift : finCW ℓA finCW (ℓ-max ℓA ℓ)
62-
fst (finCWLift (A , sk)) = Lift {j = ℓ} A
62+
fst (finCWLift (A , sk)) = Lift A
6363
snd (finCWLift (A , sk)) = PT.map hasFinCWskelLift sk

Cubical/Categories/Instances/Sets.agda

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,20 @@ _[_,-] : (C : Category ℓ ℓ') → (c : C .ob)→ Functor C (SET ℓ')
4848
(C [ c ,-]) .F-seq _ _ = funExt λ _ sym (C .⋆Assoc _ _ _)
4949

5050
-- Lift functor
51-
LiftF : Functor (SET ℓ) (SET (ℓ-max ℓ ℓ'))
52-
LiftF {ℓ}{ℓ'} .F-ob A = (Lift {ℓ}{ℓ'} (A .fst)) , isOfHLevelLift 2 (A .snd)
53-
LiftF .F-hom f x = lift (f (x .lower))
54-
LiftF .F-id = refl
55-
LiftF .F-seq f g = funExt λ x refl
51+
LiftF : ℓ' Functor (SET ℓ) (SET (ℓ-max ℓ ℓ'))
52+
LiftF ℓ' .F-ob A = (Lift ℓ' (A .fst)) , isOfHLevelLift 2 (A .snd)
53+
LiftF ℓ' .F-hom f x = lift (f (x .lower))
54+
LiftF ℓ' .F-id = refl
55+
LiftF ℓ' .F-seq f g = funExt λ x refl
5656

5757
module _ {ℓ ℓ' : Level} where
58-
isFullyFaithfulLiftF : isFullyFaithful (LiftF {ℓ} {ℓ'})
58+
isFullyFaithfulLiftF : isFullyFaithful (LiftF {ℓ} ℓ')
5959
isFullyFaithfulLiftF X Y = isoToIsEquiv LiftFIso
6060
where
6161
open Iso
6262
LiftFIso : Iso (X .fst Y .fst)
63-
(Lift {ℓ}{ℓ'} (X .fst) Lift {ℓ}{ℓ'} (Y .fst))
64-
fun LiftFIso = LiftF .F-hom {X} {Y}
63+
(Lift ℓ' (X .fst) Lift ℓ' (Y .fst))
64+
fun LiftFIso = LiftF ℓ' .F-hom {X} {Y}
6565
inv LiftFIso = λ f x f (lift x) .lower
6666
rightInv LiftFIso = λ _ funExt λ _ refl
6767
leftInv LiftFIso = λ _ funExt λ _ refl
@@ -189,7 +189,7 @@ module _ {ℓ} where
189189
-- LiftF : SET ℓ → SET (ℓ-suc ℓ) preserves "small" limits
190190
-- i.e. limits over diagram shapes J : Category ℓ ℓ
191191
module _ {ℓ : Level} where
192-
preservesLimitsLiftF : preservesLimits {ℓJ = ℓ} {ℓJ' = ℓ} (LiftF {ℓ} {ℓ-suc ℓ})
192+
preservesLimitsLiftF : preservesLimits {ℓJ = ℓ} {ℓJ' = ℓ} (LiftF {ℓ} (ℓ-suc ℓ))
193193
preservesLimitsLiftF = preservesLimitsChar _
194194
completeSET
195195
completeSETSuc
@@ -209,22 +209,22 @@ module _ {ℓ : Level} where
209209
(λ x hx funExt (λ d cone≡ λ u funExt (λ _ sym (funExt⁻ (hx u) d))))
210210

211211
lowerCone : J D
212-
Cone (LiftF ∘F D) (Unit* , isOfHLevelLift 2 isSetUnit)
212+
Cone (LiftF _ ∘F D) (Unit* , isOfHLevelLift 2 isSetUnit)
213213
Cone D (Unit* , isOfHLevelLift 2 isSetUnit)
214214
coneOut (lowerCone J D cc) v tt* = cc .coneOut v tt* .lower
215215
coneOutCommutes (lowerCone J D cc) e =
216216
funExt λ { tt* cong lower (funExt⁻ (cc .coneOutCommutes e) tt*) }
217217

218218
liftCone : J D
219219
Cone D (Unit* , isOfHLevelLift 2 isSetUnit)
220-
Cone (LiftF ∘F D) (Unit* , isOfHLevelLift 2 isSetUnit)
220+
Cone (LiftF _ ∘F D) (Unit* , isOfHLevelLift 2 isSetUnit)
221221
coneOut (liftCone J D cc) v tt* = lift (cc .coneOut v tt*)
222222
coneOutCommutes (liftCone J D cc) e =
223223
funExt λ { tt* cong lift (funExt⁻ (cc .coneOutCommutes e) tt*) }
224224

225225
limSetIso : J D CatIso (SET (ℓ-suc ℓ))
226-
(completeSETSuc J (LiftF ∘F D) .lim)
227-
(LiftF .F-ob (completeSET J D .lim))
226+
(completeSETSuc J (LiftF _ ∘F D) .lim)
227+
(LiftF _ .F-ob (completeSET J D .lim))
228228
fst (limSetIso J D) cc = lift (lowerCone J D cc)
229229
cInv (snd (limSetIso J D)) cc = liftCone J D (cc .lower)
230230
sec (snd (limSetIso J D)) = funExt (λ _ liftExt (cone≡ λ _ refl))

Cubical/Data/Bool/Base.agda

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,14 @@ dichotomyBoolSym true = inr refl
8686

8787
-- Universe lifted booleans
8888
Bool* : {ℓ} Type ℓ
89-
Bool* = Lift Bool
89+
Bool* {ℓ} = Lift _ Bool
9090

91-
true* : {ℓ} Bool* {ℓ}
91+
true* : Bool* {ℓ}
9292
true* = lift true
9393

94-
false* : {ℓ} Bool* {ℓ}
94+
false* : Bool* {ℓ}
9595
false* = lift false
9696

9797
-- Pointed version
9898
Bool*∙ : {ℓ} Σ[ X ∈ Type ℓ ] X
99-
fst Bool*∙ = Bool*
100-
snd Bool*∙ = true*
99+
Bool*∙ = Bool* , true*

Cubical/Data/Bool/Properties.agda

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ K-Bool
6666
: (P : {b : Bool} b ≡ b Type ℓ)
6767
({b} P {b} refl)
6868
{b} (q : b ≡ b) P q
69-
K-Bool P Pr {false} = J (λ{ false q P q ; true _ Lift ⊥ }) Pr
70-
K-Bool P Pr {true} = J (λ{ true q P q ; false _ Lift ⊥ }) Pr
69+
K-Bool P Pr {false} = J (λ{ false q P q ; true _ ⊥* }) Pr
70+
K-Bool P Pr {true} = J (λ{ true q P q ; false _ ⊥* }) Pr
7171

7272
isSetBool : isSet Bool
73-
isSetBool a b = J (λ _ p q p ≡ q) (K-Bool (refl ≡_) refl)
73+
isSetBool a = J> K-Bool (refl ≡_) refl
7474

7575
true≢false : ¬ true ≡ false
7676
true≢false p = subst (λ b if b then Bool else ⊥) p true

Cubical/Data/Empty/Base.agda

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ private
88

99
data : Type₀ where
1010

11-
⊥* : Type ℓ
12-
⊥* = Lift ⊥
11+
⊥* : {ℓ} Type ℓ
12+
⊥* = Lift _
1313

1414
rec : {A : Type ℓ} A
1515
rec ()
1616

17-
rec* : {A : Type ℓ} ⊥* {ℓ ='} A
17+
rec* : {A : Type ℓ} ⊥* {ℓ'} A
1818
rec* ()
1919

2020
elim : {A : Type ℓ} (x : ⊥) A x
2121
elim ()
2222

23-
elim* : {A : ⊥* {ℓ'} Type ℓ} (x : ⊥* {ℓ'}) A x
23+
elim* : {A : ⊥* {ℓ'} Type ℓ} (x : ⊥*) A x
2424
elim* ()

Cubical/Data/Empty/Properties.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ open import Cubical.Data.Empty.Base
99
isProp⊥ : isProp ⊥
1010
isProp⊥ ()
1111

12-
isProp⊥* : {ℓ} isProp {ℓ} ⊥*
12+
isProp⊥* : {ℓ} isProp (⊥* {ℓ})
1313
isProp⊥* _ ()
1414

1515
isContr⊥→A : {ℓ} {A : Type ℓ} isContr (⊥ A)

Cubical/Data/List/Properties.agda

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ module _ {ℓ} {A : Type ℓ} where
6666
module ListPath {ℓ} {A : Type ℓ} where
6767

6868
Cover : List A List A Type ℓ
69-
Cover [] [] = Lift Unit
70-
Cover [] (_ ∷ _) = Lift ⊥
71-
Cover (_ ∷ _) [] = Lift ⊥
69+
Cover [] [] = Unit*
70+
Cover [] (_ ∷ _) = ⊥*
71+
Cover (_ ∷ _) [] = ⊥*
7272
Cover (x ∷ xs) (y ∷ ys) = (x ≡ y) × Cover xs ys
7373

7474
reflCode : xs Cover xs xs
@@ -124,17 +124,17 @@ private
124124
x y : A
125125
xs ys : List A
126126

127-
caseList : {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} (n c : B) List A B
128-
caseList n _ [] = n
129-
caseList _ c (_ ∷ _) = c
127+
caseList : {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} (n c : B) List A B
128+
caseList n _ [] = n
129+
caseList _ c (_ ∷ _) = c
130130

131-
safe-head : A List A A
132-
safe-head x [] = x
133-
safe-head _ (x ∷ _) = x
131+
safe-head : A List A A
132+
safe-head x [] = x
133+
safe-head _ (x ∷ _) = x
134134

135-
safe-tail : List A List A
136-
safe-tail [] = []
137-
safe-tail (_ ∷ xs) = xs
135+
safe-tail : List A List A
136+
safe-tail [] = []
137+
safe-tail (_ ∷ xs) = xs
138138

139139
cons-inj₁ : x ∷ xs ≡ y ∷ ys x ≡ y
140140
cons-inj₁ {x = x} p = cong (safe-head x) p
@@ -152,10 +152,10 @@ snoc-inj₁ {xs = xs} {ys = ys} p =
152152
∙∙ rev-rev _
153153

154154
¬cons≡nil : ¬ (x ∷ xs ≡ [])
155-
¬cons≡nil {_} {A} p = lower (subst (caseList (Lift ⊥) (List A)) p [])
155+
¬cons≡nil p = lower (ListPath.encode _ _ p)
156156

157157
¬nil≡cons : ¬ ([] ≡ x ∷ xs)
158-
¬nil≡cons {_} {A} p = lower (subst (caseList (List A) (Lift ⊥)) p [])
158+
¬nil≡cons p = lower (ListPath.encode _ _ p)
159159

160160
¬snoc≡nil : ¬ (xs ∷ʳ x ≡ [])
161161
¬snoc≡nil {xs = []} contra = ¬cons≡nil contra

Cubical/Data/Maybe/Properties.agda

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ open import Cubical.Foundations.Structure using (⟨_⟩)
1010

1111
open import Cubical.Functions.Embedding using (isEmbedding)
1212

13-
open import Cubical.Data.Empty as ⊥ using (⊥; isProp⊥)
13+
open import Cubical.Data.Empty as ⊥ using (⊥*; isProp⊥*)
1414
open import Cubical.Data.Unit
1515
open import Cubical.Data.Nat using (suc)
1616
open import Cubical.Data.Sum using (_⊎_; inl; inr)
@@ -44,9 +44,9 @@ map-Maybe-id (just _) = refl
4444
-- Path space of Maybe type
4545
module MaybePath {ℓ} {A : Type ℓ} where
4646
Cover : Maybe A Maybe A Type ℓ
47-
Cover nothing nothing = Lift Unit
48-
Cover nothing (just _) = Lift ⊥
49-
Cover (just _) nothing = Lift ⊥
47+
Cover nothing nothing = Unit*
48+
Cover nothing (just _) = ⊥*
49+
Cover (just _) nothing = ⊥*
5050
Cover (just a) (just a') = a ≡ a'
5151

5252
reflCode : (c : Maybe A) Cover c c
@@ -88,9 +88,9 @@ module MaybePath {ℓ} {A : Type ℓ} where
8888
isOfHLevelCover : (n : HLevel)
8989
isOfHLevel (suc (suc n)) A
9090
c c' isOfHLevel (suc n) (Cover c c')
91-
isOfHLevelCover n p nothing nothing = isOfHLevelLift (suc n) (isOfHLevelUnit (suc n))
92-
isOfHLevelCover n p nothing (just a') = isOfHLevelLift (suc n) (isProp→isOfHLevelSuc n isProp⊥)
93-
isOfHLevelCover n p (just a) nothing = isOfHLevelLift (suc n) (isProp→isOfHLevelSuc n isProp⊥)
91+
isOfHLevelCover n p nothing nothing = isOfHLevelUnit* (suc n)
92+
isOfHLevelCover n p nothing (just a') = isProp→isOfHLevelSuc n isProp⊥*
93+
isOfHLevelCover n p (just a) nothing = isProp→isOfHLevelSuc n isProp⊥*
9494
isOfHLevelCover n p (just a) (just a') = p a a'
9595

9696
isOfHLevelMaybe : {ℓ} (n : HLevel) {A : Type ℓ}
@@ -113,16 +113,16 @@ fromJust-def a nothing = a
113113
fromJust-def _ (just a) = a
114114

115115
just-inj : (x y : A) just x ≡ just y x ≡ y
116-
just-inj x _ eq = cong (fromJust-def x) eq
116+
just-inj x y = MaybePath.encode _ _
117117

118118
isEmbedding-just : isEmbedding (just {A = A})
119119
isEmbedding-just w z = MaybePath.Cover≃Path (just w) (just z) .snd
120120

121121
¬nothing≡just : {x : A} ¬ (nothing ≡ just x)
122-
¬nothing≡just {A = A} {x = x} p = lower (subst (caseMaybe (Maybe A) (Lift ⊥)) p (just x))
122+
¬nothing≡just p = lower (MaybePath.encode _ _ p)
123123

124124
¬just≡nothing : {x : A} ¬ (just x ≡ nothing)
125-
¬just≡nothing {A = A} {x = x} p = lower (subst (caseMaybe (Lift ⊥) (Maybe A)) p (just x))
125+
¬just≡nothing p = lower (MaybePath.encode _ _ p)
126126

127127
isProp-x≡nothing : (x : Maybe A) isProp (x ≡ nothing)
128128
isProp-x≡nothing nothing x w =

Cubical/Data/Sigma/Properties.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ inv lUnit×Iso = tt ,_
137137
rightInv lUnit×Iso _ = refl
138138
leftInv lUnit×Iso _ = refl
139139

140-
lUnit*×Iso : {ℓ} Iso (Unit* {ℓ} × A) A
140+
lUnit*×Iso : Iso (Unit* {ℓ} × A) A
141141
fun lUnit*×Iso = snd
142142
inv lUnit*×Iso = tt* ,_
143143
rightInv lUnit*×Iso _ = refl
@@ -149,7 +149,7 @@ inv rUnit×Iso = _, tt
149149
rightInv rUnit×Iso _ = refl
150150
leftInv rUnit×Iso _ = refl
151151

152-
rUnit*×Iso : {ℓ} Iso (A × Unit* {ℓ}) A
152+
rUnit*×Iso : Iso (A × Unit* {ℓ}) A
153153
fun rUnit*×Iso = fst
154154
inv rUnit*×Iso = _, tt*
155155
rightInv rUnit*×Iso _ = refl

Cubical/Data/Sum/Properties.agda

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ private
3232
module ⊎Path {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} where
3333

3434
Cover : A ⊎ B A ⊎ B Type (ℓ-max ℓ ℓ')
35-
Cover (inl a) (inl a') = Lift {j = ℓ-max ℓ ℓ'} (a ≡ a')
36-
Cover (inl _) (inr _) = Lift ⊥
37-
Cover (inr _) (inl _) = Lift ⊥
38-
Cover (inr b) (inr b') = Lift {j = ℓ-max ℓ ℓ'} (b ≡ b')
35+
Cover (inl a) (inl a') = Lift ℓ' (a ≡ a')
36+
Cover (inl _) (inr _) = ⊥*
37+
Cover (inr _) (inl _) = ⊥*
38+
Cover (inr b) (inr b') = Lift (b ≡ b')
3939

4040
reflCode : (c : A ⊎ B) Cover c c
4141
reflCode (inl a) = lift refl
@@ -178,13 +178,13 @@ inv ⊎-IdL-⊥-Iso x = inr x
178178
rightInv ⊎-IdL-⊥-Iso _ = refl
179179
leftInv ⊎-IdL-⊥-Iso (inr _) = refl
180180

181-
⊎-IdL-⊥*-Iso : {ℓ} Iso (⊥* {ℓ} ⊎ A) A
181+
⊎-IdL-⊥*-Iso : {ℓ} Iso (⊥* {ℓ} ⊎ A) A
182182
fun ⊎-IdL-⊥*-Iso (inr x) = x
183183
inv ⊎-IdL-⊥*-Iso x = inr x
184184
rightInv ⊎-IdL-⊥*-Iso _ = refl
185185
leftInv ⊎-IdL-⊥*-Iso (inr _) = refl
186186

187-
⊎-IdR-⊥*-Iso : {ℓ} Iso (A ⊎ ⊥* {ℓ}) A
187+
⊎-IdR-⊥*-Iso : {ℓ} Iso (A ⊎ ⊥* {ℓ}) A
188188
fun ⊎-IdR-⊥*-Iso (inl x) = x
189189
inv ⊎-IdR-⊥*-Iso x = inl x
190190
rightInv ⊎-IdR-⊥*-Iso _ = refl
@@ -196,10 +196,10 @@ leftInv ⊎-IdR-⊥*-Iso (inl _) = refl
196196
⊎-IdL-⊥-≃ : ⊥ ⊎ A ≃ A
197197
⊎-IdL-⊥-≃ = isoToEquiv ⊎-IdL-⊥-Iso
198198

199-
⊎-IdR-⊥*-≃ : {ℓ} A ⊎ ⊥* {ℓ} ≃ A
199+
⊎-IdR-⊥*-≃ : {ℓ} A ⊎ ⊥* {ℓ} ≃ A
200200
⊎-IdR-⊥*-≃ = isoToEquiv ⊎-IdR-⊥*-Iso
201201

202-
⊎-IdL-⊥*-≃ : {ℓ} ⊥* {ℓ} ⊎ A ≃ A
202+
⊎-IdL-⊥*-≃ : {ℓ} ⊥* {ℓ} ⊎ A ≃ A
203203
⊎-IdL-⊥*-≃ = isoToEquiv ⊎-IdL-⊥*-Iso
204204

205205
Π⊎Iso : Iso ((x : A ⊎ B) E x) (((a : A) E (inl a)) × ((b : B) E (inr b)))
@@ -358,10 +358,10 @@ Iso⊎→Iso {A = A} {C = C} {B = B} {D = D} f e p = Iso'
358358
Iso.leftInv Iso' x = lem1 x (_ , refl) (_ , refl)
359359

360360
Lift⊎Iso : (ℓ : Level)
361-
Iso (Lift {j = ℓ} A ⊎ Lift {j = ℓ} B)
362-
(Lift {j = ℓ} (A ⊎ B))
363-
fun (Lift⊎Iso ℓD) (inl x) = liftFun inl x
364-
fun (Lift⊎Iso ℓD) (inr x) = liftFun inr x
361+
Iso (Lift A ⊎ Lift B)
362+
(Lift (A ⊎ B))
363+
fun (Lift⊎Iso ℓD) (inl x) = liftMap inl x
364+
fun (Lift⊎Iso ℓD) (inr x) = liftMap inr x
365365
inv (Lift⊎Iso ℓD) (lift (inl x)) = inl (lift x)
366366
inv (Lift⊎Iso ℓD) (lift (inr x)) = inr (lift x)
367367
rightInv (Lift⊎Iso ℓD) (lift (inl x)) = refl

0 commit comments

Comments
 (0)