Skip to content

Commit 047e7a8

Browse files
Merge pull request #448 from t-wissmann/cone-functors
Add functors between (co)cone categories
2 parents a797628 + 4fd67ee commit 047e7a8

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

src/Categories/Diagram/Cocone/Properties.agda

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ open import Categories.Category
88
open import Categories.Functor
99
open import Categories.Functor.Properties
1010
open import Categories.NaturalTransformation
11-
open import Categories.Diagram.Cone.Properties
11+
open import Categories.Diagram.Cone.Properties using (F-map-Coneʳ; F-map-Cone⇒ʳ; nat-map-Cone; nat-map-Cone⇒)
1212
open import Categories.Diagram.Duality
13+
open import Categories.Category.Construction.Cocones using (Cocones)
1314

1415
import Categories.Diagram.Cocone as Coc
1516
import Categories.Morphism.Reasoning as MR
@@ -45,6 +46,15 @@ module _ {F : Functor J C} (G : Functor C D) where
4546
}
4647
where open CF.Cocone⇒ f
4748

49+
mapˡ : Functor (Cocones F) (Cocones (G ∘F F))
50+
mapˡ = record
51+
{ F₀ = F-map-Coconeˡ
52+
; F₁ = F-map-Cocone⇒ˡ
53+
; identity = G.identity
54+
; homomorphism = G.homomorphism
55+
; F-resp-≈ = G.F-resp-≈
56+
}
57+
4858
module _ {F : Functor J C} (G : Functor J′ J) where
4959
private
5060
module C = Category C
@@ -61,8 +71,19 @@ module _ {F : Functor J C} (G : Functor J′ J) where
6171
F-map-Cocone⇒ʳ : {K K′} (f : CF.Cocone⇒ K K′) CFG.Cocone⇒ (F-map-Coconeʳ K) (F-map-Coconeʳ K′)
6272
F-map-Cocone⇒ʳ f = coCone⇒⇒Cocone⇒ C (F-map-Cone⇒ʳ G.op (Cocone⇒⇒coCone⇒ C f))
6373

74+
mapʳ : Functor (Cocones F) (Cocones (F ∘F G))
75+
mapʳ = record
76+
{ F₀ = F-map-Coconeʳ
77+
; F₁ = F-map-Cocone⇒ʳ
78+
; identity = C.Equiv.refl
79+
; homomorphism = C.Equiv.refl
80+
; F-resp-≈ = λ f≈g f≈g
81+
}
82+
83+
6484
module _ {F G : Functor J C} (α : NaturalTransformation F G) where
6585
private
86+
module C = Category C
6687
module α = NaturalTransformation α
6788
module CF = Coc F
6889
module CG = Coc G
@@ -72,3 +93,12 @@ module _ {F G : Functor J C} (α : NaturalTransformation F G) where
7293

7394
nat-map-Cocone⇒ : {K K′} (f : CG.Cocone⇒ K K′) CF.Cocone⇒ (nat-map-Cocone K) (nat-map-Cocone K′)
7495
nat-map-Cocone⇒ f = coCone⇒⇒Cocone⇒ C (nat-map-Cone⇒ α.op (Cocone⇒⇒coCone⇒ C f))
96+
97+
nat-map : Functor (Cocones G) (Cocones F)
98+
nat-map = record
99+
{ F₀ = nat-map-Cocone
100+
; F₁ = nat-map-Cocone⇒
101+
; identity = C.Equiv.refl
102+
; homomorphism = C.Equiv.refl
103+
; F-resp-≈ = λ f≈g f≈g
104+
}

src/Categories/Diagram/Cone/Properties.agda

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ open import Categories.Functor.Properties
1010
open import Categories.NaturalTransformation
1111
import Categories.Diagram.Cone as Con
1212
import Categories.Morphism.Reasoning as MR
13+
open import Categories.Category.Construction.Cones using (Cones)
1314

1415
private
1516
variable
@@ -42,6 +43,15 @@ module _ {F : Functor J C} (G : Functor C D) where
4243
}
4344
where open CF.Cone⇒ f
4445

46+
mapˡ : Functor (Cones F) (Cones (G ∘F F))
47+
mapˡ = record
48+
{ F₀ = F-map-Coneˡ
49+
; F₁ = F-map-Cone⇒ˡ
50+
; identity = G.identity
51+
; homomorphism = G.homomorphism
52+
; F-resp-≈ = G.F-resp-≈
53+
}
54+
4555
module _ {F : Functor J C} (G : Functor J′ J) where
4656
private
4757
module C = Category C
@@ -68,6 +78,15 @@ module _ {F : Functor J C} (G : Functor J′ J) where
6878
}
6979
where open CF.Cone⇒ f
7080

81+
mapʳ : Functor (Cones F) (Cones (F ∘F G))
82+
mapʳ = record
83+
{ F₀ = F-map-Coneʳ
84+
; F₁ = F-map-Cone⇒ʳ
85+
; identity = C.Equiv.refl
86+
; homomorphism = C.Equiv.refl
87+
; F-resp-≈ = λ f≈g f≈g
88+
}
89+
7190
module _ {F G : Functor J C} (α : NaturalTransformation F G) where
7291
private
7392
module C = Category C
@@ -99,3 +118,12 @@ module _ {F G : Functor J C} (α : NaturalTransformation F G) where
99118
; commute = pullʳ commute
100119
}
101120
where open CF.Cone⇒ f
121+
122+
nat-map : Functor (Cones F) (Cones G)
123+
nat-map = record
124+
{ F₀ = nat-map-Cone
125+
; F₁ = nat-map-Cone⇒
126+
; identity = C.Equiv.refl
127+
; homomorphism = C.Equiv.refl
128+
; F-resp-≈ = λ f≈g f≈g
129+
}

0 commit comments

Comments
 (0)