Readd yoneda embedding

This commit is contained in:
Frederik Hanghøj Iversen 2018-02-23 10:53:11 +01:00
parent 9a4d79fa4e
commit bc2129b8fc
2 changed files with 64 additions and 72 deletions

View file

@ -35,5 +35,6 @@ module _ { '} ( : Category ') {{hasProducts : HasProducts }}
transpose A f = proj₁ (isExponential A f) transpose A f = proj₁ (isExponential A f)
record HasExponentials { ' : Level} ( : Category ') {{_ : HasProducts }} : Set ( ') where record HasExponentials { ' : Level} ( : Category ') {{_ : HasProducts }} : Set ( ') where
open Exponential public
field field
exponent : (A B : Object ) Exponential A B exponent : (A B : Object ) Exponential A B

View file

@ -41,82 +41,73 @@ module _ { ' : Level} { : Category '} { A B : Category.Object
iso-is-epi-mono : Isomorphism f Epimorphism {X = X} f × Monomorphism {X = X} f iso-is-epi-mono : Isomorphism f Epimorphism {X = X} f × Monomorphism {X = X} f
iso-is-epi-mono iso = iso-is-epi iso , iso-is-mono iso iso-is-epi-mono iso = iso-is-epi iso , iso-is-mono iso
{- -- TODO: We want to avoid defining the yoneda embedding going through the
epi-mono-is-not-iso : { '} ¬ (( : Category {} {'}) {A B X : Object } (f : Arrow A B ) Epimorphism { = } {X = X} f Monomorphism { = } {X = X} f Isomorphism { = } f) -- category of categories (since it doesn't exist).
epi-mono-is-not-iso f = open import Cat.Categories.Cat using (RawCat)
let k = f {!!} {!!} {!!} {!!}
in {!!}
-}
open import Cat.Category module _ { : Level} { : Category } (unprovable : IsCategory (RawCat )) where
open Category open import Cat.Categories.Fun
open import Cat.Categories.Sets
module Cat = Cat.Categories.Cat
open import Cat.Category.Exponential
open Functor open Functor
𝓢 = Sets
private
Cat : Category _ _
Cat = record { raw = RawCat ; isCategory = unprovable}
prshf = presheaf { = }
module = Category
-- module _ { : Level} { : Category } _⇑_ : (A B : Category.Object Cat) Category.Object Cat
-- {isSObj : isSet ( .Object)} A B = (exponent A B) .obj
-- {isz2 : ∀ {} → {A B : Set } → isSet (Sets [ A , B ])} where where
-- -- open import Cat.Categories.Cat using (Cat) open HasExponentials (Cat.hasExponentials unprovable)
-- open import Cat.Categories.Fun
-- open import Cat.Categories.Sets
-- -- module Cat = Cat.Categories.Cat
-- open import Cat.Category.Exponential
-- private
-- Cat = Cat
-- prshf = presheaf { = }
-- module = IsCategory ( .isCategory)
-- -- Exp : Set (lsuc (lsuc )) module _ {A B : .Object} (f : [ A , B ]) where
-- -- Exp = Exponential (Cat (lsuc ) ) :func→: : NaturalTransformation (prshf A) (prshf B)
-- -- Sets (Opposite ) :func→: = (λ C x [ f x ]) , λ f₁ funExt λ _ .assoc
-- _⇑_ : (A B : Cat .Object) → Cat .Object module _ {c : Category.Object } where
-- A ⇑ B = (exponent A B) .obj eqTrans : (λ _ Transformation (prshf c) (prshf c))
-- where [ (λ _ x [ .𝟙 x ]) identityTrans (prshf c) ]
-- open HasExponentials (Cat.hasExponentials ) eqTrans = funExt λ x funExt λ x .ident .proj₂
-- module _ {A B : .Object} (f : .Arrow A B) where eqNat : (λ i Natural (prshf c) (prshf c) (eqTrans i))
-- :func→: : NaturalTransformation (prshf A) (prshf B) [(λ _ funExt (λ _ .assoc)) identityNatural (prshf c)]
-- :func→: = (λ C x [ f x ]) , λ f₁ funExt λ _ .assoc eqNat = λ i {A} {B} f
let
-- module _ {c : .Object} where open Category 𝓢
-- eqTrans : (λ _ → Transformation (prshf c) (prshf c)) lemm : (𝓢 [ eqTrans i B func→ (prshf c) f ])
-- [ (λ _ x → [ .𝟙 ∘ x ]) ≡ identityTrans (prshf c) ] (𝓢 [ func→ (prshf c) f eqTrans i A ])
-- eqTrans = funExt λ x → funExt λ x → .ident .proj₂ lemm = {!!}
lem : (λ _ 𝓢 [ Functor.func* (prshf c) A , func* (prshf c) B ])
-- eqNat : (λ i → Natural (prshf c) (prshf c) (eqTrans i)) [ 𝓢 [ eqTrans i B func→ (prshf c) f ]
-- [(λ _ → funExt (λ _ → .assoc)) ≡ identityNatural (prshf c)] 𝓢 [ func→ (prshf c) f eqTrans i A ] ]
-- eqNat = λ i {A} {B} f → lem
-- let = arrowIsSet _ _ lemm _ i
-- open IsCategory (Sets .isCategory) -- (Sets [ eqTrans i B ∘ prshf c .func→ f ])
-- lemm : (Sets [ eqTrans i B ∘ prshf c .func→ f ]) ≡
-- (Sets [ prshf c .func→ f ∘ eqTrans i A ]) -- (Sets [ prshf c .func→ f ∘ eqTrans i A ])
-- lemm = {!!} -- lemm
-- lem : (λ _ → Sets [ Functor.func* (prshf c) A , prshf c .func* B ]) -- _ i
-- [ Sets [ eqTrans i B ∘ prshf c .func→ f ] in
-- ≡ Sets [ prshf c .func→ f ∘ eqTrans i A ] ] lem
-- lem -- eqNat = λ {A} {B} i [B,A] i' [A,c] →
-- = isz2 _ _ lemm _ i -- let
-- -- (Sets [ eqTrans i B ∘ prshf c .func→ f ]) -- k : [ {!!} , {!!} ]
-- -- (Sets [ prshf c .func→ f ∘ eqTrans i A ]) -- k = [A,c]
-- -- lemm -- in {! [ ? ∘ ? ]!}
-- -- _ i
-- in
-- lem
-- -- eqNat = λ {A} {B} i [B,A] i' [A,c] →
-- -- let
-- -- k : [ {!!} , {!!} ]
-- -- k = [A,c]
-- -- in {! [ ? ∘ ? ]!}
-- :ident: : (:func→: ( .𝟙 {c})) (Fun .𝟙 {o = prshf c}) :ident: : (:func→: (.𝟙 {c})) (Category.𝟙 Fun {A = prshf c})
-- :ident: = Σ≡ eqTrans eqNat :ident: = Σ≡ eqTrans eqNat
-- yoneda : Functor (Fun { = Opposite } {𝔻 = Sets {}}) yoneda : Functor (Fun { = Opposite } {𝔻 = 𝓢})
-- yoneda = record yoneda = record
-- { func* = prshf { raw = record
-- ; func→ = :func→: { func* = prshf
-- ; isFunctor = record ; func→ = :func→:
-- { ident = :ident: }
-- ; distrib = {!!} ; isFunctor = record
-- } { ident = :ident:
-- } ; distrib = {!!}
}
}