From 9468e4b49bd2f397b5e1bd2b7994cc84929fb6ac Mon Sep 17 00:00:00 2001 From: Amin Timany Date: Thu, 27 Apr 2017 20:16:35 +0200 Subject: Fix bugs and add an option for cumulativity --- test-suite/bugs/closed/3330.v | 11 ++++++--- test-suite/success/polymorphism.v | 52 ++++++++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 23 deletions(-) (limited to 'test-suite') diff --git a/test-suite/bugs/closed/3330.v b/test-suite/bugs/closed/3330.v index e3b5e9435..a497e7a98 100644 --- a/test-suite/bugs/closed/3330.v +++ b/test-suite/bugs/closed/3330.v @@ -41,6 +41,8 @@ Notation "g 'o' f" := (compose g f) (at level 40, left associativity) : function Open Scope function_scope. +Set Printing Universes. Set Printing All. + Inductive paths {A : Type} (a : A) : A -> Type := idpath : paths a a. @@ -156,7 +158,8 @@ Delimit Scope morphism_scope with morphism. Delimit Scope category_scope with category. Delimit Scope object_scope with object. - +Set Printing Universes. +Set Printing All. Record PreCategory := Build_PreCategory' { object :> Type; @@ -1069,8 +1072,10 @@ Section Adjunction. Variable F : Functor C D. Variable G : Functor D C. - Let Adjunction_Type := - Eval simpl in (hom_functor D) o (F^op, 1) <~=~> (hom_functor C) o (1, G). +(* Let Adjunction_Type := + Eval simpl in (hom_functor D) o (F^op, 1) <~=~> (hom_functor C) o (1, G).*) + + Set Printing All. Set Printing Universes. Record AdjunctionHom := { diff --git a/test-suite/success/polymorphism.v b/test-suite/success/polymorphism.v index 3e90825ab..f57cbcc2b 100644 --- a/test-suite/success/polymorphism.v +++ b/test-suite/success/polymorphism.v @@ -316,26 +316,6 @@ Module Hurkens'. Polymorphic Record box (X : Type) (T := Type) : Type := wrap { unwrap : T }. -Section test_letin_subtyping. - Universe i j k i' j' k'. - Constraint j < j'. - - Context (W : Type) (X : box@{i j k} W). - Definition Y := X : box@{i' j' k'} W. - - Universe i1 j1 k1 i2 j2 k2. - Constraint i1 < i2, k2 < k1. - Definition Z : box@{i1 j1 k1} W := {| unwrap := W |}. - Definition Z' : box@{i2 j2 k2} W := {| unwrap := W |}. - Lemma ZZ' : @eq (box@{i2 j2 k2} W) Z Z'. - Proof. - Set Printing All. Set Printing Universes. - cbv. - reflexivity. - Qed. - -End test_letin_subtyping. - Definition unwrap' := fun (X : Type) (b : box X) => let (unw) := b in unw. Fail Definition bad : False := TypeNeqSmallType.paradox (unwrap' Type (wrap _ @@ -372,3 +352,35 @@ Module Anonymous. Check collapsethemiddle@{_ _}. End Anonymous. + +Module F. + Context {A B : Type}. + Definition foo : Type := B. +End F. + +Set Universe Polymorphism. + +Record box (X : Type) (T := Type) : Type := wrap { unwrap : T }. + +Section test_letin_subtyping. + Universe i j k i' j' k'. + Constraint j < j'. + + Context (W : Type) (X : box@{i j k} W). + Definition Y := X : box@{i' j' k'} W. + + Universe i1 j1 k1 i2 j2 k2. + Constraint i1 < i2. + Constraint k2 < k1. + Context (V : Type). + + Definition Z : box@{i1 j1 k1} V := {| unwrap := V |}. + Definition Z' : box@{i2 j2 k2} V := {| unwrap := V |}. + Lemma ZZ' : @eq (box@{i2 j2 k2} V) Z Z'. + Proof. + Set Printing All. Set Printing Universes. + cbv. + reflexivity. + Qed. + +End test_letin_subtyping. -- cgit v1.2.3