Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 68c98eb

Browse files
rwbartondigama0
authored andcommitted
feat(category_theory/isomorphism): lemmas for manipulating isomorphisms
1 parent 382abaf commit 68c98eb

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

category_theory/equivalence.lean

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -239,14 +239,7 @@ section
239239
{ obj := λ X, F.obj_preimage X,
240240
map := λ X Y f, F.preimage ((F.fun_obj_preimage_iso X).hom ≫ f ≫ (F.fun_obj_preimage_iso Y).inv),
241241
map_id' := λ X, begin apply F.injectivity, tidy, end,
242-
map_comp' := λ X Y Z f g,
243-
begin
244-
apply F.injectivity,
245-
/- obviously can finish from here... -/
246-
simp,
247-
slice_rhs 2 3 { erw [is_iso.hom_inv_id] },
248-
simp,
249-
end }.
242+
map_comp' := λ X Y Z f g, by apply F.injectivity; simp }.
250243

251244
def equivalence_of_fully_faithfully_ess_surj
252245
(F : C ⥤ D) [full F] [faithful : faithful F] [ess_surj F] : is_equivalence F :=
@@ -261,4 +254,4 @@ end
261254

262255
end category_theory.equivalence
263256

264-
end category_theory
257+
end category_theory

category_theory/isomorphism.lean

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ variables {X Y Z : C}
2626

2727
namespace iso
2828

29+
@[simp] lemma hom_inv_id_assoc (α : X ≅ Y) (f : X ⟶ Z) : α.hom ≫ α.inv ≫ f = f :=
30+
by rw [←category.assoc, α.hom_inv_id, category.id_comp]
31+
32+
@[simp] lemma inv_hom_id_assoc (α : X ≅ Y) (f : Y ⟶ Z) : α.inv ≫ α.hom ≫ f = f :=
33+
by rw [←category.assoc, α.inv_hom_id, category.id_comp]
34+
2935
@[extensionality] lemma ext
3036
(α β : X ≅ Y)
3137
(w : α.hom = β.hom) : α = β :=
@@ -82,6 +88,18 @@ infixr ` ≪≫ `:80 := iso.trans -- type as `\ll \gg`.
8288
@[simp] lemma refl_symm (X : C) : (iso.refl X).hom = 𝟙 X := rfl
8389
@[simp] lemma trans_symm (α : X ≅ Y) (β : Y ≅ Z) : (α ≪≫ β).inv = β.inv ≫ α.inv := rfl
8490

91+
lemma inv_comp_eq (α : X ≅ Y) {f : X ⟶ Z} {g : Y ⟶ Z} : α.inv ≫ f = g ↔ f = α.hom ≫ g :=
92+
⟨λ H, by simp [H.symm], λ H, by simp [H]⟩
93+
94+
lemma eq_inv_comp (α : X ≅ Y) {f : X ⟶ Z} {g : Y ⟶ Z} : g = α.inv ≫ f ↔ α.hom ≫ g = f :=
95+
(inv_comp_eq α.symm).symm
96+
97+
lemma comp_inv_eq (α : X ≅ Y) {f : Z ⟶ Y} {g : Z ⟶ X} : f ≫ α.inv = g ↔ f = g ≫ α.hom :=
98+
⟨λ H, by simp [H.symm], λ H, by simp [H]⟩
99+
100+
lemma eq_comp_inv (α : X ≅ Y) {f : Z ⟶ Y} {g : Z ⟶ X} : g = f ≫ α.inv ↔ g ≫ α.hom = f :=
101+
(comp_inv_eq α.symm).symm
102+
85103
end iso
86104

87105
/-- `is_iso` typeclass expressing that a morphism is invertible.

category_theory/natural_isomorphism.lean

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ def of_components (app : ∀ X : C, (F.obj X) ≅ (G.obj X))
7878
inv :=
7979
{ app := λ X, ((app X).inv),
8080
naturality' := λ X Y f,
81-
begin
82-
let p := congr_arg (λ f, (app X).inv ≫ (f ≫ (app Y).inv)) (eq.symm (naturality f)),
83-
dsimp at *,
84-
simp at *,
85-
erw [←p, ←category.assoc, is_iso.hom_inv_id, category.id_comp],
86-
end } }.
81+
by simpa using congr_arg (λ f, (app X).inv ≫ (f ≫ (app Y).inv)) (eq.symm (naturality f)) } }
8782

8883
@[simp] def of_components.app (app' : ∀ X : C, (F.obj X) ≅ (G.obj X)) (naturality) (X) :
8984
app (of_components app' naturality) X = app' X :=

0 commit comments

Comments
 (0)