Skip to content

Commit

Permalink
Agda-ary product category. (#739)
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Nuyts <andreas.nuyts@vub.ac.be>
  • Loading branch information
anuyts and Andreas Nuyts authored Apr 4, 2022
1 parent eee5c9c commit 2315a8c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Cubical/Categories/Constructions/Product.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- Product of type-many categories
{-# OPTIONS --safe #-}

module Cubical.Categories.Constructions.Product where

open import Cubical.Categories.Category.Base
open import Cubical.Categories.Functor.Base
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Prelude

private
variable
ℓA ℓC ℓC' : Level

open Category

ΠC : (A : Type ℓA) (catC : A Category ℓC ℓC') Category (ℓ-max ℓA ℓC) (ℓ-max ℓA ℓC')
ob (ΠC A catC) = (a : A) ob (catC a)
Hom[_,_] (ΠC A catC) c c' = (a : A) catC a [ c a , c' a ]
id (ΠC A catC) a = id (catC a)
_⋆_ (ΠC A catC) g f a = g a ⋆⟨ catC a ⟩ f a
⋆IdL (ΠC A catC) f = funExt λ a ⋆IdL (catC a) (f a)
⋆IdR (ΠC A catC) f = funExt λ a ⋆IdR (catC a) (f a)
⋆Assoc (ΠC A catC) h g f = funExt λ a ⋆Assoc (catC a) (h a) (g a) (f a)
isSetHom (ΠC A catC) = isSetΠ (λ a isSetHom (catC a))

0 comments on commit 2315a8c

Please sign in to comment.