cat/src/Cat/Categories/CwF.agda

55 lines
1.7 KiB
Agda
Raw Normal View History

2018-02-25 14:24:44 +00:00
module Cat.Categories.CwF where
2018-03-21 13:56:43 +00:00
open import Cat.Prelude
open import Cat.Category
2018-02-05 13:59:53 +00:00
open import Cat.Category.Functor
open import Cat.Categories.Fam
module _ {a b : Level} where
record CwF : Set (lsuc (a b)) where
-- "A category with families consists of"
field
-- "A base category"
: Category a b
2018-03-21 13:56:43 +00:00
module = Category
-- It's objects are called contexts
2018-03-21 13:56:43 +00:00
Contexts = .Object
-- It's arrows are called substitutions
2018-03-21 13:56:43 +00:00
Substitutions = .Arrow
field
-- A functor T
2018-02-25 14:23:33 +00:00
T : Functor (opposite ) (Fam a b)
-- Empty context
2018-03-21 13:56:43 +00:00
[] : .Terminal
private
module T = Functor T
2018-03-21 13:56:43 +00:00
Type : (Γ : .Object) Set a
Type Γ = proj₁ (proj₁ (T.omap Γ))
2018-03-21 13:56:43 +00:00
module _ {Γ : .Object} {A : Type Γ} where
2018-02-23 13:13:55 +00:00
-- module _ {A B : Object } {γ : [ A , B ]} where
-- k : Σ (proj₁ (omap T B) → proj₁ (omap T A))
2018-02-23 13:13:55 +00:00
-- (λ f →
-- {x : proj₁ (omap T B)} →
-- proj₂ (omap T B) x → proj₂ (omap T A) (f x))
-- k = T.fmap γ
-- k₁ : proj₁ (omap T B) → proj₁ (omap T A)
2018-02-23 13:13:55 +00:00
-- k₁ = proj₁ k
-- k₂ : ({x : proj₁ (omap T B)} →
-- proj₂ (omap T B) x → proj₂ (omap T A) (k₁ x))
2018-02-23 13:13:55 +00:00
-- k₂ = proj₂ k
record ContextComprehension : Set (a b) where
field
2018-03-21 13:56:43 +00:00
Γ&A : .Object
proj1 : [ Γ&A , Γ ]
-- proj2 : ????
-- if γ : [ A , B ]
-- then T .fmap γ (written T[γ]) interpret substitutions in types and terms respectively.
-- field
-- ump : {Δ : .Object} → (γ : [ Δ , Γ ])
-- → (a : {!!}) → {!!}