@@ -69,23 +69,24 @@ structure Hom (P Q : Karoubi C) where
6969 /-- a morphism between the underlying objects -/
7070 f : P.X ⟶ Q.X
7171 /-- compatibility of the given morphism with the given idempotents -/
72- comm : f = P.p ≫ f ≫ Q.p := by aesop_cat
72+ comm : P.p ≫ f ≫ Q.p = f := by aesop_cat
7373
7474instance [Preadditive C] (P Q : Karoubi C) : Inhabited (Hom P Q) :=
7575 ⟨⟨0 , by rw [zero_comp, comp_zero]⟩⟩
7676
7777@[reassoc (attr := simp)]
78- theorem p_comp {P Q : Karoubi C} (f : Hom P Q) : P.p ≫ f.f = f.f := by rw [f.comm, ← assoc, P.idem]
78+ theorem p_comp {P Q : Karoubi C} (f : Hom P Q) : P.p ≫ f.f = f.f := by
79+ rw [← f.comm, ← assoc, P.idem]
7980
8081@[reassoc (attr := simp)]
8182theorem comp_p {P Q : Karoubi C} (f : Hom P Q) : f.f ≫ Q.p = f.f := by
82- rw [f.comm, assoc, assoc, Q.idem]
83+ rw [← f.comm, assoc, assoc, Q.idem]
8384
8485@[reassoc]
8586theorem p_comm {P Q : Karoubi C} (f : Hom P Q) : P.p ≫ f.f = f.f ≫ Q.p := by rw [p_comp, comp_p]
8687
8788theorem comp_proof {P Q R : Karoubi C} (g : Hom Q R) (f : Hom P Q) :
88- f.f ≫ g.f = P.p ≫ (f.f ≫ g.f) ≫ R.p := by rw [assoc, comp_p, ← assoc, p_comp]
89+ P.p ≫ (f.f ≫ g.f) ≫ R.p = f.f ≫ g.f := by simp
8990
9091/-- The category structure on the karoubi envelope of a category. -/
9192instance : Category (Karoubi C) where
@@ -144,7 +145,7 @@ variable {C}
144145
145146@[simps add]
146147instance instAdd [Preadditive C] {P Q : Karoubi C} : Add (P ⟶ Q) where
147- add f g := ⟨f.f + g.f, by rw [add_comp, comp_add, ← f.comm, ← g.comm]⟩
148+ add f g := ⟨f.f + g.f, by rw [add_comp, comp_add, f.comm, g.comm]⟩
148149
149150@[simps neg]
150151instance instNeg [Preadditive C] {P Q : Karoubi C} : Neg (P ⟶ Q) where
0 commit comments