| 1 |
Require Import TestSuite.admit. |
| 2 |
(* File reduced by coq-bug-finder from 138 lines to 78 lines. *) |
| 3 |
Set Implicit Arguments. |
| 4 |
Generalizable All Variables. |
| 5 |
Set Universe Polymorphism. |
| 6 |
Delimit Scope object_scope with object. |
| 7 |
Delimit Scope morphism_scope with morphism. |
| 8 |
Delimit Scope category_scope with category. |
| 9 |
Record Category (obj : Type) := |
| 10 |
{ |
| 11 |
Object :> _ := obj; |
| 12 |
Morphism : obj -> obj -> Type; |
| 13 |
|
| 14 |
Identity : forall x, Morphism x x; |
| 15 |
Compose : forall s d d', Morphism d d' -> Morphism s d -> Morphism s d' |
| 16 |
}. |
| 17 |
|
| 18 |
Arguments Identity {obj%_type} [!C%_category] x%_object : rename. |
| 19 |
Arguments Compose {obj%_type} [!C%_category s%_object d%_object d'%_object] m1%_morphism m2%_morphism : rename. |
| 20 |
Bind Scope category_scope with Category. |
| 21 |
|
| 22 |
Record Functor `(C : @Category objC) `(D : @Category objD) |
| 23 |
:= { ObjectOf :> objC -> objD; |
| 24 |
MorphismOf : forall s d, C.(Morphism) s d -> D.(Morphism) (ObjectOf s) (ObjectOf d) }. |
| 25 |
|
| 26 |
Record NaturalTransformation `(C : @Category objC) `(D : @Category objD) (F G : Functor C D) |
| 27 |
:= { ComponentsOf :> forall c, D.(Morphism) (F c) (G c) }. |
| 28 |
|
| 29 |
Definition ProductCategory `(C : @Category objC) `(D : @Category objD) |
| 30 |
: @Category (objC * objD)%type |
| 31 |
:= @Build_Category _ |
| 32 |
(fun s d => (C.(Morphism) (fst s) (fst d) * D.(Morphism) (snd s) (snd d))%type) |
| 33 |
(fun o => (Identity (fst o), Identity (snd o))) |
| 34 |
(fun s d d' m2 m1 => (Compose (fst m2) (fst m1), Compose (snd m2) (snd m1))). |
| 35 |
|
| 36 |
Infix "*" := ProductCategory : category_scope. |
| 37 |
|
| 38 |
Record IsomorphismOf `{C : @Category objC} {s d} (m : C.(Morphism) s d) := |
| 39 |
{ IsomorphismOf_Morphism :> C.(Morphism) s d := m; |
| 40 |
Inverse : C.(Morphism) d s }. |
| 41 |
|
| 42 |
Record NaturalIsomorphism `(C : @Category objC) `(D : @Category objD) (F G : Functor C D) |
| 43 |
:= { NaturalIsomorphism_Transformation :> NaturalTransformation F G; |
| 44 |
NaturalIsomorphism_Isomorphism : forall x : objC, IsomorphismOf (NaturalIsomorphism_Transformation x) }. |
| 45 |
|
| 46 |
Section PreMonoidalCategory. |
| 47 |
Context `(C : @Category objC). |
| 48 |
Definition TriMonoidalProductL : Functor (C * C * C) C. |
| 49 |
admit. |
| 50 |
Defined. |
| 51 |
Definition TriMonoidalProductR : Functor (C * C * C) C. |
| 52 |
admit. |
| 53 |
Defined. (** Replacing [admit. Defined.] with [Admitted.] satisfies the constraints *) |
| 54 |
Variable Associator : NaturalIsomorphism TriMonoidalProductL TriMonoidalProductR. |
| 55 |
(* Toplevel input, characters 15-96: |
| 56 |
Error: Unsatisfied constraints: |
| 57 |
Stdlib.Init.Datatypes.28 <= Coq.Init.Datatypes.29 |
| 58 |
Top.168 <= Stdlib.Init.Datatypes.29 |
| 59 |
Top.168 <= Stdlib.Init.Datatypes.28 |
| 60 |
Top.169 <= Stdlib.Init.Datatypes.29 |
| 61 |
Top.169 <= Stdlib.Init.Datatypes.28 |
| 62 |
(maybe a bugged tactic). *) |
| 63 |
End PreMonoidalCategory. |