changeset 780:b44c1c6ce646

CCC in Hom form
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 08 Oct 2018 16:48:27 +0900
parents 6b4bd02efd80
children 340708e8d54f
files CCC.agda
diffstat 1 files changed, 35 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/CCC.agda	Sat Oct 06 13:42:27 2018 +0900
+++ b/CCC.agda	Mon Oct 08 16:48:27 2018 +0900
@@ -4,7 +4,9 @@
 
 open import HomReasoning
 open import cat-utility
-open import Data.Product renaming (_×_ to _*_)
+open import Data.Product renaming (_×_ to _∧_)
+open import Category.Constructions.Product
+open  import  Relation.Binary.PropositionalEquality
 
 open Functor
 
@@ -12,23 +14,46 @@
 --   ccc-2 : Hom A c (a × b) ≅ (Hom A c a ) × ( Hom A c b )
 --   ccc-3 : Hom A a (c ^ b) ≅ Hom A (a × b) c
 
-record _≅_ {c₁ c₂ ℓ ℓ' : Level} {A : Category c₁ c₂ ℓ} {a b : Obj A} (f : Hom A a b) (S : Set ℓ') :  Set ( c₁  ⊔  c₂ ⊔ ℓ ⊔ ℓ' ) where
+record IsoS {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') (a b : Obj A) ( a' b' : Obj B )
+          :  Set ( c₁  ⊔  c₂ ⊔ ℓ ⊔  c₁'  ⊔  c₂' ⊔ ℓ' ) where
       field
-           ≅→ :  {!!}
-           ≅← :  {!!}
-           iso→  :  {!!}
-           iso←  :  {!!}
+           ≅→ :  Hom A a b   → Hom B a' b'
+           ≅← :  Hom B a' b' → Hom A a b
+           iso→  : {f : Hom B a' b' }  → B [ ≅→ ( ≅← f) ≈ f ]
+           iso←  : {f : Hom A a b }    → A [ ≅← ( ≅→ f) ≈ f ]
 
 data One {c : Level} : Set c where
   OneObj : One   -- () in Haskell ( or any one object set )
 
+OneCat : Category Level.zero Level.zero Level.zero
+OneCat = record {
+    Obj  = One ;
+    Hom = λ a b →   One  ;
+    _o_ =  λ{a} {b} {c} x y → OneObj ;
+    _≈_ =  λ x y → x ≡ y ;
+    Id  =  λ{a} → OneObj ;
+    isCategory  = record {
+            isEquivalence =  record {refl = refl ; trans = trans ; sym = sym } ;
+            identityL  = λ{a b f} → lemma {a} {b} {f} ;
+            identityR  = λ{a b f} → lemma {a} {b} {f} ;
+            o-resp-≈  = λ{a b c f g h i} _ _ →  refl ;
+            associative  = λ{a b c d f g h } → refl 
+       }
+   }  where
+         lemma : {a b : One {Level.zero}} → { f : One {Level.zero}} →  OneObj ≡ f
+         lemma {a} {b} {f} with f
+         ... | OneObj = refl
+
 
 record isCCC {c₁ c₂ ℓ : Level} (A : Category c₁ c₂ ℓ) (one : Obj A)
-          ( _×_ : Obj A → Obj A → Obj A  ) ( _^_ : Obj A → Obj A → Obj A  ) :  Set ( c₁  ⊔  c₂ ⊔ ℓ ) where
+          ( _*_ : Obj A → Obj A → Obj A  ) ( _^_ : Obj A → Obj A → Obj A  ) :  Set ( c₁  ⊔  c₂ ⊔ ℓ ) where
      field
-       ccc-1 : {a : Obj A}     → Hom A a one  ≅ One {ℓ}
-       ccc-2 : {a b c : Obj A} → Hom A c ( a × b ) ≅ ( Hom A c a ) * ( Hom A c b )
-       ccc-3 : {a b c : Obj A} → Hom A a ( c ^ b ) ≅ Hom A ( a × b ) c
+       ccc-1 : {a : Obj A}     →  --   Hom A a one ≅ {*}
+                          IsoS A OneCat  a one OneObj OneObj  
+       ccc-2 : {a b c : Obj A} →  --  Hom A c ( a * b ) ≅ ( Hom A c a ) * ( Hom A c b )
+                          IsoS A (A × A) c (a * b) (c , c) (a , b)
+       ccc-3 : {a b c : Obj A} →  -- Hom A a ( c ^ b ) ≅ Hom A ( a * b ) c
+                          IsoS A A  a (c ^ b) (a * b) c