Library CT.Instance.Category.Equivalence

Equivalence of categories forms an equivalence relation.
Section CategoryEquivalence.
  Context {A B C : Category}.
  Section CategoryEquivalenceReflexivity.
    Program Definition category_equiv_refl_nat_iso :
      NaturalIsomorphism (ComposeFunctor (@IdentityFunctor C)
                                         (@IdentityFunctor C))
                         (@IdentityFunctor C).
    Proof.
      rewrite comp_identity_identity.
      apply IdentityIso.
      trivial.
      trivial.
    Qed.

    Program Definition CategoryEquivalenceReflexivity : CategoryEquivalence C C :=
      {| F := @IdentityFunctor C;
         G := @IdentityFunctor C;
         ceq_nat_iso1 := category_equiv_refl_nat_iso;
         ceq_nat_iso2 := category_equiv_refl_nat_iso
      |}.
  End CategoryEquivalenceReflexivity.

  Section CategoryEquivalenceSymmetry.
    Theorem CategoryEquivalenceSymmetry :
      CategoryEquivalence A B
      CategoryEquivalence B A.
    Proof.
      intros.
      destruct X.
       G0 F0.
      trivial.
      trivial.
    Qed.
  End CategoryEquivalenceSymmetry.

  Section CategoryEquivalenceTransitivity.
    Theorem CategoryEquivalenceTransitivity :
      CategoryEquivalence A B
      CategoryEquivalence B C
      CategoryEquivalence A C.
    Proof.
      intros.
      destruct X, X0.
       (ComposeFunctor F0 F1) (ComposeFunctor G1 G0).
      replace (ComposeFunctor (ComposeFunctor G1 G0) (ComposeFunctor F0 F1)) with
              (ComposeFunctor (ComposeFunctor G1 (ComposeFunctor G0 F0)) F1).
      Focus 2.
      rewrite functor_comp_assoc.
      rewrite functor_comp_assoc.
      trivial.
      admit.     Admitted.
  End CategoryEquivalenceTransitivity.
End CategoryEquivalence.