Module Comment1.
Set Implicit Arguments.
Polymorphic Record Category (obj : Type) :=
{
Morphism : obj -> obj -> Type;
Identity : forall o, Morphism o o
}.
Polymorphic Record Functor objC (C :Category objC) objD (D : Category objD) :=
{
ObjectOf :> objC -> objD;
MorphismOf : forall s d, C.(Morphism) s d -> D.(Morphism) (ObjectOf s) (ObjectOf d);
FIdentityOf : forall o, MorphismOf _ _ (C.(Identity) o) = D.(Identity) (ObjectOf o)
}.
Create HintDb functor discriminated.
Hint Rewrite @FIdentityOf : functor.
Polymorphic Definition ComposeFunctors objC C objD D objE E (G : @Functor objD D objE E) (F : @Functor objC C objD D) : Functor C E.
refine {| ObjectOf := (fun c => G (F c));
MorphismOf := (fun _ _ m => G.(MorphismOf) _ _ (F.(MorphismOf) _ _ m))
|};
intros; autorewrite with functor; reflexivity.
Defined.
Definition Cat0 : Category@{i j} Empty_set.
refine {|
Morphism := fun s d : Empty_set => s = d;
Identity := fun o : Empty_set => eq_refl
|};
admit.
Defined.
Set Printing All.
Set Printing Universes.

Lemma foo objC (C : @Category objC) (C0 : Category (Functor Cat0 C)) (x : Functor Cat0 Cat0)
: forall (y : Functor C0 Cat0) z, (ComposeFunctors y z = x).