annotate src/Polynominal.agda @ 975:f8fba4f1dcfa

char-m=⊤
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 01 Mar 2021 17:01:00 +0900
parents 9746e93a8c31
children 5dcbf2b9194e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 open import Category
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 open import CCC
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 open import Level
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 open import HomReasoning
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 open import cat-utility
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
7 module Polynominal { c₁ c₂ ℓ : Level} ( A : Category c₁ c₂ ℓ ) ( C : CCC A ) where
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
9 module coKleisli { c₁ c₂ ℓ : Level} { A : Category c₁ c₂ ℓ } { S : Functor A A } (SM : coMonad A S) where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
11 open coMonad
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
13 open Functor
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
14 open NTrans
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
16 --
971
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 970
diff changeset
17 -- Hom in Kleisli Category
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
18 --
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
20 record SHom (a : Obj A) (b : Obj A)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
21 : Set c₂ where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
22 field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
23 SMap : Hom A ( FObj S a ) b
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
25 open SHom
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
27 S-id : (a : Obj A) → SHom a a
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
28 S-id a = record { SMap = TMap (ε SM) a }
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
30 open import Relation.Binary
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
32 _⋍_ : { a : Obj A } { b : Obj A } (f g : SHom a b ) → Set ℓ
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
33 _⋍_ {a} {b} f g = A [ SMap f ≈ SMap g ]
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
35 _*_ : { a b c : Obj A } → ( SHom b c) → ( SHom a b) → SHom a c
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
36 _*_ {a} {b} {c} g f = record { SMap = coJoin SM {a} {b} {c} (SMap g) (SMap f) }
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
38 isSCat : IsCategory ( Obj A ) SHom _⋍_ _*_ (λ {a} → S-id a)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
39 isSCat = record { isEquivalence = isEquivalence
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
40 ; identityL = SidL
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
41 ; identityR = SidR
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
42 ; o-resp-≈ = So-resp
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
43 ; associative = Sassoc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
44 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
45 where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
46 open ≈-Reasoning A
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
47 isEquivalence : { a b : Obj A } → IsEquivalence {_} {_} {SHom a b} _⋍_
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
48 isEquivalence {C} {D} = record { refl = refl-hom ; sym = sym ; trans = trans-hom }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
49 SidL : {a b : Obj A} → {f : SHom a b} → (S-id _ * f) ⋍ f
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
50 SidL {a} {b} {f} = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
51 SMap (S-id _ * f) ≈⟨⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
52 (TMap (ε SM) b o (FMap S (SMap f))) o TMap (δ SM) a ≈↑⟨ car (nat (ε SM)) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
53 (SMap f o TMap (ε SM) (FObj S a)) o TMap (δ SM) a ≈↑⟨ assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
54 SMap f o TMap (ε SM) (FObj S a) o TMap (δ SM) a ≈⟨ cdr (IsCoMonad.unity1 (isCoMonad SM)) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
55 SMap f o id1 A _ ≈⟨ idR ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
56 SMap f ∎
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
57 SidR : {C D : Obj A} → {f : SHom C D} → (f * S-id _ ) ⋍ f
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
58 SidR {a} {b} {f} = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
59 SMap (f * S-id a) ≈⟨⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
60 (SMap f o FMap S (TMap (ε SM) a)) o TMap (δ SM) a ≈↑⟨ assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
61 SMap f o (FMap S (TMap (ε SM) a) o TMap (δ SM) a) ≈⟨ cdr (IsCoMonad.unity2 (isCoMonad SM)) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
62 SMap f o id1 A _ ≈⟨ idR ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
63 SMap f ∎
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
64 So-resp : {a b c : Obj A} → {f g : SHom a b } → {h i : SHom b c } →
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
65 f ⋍ g → h ⋍ i → (h * f) ⋍ (i * g)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
66 So-resp {a} {b} {c} {f} {g} {h} {i} eq-fg eq-hi = resp refl-hom (resp (fcong S eq-fg ) eq-hi )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
67 Sassoc : {a b c d : Obj A} → {f : SHom c d } → {g : SHom b c } → {h : SHom a b } →
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
68 (f * (g * h)) ⋍ ((f * g) * h)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
69 Sassoc {a} {b} {c} {d} {f} {g} {h} = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
70 SMap (f * (g * h)) ≈⟨ car (cdr (distr S)) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
71 (SMap f o ( FMap S (SMap g o FMap S (SMap h)) o FMap S (TMap (δ SM) a) )) o TMap (δ SM) a ≈⟨ car assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
72 ((SMap f o FMap S (SMap g o FMap S (SMap h))) o FMap S (TMap (δ SM) a) ) o TMap (δ SM) a ≈↑⟨ assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
73 (SMap f o FMap S (SMap g o FMap S (SMap h))) o (FMap S (TMap (δ SM) a) o TMap (δ SM) a ) ≈↑⟨ cdr (IsCoMonad.assoc (isCoMonad SM)) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
74 (SMap f o (FMap S (SMap g o FMap S (SMap h)))) o ( TMap (δ SM) (FObj S a) o TMap (δ SM) a ) ≈⟨ assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
75 ((SMap f o (FMap S (SMap g o FMap S (SMap h)))) o TMap (δ SM) (FObj S a) ) o TMap (δ SM) a ≈⟨ car (car (cdr (distr S))) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
76 ((SMap f o (FMap S (SMap g) o FMap S (FMap S (SMap h)))) o TMap (δ SM) (FObj S a) ) o TMap (δ SM) a ≈↑⟨ car assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
77 (SMap f o ((FMap S (SMap g) o FMap S (FMap S (SMap h))) o TMap (δ SM) (FObj S a) )) o TMap (δ SM) a ≈↑⟨ assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
78 SMap f o (((FMap S (SMap g) o FMap S (FMap S (SMap h))) o TMap (δ SM) (FObj S a) ) o TMap (δ SM) a) ≈↑⟨ cdr (car assoc ) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
79 SMap f o ((FMap S (SMap g) o (FMap S (FMap S (SMap h)) o TMap (δ SM) (FObj S a) )) o TMap (δ SM) a) ≈⟨ cdr (car (cdr (nat (δ SM)))) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
80 SMap f o ((FMap S (SMap g) o ( TMap (δ SM) b o FMap S (SMap h))) o TMap (δ SM) a) ≈⟨ assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
81 (SMap f o (FMap S (SMap g) o ( TMap (δ SM) b o FMap S (SMap h)))) o TMap (δ SM) a ≈⟨ car (cdr assoc) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
82 (SMap f o ((FMap S (SMap g) o TMap (δ SM) b ) o FMap S (SMap h))) o TMap (δ SM) a ≈⟨ car assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
83 ((SMap f o (FMap S (SMap g) o TMap (δ SM) b )) o FMap S (SMap h)) o TMap (δ SM) a ≈⟨ car (car assoc) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
84 (((SMap f o FMap S (SMap g)) o TMap (δ SM) b ) o FMap S (SMap h)) o TMap (δ SM) a ≈⟨⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
85 SMap ((f * g) * h) ∎
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
87 SCat : Category c₁ c₂ ℓ
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
88 SCat = record { Obj = Obj A ; Hom = SHom ; _o_ = _*_ ; _≈_ = _⋍_ ; Id = λ {a} → S-id a ; isCategory = isSCat }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
89
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
90 open CCC.CCC C
970
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
91 open coMonad
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
92 open Functor
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
93 open NTrans
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
94 open import Category.Cat
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
95
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
96 SA : (a : Obj A) → Functor A A
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
97 SA a = record {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
98 FObj = λ x → a ∧ x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
99 ; FMap = λ f → < π , A [ f o π' ] >
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
100 ; isFunctor = record {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
101 identity = sa-id
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
102 ; ≈-cong = λ eq → IsCCC.π-cong isCCC refl-hom (resp refl-hom eq )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
103 ; distr = sa-distr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
104 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
105 } where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
106 open ≈-Reasoning A
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
107 sa-id : {b : Obj A} → < π , ( id1 A b o π' ) > ≈ id1 A (a ∧ b )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
108 sa-id {b} = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
109 < π , ( id1 A b o π' ) > ≈⟨ IsCCC.π-cong isCCC (sym idR) (trans-hom idL (sym idR) ) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
110 < ( π o id1 A _ ) , ( π' o id1 A _ ) > ≈⟨ IsCCC.e3c isCCC ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
111 id1 A (a ∧ b ) ∎
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
112 sa-distr : {x b c : Obj A} {f : Hom A x b} {g : Hom A b c} →
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
113 < π , (( g o f ) o π') > ≈ < π , ( g o π' ) > o < π , (f o π') >
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
114 sa-distr {x} {b} {c} {f} {g} = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
115 < π , (( g o f ) o π') > ≈↑⟨ IsCCC.π-cong isCCC (IsCCC.e3a isCCC) ( begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
116 ( g o π' ) o < π , (f o π') > ≈↑⟨ assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
117 g o ( π' o < π , (f o π') > ) ≈⟨ cdr (IsCCC.e3b isCCC) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
118 g o ( f o π') ≈⟨ assoc ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
119 ( g o f ) o π' ∎ ) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
120 < (π o < π , (f o π') >) , ( ( g o π' ) o < π , (f o π') >) > ≈↑⟨ IsCCC.distr-π isCCC ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
121 < π , ( g o π' ) > o < π , (f o π') > ∎
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
122
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
123 SM : (a : Obj A) → coMonad A (SA a)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
124 SM a = record {
970
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
125 δ = record { TMap = λ x → < π , id1 A _ > ; isNTrans = record { commute = δ-comm} }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
126 ; ε = record { TMap = λ x → π' ; isNTrans = record { commute = ε-comm } }
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
127 ; isCoMonad = record {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
128 unity1 = IsCCC.e3b isCCC
970
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
129 ; unity2 = unity2
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
130 ; assoc = assoc2
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
131 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
132 } where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
133 open ≈-Reasoning A
970
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
134 δ-comm : {a₁ : Obj A} {b : Obj A} {f : Hom A a₁ b} →
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
135 FMap (_○_ (SA a) (SA a)) f o < π , id1 A _ > ≈ < π , id1 A _ > o FMap (SA a) f
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
136 δ-comm {x} {b} {f} = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
137 FMap (_○_ (SA a) (SA a)) f o < π , id1 A _ > ≈⟨ IsCCC.distr-π isCCC ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
138 < π o < π , id1 A _ > , (FMap (SA a) f o π' ) o < π , id1 A _ > > ≈⟨ IsCCC.π-cong isCCC (IsCCC.e3a isCCC) (sym assoc) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
139 < π , FMap (SA a) f o ( π' o < π , id1 A _ >) > ≈⟨ IsCCC.π-cong isCCC refl-hom (cdr (IsCCC.e3b isCCC)) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
140 < π , FMap (SA a) f o id1 A _ > ≈⟨ IsCCC.π-cong isCCC refl-hom idR ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
141 < π , FMap (SA a) f > ≈↑⟨ IsCCC.π-cong isCCC (IsCCC.e3a isCCC) idL ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
142 < π o FMap (SA a) f , id1 A _ o FMap (SA a) f > ≈↑⟨ IsCCC.distr-π isCCC ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
143 < π , id1 A _ > o FMap (SA a) f ∎
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
144 ε-comm : {a₁ : Obj A} {b : Obj A} {f : Hom A a₁ b} →
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
145 FMap (identityFunctor {_} {_} {_} {A}) f o π' ≈ π' o FMap (SA a) f
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
146 ε-comm {_} {_} {f} = sym (IsCCC.e3b isCCC)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
147 unity2 : {a₁ : Obj A} → FMap (SA a) π' o < π , id1 A _ > ≈ id1 A (a ∧ a₁)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
148 unity2 {x} = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
149 FMap (SA a) π' o < π , id1 A _ > ≈⟨ IsCCC.distr-π isCCC ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
150 < π o < π , id1 A _ > , ( π' o π' ) o < π , id1 A _ > > ≈⟨ IsCCC.π-cong isCCC (IsCCC.e3a isCCC) (sym assoc) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
151 < π , π' o ( π' o < π , id1 A _ > ) > ≈⟨ IsCCC.π-cong isCCC refl-hom (cdr (IsCCC.e3b isCCC)) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
152 < π , π' o id1 A _ > ≈⟨ IsCCC.π-cong isCCC refl-hom idR ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
153 < π , π' > ≈⟨ IsCCC.π-id isCCC ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
154 id1 A (a ∧ x) ∎
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
155 assoc2 : {a₁ : Obj A} → < π , id1 A _ > o < π , id1 A _ > ≈ FMap (SA a) < π , id1 A (a ∧ a₁) > o < π , id1 A _ >
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
156 assoc2 {x} = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
157 < π , id1 A _ > o < π , id1 A _ > ≈⟨ IsCCC.distr-π isCCC ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
158 < π o < π , id1 A _ > , id1 A _ o < π , id1 A _ > > ≈⟨ IsCCC.π-cong isCCC (IsCCC.e3a isCCC) idL ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
159 < π , < π , id1 A _ > > ≈↑⟨ IsCCC.π-cong isCCC refl-hom idR ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
160 < π , < π , id1 A _ > o id1 A _ > ≈↑⟨ IsCCC.π-cong isCCC refl-hom (cdr (IsCCC.e3b isCCC)) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
161 < π , < π , id1 A _ > o ( π' o < π , id1 A _ > ) > ≈↑⟨ IsCCC.π-cong isCCC (IsCCC.e3a isCCC) (sym assoc) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
162 < π o < π , id1 A _ > , (< π , id1 A _ > o π' ) o < π , id1 A _ > > ≈↑⟨ IsCCC.distr-π isCCC ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
163 FMap (SA a) < π , id1 A (a ∧ x) > o < π , id1 A _ > ∎
969
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 968
diff changeset
164
970
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
165
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
166
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
167 -- functional-completeness : (C : CCC A ) → {a : Obj A} → ( x : Hom A (CCC.1 C) a ) → {!!}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 969
diff changeset
168 -- functional-completeness = {!!}
968
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
169
3a096cb82dc4 Polynominal category and functional completeness begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 -- end