Fix typo, rename implicit variables, implement presheaf
This commit is contained in:
parent
dd3415a69d
commit
6a25a4c3ff
|
@ -24,8 +24,8 @@ module _ {ℓc ℓc' ℓd ℓd' : Level} {ℂ : Category ℓc ℓc'} {𝔻 : Cat
|
||||||
→ (f : ℂ .Arrow A B)
|
→ (f : ℂ .Arrow A B)
|
||||||
→ 𝔻 ._⊕_ (θ B) (F .func→ f) ≡ 𝔻 ._⊕_ (G .func→ f) (θ A)
|
→ 𝔻 ._⊕_ (θ B) (F .func→ f) ≡ 𝔻 ._⊕_ (G .func→ f) (θ A)
|
||||||
|
|
||||||
NaturalTranformation : Set (ℓc ⊔ ℓc' ⊔ ℓd')
|
NaturalTransformation : Set (ℓc ⊔ ℓc' ⊔ ℓd')
|
||||||
NaturalTranformation = Σ Transformation Natural
|
NaturalTransformation = Σ Transformation Natural
|
||||||
|
|
||||||
-- NaturalTranformation : Set (ℓc ⊔ (ℓc' ⊔ ℓd'))
|
-- NaturalTranformation : Set (ℓc ⊔ (ℓc' ⊔ ℓd'))
|
||||||
-- NaturalTranformation = ∀ (θ : Transformation) {A B : ℂ .Object} → (f : ℂ .Arrow A B) → 𝔻 ._⊕_ (θ B) (F .func→ f) ≡ 𝔻 ._⊕_ (G .func→ f) (θ A)
|
-- NaturalTranformation = ∀ (θ : Transformation) {A B : ℂ .Object} → (f : ℂ .Arrow A B) → 𝔻 ._⊕_ (θ B) (F .func→ f) ≡ 𝔻 ._⊕_ (G .func→ f) (θ A)
|
||||||
|
@ -45,37 +45,38 @@ module _ {ℓc ℓc' ℓd ℓd' : Level} {ℂ : Category ℓc ℓc'} {𝔻 : Cat
|
||||||
F→ = F .func→
|
F→ = F .func→
|
||||||
open module 𝔻 = IsCategory (𝔻 .isCategory)
|
open module 𝔻 = IsCategory (𝔻 .isCategory)
|
||||||
|
|
||||||
identityNat : (F : Functor ℂ 𝔻) → NaturalTranformation F F
|
identityNat : (F : Functor ℂ 𝔻) → NaturalTransformation F F
|
||||||
identityNat F = identityTrans F , identityNatural F
|
identityNat F = identityTrans F , identityNatural F
|
||||||
|
|
||||||
module _ {a b c : Functor ℂ 𝔻} where
|
module _ {F G H : Functor ℂ 𝔻} where
|
||||||
private
|
private
|
||||||
_𝔻⊕_ = 𝔻 ._⊕_
|
_𝔻⊕_ = 𝔻 ._⊕_
|
||||||
_∘nt_ : Transformation b c → Transformation a b → Transformation a c
|
_∘nt_ : Transformation G H → Transformation F G → Transformation F H
|
||||||
(θ ∘nt η) C = θ C 𝔻⊕ η C
|
(θ ∘nt η) C = θ C 𝔻⊕ η C
|
||||||
|
|
||||||
_:⊕:_ : NaturalTranformation b c → NaturalTranformation a b → NaturalTranformation a c
|
NatComp _:⊕:_ : NaturalTransformation G H → NaturalTransformation F G → NaturalTransformation F H
|
||||||
proj₁ ((θ , _) :⊕: (η , _)) = θ ∘nt η
|
proj₁ ((θ , _) :⊕: (η , _)) = θ ∘nt η
|
||||||
proj₂ ((θ , θNat) :⊕: (η , ηNat)) {A} {B} f = begin
|
proj₂ ((θ , θNat) :⊕: (η , ηNat)) {A} {B} f = begin
|
||||||
((θ ∘nt η) B) 𝔻⊕ (a .func→ f) ≡⟨⟩
|
((θ ∘nt η) B) 𝔻⊕ (F .func→ f) ≡⟨⟩
|
||||||
(θ B 𝔻⊕ η B) 𝔻⊕ (a .func→ f) ≡⟨ sym assoc ⟩
|
(θ B 𝔻⊕ η B) 𝔻⊕ (F .func→ f) ≡⟨ sym assoc ⟩
|
||||||
θ B 𝔻⊕ (η B 𝔻⊕ (a .func→ f)) ≡⟨ cong (λ φ → θ B 𝔻⊕ φ) (ηNat f) ⟩
|
θ B 𝔻⊕ (η B 𝔻⊕ (F .func→ f)) ≡⟨ cong (λ φ → θ B 𝔻⊕ φ) (ηNat f) ⟩
|
||||||
θ B 𝔻⊕ ((b .func→ f) 𝔻⊕ η A) ≡⟨ assoc ⟩
|
θ B 𝔻⊕ ((G .func→ f) 𝔻⊕ η A) ≡⟨ assoc ⟩
|
||||||
(θ B 𝔻⊕ (b .func→ f)) 𝔻⊕ η A ≡⟨ cong (λ φ → φ 𝔻⊕ η A) (θNat f) ⟩
|
(θ B 𝔻⊕ (G .func→ f)) 𝔻⊕ η A ≡⟨ cong (λ φ → φ 𝔻⊕ η A) (θNat f) ⟩
|
||||||
(((c .func→ f) 𝔻⊕ θ A) 𝔻⊕ η A) ≡⟨ sym assoc ⟩
|
(((H .func→ f) 𝔻⊕ θ A) 𝔻⊕ η A) ≡⟨ sym assoc ⟩
|
||||||
((c .func→ f) 𝔻⊕ (θ A 𝔻⊕ η A)) ≡⟨⟩
|
((H .func→ f) 𝔻⊕ (θ A 𝔻⊕ η A)) ≡⟨⟩
|
||||||
((c .func→ f) 𝔻⊕ ((θ ∘nt η) A)) ∎
|
((H .func→ f) 𝔻⊕ ((θ ∘nt η) A)) ∎
|
||||||
where
|
where
|
||||||
open IsCategory (𝔻 .isCategory)
|
open IsCategory (𝔻 .isCategory)
|
||||||
|
NatComp = _:⊕:_
|
||||||
|
|
||||||
private
|
private
|
||||||
module _ {A B C D : Functor ℂ 𝔻} {f : NaturalTranformation A B}
|
module _ {A B C D : Functor ℂ 𝔻} {f : NaturalTransformation A B}
|
||||||
{g : NaturalTranformation B C} {h : NaturalTranformation C D} where
|
{g : NaturalTransformation B C} {h : NaturalTransformation C D} where
|
||||||
_g⊕f_ = _:⊕:_ {A} {B} {C}
|
_g⊕f_ = _:⊕:_ {A} {B} {C}
|
||||||
_h⊕g_ = _:⊕:_ {B} {C} {D}
|
_h⊕g_ = _:⊕:_ {B} {C} {D}
|
||||||
:assoc: : (_:⊕:_ {A} {C} {D} h (_:⊕:_ {A} {B} {C} g f)) ≡ (_:⊕:_ {A} {B} {D} (_:⊕:_ {B} {C} {D} h g) f)
|
:assoc: : (_:⊕:_ {A} {C} {D} h (_:⊕:_ {A} {B} {C} g f)) ≡ (_:⊕:_ {A} {B} {D} (_:⊕:_ {B} {C} {D} h g) f)
|
||||||
:assoc: = {!!}
|
:assoc: = {!!}
|
||||||
module _ {A B : Functor ℂ 𝔻} {f : NaturalTranformation A B} where
|
module _ {A B : Functor ℂ 𝔻} {f : NaturalTransformation A B} where
|
||||||
ident-r : (_:⊕:_ {A} {A} {B} f (identityNat A)) ≡ f
|
ident-r : (_:⊕:_ {A} {A} {B} f (identityNat A)) ≡ f
|
||||||
ident-r = {!!}
|
ident-r = {!!}
|
||||||
ident-l : (_:⊕:_ {A} {B} {B} (identityNat B) f) ≡ f
|
ident-l : (_:⊕:_ {A} {B} {B} (identityNat B) f) ≡ f
|
||||||
|
@ -86,7 +87,7 @@ module _ {ℓc ℓc' ℓd ℓd' : Level} {ℂ : Category ℓc ℓc'} {𝔻 : Cat
|
||||||
:ident: = ident-r , ident-l
|
:ident: = ident-r , ident-l
|
||||||
|
|
||||||
instance
|
instance
|
||||||
:isCategory: : IsCategory (Functor ℂ 𝔻) NaturalTranformation
|
:isCategory: : IsCategory (Functor ℂ 𝔻) NaturalTransformation
|
||||||
(λ {F} → identityNat F) (λ {a} {b} {c} → _:⊕:_ {a} {b} {c})
|
(λ {F} → identityNat F) (λ {a} {b} {c} → _:⊕:_ {a} {b} {c})
|
||||||
:isCategory: = record
|
:isCategory: = record
|
||||||
{ assoc = λ {A B C D} → :assoc: {A} {B} {C} {D}
|
{ assoc = λ {A B C D} → :assoc: {A} {B} {C} {D}
|
||||||
|
@ -94,10 +95,22 @@ module _ {ℓc ℓc' ℓd ℓd' : Level} {ℂ : Category ℓc ℓc'} {𝔻 : Cat
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Functor categories. Objects are functors, arrows are natural transformations.
|
-- Functor categories. Objects are functors, arrows are natural transformations.
|
||||||
Fun : Category (ℓc ⊔ (ℓc' ⊔ (ℓd ⊔ ℓd'))) (ℓc ⊔ (ℓc' ⊔ ℓd'))
|
Fun : Category (ℓc ⊔ ℓc' ⊔ ℓd ⊔ ℓd') (ℓc ⊔ ℓc' ⊔ ℓd')
|
||||||
Fun = record
|
Fun = record
|
||||||
{ Object = Functor ℂ 𝔻
|
{ Object = Functor ℂ 𝔻
|
||||||
; Arrow = NaturalTranformation
|
; Arrow = NaturalTransformation
|
||||||
; 𝟙 = λ {F} → identityNat F
|
; 𝟙 = λ {F} → identityNat F
|
||||||
; _⊕_ = λ {a b c} → _:⊕:_ {a} {b} {c}
|
; _⊕_ = λ {F G H} → _:⊕:_ {F} {G} {H}
|
||||||
|
}
|
||||||
|
|
||||||
|
module _ {ℓ ℓ' : Level} (ℂ : Category ℓ ℓ') where
|
||||||
|
open import Cat.Categories.Sets
|
||||||
|
|
||||||
|
-- Restrict the functors to Presheafs.
|
||||||
|
Presh : Category (ℓ ⊔ lsuc ℓ') (ℓ ⊔ ℓ')
|
||||||
|
Presh = record
|
||||||
|
{ Object = Presheaf ℂ
|
||||||
|
; Arrow = NaturalTransformation
|
||||||
|
; 𝟙 = λ {F} → identityNat F
|
||||||
|
; _⊕_ = λ {F G H} → NatComp {F = F} {G = G} {H = H}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue