changeset 443:f526f4b68565

fix IsEqualizer
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 04 Sep 2016 21:05:39 +0900
parents 87600d338337
children 59e47e75188f c2616de4d208
files cat-utility.agda equalizer.agda freyd.agda limit-to.agda pullback.agda
diffstat 5 files changed, 122 insertions(+), 116 deletions(-) [+]
line wrap: on
line diff
--- a/cat-utility.agda	Thu Sep 01 17:34:28 2016 +0900
+++ b/cat-utility.agda	Sun Sep 04 21:05:39 2016 +0900
@@ -170,21 +170,21 @@
         --    |  . h
         --    d
 
-        record Equalizer { c₁ c₂ ℓ : Level} ( A : Category c₁ c₂ ℓ )  {c a b : Obj A} (e : Hom A c a) (f g : Hom A a b)  : Set  (ℓ ⊔ (c₁ ⊔ c₂)) where
+        record IsEqualizer { c₁ c₂ ℓ : Level} ( A : Category c₁ c₂ ℓ )  {c a b : Obj A} (e : Hom A c a) (f g : Hom A a b)  : Set  (ℓ ⊔ (c₁ ⊔ c₂)) where
            field
               fe=ge : A [ A [ f o e ] ≈ A [ g o e ] ]
               k : {d : Obj A}  (h : Hom A d a) → A [ A [ f  o  h ] ≈ A [ g  o h ] ] → Hom A d c
               ek=h : {d : Obj A}  → ∀ {h : Hom A d a} →  {eq : A [ A [ f  o  h ] ≈ A [ g  o h ] ] } →  A [ A [ e  o k {d} h eq ] ≈ h ]
               uniqueness : {d : Obj A} →  ∀ {h : Hom A d a} →  {eq : A [ A [ f  o  h ] ≈ A [ g  o h ] ] } →  {k' : Hom A d c } →
                       A [ A [ e  o k' ] ≈ h ] → A [ k {d} h eq  ≈ k' ]
-           equalizer : Hom A c a
-           equalizer = e
+           equalizer1 : Hom A c a
+           equalizer1 = e
 
-        record CreateEqualizer { c₁ c₂ ℓ : Level} ( A : Category c₁ c₂ ℓ ) : Set  (ℓ ⊔ (c₁ ⊔ c₂)) where
+        record Equalizer { c₁ c₂ ℓ : Level} ( A : Category c₁ c₂ ℓ ) {a b : Obj A} (f g : Hom A a b) : Set  (ℓ ⊔ (c₁ ⊔ c₂)) where
            field
-                equalizer : {a b : Obj A} (f g : Hom A a b)  -> Obj A
-                equalizer-e : {a b : Obj A} (f g : Hom A a b)  -> Hom A (equalizer f g ) a
-                isEqualizer : {a b : Obj A} (f g : Hom A a b)  -> Equalizer A (equalizer-e f g ) f g 
+                equalizer-c : Obj A
+                equalizer : Hom A equalizer-c a
+                isEqualizer : IsEqualizer A equalizer f g 
 
         -- 
         -- Product
@@ -303,4 +303,4 @@
 
              equalizer-p : {a b : Obj A} (f g : Hom A a b)  -> Obj A
              equalizer-e : {a b : Obj A} (f g : Hom A a b)  -> Hom A (equalizer-p f g) a
-             isEqualizer : {a b : Obj A} (f g : Hom A a b)  -> Equalizer A (equalizer-e f g) f g 
+             isEqualizer : {a b : Obj A} (f g : Hom A a b)  -> IsEqualizer A (equalizer-e f g) f g 
--- a/equalizer.agda	Thu Sep 01 17:34:28 2016 +0900
+++ b/equalizer.agda	Sun Sep 04 21:05:39 2016 +0900
@@ -41,21 +41,23 @@
       γ : {a b c d : Obj A } → (f : Hom A a b) → (g : Hom A a b ) → (h : Hom A d a ) →  Hom A d c
       δ : {a b c : Obj A } → (e : Hom A c a ) → (f : Hom A a b) → Hom A a c
       cong-α : {a b c :  Obj A } → { e : Hom A c a }
-          → {f g g' : Hom A a b } →  A [ g ≈ g' ] → A [ α f g e ≈ α f g' e ] 
-      cong-γ : {a _ c d : Obj A } → {f g : Hom A a b} {h h' : Hom A d a } →  A [ h ≈ h' ] 
-         → A [ γ {a} {b} {c} {d} f g h ≈ γ f g h' ] 
-      cong-δ : {a b c : Obj A } → {e : Hom A c a} → {f f' : Hom A a b} → A [ f ≈ f' ] →  A [ δ e f ≈ δ e f' ] 
+          → {f g g' : Hom A a b } →  A [ g ≈ g' ] → A [ α f g e ≈ α f g' e ]
+      cong-γ : {a _ c d : Obj A } → {f g : Hom A a b} {h h' : Hom A d a } →  A [ h ≈ h' ]
+         → A [ γ {a} {b} {c} {d} f g h ≈ γ f g h' ]
+      cong-δ : {a b c : Obj A } → {e : Hom A c a} → {f f' : Hom A a b} → A [ f ≈ f' ] →  A [ δ e f ≈ δ e f' ]
       b1 : A [ A [ f  o α {a} {b} {c}  f g e ] ≈ A [ g  o α {a} {b} {c} f g e ] ]
       b2 :  {d : Obj A } → {h : Hom A d a } → A [ A [ ( α {a} {b} {c} f g e ) o (γ {a} {b} {c} f g h) ] ≈ A [ h  o α (A [ f o h ]) (A [ g o h ]) (id1 A d) ] ]
       b3 : {a b d : Obj A} → (f : Hom A a b ) → {h : Hom A d a } → A [ A [ α {a} {b} {d} f f h o δ {a} {b} {d} h f ] ≈ id1 A a ]
       -- b4 :  {c d : Obj A } {k : Hom A c a} → A [ β f g ( A [ α f g o  k ] ) ≈ k ]
-      b4 :  {d : Obj A } {k : Hom A d c} → 
+      b4 :  {d : Obj A } {k : Hom A d c} →
            A [ A [ γ {a} {b} {c} {d} f g ( A [ α {a} {b} {c} f g e o k ] ) o ( δ {d} {b} {d} (id1 A d) (A [ f o A [ α {a} {b} {c} f g e o  k ] ] )  )] ≈ k ]
    --  A [ α f g o β f g h ] ≈ h
    β : { d a b : Obj A}  → (f : Hom A a b) → (g : Hom A a b ) →  (h : Hom A d a ) → Hom A d c
    β {d} {a} {b} f g h =  A [ γ {a} {b} {c} f g h o δ {d} {b} {d} (id1 A d) (A [ f o h ]) ]
 
+
 open Equalizer
+open IsEqualizer
 open Burroni
 
 --
@@ -95,24 +97,24 @@
 --        ||
 --         d
 
-monoic : { c a b d : Obj A } {f g : Hom A a b } → {e : Hom A c a } ( eqa : Equalizer A e f g) 
-      →  { i j : Hom A d c }
+monoic : { c a b d : Obj A } {f g : Hom A a b } → ( eqa : Equalizer A f g) 
+      →  { i j : Hom A d (equalizer-c eqa) }
       →  A [ A [ equalizer eqa o i ]  ≈  A [ equalizer eqa o j ] ] →  A [ i  ≈ j  ]
-monoic {c} {a} {b} {d} {f} {g} {e} eqa {i} {j} ei=ej = let open ≈-Reasoning (A) in begin
+monoic {c} {a} {b} {d} {f} {g} eqa {i} {j} ei=ej = let open ≈-Reasoning (A) in begin
                  i
-              ≈↑⟨ uniqueness eqa ( begin
+              ≈↑⟨ uniqueness (isEqualizer eqa) ( begin
                    equalizer eqa  o i
               ≈⟨ ei=ej ⟩
                    equalizer eqa  o j
               ∎ )⟩
-                 k eqa (equalizer eqa o j) ( f1=gh (fe=ge eqa ) )
-              ≈⟨ uniqueness eqa ( begin
+                 k (isEqualizer eqa) (equalizer eqa o j) ( f1=gh (fe=ge (isEqualizer eqa) ) )
+              ≈⟨ uniqueness (isEqualizer eqa) ( begin
                    equalizer eqa o j
               ≈⟨⟩
                    equalizer eqa o j
               ∎ )⟩
                  j
-              ∎
+              ∎ 
 
 --------------------------------
 --
@@ -127,42 +129,43 @@
 --        v|
 --         c'
 
-equalizer+iso : {a b c c' : Obj A } {f g : Hom A a b } {e : Hom A c a } 
-                (h-1 : Hom A c' c ) → (h : Hom A c c' ) →
-                A [ A [ h o h-1 ]  ≈ id1 A c' ] → A [ A [ h-1  o h ]  ≈ id1 A c ] →
-                ( eqa : Equalizer A e f g ) 
-           → Equalizer A (A [ e  o h-1  ] ) f g
-equalizer+iso  {a} {b} {c} {c'} {f} {g} {e} h-1 h  hh-1=1 h-1h=1  eqa =  record {
+equalizer+iso : {a b c' : Obj A } {f g : Hom A a b } →
+                ( eqa : Equalizer A f g ) →
+                (h-1 : Hom A c' (equalizer-c eqa) ) → (h : Hom A (equalizer-c eqa) c' ) →
+                A [ A [ h o h-1 ]  ≈ id1 A c' ] → A [ A [ h-1  o h ]  ≈ id1 A (equalizer-c eqa) ] 
+           → IsEqualizer A (A [ equalizer eqa  o h-1  ] ) f g
+equalizer+iso  {a} {b} {c'} {f} {g} eqa h-1 h  hh-1=1 h-1h=1  =  record {
       fe=ge = fe=ge1 ;
-      k = λ j eq → A [ h o k eqa j eq ] ;
+      k = λ j eq → A [ h o k (isEqualizer eqa) j eq ] ;
       ek=h = ek=h1 ;
       uniqueness = uniqueness1
   } where
+      e = equalizer eqa
       fe=ge1 :  A [ A [ f o  A [ e  o h-1  ]  ]  ≈ A [ g o  A [ e  o h-1  ]  ] ]
-      fe=ge1 = f1=gh ( fe=ge eqa )
+      fe=ge1 = f1=gh ( fe=ge (isEqualizer eqa) )
       ek=h1 :   {d : Obj A} {j : Hom A d a} {eq : A [ A [ f o j ] ≈ A [ g o j ] ]} →
-                A [ A [  A [ e  o h-1  ]  o A [ h o k eqa j eq ] ] ≈ j ]
+                A [ A [  A [ e  o h-1  ]  o A [ h o k (isEqualizer eqa) j eq ] ] ≈ j ]
       ek=h1 {d} {j} {eq} =  let open ≈-Reasoning (A) in
              begin
-                   ( e  o h-1 )  o ( h o k eqa j eq )
+                   ( e  o h-1 )  o ( h o k (isEqualizer eqa) j eq )
              ≈↑⟨ assoc ⟩
-                    e o ( h-1  o ( h  o k eqa j eq  ) )
+                    e o ( h-1  o ( h  o k (isEqualizer eqa) j eq  ) )
              ≈⟨ cdr assoc ⟩
-                    e o (( h-1  o  h)  o k eqa j eq  ) 
+                    e o (( h-1  o  h)  o k (isEqualizer eqa) j eq  ) 
              ≈⟨ cdr (car h-1h=1 )  ⟩
-                    e o (id c  o k eqa j eq  ) 
+                    e o (id1 A (equalizer-c eqa)  o k (isEqualizer eqa) j eq  ) 
              ≈⟨ cdr idL  ⟩
-                    e o  k eqa j eq  
-             ≈⟨ ek=h eqa ⟩
+                    e o  k (isEqualizer eqa) j eq  
+             ≈⟨ ek=h (isEqualizer eqa) ⟩
                    j
-             ∎
+             ∎ 
       uniqueness1 : {d : Obj A} {h' : Hom A d a} {eq : A [ A [ f o h' ] ≈ A [ g o h' ] ]} {j : Hom A d c'} →
                 A [ A [  A [ e  o h-1 ]  o j ] ≈ h' ] →
-                A [ A [ h o k eqa h' eq ] ≈ j ]
+                A [ A [ h o k (isEqualizer eqa) h' eq ] ≈ j ]
       uniqueness1 {d} {h'} {eq} {j} ej=h  =  let open ≈-Reasoning (A) in
              begin
-                   h o k eqa h' eq
-             ≈⟨ cdr (uniqueness eqa ( begin
+                   h o k (isEqualizer eqa) h' eq
+             ≈⟨ cdr (uniqueness (isEqualizer eqa) ( begin
                     e o ( h-1 o j  )
                  ≈⟨ assoc ⟩
                    (e o  h-1 ) o j  
@@ -198,28 +201,28 @@
 --           e eqa' f g
 
 c-iso-l : { c c' a b : Obj A } {f g : Hom A a b } →  {e : Hom A c a } { e' : Hom A c' a }
-       ( eqa : Equalizer A e f g) → ( eqa' :  Equalizer A e' f g )
+       ( eqa : IsEqualizer A e f g) → ( eqa' :  IsEqualizer A e' f g )
       → Hom A c c'         
-c-iso-l  {c} {c'} eqa eqa' = k eqa' (equalizer eqa) ( fe=ge eqa )
+c-iso-l  {c} {c'} {a} {b} {f} {g} {e} eqa eqa' = k eqa' e ( fe=ge eqa )
 
 c-iso-r : { c c' a b : Obj A } {f g : Hom A a b } →  {e : Hom A c a } { e' : Hom A c' a }
-       ( eqa : Equalizer A e f g) → ( eqa' :  Equalizer A e' f g )
+       ( eqa : IsEqualizer A e f g) → ( eqa' :  IsEqualizer A e' f g )
       → Hom A c' c         
-c-iso-r  {c} {c'} eqa eqa' = k eqa (equalizer eqa') ( fe=ge eqa' )
+c-iso-r  {c} {c'} {a} {b} {f} {g} {e} {e'} eqa eqa' = k eqa e' ( fe=ge eqa' )
 
 c-iso-lr : { c c' a b : Obj A } {f g : Hom A a b } →  {e : Hom A c a } { e' : Hom A c' a }
-       ( eqa : Equalizer A e f g) → ( eqa' :  Equalizer A e' f g ) →
+       ( eqa : IsEqualizer A e f g) → ( eqa' :  IsEqualizer A e' f g ) →
   A [ A [ c-iso-l eqa eqa' o c-iso-r eqa eqa' ]  ≈ id1 A c' ]
 c-iso-lr  {c} {c'} {a} {b} {f} {g} {e} {e'} eqa eqa' =  let open ≈-Reasoning (A) in begin
                   c-iso-l eqa eqa' o c-iso-r eqa eqa'
               ≈⟨⟩
-                  k eqa' (equalizer eqa) ( fe=ge eqa )  o  k eqa (equalizer eqa') ( fe=ge eqa' )
+                  k eqa' e ( fe=ge eqa )  o  k eqa e' ( fe=ge eqa' )
               ≈↑⟨ uniqueness eqa' ( begin
-                  e' o ( k eqa' (equalizer eqa) (fe=ge eqa) o k eqa (equalizer eqa') (fe=ge eqa') )
+                  e' o ( k eqa' e (fe=ge eqa) o k eqa e' (fe=ge eqa') )
               ≈⟨ assoc  ⟩
-                  ( e' o  k eqa' (equalizer eqa) (fe=ge eqa) ) o k eqa (equalizer eqa') (fe=ge eqa') 
+                  ( e' o  k eqa' e (fe=ge eqa) ) o k eqa e' (fe=ge eqa') 
               ≈⟨ car (ek=h eqa') ⟩
-                  e o k eqa (equalizer eqa') (fe=ge eqa') 
+                  e o k eqa e' (fe=ge eqa') 
               ≈⟨ ek=h eqa ⟩
                   e'
               ∎ )⟩
@@ -235,6 +238,7 @@
 -- c-iso-rl is obvious from the symmetry
 
 
+
 --------------------------------
 ----
 --
@@ -243,18 +247,18 @@
 ----
 
 lemma-equ1 : {a b c : Obj A} (f g : Hom A a b)  → (e : Hom A c a ) →
-         ( eqa : {a b c : Obj A} → (f g : Hom A a b)  → {e : Hom A c a }  → Equalizer A e f g ) 
+         ( eqa : {a b c : Obj A} → (f g : Hom A a b)  → {e : Hom A c a }  → IsEqualizer A e f g ) 
               → Burroni A {c} {a} {b} f g e
 lemma-equ1  {a} {b} {c} f g e eqa  = record {
-      α = λ {a} {b} {c}  f g e  →  equalizer (eqa {a} {b} {c} f g {e} ) ; -- Hom A c a
-      γ = λ {a} {b} {c} {d} f g h → k (eqa {a} {b} {c} f g ) {d} ( A [ h  o (equalizer ( eqa (A [ f  o  h ] ) (A [ g o h ] ))) ] ) 
+      α = λ {a} {b} {c}  f g e  →  equalizer1 (eqa {a} {b} {c} f g {e} ) ; -- Hom A c a
+      γ = λ {a} {b} {c} {d} f g h → k (eqa {a} {b} {c} f g ) {d} ( A [ h  o (equalizer1 ( eqa (A [ f  o  h ] ) (A [ g o h ] ))) ] ) 
                             (lemma-equ4 {a} {b} {c} {d} f g h ) ;  -- Hom A c d
-      δ =  λ {a} {b} {c} e f → k (eqa {a} {b} {c} f f {e} ) (id1 A a)  (f1=f1 f); -- Hom A a c
+      δ =  λ {a} {b} {c} e f → k (eqa {a} {b} {c} f f {e} ) {a} (id1 A a)  (f1=f1 f); -- Hom A a c
       cong-α = λ {a b c e f g g'} eq → cong-α1 {a} {b} {c} {e} {f} {g} {g'} eq ;
       cong-γ = λ {a} {_} {c} {d} {f} {g} {h} {h'} eq → cong-γ1 {a}  {c} {d} {f} {g} {h} {h'} eq  ;
       cong-δ = λ {a b c e f f'} f=f' → cong-δ1 {a} {b} {c} {e} {f} {f'} f=f'  ;
       b1 = fe=ge (eqa {a} {b} {c} f g {e}) ;
-      b2 = lemma-b2 ;
+      b2 = λ {d} {h} → lemma-b2 {d} {h};
       b3 = lemma-b3 ;
       b4 = lemma-b4 
  } where
@@ -270,41 +274,41 @@
      --
      --               e  o id1 ≈  e  →   k e  ≈ id
 
-     lemma-b3 : {a b d : Obj A} (f : Hom A a b ) { h : Hom A d a } → A [ A [ equalizer (eqa f f ) o k (eqa f f) (id1 A a) (f1=f1 f) ] ≈ id1 A a  ]
+     lemma-b3 : {a b d : Obj A} (f : Hom A a b ) { h : Hom A d a } → A [ A [ equalizer1 (eqa f f ) o k (eqa f f) (id1 A a) (f1=f1 f) ] ≈ id1 A a  ]
      lemma-b3 {a} {b} {d} f {h} = let open ≈-Reasoning (A) in
              begin
-                  equalizer (eqa f f) o k (eqa f f) (id a) (f1=f1 f)
+                  equalizer1 (eqa f f) o k (eqa f f) (id a) (f1=f1 f)
              ≈⟨ ek=h (eqa f f )  ⟩
                   id a

      lemma-equ4 :  {a b c d : Obj A}  → (f : Hom A a b) → (g : Hom A a b ) → (h : Hom A d a ) →
-                      A [ A [ f o A [ h o equalizer (eqa (A [ f o h ]) (A [ g o h ])) ] ] ≈ A [ g o A [ h o equalizer (eqa (A [ f o h ]) (A [ g o h ])) ] ] ]
+                      A [ A [ f o A [ h o equalizer1 (eqa (A [ f o h ]) (A [ g o h ])) ] ] ≈ A [ g o A [ h o equalizer1 (eqa (A [ f o h ]) (A [ g o h ])) ] ] ]
      lemma-equ4 {a} {b} {c} {d} f g h  = let open ≈-Reasoning (A) in
              begin
-                   f o ( h o equalizer (eqa (f o h) ( g o h )))
+                   f o ( h o equalizer1 (eqa (f o h) ( g o h )))
              ≈⟨ assoc ⟩
-                   (f o h) o equalizer (eqa (f o h) ( g o h ))
+                   (f o h) o equalizer1 (eqa (f o h) ( g o h ))
              ≈⟨ fe=ge (eqa (A [ f o h ]) (A [ g o h ])) ⟩
-                   (g o h) o equalizer (eqa (f o h) ( g o h ))
+                   (g o h) o equalizer1 (eqa (f o h) ( g o h ))
              ≈↑⟨ assoc ⟩
-                   g o ( h o equalizer (eqa (f o h) ( g o h )))
+                   g o ( h o equalizer1 (eqa (f o h) ( g o h )))

      cong-α1 : {a b c :  Obj A } → { e : Hom A c a }
-          → {f g g' : Hom A a b } →  A [ g ≈ g' ] → A [ equalizer (eqa {a} {b} {c} f g {e} )≈ equalizer (eqa {a} {b} {c} f g' {e} ) ] 
+          → {f g g' : Hom A a b } →  A [ g ≈ g' ] → A [ equalizer1 (eqa {a} {b} {c} f g {e} )≈ equalizer1 (eqa {a} {b} {c} f g' {e} ) ] 
      cong-α1 {a} {b} {c} {e} {f} {g} {g'} eq = let open ≈-Reasoning (A) in refl-hom 
      cong-γ1 :  {a c d : Obj A } → {f g : Hom A a b} {h h' : Hom A d a } →  A [ h ≈ h' ] →  { e : Hom A c a} →
-                     A [  k (eqa f g {e} ) {d} ( A [ h  o (equalizer ( eqa (A [ f  o  h  ] ) (A [ g o h  ] ) {id1 A d} )) ] ) (lemma-equ4 {a} {b} {c} {d} f g h ) 
-                       ≈  k (eqa f g {e} ) {d} ( A [ h' o (equalizer ( eqa (A [ f  o  h' ] ) (A [ g o h' ] ) {id1 A d} )) ] ) (lemma-equ4 {a} {b} {c} {d} f g h' )  ]
+                     A [  k (eqa f g {e} ) {d} ( A [ h  o (equalizer1 ( eqa (A [ f  o  h  ] ) (A [ g o h  ] ) {id1 A d} )) ] ) (lemma-equ4 {a} {b} {c} {d} f g h ) 
+                       ≈  k (eqa f g {e} ) {d} ( A [ h' o (equalizer1 ( eqa (A [ f  o  h' ] ) (A [ g o h' ] ) {id1 A d} )) ] ) (lemma-equ4 {a} {b} {c} {d} f g h' )  ]
      cong-γ1 {a} {c} {d} {f} {g} {h} {h'} h=h' {e} = let open ≈-Reasoning (A) in begin
-                 k (eqa f g ) {d} ( A [ h  o (equalizer ( eqa (A [ f  o  h  ] ) (A [ g o h  ] ))) ] ) (lemma-equ4 {a} {b} {c} {d} f g h )
+                 k (eqa f g ) {d} ( A [ h  o (equalizer1 ( eqa (A [ f  o  h  ] ) (A [ g o h  ] ))) ] ) (lemma-equ4 {a} {b} {c} {d} f g h )
              ≈⟨ uniqueness (eqa f g) ( begin
-                 e o k (eqa f g ) {d} ( A [ h' o (equalizer ( eqa (A [ f  o  h' ] ) (A [ g o h' ] ))) ] ) (lemma-equ4 {a} {b} {c} {d} f g h' )
+                 e o k (eqa f g ) {d} ( A [ h' o (equalizer1 ( eqa (A [ f  o  h' ] ) (A [ g o h' ] ))) ] ) (lemma-equ4 {a} {b} {c} {d} f g h' )
              ≈⟨ ek=h (eqa f g ) ⟩
-                 h' o (equalizer ( eqa (A [ f  o  h' ] ) (A [ g o h' ] )))
+                 h' o (equalizer1 ( eqa (A [ f  o  h' ] ) (A [ g o h' ] )))
              ≈↑⟨ car h=h'  ⟩
-                 h o (equalizer ( eqa (A [ f  o  h' ] ) (A [ g o h' ] )))
+                 h o (equalizer1 ( eqa (A [ f  o  h' ] ) (A [ g o h' ] )))
              ∎ )⟩    
-                 k (eqa f g ) {d} ( A [ h' o (equalizer ( eqa (A [ f  o  h' ] ) (A [ g o h' ] ))) ] ) (lemma-equ4 {a} {b} {c} {d} f g h' )
+                 k (eqa f g ) {d} ( A [ h' o (equalizer1 ( eqa (A [ f  o  h' ] ) (A [ g o h' ] ))) ] ) (lemma-equ4 {a} {b} {c} {d} f g h' )

      cong-δ1 : {a b c : Obj A} {e : Hom A c a } {f f' : Hom A a b} → A [ f ≈ f' ] →  A [ k (eqa {a} {b} {c} f f {e} ) (id1 A a)  (f1=f1 f)  ≈ 
                                                                             k (eqa {a} {b} {c} f' f' {e} ) (id1 A a)  (f1=f1 f') ]
@@ -320,39 +324,39 @@

 
      lemma-b2 :  {d : Obj A} {h : Hom A d a} → A [
-                      A [ equalizer (eqa f g) o k (eqa f g) (A [ h o equalizer (eqa (A [ f o h ]) (A [ g o h ])) ]) (lemma-equ4 {a} {b} {c} f g h) ]
-                    ≈ A [ h o equalizer (eqa (A [ f o h ]) (A [ g o h ])) ] ]
+                      A [ equalizer1 (eqa f g) o k (eqa f g) (A [ h o equalizer1 (eqa (A [ f o h ]) (A [ g o h ])) ]) (lemma-equ4 {a} {b} {c} f g h) ]
+                    ≈ A [ h o equalizer1 (eqa (A [ f o h ]) (A [ g o h ])) ] ]
      lemma-b2 {d} {h} = let open ≈-Reasoning (A) in
              begin
-                    equalizer (eqa f g) o k (eqa f g) (h o equalizer (eqa (f o h) (g o h))) (lemma-equ4 {a} {b} {c} f g h)
+                    equalizer1 (eqa f g) o k (eqa f g) (h o equalizer1 (eqa (f o h) (g o h))) (lemma-equ4 {a} {b} {c} f g h)
              ≈⟨ ek=h (eqa f g)  ⟩
-                    h o equalizer (eqa (f o h ) ( g o h ))
+                    h o equalizer1 (eqa (f o h ) ( g o h ))

 
      lemma-b4 : {d : Obj A} {j : Hom A d c} → A [
-              A [ k (eqa f g) (A [ A [ equalizer (eqa f g) o j ] o 
-                              equalizer (eqa (A [ f o A [ equalizer (eqa f g {e}) o j ] ]) (A [ g o A [ equalizer (eqa f g {e} ) o j ] ])) ])
-                     (lemma-equ4 {a} {b} {c} f g (A [ equalizer (eqa f g) o j ])) 
-                 o k (eqa (A [ f o A [ equalizer (eqa f g) o j ] ]) (A [ f o A [ equalizer (eqa f g) o j ] ])) 
-                     (id1 A d) (f1=f1 (A [ f o A [ equalizer (eqa f g) o j ] ])) ]
+              A [ k (eqa f g) (A [ A [ equalizer1 (eqa f g) o j ] o 
+                              equalizer1 (eqa (A [ f o A [ equalizer1 (eqa f g {e}) o j ] ]) (A [ g o A [ equalizer1 (eqa f g {e} ) o j ] ])) ])
+                     (lemma-equ4 {a} {b} {c} f g (A [ equalizer1 (eqa f g) o j ])) 
+                 o k (eqa (A [ f o A [ equalizer1 (eqa f g) o j ] ]) (A [ f o A [ equalizer1 (eqa f g) o j ] ])) 
+                     (id1 A d) (f1=f1 (A [ f o A [ equalizer1 (eqa f g) o j ] ])) ]
               ≈ j ]
      lemma-b4 {d} {j} = let open ≈-Reasoning (A) in
              begin
-                ( k (eqa f g) (( ( equalizer (eqa f g) o j ) o equalizer (eqa (( f o ( equalizer (eqa f g {e}) o j ) )) (( g o ( equalizer (eqa f g {e}) o j ) ))) ))
-                            (lemma-equ4 {a} {b} {c} f g (( equalizer (eqa f g) o j ))) o
-                   k (eqa (( f o ( equalizer (eqa f g) o j ) )) (( f o ( equalizer (eqa f g) o j ) ))) (id1 A d) (f1=f1 (( f o ( equalizer (eqa f g) o j ) ))) )
+                ( k (eqa f g) (( ( equalizer1 (eqa f g) o j ) o equalizer1 (eqa (( f o ( equalizer1 (eqa f g {e}) o j ) )) (( g o ( equalizer1 (eqa f g {e}) o j ) ))) ))
+                            (lemma-equ4 {a} {b} {c} f g (( equalizer1 (eqa f g) o j ))) o
+                   k (eqa (( f o ( equalizer1 (eqa f g) o j ) )) (( f o ( equalizer1 (eqa f g) o j ) ))) (id1 A d) (f1=f1 (( f o ( equalizer1 (eqa f g) o j ) ))) )
              ≈⟨ car ((uniqueness (eqa f g) ( begin
-                         equalizer (eqa f g) o j 
+                         equalizer1 (eqa f g) o j 
                 ≈↑⟨ idR  ⟩
-                         (equalizer (eqa f g) o j )  o id d
+                         (equalizer1 (eqa f g) o j )  o id d
                 ≈⟨⟩         -- here we decide e (fej) (gej)' is id d
-                        ((equalizer (eqa f g) o j) o equalizer (eqa (f o equalizer (eqa f g {e}) o j) (g o equalizer (eqa f g {e}) o j)))
+                        ((equalizer1 (eqa f g) o j) o equalizer1 (eqa (f o equalizer1 (eqa f g {e}) o j) (g o equalizer1 (eqa f g {e}) o j)))
              ∎ ))) ⟩
-                    j o k (eqa (( f o ( equalizer (eqa f g) o j ) )) (( f o ( equalizer (eqa f g) o j ) ))) (id1 A d) (f1=f1 (( f o ( equalizer (eqa f g) o j ) ))) 
-             ≈⟨ cdr ((uniqueness (eqa (( f o ( equalizer (eqa f g) o j ) )) (( f o ( equalizer (eqa f g) o j ) ))) ( begin
-                     equalizer (eqa (f o equalizer (eqa f g {e} ) o j) (f o equalizer (eqa f g {e}) o j))  o id d
+                    j o k (eqa (( f o ( equalizer1 (eqa f g) o j ) )) (( f o ( equalizer1 (eqa f g) o j ) ))) (id1 A d) (f1=f1 (( f o ( equalizer1 (eqa f g) o j ) ))) 
+             ≈⟨ cdr ((uniqueness (eqa (( f o ( equalizer1 (eqa f g) o j ) )) (( f o ( equalizer1 (eqa f g) o j ) ))) ( begin
+                     equalizer1 (eqa (f o equalizer1 (eqa f g {e} ) o j) (f o equalizer1 (eqa f g {e}) o j))  o id d
                 ≈⟨ idR ⟩
-                     equalizer (eqa (f o equalizer (eqa f g {e}) o j) (f o equalizer (eqa f g {e}) o j))  
+                     equalizer1 (eqa (f o equalizer1 (eqa f g {e}) o j) (f o equalizer1 (eqa f g {e}) o j))  
                 ≈⟨⟩         -- here we decide e (fej) (fej)' is id d
                     id d
              ∎ ))) ⟩
@@ -367,7 +371,7 @@
 --
 
 lemma-equ2 : {a b c : Obj A} (f g : Hom A a b)  (e : Hom A c a )
-         → ( bur : Burroni A {c} {a} {b} f g e ) → Equalizer A {c} {a} {b} (α bur f g e) f g 
+         → ( bur : Burroni A {c} {a} {b} f g e ) → IsEqualizer A {c} {a} {b} (α bur f g e) f g 
 lemma-equ2 {a} {b} {c} f g e bur = record {
       fe=ge = fe=ge1 ;  
       k = k1 ;
--- a/freyd.agda	Thu Sep 01 17:34:28 2016 +0900
+++ b/freyd.agda	Sun Sep 04 21:05:39 2016 +0900
@@ -44,6 +44,7 @@
 open PreInitial
 open Complete
 open Equalizer
+open IsEqualizer
 
 initialFromPreInitialFullSubcategory : {c₁ c₂ ℓ : Level} (A : Category c₁ c₂ ℓ)
       (comp : Complete A A)
@@ -59,8 +60,8 @@
       FMap←  = SFSFMap←  SFS
       lim : ( Γ : Functor A A ) → Limit A A Γ (limit-c comp Γ)  (limit-u comp Γ)
       lim Γ =  isLimit comp Γ 
-      equ : {a b : Obj A} → (f g : Hom A a b)  → Equalizer A (equalizer-e comp f g ) f g
-      equ f g = isEqualizer comp f g 
+      equ : {a b : Obj A} → (f g : Hom A a b)  → IsEqualizer A (equalizer-e comp f g ) f g
+      equ f g = Complete.isEqualizer comp f g 
       a0 : Obj A
       a0 = limit-c comp F
       u : NTrans A A (K A A a0) F
@@ -74,7 +75,7 @@
       initialArrow :  ∀( a : Obj A )  →  Hom A a0 a
       initialArrow a  = A [ preinitialArrow PI {a}  o f ]
       equ-fi : { a : Obj A} → {f' : Hom A a0 a} → 
-          Equalizer A ee ( A [ preinitialArrow PI {a} o  f ] ) f'
+          IsEqualizer A ee ( A [ preinitialArrow PI {a} o  f ] ) f'
       equ-fi  {a} {f'} = equ ( A [ preinitialArrow PI {a} o  f ] ) f'
       e=id : {e : Hom A a0 a0} → ( {c : Obj A} → A [ A [ TMap u  c o  e ]  ≈  TMap u c ] ) → A [ e  ≈ id1 A a0 ]
       e=id  {e} uce=uc =  let open ≈-Reasoning (A) in
@@ -108,7 +109,7 @@
       kfuc=1 {k1} {p} = e=id ( kfuc=uc )
       -- if equalizer has right inverse, f = g
       lemma2 :  (a b : Obj A) {c : Obj A} ( f g : Hom A a b ) 
-            {e : Hom A c a } {e' : Hom A a c } ( equ : Equalizer A e f g ) (inv-e : A [ A [ e o e' ] ≈ id1 A a ] )
+            {e : Hom A c a } {e' : Hom A a c } ( equ : IsEqualizer A e f g ) (inv-e : A [ A [ e o e' ] ≈ id1 A a ] )
            → A [ f ≈ g ]
       lemma2 a b {c} f g {e} {e'} equ inv-e = let open ≈-Reasoning (A) in
             let open Equalizer in
--- a/limit-to.agda	Thu Sep 01 17:34:28 2016 +0900
+++ b/limit-to.agda	Sun Sep 04 21:05:39 2016 +0900
@@ -448,7 +448,7 @@
       (lim :  ( Γ : Functor (I' {c₁} {c₂} {ℓ}) A ) → {a0 : Obj A } 
                {u : NTrans I' A ( K A  I' a0 )  Γ } → Limit A I' Γ a0 u ) -- completeness
         →  {a b c : Obj A}      (f g : Hom A  a b )
-        → (e : Hom A c a ) → (fe=ge : A [ A [ f o e ] ≈ A [ g o e ] ] ) → Equalizer A e f g
+        → (e : Hom A c a ) → (fe=ge : A [ A [ f o e ] ≈ A [ g o e ] ] ) → IsEqualizer A e f g
 lim-to-equ  {c₁} {c₂} {ℓ } A none  lim {a} {b} {c}  f g e fe=ge = record {
         fe=ge =  fe=ge
         ; k = λ {d} h fh=gh → k {d} h fh=gh
--- a/pullback.agda	Thu Sep 01 17:34:28 2016 +0900
+++ b/pullback.agda	Sun Sep 04 21:05:39 2016 +0900
@@ -27,16 +27,17 @@
 --         k (π1' × π2' )
 
 open Equalizer
+open IsEqualizer
 open Product
 open Pullback
 
 pullback-from :  (a b c ab d : Obj A)
       ( f : Hom A a c )    ( g : Hom A b c )
       ( π1 : Hom A ab a )  ( π2 : Hom A ab b ) ( e : Hom A d ab )
-      ( eqa : {a b c : Obj A} → (f g : Hom A a b)  → {e : Hom A c a }  → Equalizer A e f g )
+      ( eqa : {a b c : Obj A} → (f g : Hom A a b)  → {e : Hom A c a }  → IsEqualizer A e f g )
       ( prod : Product A a b ab π1 π2 ) → Pullback A a b c d f g
-          ( A [  π1 o equalizer ( eqa ( A [ f  o π1 ] ) ( A [ g  o π2 ] ){e} )  ] )
-          ( A [  π2 o equalizer ( eqa ( A [ f  o π1 ] ) ( A [ g  o π2 ] ){e} )  ] )
+          ( A [  π1 o equalizer1 ( eqa ( A [ f  o π1 ] ) ( A [ g  o π2 ] ) )  ] )
+          ( A [  π2 o equalizer1 ( eqa ( A [ f  o π1 ] ) ( A [ g  o π2 ] ) )  ] )
 pullback-from  a b c ab d f g π1 π2 e eqa prod =  record {
               commute = commute1 ;
               p = p1 ;
@@ -44,17 +45,17 @@
               π2p=π2 = λ {d} {π1'} {π2'} {eq} → π2p=π21  {d} {π1'} {π2'} {eq} ;
               uniqueness = uniqueness1
       } where
-      commute1 :  A [ A [ f o A [ π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] ] 
-                    ≈ A [ g o A [ π2 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] ] ]
+      commute1 :  A [ A [ f o A [ π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] ] 
+                    ≈ A [ g o A [ π2 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] ] ]
       commute1 = let open ≈-Reasoning (A) in
              begin
-                    f o ( π1 o equalizer (eqa ( f o π1 ) ( g o π2 )) )
+                    f o ( π1 o equalizer1 (eqa ( f o π1 ) ( g o π2 )) )
              ≈⟨ assoc ⟩
-                    ( f o  π1 ) o equalizer (eqa ( f o π1 ) ( g o π2 ))
+                    ( f o  π1 ) o equalizer1 (eqa ( f o π1 ) ( g o π2 ))
              ≈⟨ fe=ge (eqa (A [ f o π1 ]) (A [ g o π2 ])) ⟩
-                    ( g o  π2 ) o equalizer (eqa ( f o π1 ) ( g o π2 ))
+                    ( g o  π2 ) o equalizer1 (eqa ( f o π1 ) ( g o π2 ))
              ≈↑⟨ assoc ⟩
-                    g o ( π2 o equalizer (eqa ( f o π1 ) ( g o π2 )) )
+                    g o ( π2 o equalizer1 (eqa ( f o π1 ) ( g o π2 )) )

       lemma1 :  {d' : Obj A} {π1' : Hom A d' a} {π2' : Hom A d' b} → A [ A [ f o π1' ] ≈ A [ g o π2' ] ] →
                       A [ A [ A [ f o π1 ] o (prod × π1') π2' ] ≈ A [ A [ g o π2 ] o (prod × π1') π2' ] ]
@@ -76,10 +77,10 @@
       p1 {d'} { π1' } { π2' } eq  =
          let open ≈-Reasoning (A) in k ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} ) (_×_ prod  π1'  π2' ) ( lemma1 eq )
       π1p=π11 :   {d₁ : Obj A} {π1' : Hom A d₁ a} {π2' : Hom A d₁ b} {eq : A [ A [ f o π1' ] ≈ A [ g o π2' ] ]} →
-            A [ A [ A [ π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ] o p1 eq ] ≈ π1' ]
+            A [ A [ A [ π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ] o p1 eq ] ≈ π1' ]
       π1p=π11 {d'} {π1'} {π2'} {eq} = let open ≈-Reasoning (A) in
              begin
-                     ( π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ) o p1 eq
+                     ( π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ) o p1 eq
              ≈⟨⟩
                      ( π1 o e) o  k ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} ) (_×_ prod  π1'  π2' ) (lemma1 eq)
              ≈↑⟨ assoc ⟩
@@ -90,10 +91,10 @@
                      π1'

       π2p=π21 : {d₁ : Obj A} {π1' : Hom A d₁ a} {π2' : Hom A d₁ b} {eq : A [ A [ f o π1' ] ≈ A [ g o π2' ] ]} →
-            A [ A [ A [ π2 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ] o p1 eq ] ≈ π2' ]
+            A [ A [ A [ π2 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ] o p1 eq ] ≈ π2' ]
       π2p=π21  {d'} {π1'} {π2'} {eq} = let open ≈-Reasoning (A) in
              begin
-                     ( π2 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ) o p1 eq
+                     ( π2 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ) o p1 eq
              ≈⟨⟩
                      ( π2 o e) o  k ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} ) (_×_ prod  π1'  π2' ) (lemma1 eq)
              ≈↑⟨ assoc ⟩
@@ -105,23 +106,23 @@

       uniqueness1 :  {d₁ : Obj A} (p' : Hom A d₁ d) {π1' : Hom A d₁ a} {π2' : Hom A d₁ b} 
          {eq : A [ A [ f o π1' ] ≈ A [ g o π2' ] ]} →
-        {eq1 : A [ A [ A [ π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ] ≈ π1' ]} →
-        {eq2 : A [ A [ A [ π2 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ] ≈ π2' ]} →
+        {eq1 : A [ A [ A [ π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ] ≈ π1' ]} →
+        {eq2 : A [ A [ A [ π2 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ] ≈ π2' ]} →
         A [ p1 eq ≈ p' ]
       uniqueness1 {d'} p' {π1'} {π2'} {eq} {eq1} {eq2} = let open ≈-Reasoning (A) in
              begin
                  p1 eq
              ≈⟨⟩
                  k ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} ) (_×_ prod  π1'  π2' ) (lemma1 eq)
-             ≈⟨ Equalizer.uniqueness (eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e}) ( begin
+             ≈⟨ IsEqualizer.uniqueness (eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e}) ( begin
                  e o p'
              ≈⟨⟩
-                  equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p'
+                  equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p'
              ≈↑⟨ Product.uniqueness prod ⟩
-                (prod × (  π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p') ) ( π2 o (equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p'))
+                (prod × (  π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p') ) ( π2 o (equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p'))
              ≈⟨ ×-cong prod (assoc) (assoc) ⟩
-                 (prod × (A [ A [ π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ]))
-                         (A [ A [ π2 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ])
+                 (prod × (A [ A [ π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ]))
+                         (A [ A [ π2 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ])
              ≈⟨ ×-cong prod eq1 eq2 ⟩
                 ((prod × π1') π2')
              ∎ ) ⟩
@@ -346,7 +347,7 @@
 --
 
 limit-ε :
-     ( eqa : {a b c : Obj A} → (e : Hom A c a )  → (f g : Hom A a b)  → Equalizer A e f g )
+     ( eqa : {a b c : Obj A} → (e : Hom A c a )  → (f g : Hom A a b)  → IsEqualizer A e f g )
      ( lim p : Obj A ) ( e : Hom  A lim p )
      ( proj : (i : Obj I ) → Hom A p (FObj Γ i) ) →
          NTrans I A (K A I lim) Γ
@@ -375,7 +376,7 @@
 limit-from :
      ( prod : (p : Obj A) ( ai : Obj I → Obj A )  ( pi : (i : Obj I) → Hom A p ( ai i ) )
                   →  IProduct {c₁'} A (Obj I) p ai pi )
-     ( eqa : {a b c : Obj A} → (e : Hom A c a )  → (f g : Hom A a b)  → Equalizer A e f g )
+     ( eqa : {a b c : Obj A} → (e : Hom A c a )  → (f g : Hom A a b)  → IsEqualizer A e f g )
      ( lim p : Obj A )       -- limit to be made
      ( e : Hom  A lim p )                          -- existing of equalizer
      ( proj : (i : Obj I ) → Hom A p (FObj Γ i) )  -- existing of product ( projection actually )
@@ -407,7 +408,7 @@
                     limit1 a t
                 ≈⟨⟩
                     k (eqa e (id1 A p) (id1 A p )) (product ( prod p (FObj Γ)  proj ) (TMap t) ) refl-hom
-                ≈⟨ Equalizer.uniqueness  (eqa e (id1 A p) (id1 A p )) ( begin
+                ≈⟨ IsEqualizer.uniqueness  (eqa e (id1 A p) (id1 A p )) ( begin
                       e o f 
                 ≈↑⟨ ip-uniqueness (prod p (FObj Γ) proj) ⟩
                       product (prod p (FObj Γ) proj) (λ i → ( proj i o ( e  o f ) ) )