@@ -33,13 +33,13 @@ powerful tactics.
33
33
def_replacer obviously
34
34
@[obviously] meta def obviously' := tactic.tidy
35
35
36
- class has_hom (obj : Type u) : Type (max u (v+1 )) :=
37
- (hom : obj → obj → Type v)
36
+ class has_hom (obj : Sort u) : Sort (max u (v+1 )) :=
37
+ (hom : obj → obj → Sort v)
38
38
39
39
infixr ` ⟶ `:10 := has_hom.hom -- type as \h
40
40
41
- class category_struct (obj : Type u)
42
- extends has_hom.{v} obj :=
41
+ class category_struct (obj : Sort u)
42
+ extends has_hom.{v} obj : Sort (max u (v+ 1 )) : =
43
43
(id : Π X : obj, hom X X)
44
44
(comp : Π {X Y Z : obj}, (X ⟶ Y) → (Y ⟶ Z) → (X ⟶ Z))
45
45
@@ -51,8 +51,8 @@ The typeclass `category C` describes morphisms associated to objects of type `C`
51
51
The universe levels of the objects and morphisms are unconstrained, and will often need to be
52
52
specified explicitly, as `category.{v} C`. (See also `large_category` and `small_category`.)
53
53
-/
54
- class category (obj : Type u)
55
- extends category_struct.{v} obj :=
54
+ class category (obj : Sort u)
55
+ extends category_struct.{v} obj : Sort (max u (v+ 1 )) : =
56
56
(id_comp' : ∀ {X Y : obj} (f : hom X Y), 𝟙 X ≫ f = f . obviously)
57
57
(comp_id' : ∀ {X Y : obj} (f : hom X Y), f ≫ 𝟙 Y = f . obviously)
58
58
(assoc' : ∀ {W X Y Z : obj} (f : hom W X) (g : hom X Y) (h : hom Y Z),
@@ -76,14 +76,14 @@ A `large_category` has objects in one universe level higher than the universe le
76
76
the morphisms. It is useful for examples such as the category of types, or the category
77
77
of groups, etc.
78
78
-/
79
- abbreviation large_category (C : Type (u+1 )) : Type (u+1 ) := category.{u} C
79
+ abbreviation large_category (C : Sort (u+1 )) : Sort (u+1 ) := category.{u} C
80
80
/--
81
81
A `small_category` has objects and morphisms in the same universe level.
82
82
-/
83
- abbreviation small_category (C : Type u) : Type (u+1 ) := category.{u} C
83
+ abbreviation small_category (C : Sort u) : Sort (u+1 ) := category.{u} C
84
84
85
85
section
86
- variables {C : Type u} [𝒞 : category.{v} C] {X Y Z : C}
86
+ variables {C : Sort u} [𝒞 : category.{v} C] {X Y Z : C}
87
87
include 𝒞
88
88
89
89
class epi (f : X ⟶ Y) : Prop :=
@@ -124,14 +124,14 @@ variables {C : Type u}
124
124
125
125
def End [has_hom.{v} C] (X : C) := X ⟶ X
126
126
127
- instance End.has_one [category_struct.{v} C] {X : C} : has_one (End X) := by refine { one := 𝟙 X }
128
- instance End.has_mul [category_struct.{v} C] {X : C} : has_mul (End X) := by refine { mul := λ x y, x ≫ y }
129
- instance End.monoid [category.{v} C] {X : C} : monoid (End X) :=
127
+ instance End.has_one [category_struct.{v+ 1 } C] {X : C} : has_one (End X) := by refine { one := 𝟙 X }
128
+ instance End.has_mul [category_struct.{v+ 1 } C] {X : C} : has_mul (End X) := by refine { mul := λ x y, x ≫ y }
129
+ instance End.monoid [category.{v+ 1 } C] {X : C} : monoid (End X) :=
130
130
by refine { .. End.has_one, .. End.has_mul, .. }; dsimp [has_mul.mul,has_one.one]; obviously
131
131
132
- @[simp] lemma End.one_def {C : Type u} [category_struct.{v} C] {X : C} : (1 : End X) = 𝟙 X := rfl
132
+ @[simp] lemma End.one_def {C : Type u} [category_struct.{v+ 1 } C] {X : C} : (1 : End X) = 𝟙 X := rfl
133
133
134
- @[simp] lemma End.mul_def {C : Type u} [category_struct.{v} C] {X : C} (xs ys : End X) : xs * ys = xs ≫ ys := rfl
134
+ @[simp] lemma End.mul_def {C : Type u} [category_struct.{v+ 1 } C] {X : C} (xs ys : End X) : xs * ys = xs ≫ ys := rfl
135
135
136
136
end
137
137
0 commit comments