-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(category_theory): def
is_isomorphic_setoid
, `groupoid.iso_equi…
…v_hom` (#1506) * feat(category_theory): def `is_isomorphic_setoid`, `groupoid.iso_equiv_hom` * Move to a dedicated file, define `isomorphic_class_functor` * explicit/implicit arguments * Update src/category_theory/groupoid.lean * Update src/category_theory/groupoid.lean * Update src/category_theory/isomorphism_classes.lean * Update src/category_theory/isomorphism_classes.lean * Update src/category_theory/isomorphism_classes.lean
- Loading branch information
1 parent
e5fc2a7
commit a1c0ad5
Showing
2 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/- | ||
Copyright (c) 2019 Yury Kudryashov. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Yury Kudryashov | ||
-/ | ||
import category_theory.category.Cat category_theory.groupoid data.quot | ||
|
||
/-! | ||
# Objects of a category up to an isomorphism | ||
`is_isomorphic X Y := nonempty (X ≅ Y)` is an equivalence relation on the objects of a category. | ||
The quotient with respect to this relation defines a functor from our category to `Type`. | ||
-/ | ||
|
||
universes v u | ||
|
||
namespace category_theory | ||
|
||
section category | ||
|
||
variables {C : Type u} [𝒞 : category.{v} C] | ||
include 𝒞 | ||
|
||
/-- An object `X` is isomorphic to an object `Y`, if `X ≅ Y` is not empty. -/ | ||
def is_isomorphic : C → C → Prop := λ X Y, nonempty (X ≅ Y) | ||
|
||
variable (C) | ||
|
||
/-- `is_isomorphic` defines a setoid. -/ | ||
def is_isomorphic_setoid : setoid C := | ||
{ r := is_isomorphic, | ||
iseqv := ⟨λ X, ⟨iso.refl X⟩, λ X Y ⟨α⟩, ⟨α.symm⟩, λ X Y Z ⟨α⟩ ⟨β⟩, ⟨α.trans β⟩⟩ } | ||
|
||
end category | ||
|
||
/-- | ||
The functor that sends each category to the quotient space of its objects up to an isomorphism. | ||
-/ | ||
def isomorphism_classes : Cat.{v u} ⥤ Type u := | ||
{ obj := λ C, quotient (is_isomorphic_setoid C.α), | ||
map := λ C D F, quot.map F.obj $ λ X Y ⟨f⟩, ⟨F.map_iso f⟩ } | ||
|
||
lemma groupoid.is_isomorphic_iff_nonempty_hom {C : Type u} [groupoid.{v} C] {X Y : C} : | ||
is_isomorphic X Y ↔ nonempty (X ⟶ Y) := | ||
(groupoid.iso_equiv_hom X Y).nonempty_iff_nonempty | ||
|
||
-- PROJECT: define `skeletal`, and show every category is equivalent to a skeletal category, | ||
-- using the axiom of choice to pick a representative of every isomorphism class. | ||
end category_theory |