Make level-parameters to Category explicit

This commit is contained in:
Frederik Hanghøj Iversen 2018-01-21 01:11:08 +01:00
parent 0990a3778f
commit 07e4269399
8 changed files with 31 additions and 31 deletions

View file

@ -20,7 +20,7 @@ snd (lift-eq a b i) = b i
open Functor
open Category
module _ { ' : Level} {A B : Category {} {'}} where
module _ { ' : Level} {A B : Category '} where
lift-eq-functors : {f g : Functor A B}
(eq* : Functor.func* f Functor.func* g)
(eq→ : PathP (λ i {x y} Arrow A x y Arrow B (eq* i x) (eq* i y))
@ -41,11 +41,11 @@ module _ { ' : Level} {A B : Category {} {'}} where
module _ { ' : Level} where
private
_⊛_ = functor-comp
module _ {A B C D : Category {} {'}} {f : Functor A B} {g : Functor B C} {h : Functor C D} where
module _ {A B C D : Category '} {f : Functor A B} {g : Functor B C} {h : Functor C D} where
postulate assc : h (g f) (h g) f
-- assc = lift-eq-functors refl refl {!refl!} λ i j → {!!}
module _ {A B : Category {} {'}} {f : Functor A B} where
module _ {A B : Category '} {f : Functor A B} where
lem : (func* f) (func* (identity {C = A})) func* f
lem = refl
-- lemmm : func→ {C = A} {D = B} (f ⊛ identity) ≡ func→ f
@ -62,10 +62,10 @@ module _ { ' : Level} where
postulate ident-l : identity f f
-- ident-l = lift-eq-functors lem lemmm {!refl!} {!!}
CatCat : Category {lsuc ( ')} { '}
CatCat : Category (lsuc ( ')) ( ')
CatCat =
record
{ Object = Category {} {'}
{ Object = Category '
; Arrow = Functor
; 𝟙 = identity
; _⊕_ = functor-comp
@ -74,7 +74,7 @@ module _ { ' : Level} where
; ident = ident-r , ident-l
}
module _ { : Level} (C D : Category {} {}) where
module _ { : Level} (C D : Category ) where
private
proj₁ : Arrow CatCat (catProduct C D) C
proj₁ = record { func* = fst ; func→ = fst ; ident = refl ; distrib = refl }

View file

@ -154,7 +154,7 @@ module _ {A B C D : Set} {S : Subset (A × B)} {R : Subset (B × C)} {Q : Subset
(Σ[ b B ] (a , b) S × (Σ[ c C ] (b , c) R × (c , d) Q))
is-assoc = equivToPath equi
Rel : Category
Rel : Category (lsuc lzero) (lsuc lzero)
Rel = record
{ Object = Set
; Arrow = λ S R Subset (S × R)

View file

@ -15,7 +15,7 @@ open import Cat.Functor
Fun : { : Level} ( T U : Set ) Set
Fun T U = T U
Sets : { : Level} Category {lsuc } {}
Sets : { : Level} Category (lsuc )
Sets {} = record
{ Object = Set
; Arrow = λ T U Fun {} T U
@ -26,11 +26,11 @@ Sets {} = record
}
-- Covariant Presheaf
Representable : { ' : Level} ( : Category {} {'}) Set ( lsuc ')
Representable : { ' : Level} ( : Category ') Set ( lsuc ')
Representable {' = '} = Functor (Sets {'})
-- The "co-yoneda" embedding.
representable : { ' : Level} { : Category {} {'}} Category.Object Representable
representable : { '} { : Category '} Category.Object Representable
representable { = } A = record
{ func* = λ B .Arrow A B
; func→ = λ f g f .⊕ g
@ -41,11 +41,11 @@ representable { = } A = record
open module = Category
-- Contravariant Presheaf
Presheaf : { ' : Level} ( : Category {} {'}) Set ( lsuc ')
Presheaf : { '} ( : Category ') Set ( lsuc ')
Presheaf {' = '} = Functor (Opposite ) (Sets {'})
-- Alternate name: `yoneda`
presheaf : { ' : Level} { : Category {} {'}} Category.Object (Opposite ) Presheaf
presheaf : { ' : Level} { : Category '} Category.Object (Opposite ) Presheaf
presheaf { = } B = record
{ func* = λ A .Arrow A B
; func→ = λ f g g .⊕ f

View file

@ -24,7 +24,7 @@ syntax ∃!-syntax (λ x → B) = ∃![ x ] B
postulate undefined : { : Level} {A : Set } A
record Category { '} : Set (lsuc (' )) where
record Category ( ' : Level) : Set (lsuc (' )) where
-- adding no-eta-equality can speed up type-checking.
no-eta-equality
field
@ -44,7 +44,7 @@ record Category { '} : Set (lsuc (' ⊔ )) where
open Category public
module _ { ' : Level} { : Category {} {'}} { A B : .Object } where
module _ { ' : Level} { : Category '} { A B : .Object } where
private
open module = Category
_+_ = ._⊕_
@ -93,10 +93,10 @@ epi-mono-is-not-iso f =
-}
-- Isomorphism of objects
_≅_ : { ' : Level } { : Category {} {'} } ( A B : Object ) Set '
_≅_ : { '} { : Category '} (A B : Object ) Set '
_≅_ { = } A B = Σ[ f .Arrow A B ] (Isomorphism { = } f)
IsProduct : { '} ( : Category {} {'}) {A B obj : Object } (π₁ : Arrow obj A) (π₂ : Arrow obj B) Set ( ')
IsProduct : { '} ( : Category ') {A B obj : Object } (π₁ : Arrow obj A) (π₂ : Arrow obj B) Set ( ')
IsProduct {A = A} {B = B} π₁ π₂
= {X : .Object} (x₁ : .Arrow X A) (x₂ : .Arrow X B)
∃![ x ] (π₁ .⊕ x x₁ × π₂ .⊕ x x₂)
@ -110,7 +110,7 @@ IsProduct {A = A} {B = B} π₁ π₂
-- isProduct : ∀ {X : .Object} (x₁ : .Arrow X A) (x₂ : .Arrow X B)
-- → ∃![ x ] ( ._⊕_ π₁ x ≡ x₁ × . _⊕_ π₂ x ≡ x₂)
record Product { ' : Level} { : Category {} {'}} (A B : .Object) : Set ( ') where
record Product { ' : Level} { : Category '} (A B : .Object) : Set ( ') where
no-eta-equality
field
obj : .Object
@ -119,7 +119,7 @@ record Product { ' : Level} { : Category {} {'}} (A B : .Obje
{{isProduct}} : IsProduct proj₁ proj₂
mutual
catProduct : { : Level} (C D : Category {} {}) Category {} {}
catProduct : {} (C D : Category ) Category
catProduct C D =
record
{ Object = C.Object × D.Object
@ -146,10 +146,10 @@ mutual
-- arrowProduct = {!!}
-- Arrows in the product-category
arrowProduct : {} {C D : Category {} {}} (c d : Object (catProduct C D)) Set
arrowProduct : {} {C D : Category } (c d : Object (catProduct C D)) Set
arrowProduct {C = C} {D = D} (c , d) (c' , d') = Arrow C c c' × Arrow D d d'
Opposite : { '} Category {} {'} Category {} {'}
Opposite : { '} Category ' Category '
Opposite =
record
{ Object = .Object
@ -173,10 +173,10 @@ Opposite =
-- assoc (Opposite-is-involution i) = {!!}
-- ident (Opposite-is-involution i) = {!!}
Hom : { ' : Level} ( : Category {} {'}) (A B : Object ) Set '
Hom : { ' : Level} ( : Category ') (A B : Object ) Set '
Hom A B = Arrow A B
module _ { ' : Level} { : Category {} {'}} where
module _ { ' : Level} { : Category '} where
HomFromArrow : (A : .Object) {B B' : .Object} (g : .Arrow B B')
Hom A B Hom A B'
HomFromArrow _A = _⊕_

View file

@ -6,12 +6,12 @@ open import Data.Product
open import Cat.Category as C
module _ { ' : Level} ( : Category {} {'}) where
module _ { ' : Level} ( : Category ') where
private
open module = Category
Obj = .Object
Path : ( a b : Obj ) Set
Path : ( a b : Obj ) Set '
Path a b = undefined
postulate emptyPath : (o : Obj) Path o o
@ -28,7 +28,7 @@ module _ { ' : Level} ( : Category {} {'}) where
ident-r : concatenate {A} {A} {B} p (emptyPath A) p
ident-l : concatenate {A} {B} {B} (emptyPath B) p p
Free : Category
Free : Category '
Free = record
{ Object = Obj
; Arrow = Path

View file

@ -7,7 +7,7 @@ open import Cat.Functor
open import Cat.Categories.Sets
module _ {a a' b b'} where
Exponential : Category {a} {a'} Category {b} {b'} Category {{!!}} {{!!}}
Exponential : Category a a' Category b b' Category ? ?
Exponential A B = record
{ Object = {!!}
; Arrow = {!!}
@ -19,5 +19,5 @@ module _ {a a' b b'} where
_⇑_ = Exponential
yoneda : { '} { : Category {} {'}} Functor (Sets (Opposite ))
yoneda : { '} { : Category '} Functor (Sets (Opposite ))
yoneda = {!!}

View file

@ -42,7 +42,7 @@ module _ { ' : Level} (Ns : Set ) where
Mor = Σ themap rules
-- The category of names and substitutions
: Category -- {o} {lsuc lzero ⊔ o}
: Category -- o (lsuc lzero ⊔ o)
= record
-- { Object = FiniteDecidableSubset
{ Object = Ns Bool

View file

@ -6,7 +6,7 @@ open import Function
open import Cat.Category
record Functor {c c' d d'} (C : Category {c} {c'}) (D : Category {d} {d'})
record Functor {c c' d d'} (C : Category c c') (D : Category d d')
: Set (c c' d d') where
private
open module C = Category C
@ -21,7 +21,7 @@ record Functor {c c' d d'} (C : Category {c} {c'}) (D : Catego
distrib : { c c' c'' : C.Object} {a : C.Arrow c c'} {a' : C.Arrow c' c''}
func→ (a' C.⊕ a) func→ a' D.⊕ func→ a
module _ { ' : Level} {A B C : Category {} {'}} (F : Functor B C) (G : Functor A B) where
module _ { ' : Level} {A B C : Category '} (F : Functor B C) (G : Functor A B) where
private
open module F = Functor F
open module G = Functor G
@ -56,7 +56,7 @@ module _ { ' : Level} {A B C : Category {} {'}} (F : Functor B C) (G
}
-- The identity functor
identity : { ' : Level} {C : Category {} {'}} Functor C C
identity : { '} {C : Category '} Functor C C
-- Identity = record { F* = λ x → x ; F→ = λ x → x ; ident = refl ; distrib = refl }
identity = record
{ func* = λ x x