2018-01-31 14:15:00 +00:00
|
|
|
|
{-# OPTIONS --allow-unsolved-metas #-}
|
|
|
|
|
module Cat.Categories.Fam where
|
|
|
|
|
|
2018-03-21 13:47:01 +00:00
|
|
|
|
open import Cat.Prelude
|
2018-01-31 14:15:00 +00:00
|
|
|
|
import Function
|
|
|
|
|
|
|
|
|
|
open import Cat.Category
|
|
|
|
|
|
2018-02-02 13:47:33 +00:00
|
|
|
|
module _ (ℓa ℓb : Level) where
|
2018-01-31 14:15:00 +00:00
|
|
|
|
private
|
2018-03-21 16:52:32 +00:00
|
|
|
|
Object = Σ[ hA ∈ hSet ℓa ] (proj₁ hA → hSet ℓb)
|
2018-02-23 12:36:54 +00:00
|
|
|
|
Arr : Object → Object → Set (ℓa ⊔ ℓb)
|
|
|
|
|
Arr ((A , _) , B) ((A' , _) , B') = Σ[ f ∈ (A → A') ] ({x : A} → proj₁ (B x) → proj₁ (B' (f x)))
|
2018-04-03 09:36:09 +00:00
|
|
|
|
identity : {A : Object} → Arr A A
|
|
|
|
|
proj₁ identity = λ x → x
|
|
|
|
|
proj₂ identity = λ b → b
|
2018-02-23 12:36:54 +00:00
|
|
|
|
_∘_ : {a b c : Object} → Arr b c → Arr a b → Arr a c
|
2018-01-31 14:15:00 +00:00
|
|
|
|
(g , g') ∘ (f , f') = g Function.∘ f , g' Function.∘ f'
|
2018-02-05 10:43:38 +00:00
|
|
|
|
|
|
|
|
|
RawFam : RawCategory (lsuc (ℓa ⊔ ℓb)) (ℓa ⊔ ℓb)
|
|
|
|
|
RawFam = record
|
2018-02-23 12:36:54 +00:00
|
|
|
|
{ Object = Object
|
2018-02-05 10:43:38 +00:00
|
|
|
|
; Arrow = Arr
|
2018-04-03 09:36:09 +00:00
|
|
|
|
; identity = λ { {A} → identity {A = A}}
|
2018-02-05 10:43:38 +00:00
|
|
|
|
; _∘_ = λ {a b c} → _∘_ {a} {b} {c}
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-03 09:36:09 +00:00
|
|
|
|
open RawCategory RawFam hiding (Object ; identity)
|
2018-02-23 12:36:54 +00:00
|
|
|
|
|
|
|
|
|
isAssociative : IsAssociative
|
|
|
|
|
isAssociative = Σ≡ refl refl
|
|
|
|
|
|
2018-04-03 09:36:09 +00:00
|
|
|
|
isIdentity : IsIdentity λ { {A} → identity {A} }
|
2018-02-23 12:36:54 +00:00
|
|
|
|
isIdentity = (Σ≡ refl refl) , Σ≡ refl refl
|
|
|
|
|
|
2018-02-23 12:59:35 +00:00
|
|
|
|
open import Cubical.NType.Properties
|
|
|
|
|
open import Cubical.Sigma
|
2018-01-31 14:15:00 +00:00
|
|
|
|
instance
|
2018-02-05 10:43:38 +00:00
|
|
|
|
isCategory : IsCategory RawFam
|
2018-01-31 14:15:00 +00:00
|
|
|
|
isCategory = record
|
2018-02-23 12:36:54 +00:00
|
|
|
|
{ isAssociative = λ {A} {B} {C} {D} {f} {g} {h} → isAssociative {A} {B} {C} {D} {f} {g} {h}
|
2018-02-23 11:49:41 +00:00
|
|
|
|
; isIdentity = λ {A} {B} {f} → isIdentity {A} {B} {f = f}
|
2018-02-23 12:59:35 +00:00
|
|
|
|
; arrowsAreSets = λ {
|
|
|
|
|
{((A , hA) , famA)}
|
|
|
|
|
{((B , hB) , famB)}
|
|
|
|
|
→ setSig
|
|
|
|
|
{sA = setPi λ _ → hB}
|
|
|
|
|
{sB = λ f →
|
|
|
|
|
let
|
|
|
|
|
helpr : isSet ((a : A) → proj₁ (famA a) → proj₁ (famB (f a)))
|
|
|
|
|
helpr = setPi λ a → setPi λ _ → proj₂ (famB (f a))
|
|
|
|
|
-- It's almost like above, but where the first argument is
|
|
|
|
|
-- implicit.
|
|
|
|
|
res : isSet ({a : A} → proj₁ (famA a) → proj₁ (famB (f a)))
|
|
|
|
|
res = {!!}
|
|
|
|
|
in res
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-02-05 13:47:15 +00:00
|
|
|
|
; univalent = {!!}
|
2018-01-31 14:15:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Fam : Category (lsuc (ℓa ⊔ ℓb)) (ℓa ⊔ ℓb)
|
2018-02-05 13:47:15 +00:00
|
|
|
|
Category.raw Fam = RawFam
|