Skip to content

Commit

Permalink
feat(CategoryTheory): AsSmall C is abelian
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoFX committed Feb 22, 2025
1 parent 8d0660f commit 626d924
Showing 1 changed file with 37 additions and 13 deletions.
50 changes: 37 additions & 13 deletions Mathlib/CategoryTheory/Abelian/Transfer.lean
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,6 @@ section Preadditive

variable [Preadditive C]

noncomputable instance homGroup (P Q : ShrinkHoms C) : AddCommGroup (P ⟶ Q : Type w) :=
Equiv.addCommGroup (equivShrink _).symm

lemma functor_map_add {P Q : C} (f g : P ⟶ Q) :
(functor C).map (f + g) =
(functor C).map f + (functor C).map g := by
exact map_add (equivShrink.{w} (P ⟶ Q)).symm.addEquiv.symm f g

lemma inverse_map_add {P Q : ShrinkHoms C} (f g : P ⟶ Q) :
(inverse C).map (f + g) =
(inverse C).map f + (ShrinkHoms.inverse C).map g :=
map_add (equivShrink.{w} (P.fromShrinkHoms ⟶ Q.fromShrinkHoms)).symm.addEquiv f g

variable (C)

instance preadditive : Preadditive.{w} (ShrinkHoms C) :=
Expand All @@ -158,4 +145,41 @@ noncomputable instance abelian [Abelian C] :

end ShrinkHoms


namespace AsSmall

universe w v u

variable {C : Type u} [Category.{v} C]

section Preadditive

variable [Preadditive C]

variable (C)

instance preadditive : Preadditive (AsSmall.{w} C) :=
.ofFullyFaithful equiv.fullyFaithfulInverse

instance : (down (C := C)).Additive :=
equiv.symm.fullyFaithfulFunctor.additive_ofFullyFaithful

instance : (up (C := C)).Additive :=
equiv.symm.additive_inverse_of_FullyFaithful

instance hasLimitsOfShape (J : Type*) [Category J]
[HasLimitsOfShape J C] : HasLimitsOfShape.{_, _, max u v w} J (AsSmall.{w} C) :=
Adjunction.hasLimitsOfShape_of_equivalence equiv.inverse

instance hasFiniteLimits [HasFiniteLimits C] :
HasFiniteLimits (AsSmall.{w} C) := ⟨fun _ => inferInstance⟩

end Preadditive

variable (C) in
noncomputable instance abelian [Abelian C] :
Abelian (AsSmall.{w} C) := abelianOfEquivalence equiv.inverse

end AsSmall

end CategoryTheory

0 comments on commit 626d924

Please sign in to comment.