Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Homology/Opposite.lean
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,10 @@ section

variable [Preadditive V]

set_option backward.isDefEq.respectTransparency false in
example : Preadditive (HomologicalComplex Vᵒᵖ c) := inferInstance

instance opFunctor_additive : (@opFunctor ι V _ c _).Additive where

set_option backward.isDefEq.respectTransparency false in
instance unopFunctor_additive : (@unopFunctor ι V _ c _).Additive where

end
Expand Down
8 changes: 7 additions & 1 deletion Mathlib/CategoryTheory/Preadditive/Opposite.lean
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ namespace CategoryTheory
variable (C : Type*) [Category* C] [Preadditive C]

instance : Preadditive Cᵒᵖ where
homGroup X Y := Equiv.addCommGroup (opEquiv X Y)
homGroup X Y := fast_instance% Equiv.addCommGroup (opEquiv X Y)
add_comp _ _ _ f f' g := Quiver.Hom.unop_inj (Preadditive.comp_add _ _ _ g.unop f.unop f'.unop)
comp_add _ _ _ f g g' := Quiver.Hom.unop_inj (Preadditive.add_comp _ _ _ g.unop g'.unop f.unop)

/-- Test that the two ways to obtain the `HasZeroMorphisms Cᵒᵖ` instance
from `Preadditive C` are the same. -/
example : (instPreadditiveOpposite C).preadditiveHasZeroMorphisms =
@Limits.hasZeroMorphismsOpposite C _ Preadditive.preadditiveHasZeroMorphisms := by
with_reducible_and_instances rfl

instance moduleEndLeft {X Y : C} : Module (End X)ᵐᵒᵖ (X ⟶ Y) where
smul_add _ _ _ := Preadditive.comp_add _ _ _ _ _ _
smul_zero _ := Limits.comp_zero
Expand Down
Loading