Dual.agda 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. module Dual where
  2. open import Prelude using (flip)
  3. open import Logic.Equivalence
  4. open import Category
  5. _op : Cat -> Cat
  6. ℂ@(cat _ _ _ _ _ _ _ _ _) op = cat Obj
  7. (\A B -> B ─→ A)
  8. id
  9. (\{_}{_}{_} -> flip _∘_)
  10. (\{_}{_} -> Eq)
  11. (\{_}{_}{_}{_}{_}{_}{_} -> flip cong)
  12. (\{_}{_}{_} -> idR)
  13. (\{_}{_}{_} -> idL)
  14. (\{_}{_}{_}{_}{_}{_}{_} -> sym assoc)
  15. where open module C = Cat ℂ
  16. {-
  17. open Poly-Cat
  18. dualObj : {ℂ : Cat} -> Obj ℂ -> Obj (ℂ op)
  19. dualObj {cat _ _ _ _ _ _ _ _ _}(obj A) = obj A
  20. undualObj : {ℂ : Cat} -> Obj (ℂ op) -> Obj ℂ
  21. undualObj {cat _ _ _ _ _ _ _ _ _}(obj A) = obj A
  22. dualdualArr : {ℂ : Cat}{A B : Obj ℂ} -> A ─→ B -> dualObj B ─→ dualObj A
  23. dualdualArr {cat _ _ _ _ _ _ _ _ _}{A = obj _}{B = obj _}(arr f) = arr f
  24. dualundualArr : {ℂ : Cat}{A : Obj ℂ}{B : Obj (ℂ op)} ->
  25. A ─→ undualObj B -> B ─→ dualObj A
  26. dualundualArr {cat _ _ _ _ _ _ _ _ _}{A = obj _}{B = obj _}(arr f) = arr f
  27. -}