Skip to content

Commit

Permalink
chore(CategoryTheory): universe polymorphic `CategoryTheory.Limits.Ty…
Browse files Browse the repository at this point in the history
…pes.coproductIso` (#8421)

Fixes a typo requiring matching universe levels in `CategoryTheory.Limits.Types.coproductIso`.
  • Loading branch information
dagurtomas committed Nov 16, 2023
1 parent 6d09b20 commit 7c434b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Mathlib/CategoryTheory/GlueData.lean
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ theorem types_π_surjective (D : GlueData (Type*)) : Function.Surjective D.π :=
(epi_iff_surjective _).mp inferInstance
#align category_theory.glue_data.types_π_surjective CategoryTheory.GlueData.types_π_surjective

theorem types_ι_jointly_surjective (D : GlueData (Type*)) (x : D.glued) :
theorem types_ι_jointly_surjective (D : GlueData (Type v)) (x : D.glued) :
∃ (i : _) (y : D.U i), D.ι i y = x := by
delta CategoryTheory.GlueData.ι
simp_rw [← Multicoequalizer.ι_sigmaπ D.diagram]
rcases D.types_π_surjective x with ⟨x', rfl⟩
--have := colimit.isoColimitCocone (Types.coproductColimitCocone _)
rw [← show (colimit.isoColimitCocone (Types.coproductColimitCocone _)).inv _ = x' from
rw [← show (colimit.isoColimitCocone (Types.coproductColimitCocone.{v, v} _)).inv _ = x' from
ConcreteCategory.congr_hom
(colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom_inv_id x']
rcases (colimit.isoColimitCocone (Types.coproductColimitCocone _)).hom x' with ⟨i, y⟩
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/CategoryTheory/Limits/Shapes/Types.lean
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ end UnivLE

/-- The category of types has `Σ j, f j` as the coproduct of a type family `f : J → Type`.
-/
def coproductColimitCocone {J : Type u} (F : J → Type u) :
def coproductColimitCocone {J : Type v} (F : J → TypeMax.{v, u}) :
Limits.ColimitCocone (Discrete.functor F) where
cocone :=
{ pt := Σj, F j
Expand All @@ -451,19 +451,19 @@ def coproductColimitCocone {J : Type u} (F : J → Type u) :
#align category_theory.limits.types.coproduct_colimit_cocone CategoryTheory.Limits.Types.coproductColimitCocone

/-- The categorical coproduct in `Type u` is the type theoretic coproduct `Σ j, F j`. -/
noncomputable def coproductIso {J : Type u} (F : J → Type u) : ∐ F ≅ Σj, F j :=
noncomputable def coproductIso {J : Type v} (F : J → TypeMax.{v, u}) : ∐ F ≅ Σj, F j :=
colimit.isoColimitCocone (coproductColimitCocone F)
#align category_theory.limits.types.coproduct_iso CategoryTheory.Limits.Types.coproductIso

@[elementwise (attr := simp)]
theorem coproductIso_ι_comp_hom {J : Type u} (F : J → Type u) (j : J) :
theorem coproductIso_ι_comp_hom {J : Type v} (F : J → TypeMax.{v, u}) (j : J) :
Sigma.ι F j ≫ (coproductIso F).hom = fun x : F j => (⟨j, x⟩ : Σj, F j) :=
colimit.isoColimitCocone_ι_hom (coproductColimitCocone F) ⟨j⟩
#align category_theory.limits.types.coproduct_iso_ι_comp_hom CategoryTheory.Limits.Types.coproductIso_ι_comp_hom

-- porting note: was @[elementwise (attr := simp)], but it produces a trivial lemma
-- removed simp attribute because it seems it never applies
theorem coproductIso_mk_comp_inv {J : Type u} (F : J → Type u) (j : J) :
theorem coproductIso_mk_comp_inv {J : Type v} (F : J → TypeMax.{v, u}) (j : J) :
(↾fun x : F j => (⟨j, x⟩ : Σj, F j)) ≫ (coproductIso F).inv = Sigma.ι F j :=
rfl
#align category_theory.limits.types.coproduct_iso_mk_comp_inv CategoryTheory.Limits.Types.coproductIso_mk_comp_inv
Expand Down

0 comments on commit 7c434b4

Please sign in to comment.