File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed
Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ {-# OPTIONS --without-K --safe #-}
2+
3+ open import Categories.Category
4+
5+ module Categories.Object.Coproduct.Indexed {o ℓ e} (C : Category o ℓ e) where
6+
7+ open import Level
8+
9+ open import Categories.Morphism.Reasoning.Core C
10+
11+ open Category C
12+ open Equiv
13+
14+ record IndexedCoproductOf {i} {I : Set i} (P : I → Obj) : Set (i ⊔ o ⊔ e ⊔ ℓ) where
15+ field
16+ X : Obj
17+
18+ ι : ∀ i → P i ⇒ X
19+ [_] : ∀ {Y} → (∀ i → P i ⇒ Y) → X ⇒ Y
20+
21+ commute : ∀ {Y} (f : ∀ i → P i ⇒ Y) → ∀ i → [ f ] ∘ ι i ≈ f i
22+ unique : ∀ {Y} (h : X ⇒ Y) (f : ∀ i → P i ⇒ Y) → (∀ i → h ∘ ι i ≈ f i) → [ f ] ≈ h
23+
24+ η : ∀ {Y} (h : X ⇒ Y) → [ (λ i → h ∘ ι i) ] ≈ h
25+ η h = unique _ _ λ _ → refl
26+
27+ ∘[] : ∀ {Y Z} (f : ∀ i → P i ⇒ Y) (g : Y ⇒ Z) → g ∘ [ f ] ≈ [ (λ i → g ∘ f i) ]
28+ ∘[] f g = sym (unique _ _ λ i → pullʳ (commute _ _))
29+
30+ []-cong : ∀ {Y} (f g : ∀ i → P i ⇒ Y) → (∀ i → f i ≈ g i) → [ f ] ≈ [ g ]
31+ []-cong f g eq = unique _ _ λ i → trans (commute _ _) (sym (eq i))
32+
33+ unique′ : ∀ {Y} (h h′ : X ⇒ Y) → (∀ i → h′ ∘ ι i ≈ h ∘ ι i) → h′ ≈ h
34+ unique′ h h′ f = trans (sym (unique _ _ f)) (η _)
35+
36+ AllCoproductsOf : ∀ i → Set (o ⊔ ℓ ⊔ e ⊔ suc i)
37+ AllCoproductsOf i = ∀ {I : Set i} (P : I → Obj) → IndexedCoproductOf P
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ open import Categories.Object.Terminal op
1515open import Categories.Object.Initial C
1616open import Categories.Object.Product op
1717open import Categories.Object.Coproduct C
18+ open import Categories.Object.Product.Indexed op
19+ open import Categories.Object.Coproduct.Indexed C
1820
1921open import Categories.Object.Zero
2022
@@ -80,6 +82,26 @@ coProduct⇒Coproduct A×B = record
8082 where
8183 module A×B = Product A×B
8284
85+ IndexedCoproductOf⇒coIndexedProductOf : ∀ {i} {I : Set i} {P : I → Obj} → IndexedCoproductOf P → IndexedProductOf P
86+ IndexedCoproductOf⇒coIndexedProductOf ΣP = record
87+ { X = ΣP.X
88+ ; π = ΣP.ι
89+ ; ⟨_⟩ = ΣP.[_]
90+ ; commute = ΣP.commute
91+ ; unique = ΣP.unique
92+ }
93+ where module ΣP = IndexedCoproductOf ΣP
94+
95+ coIndexedProductOf⇒IndexedCoproductOf : ∀ {i} {I : Set i} {P : I → Obj} → IndexedProductOf P → IndexedCoproductOf P
96+ coIndexedProductOf⇒IndexedCoproductOf ΠP = record
97+ { X = ΠP.X
98+ ; ι = ΠP.π
99+ ; [_] = ΠP.⟨_⟩
100+ ; commute = ΠP.commute
101+ ; unique = ΠP.unique
102+ }
103+ where module ΠP = IndexedProductOf ΠP
104+
83105-- Zero objects are autodual
84106IsZero⇒coIsZero : IsZero C Z → IsZero op Z
85107IsZero⇒coIsZero is-zero = record
You can’t perform that action at this time.
0 commit comments