| 1 |
Require Import TestSuite.admit. |
| 2 |
Set Universe Polymorphism. |
| 3 |
Set Implicit Arguments. |
| 4 |
Generalizable All Variables. |
| 5 |
|
| 6 |
Record SpecializedCategory (obj : Type) := |
| 7 |
{ |
| 8 |
Object :> _ := obj; |
| 9 |
Morphism : obj -> obj -> Type |
| 10 |
}. |
| 11 |
|
| 12 |
|
| 13 |
Record > Category := |
| 14 |
{ |
| 15 |
CObject : Type; |
| 16 |
|
| 17 |
UnderlyingCategory :> @SpecializedCategory CObject |
| 18 |
}. |
| 19 |
|
| 20 |
Record SpecializedFunctor `(C : @SpecializedCategory objC) `(D : @SpecializedCategory objD) := |
| 21 |
{ |
| 22 |
ObjectOf :> objC -> objD; |
| 23 |
MorphismOf : forall s d, C.(Morphism) s d -> D.(Morphism) (ObjectOf s) (ObjectOf d) |
| 24 |
}. |
| 25 |
|
| 26 |
(* Replacing this with [Definition Functor (C D : Category) := |
| 27 |
SpecializedFunctor C D.] gets rid of the universe inconsistency. *) |
| 28 |
Section Functor. |
| 29 |
Variable C D : Category. |
| 30 |
|
| 31 |
Definition Functor := SpecializedFunctor C D. |
| 32 |
End Functor. |
| 33 |
|
| 34 |
Record SpecializedNaturalTransformation `(C : @SpecializedCategory objC) `(D : @SpecializedCategory objD) (F G : SpecializedFunctor C D) := |
| 35 |
{ |
| 36 |
ComponentsOf :> forall c, D.(Morphism) (F c) (G c) |
| 37 |
}. |
| 38 |
|
| 39 |
Definition FunctorProduct' `(F : Functor C D) : SpecializedFunctor C D. |
| 40 |
admit. |
| 41 |
Defined. |
| 42 |
|
| 43 |
Definition TypeCat : @SpecializedCategory Type. |
| 44 |
admit. |
| 45 |
Defined. |
| 46 |
|
| 47 |
|
| 48 |
Definition CovariantHomFunctor `(C : @SpecializedCategory objC) : SpecializedFunctor C TypeCat. |
| 49 |
refine (Build_SpecializedFunctor C TypeCat |
| 50 |
(fun X : C => C.(Morphism) X X) |
| 51 |
_ |
| 52 |
); admit. |
| 53 |
Defined. |
| 54 |
|
| 55 |
Definition FunctorCategory `(C : @SpecializedCategory objC) `(D : @SpecializedCategory objD) : @SpecializedCategory (SpecializedFunctor C D). |
| 56 |
refine (@Build_SpecializedCategory _ |
| 57 |
(SpecializedNaturalTransformation (C := C) (D := D))). |
| 58 |
Defined. |
| 59 |
|
| 60 |
Definition Yoneda `(C : @SpecializedCategory objC) : SpecializedFunctor C (FunctorCategory C TypeCat). |
| 61 |
match goal with |
| 62 |
| [ |- SpecializedFunctor ?C0 ?D0 ] => |
| 63 |
refine (Build_SpecializedFunctor C0 D0 |
| 64 |
(fun c => CovariantHomFunctor C) |
| 65 |
_ |
| 66 |
) |
| 67 |
end; |
| 68 |
admit. |
| 69 |
Defined. |
| 70 |
|
| 71 |
Section FullyFaithful. |
| 72 |
Context `(C : @SpecializedCategory objC). |
| 73 |
Let TypeCatC := FunctorCategory C TypeCat. |
| 74 |
Let YC := (Yoneda C). |
| 75 |
Set Printing Universes. |
| 76 |
Check @FunctorProduct' C TypeCatC YC. (* Toplevel input, characters 0-37: |
| 77 |
Error: Universe inconsistency. Cannot enforce Top.187 = Top.186 because |
| 78 |
Top.186 <= Top.189 < Top.191 <= Top.187). *) |
| 79 |
End FullyFaithful. |