Skip to content

Commit

Permalink
feat(CategoryTheory/Category/RelCat): Make rel_iso_iff universe pol…
Browse files Browse the repository at this point in the history
…ymorphic. (#15854)

Make `rel_iso_iff` universe polymorphic by changing `C := Type` to `C := Type u`.
  • Loading branch information
nmertes7 authored and bjoernkjoshanssen committed Sep 9, 2024
1 parent cd83888 commit 12e4ce1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Mathlib/CategoryTheory/Category/RelCat.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ universe u

-- This file is about Lean 3 declaration "Rel".

/-- A type synonym for `Type`, which carries the category instance for which
/-- A type synonym for `Type u`, which carries the category instance for which
morphisms are binary relations. -/
def RelCat :=
Type u
Expand Down Expand Up @@ -83,17 +83,17 @@ instance graphFunctor_essSurj : graphFunctor.EssSurj :=
graphFunctor.essSurj_of_surj Function.surjective_id

/-- A relation is an isomorphism in `RelCat` iff it is the image of an isomorphism in
`Type`. -/
`Type u`. -/
theorem rel_iso_iff {X Y : RelCat} (r : X ⟶ Y) :
IsIso (C := RelCat) r ↔ ∃ f : (Iso (C := Type) X Y), graphFunctor.map f.hom = r := by
IsIso (C := RelCat) r ↔ ∃ f : (Iso (C := Type u) X Y), graphFunctor.map f.hom = r := by
constructor
· intro h
have h1 := congr_fun₂ h.hom_inv_id
have h2 := congr_fun₂ h.inv_hom_id
simp only [RelCat.Hom.rel_comp_apply₂, RelCat.Hom.rel_id_apply₂, eq_iff_iff] at h1 h2
obtain ⟨f, hf⟩ := Classical.axiomOfChoice (fun a => (h1 a a).mpr rfl)
obtain ⟨g, hg⟩ := Classical.axiomOfChoice (fun a => (h2 a a).mpr rfl)
suffices hif : IsIso (C := Type) f by
suffices hif : IsIso (C := Type u) f by
use asIso f
ext x y
simp only [asIso_hom, graphFunctor_map]
Expand Down

0 comments on commit 12e4ce1

Please sign in to comment.