diff options
author | Jason Gross <jgross@mit.edu> | 2014-05-06 09:51:21 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2014-05-06 16:11:43 -0400 |
commit | d1a39e06c44dc451d8a56a286017885d400ac435 (patch) | |
tree | f83237ecf03b9d809d888ea31a842e6fb6d716d0 /test-suite/bugs/closed/HoTT_coq_099.v | |
parent | d40091c015b68cc1a8403ca5dcc74323bf939f37 (diff) |
Add regression tests for univ. poly. and prim proj
These regression tests are aggregated from the various bugs I (and
others) have reported on https://github.com/HoTT/coq/issues relating to
universe polymorphism, primitive projections, and eta for records.
These are the tests that trunk currently passes.
I'm not sure about the naming scheme (HoTT_coq_###.v, where ### is the
number of the issue in GitHub), but I couldn't think of a better one.
Diffstat (limited to 'test-suite/bugs/closed/HoTT_coq_099.v')
-rw-r--r-- | test-suite/bugs/closed/HoTT_coq_099.v | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/HoTT_coq_099.v b/test-suite/bugs/closed/HoTT_coq_099.v new file mode 100644 index 000000000..9b6ace824 --- /dev/null +++ b/test-suite/bugs/closed/HoTT_coq_099.v @@ -0,0 +1,61 @@ +(* File reduced by coq-bug-finder from 138 lines to 78 lines. *) +Set Implicit Arguments. +Generalizable All Variables. +Set Universe Polymorphism. +Delimit Scope object_scope with object. +Delimit Scope morphism_scope with morphism. +Delimit Scope category_scope with category. +Record Category (obj : Type) := + { + Object :> _ := obj; + Morphism : obj -> obj -> Type; + + Identity : forall x, Morphism x x; + Compose : forall s d d', Morphism d d' -> Morphism s d -> Morphism s d' + }. + +Arguments Identity {obj%type} [!C%category] x%object : rename. +Arguments Compose {obj%type} [!C%category s%object d%object d'%object] m1%morphism m2%morphism : rename. +Bind Scope category_scope with Category. + +Record Functor `(C : @Category objC) `(D : @Category objD) + := { ObjectOf :> objC -> objD; + MorphismOf : forall s d, C.(Morphism) s d -> D.(Morphism) (ObjectOf s) (ObjectOf d) }. + +Record NaturalTransformation `(C : @Category objC) `(D : @Category objD) (F G : Functor C D) + := { ComponentsOf :> forall c, D.(Morphism) (F c) (G c) }. + +Definition ProductCategory `(C : @Category objC) `(D : @Category objD) +: @Category (objC * objD)%type + := @Build_Category _ + (fun s d => (C.(Morphism) (fst s) (fst d) * D.(Morphism) (snd s) (snd d))%type) + (fun o => (Identity (fst o), Identity (snd o))) + (fun s d d' m2 m1 => (Compose (fst m2) (fst m1), Compose (snd m2) (snd m1))). + +Infix "*" := ProductCategory : category_scope. + +Record IsomorphismOf `{C : @Category objC} {s d} (m : C.(Morphism) s d) := + { IsomorphismOf_Morphism :> C.(Morphism) s d := m; + Inverse : C.(Morphism) d s }. + +Record NaturalIsomorphism `(C : @Category objC) `(D : @Category objD) (F G : Functor C D) + := { NaturalIsomorphism_Transformation :> NaturalTransformation F G; + NaturalIsomorphism_Isomorphism : forall x : objC, IsomorphismOf (NaturalIsomorphism_Transformation x) }. + +Section PreMonoidalCategory. + Context `(C : @Category objC). + Definition TriMonoidalProductL : Functor (C * C * C) C. + admit. + Defined. + Definition TriMonoidalProductR : Functor (C * C * C) C. + admit. + Defined. (** Replacing [admit. Defined.] with [Admitted.] satisfies the constraints *) + Variable Associator : NaturalIsomorphism TriMonoidalProductL TriMonoidalProductR. + (* Toplevel input, characters 15-96: +Error: Unsatisfied constraints: +Coq.Init.Datatypes.28 <= Coq.Init.Datatypes.29 +Top.168 <= Coq.Init.Datatypes.29 +Top.168 <= Coq.Init.Datatypes.28 +Top.169 <= Coq.Init.Datatypes.29 +Top.169 <= Coq.Init.Datatypes.28 + (maybe a bugged tactic). *) |