Skip to content

Commit

Permalink
chore(CategoryTheory): move Full, Faithful, EssSurj, IsEquivalence an…
Browse files Browse the repository at this point in the history
…d ReflectsIsomorphisms to the Functor namespace (#11985)

These notions on functors are now `Functor.Full`, `Functor.Faithful`, `Functor.EssSurj`, `Functor.IsEquivalence`, `Functor.ReflectsIsomorphisms`. Deprecated aliases are introduced for the previous names.
  • Loading branch information
joelriou committed Apr 12, 2024
1 parent eb0a213 commit 65b7aff
Show file tree
Hide file tree
Showing 177 changed files with 840 additions and 782 deletions.
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Category/AlgebraCat/Basic.lean
Expand Up @@ -247,7 +247,7 @@ def algEquivIsoAlgebraIso {X Y : Type u} [Ring X] [Ring Y] [Algebra R X] [Algebr
instance (X : Type u) [Ring X] [Algebra R X] : CoeOut (Subalgebra R X) (AlgebraCat R) :=
fun N => AlgebraCat.of R N⟩

instance AlgebraCat.forget_reflects_isos : ReflectsIsomorphisms (forget (AlgebraCat.{u} R)) where
instance AlgebraCat.forget_reflects_isos : (forget (AlgebraCat.{u} R)).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget (AlgebraCat.{u} R)).map f)
let e : X ≃ₐ[R] Y := { f, i.toEquiv with }
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Category/AlgebraCat/Monoidal.lean
Expand Up @@ -99,7 +99,7 @@ def toModuleCatMonoidalFunctor : MonoidalFunctor (AlgebraCat.{u} R) (ModuleCat.{
unfold instMonoidalCategory
exact Monoidal.fromInduced (forget₂ (AlgebraCat R) (ModuleCat R)) _

instance : Faithful (toModuleCatMonoidalFunctor R).toFunctor :=
instance : (toModuleCatMonoidalFunctor R).Faithful :=
forget₂_faithful _ _

end
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Category/AlgebraCat/Symmetric.lean
Expand Up @@ -35,7 +35,7 @@ variable (R) in
def toModuleCatBraidedFunctor : BraidedFunctor (AlgebraCat.{u} R) (ModuleCat.{u} R) where
toMonoidalFunctor := toModuleCatMonoidalFunctor R

instance : Faithful (toModuleCatBraidedFunctor R).toFunctor :=
instance : (toModuleCatBraidedFunctor R).Faithful :=
forget₂_faithful _ _

instance instSymmetricCategory : SymmetricCategory (AlgebraCat.{u} R) :=
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Algebra/Category/FGModuleCat/Basic.lean
Expand Up @@ -118,7 +118,7 @@ instance : HasForget₂ (FGModuleCat.{u} R) (ModuleCat.{u} R) := by
dsimp [FGModuleCat]
infer_instance

instance : Full (forget₂ (FGModuleCat R) (ModuleCat.{u} R)) where
instance : (forget₂ (FGModuleCat R) (ModuleCat.{u} R)).Full where
preimage f := f

variable {R}
Expand Down Expand Up @@ -183,19 +183,19 @@ def forget₂Monoidal : MonoidalFunctor (FGModuleCat R) (ModuleCat.{u} R) :=
MonoidalCategory.fullMonoidalSubcategoryInclusion _
#align fgModule.forget₂_monoidal FGModuleCat.forget₂Monoidal

instance forget₂Monoidal_faithful : Faithful (forget₂Monoidal R).toFunctor := by
instance forget₂Monoidal_faithful : (forget₂Monoidal R).Faithful := by
dsimp [forget₂Monoidal]
-- Porting note (#11187): was `infer_instance`
exact FullSubcategory.faithful _
#align fgModule.forget₂_monoidal_faithful FGModuleCat.forget₂Monoidal_faithful

instance forget₂Monoidal_additive : (forget₂Monoidal R).toFunctor.Additive := by
instance forget₂Monoidal_additive : (forget₂Monoidal R).Additive := by
dsimp [forget₂Monoidal]
-- Porting note (#11187): was `infer_instance`
exact Functor.fullSubcategoryInclusion_additive _
#align fgModule.forget₂_monoidal_additive FGModuleCat.forget₂Monoidal_additive

instance forget₂Monoidal_linear : (forget₂Monoidal R).toFunctor.Linear R := by
instance forget₂Monoidal_linear : (forget₂Monoidal R).Linear R := by
dsimp [forget₂Monoidal]
-- Porting note (#11187): was `infer_instance`
exact Functor.fullSubcategoryInclusionLinear _ _
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Category/GroupCat/Basic.lean
Expand Up @@ -485,7 +485,7 @@ set_option linter.uppercaseLean3 false in
end CategoryTheory.Aut

@[to_additive]
instance GroupCat.forget_reflects_isos : ReflectsIsomorphisms (forget GroupCat.{u}) where
instance GroupCat.forget_reflects_isos : (forget GroupCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget GroupCat).map f)
let e : X ≃* Y := { i.toEquiv with map_mul' := map_mul _ }
Expand All @@ -496,7 +496,7 @@ set_option linter.uppercaseLean3 false in
#align AddGroup.forget_reflects_isos AddGroupCat.forget_reflects_isos

@[to_additive]
instance CommGroupCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommGroupCat.{u}) where
instance CommGroupCat.forget_reflects_isos : (forget CommGroupCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget CommGroupCat).map f)
let e : X ≃* Y := { i.toEquiv with map_mul' := map_mul _}
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Category/GroupCat/Limits.lean
Expand Up @@ -86,7 +86,7 @@ reuse the existing limit."]
noncomputable instance Forget₂.createsLimit :
CreatesLimit F (forget₂ GroupCat.{u} MonCat.{u}) :=
-- Porting note: need to add `forget₂ GrpCat MonCat` reflects isomorphism
letI : ReflectsIsomorphisms (forget₂ GroupCat.{u} MonCat.{u}) :=
letI : (forget₂ GroupCat.{u} MonCat.{u}).ReflectsIsomorphisms :=
CategoryTheory.reflectsIsomorphisms_forget₂ _ _
createsLimitOfReflectsIso (K := F) (F := (forget₂ GroupCat.{u} MonCat.{u}))
fun c' t =>
Expand Down Expand Up @@ -258,7 +258,7 @@ and then reuse the existing limit.
and then reuse the existing limit."]
noncomputable instance Forget₂.createsLimit :
CreatesLimit F (forget₂ CommGroupCat GroupCat.{u}) :=
letI : ReflectsIsomorphisms (forget₂ CommGroupCat.{u} GroupCat.{u}) :=
letI : (forget₂ CommGroupCat.{u} GroupCat.{u}).ReflectsIsomorphisms :=
CategoryTheory.reflectsIsomorphisms_forget₂ _ _
letI : Small.{u}
(Functor.sections ((F ⋙ forget₂ CommGroupCat GroupCat) ⋙ forget GroupCat)) :=
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Algebra/Category/GroupCat/ZModuleEquivalence.lean
Expand Up @@ -26,7 +26,7 @@ universe u
namespace ModuleCat

/-- The forgetful functor from `ℤ` modules to `AddCommGroup` is full. -/
instance forget₂AddCommGroupFull : Full (forget₂ (ModuleCat ℤ) AddCommGroupCat.{u}) where
instance forget₂AddCommGroupFull : (forget₂ (ModuleCat ℤ) AddCommGroupCat.{u}).Full where
preimage {A B}
-- `AddMonoidHom.toIntLinearMap` doesn't work here because `A` and `B` are not
-- definitionally equal to the canonical `AddCommGroup.intModule` module
Expand All @@ -41,7 +41,7 @@ set_option linter.uppercaseLean3 false in
#align Module.forget₂_AddCommGroup_full ModuleCat.forget₂AddCommGroupFull

/-- The forgetful functor from `ℤ` modules to `AddCommGroup` is essentially surjective. -/
instance forget₂_addCommGroupCat_essSurj : EssSurj (forget₂ (ModuleCat ℤ) AddCommGroupCat.{u}) where
instance forget₂_addCommGroupCat_essSurj : (forget₂ (ModuleCat ℤ) AddCommGroupCat.{u}).EssSurj where
mem_essImage A :=
⟨ModuleCat.of ℤ A,
⟨{ hom := 𝟙 A
Expand All @@ -50,8 +50,8 @@ set_option linter.uppercaseLean3 false in
#align Module.forget₂_AddCommGroup_ess_surj ModuleCat.forget₂_addCommGroupCat_essSurj

noncomputable instance forget₂AddCommGroupIsEquivalence :
IsEquivalence (forget₂ (ModuleCat ℤ) AddCommGroupCat.{u}) :=
Equivalence.ofFullyFaithfullyEssSurj (forget₂ (ModuleCat ℤ) AddCommGroupCat)
(forget₂ (ModuleCat ℤ) AddCommGroupCat.{u}).IsEquivalence :=
Functor.IsEquivalence.ofFullyFaithfullyEssSurj (forget₂ (ModuleCat ℤ) AddCommGroupCat)
set_option linter.uppercaseLean3 false in
#align Module.forget₂_AddCommGroup_is_equivalence ModuleCat.forget₂AddCommGroupIsEquivalence

Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean
Expand Up @@ -84,7 +84,7 @@ def restrictScalars {R : Type u₁} {S : Type u₂} [Ring R] [Ring S] (f : R →
#align category_theory.Module.restrict_scalars ModuleCat.restrictScalars

instance {R : Type u₁} {S : Type u₂} [Ring R] [Ring S] (f : R →+* S) :
CategoryTheory.Faithful (restrictScalars.{v} f) where
(restrictScalars.{v} f).Faithful where
map_injective h :=
LinearMap.ext fun x => by simpa only using DFunLike.congr_fun h x

Expand Down Expand Up @@ -216,7 +216,7 @@ abbrev restrictScalarsComp := restrictScalarsComp'.{v} f g _ rfl
end

instance restrictScalarsIsEquivalenceOfRingEquiv {R S} [Ring R] [Ring S] (e : R ≃+* S) :
IsEquivalence (ModuleCat.restrictScalars e.toRingHom) where
(ModuleCat.restrictScalars e.toRingHom).IsEquivalence where
inverse := ModuleCat.restrictScalars e.symm
unitIso := NatIso.ofComponents (fun M ↦ LinearEquiv.toModuleIso'
{ __ := AddEquiv.refl M
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Category/ModuleCat/Presheaf.lean
Expand Up @@ -208,7 +208,7 @@ lemma toPresheaf_map_app {P Q : PresheafOfModules R}

instance : (toPresheaf R).Additive where

instance : Faithful (toPresheaf R) where
instance : (toPresheaf R).Faithful where
map_injective {P Q} f g h := by
ext X x
have eq := congr_app h X
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Algebra/Category/MonCat/Basic.lean
Expand Up @@ -402,7 +402,7 @@ the same as (isomorphic to) isomorphisms in `AddCommMonCat` -/
add_decl_doc addEquivIsoAddCommMonCatIso

@[to_additive]
instance MonCat.forget_reflects_isos : ReflectsIsomorphisms (forget MonCat.{u}) where
instance MonCat.forget_reflects_isos : (forget MonCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget MonCat).map f)
-- Again a problem that exists already creeps into other things leanprover/lean4#2644
Expand All @@ -415,7 +415,7 @@ set_option linter.uppercaseLean3 false in
#align AddMon.forget_reflects_isos AddMonCat.forget_reflects_isos

@[to_additive]
instance CommMonCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommMonCat.{u}) where
instance CommMonCat.forget_reflects_isos : (forget CommMonCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget CommMonCat).map f)
let e : X ≃* Y := MulEquiv.mk i.toEquiv
Expand All @@ -431,6 +431,6 @@ set_option linter.uppercaseLean3 false in
-- automatically reflects isomorphisms
-- we could have used `CategoryTheory.ConcreteCategory.ReflectsIso` alternatively
@[to_additive]
instance CommMonCat.forget₂Full : Full (forget₂ CommMonCat MonCat) where preimage f := f
instance CommMonCat.forget₂Full : (forget₂ CommMonCat MonCat).Full where preimage f := f

example : ReflectsIsomorphisms (forget₂ CommMonCat MonCat) := inferInstance
example : (forget₂ CommMonCat MonCat).ReflectsIsomorphisms := inferInstance
12 changes: 6 additions & 6 deletions Mathlib/Algebra/Category/Ring/Basic.lean
Expand Up @@ -144,7 +144,7 @@ def _root_.RingEquiv.toSemiRingCatIso [Semiring X] [Semiring Y] (e : X ≃+* Y)
hom := e.toRingHom
inv := e.symm.toRingHom

instance forgetReflectIsos : ReflectsIsomorphisms (forget SemiRingCat) where
instance forgetReflectIsos : (forget SemiRingCat).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget SemiRingCat).map f)
let ff : X →+* Y := f
Expand Down Expand Up @@ -365,7 +365,7 @@ def _root_.RingEquiv.toCommSemiRingCatIso [CommSemiring X] [CommSemiring Y] (e :
hom := e.toRingHom
inv := e.symm.toRingHom

instance forgetReflectIsos : ReflectsIsomorphisms (forget CommSemiRingCat) where
instance forgetReflectIsos : (forget CommSemiRingCat).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget CommSemiRingCat).map f)
let ff : X →+* Y := f
Expand Down Expand Up @@ -490,7 +490,7 @@ instance hasForgetToCommSemiRingCat : HasForget₂ CommRingCat CommSemiRingCat :
set_option linter.uppercaseLean3 false in
#align CommRing.has_forget_to_CommSemiRing CommRingCat.hasForgetToCommSemiRingCat

instance : Full (forget₂ CommRingCat CommSemiRingCat) where preimage {X Y} f := f
instance : (forget₂ CommRingCat CommSemiRingCat).Full where preimage {X Y} f := f

end CommRingCat

Expand Down Expand Up @@ -574,7 +574,7 @@ def ringEquivIsoCommRingIso {X Y : Type u} [CommRing X] [CommRing Y] :
set_option linter.uppercaseLean3 false in
#align ring_equiv_iso_CommRing_iso ringEquivIsoCommRingIso

instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u}) where
instance RingCat.forget_reflects_isos : (forget RingCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget RingCat).map f)
let ff : X →+* Y := f
Expand All @@ -583,7 +583,7 @@ instance RingCat.forget_reflects_isos : ReflectsIsomorphisms (forget RingCat.{u}
set_option linter.uppercaseLean3 false in
#align Ring.forget_reflects_isos RingCat.forget_reflects_isos

instance CommRingCat.forget_reflects_isos : ReflectsIsomorphisms (forget CommRingCat.{u}) where
instance CommRingCat.forget_reflects_isos : (forget CommRingCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget CommRingCat).map f)
let ff : X →+* Y := f
Expand All @@ -610,4 +610,4 @@ set_option linter.uppercaseLean3 false in
-- Porting note: This was the case in mathlib3, perhaps it is different now?
attribute [local instance] reflectsIsomorphisms_forget₂

example : ReflectsIsomorphisms (forget₂ RingCat AddCommGroupCat) := by infer_instance
example : (forget₂ RingCat AddCommGroupCat).ReflectsIsomorphisms := by infer_instance
9 changes: 4 additions & 5 deletions Mathlib/Algebra/Category/Ring/Limits.lean
Expand Up @@ -255,10 +255,9 @@ instance :
-- `CommSemiRingCat ⥤ SemiRingCat` reflects isomorphism. `CommSemiRingCat ⥤ Type` reflecting
-- isomorphism is added manually since Lean can't see it, but even with this addition Lean can not
-- see `CommSemiRingCat ⥤ SemiRingCat` reflects isomorphism, so this instance is also added.
letI : ReflectsIsomorphisms (forget CommSemiRingCat.{u}) :=
letI : (forget CommSemiRingCat.{u}).ReflectsIsomorphisms :=
CommSemiRingCat.forgetReflectIsos.{u}
letI : ReflectsIsomorphisms
(forget₂ CommSemiRingCat.{u} SemiRingCat.{u}) :=
letI : (forget₂ CommSemiRingCat.{u} SemiRingCat.{u}).ReflectsIsomorphisms :=
CategoryTheory.reflectsIsomorphisms_forget₂ CommSemiRingCat.{u} SemiRingCat.{u}
letI : Small.{u} (Functor.sections ((F ⋙ forget₂ _ SemiRingCat) ⋙ forget _)) :=
inferInstanceAs <| Small.{u} (Functor.sections (F ⋙ forget CommSemiRingCat))
Expand Down Expand Up @@ -388,7 +387,7 @@ All we need to do is notice that the limit point has a `Ring` instance available
and then reuse the existing limit.
-/
instance : CreatesLimit F (forget₂ RingCat.{u} SemiRingCat.{u}) :=
have : ReflectsIsomorphisms (forget₂ RingCat SemiRingCat) :=
letI : (forget₂ RingCat SemiRingCat).ReflectsIsomorphisms :=
CategoryTheory.reflectsIsomorphisms_forget₂ _ _
have : Small.{u} (Functor.sections ((F ⋙ forget₂ _ SemiRingCat) ⋙ forget _)) :=
inferInstanceAs <| Small.{u} (Functor.sections (F ⋙ forget _))
Expand Down Expand Up @@ -546,7 +545,7 @@ instance :
but it seems this would introduce additional identity morphisms in `limit.π`.
-/
-- Porting note: need to add these instances manually
have : ReflectsIsomorphisms (forget₂ CommRingCat.{u} RingCat.{u}) :=
letI : (forget₂ CommRingCat.{u} RingCat.{u}).ReflectsIsomorphisms :=
CategoryTheory.reflectsIsomorphisms_forget₂ _ _
have : Small.{u} (Functor.sections ((F ⋙ forget₂ CommRingCat RingCat) ⋙ forget RingCat)) :=
inferInstanceAs <| Small.{u} (Functor.sections (F ⋙ forget _))
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Algebra/Category/SemigroupCat/Basic.lean
Expand Up @@ -305,7 +305,7 @@ def mulEquivIsoSemigroupCatIso {X Y : Type u} [Semigroup X] [Semigroup Y] :
#align add_equiv_iso_AddSemigroup_iso addEquivIsoAddSemigroupCatIso

@[to_additive]
instance MagmaCat.forgetReflectsIsos : ReflectsIsomorphisms (forget MagmaCat.{u}) where
instance MagmaCat.forgetReflectsIsos : (forget MagmaCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget MagmaCat).map f)
let e : X ≃* Y := { f, i.toEquiv with }
Expand All @@ -314,7 +314,7 @@ instance MagmaCat.forgetReflectsIsos : ReflectsIsomorphisms (forget MagmaCat.{u}
#align AddMagma.forget_reflects_isos AddMagmaCat.forgetReflectsIsos

@[to_additive]
instance SemigroupCat.forgetReflectsIsos : ReflectsIsomorphisms (forget SemigroupCat.{u}) where
instance SemigroupCat.forgetReflectsIsos : (forget SemigroupCat.{u}).ReflectsIsomorphisms where
reflects {X Y} f _ := by
let i := asIso ((forget SemigroupCat).map f)
let e : X ≃* Y := { f, i.toEquiv with }
Expand All @@ -326,12 +326,12 @@ instance SemigroupCat.forgetReflectsIsos : ReflectsIsomorphisms (forget Semigrou
-- automatically reflects isomorphisms
-- we could have used `CategoryTheory.ConcreteCategory.ReflectsIso` alternatively
@[to_additive]
instance SemigroupCat.forget₂Full : Full (forget₂ SemigroupCat MagmaCat) where preimage f := f
instance SemigroupCat.forget₂Full : (forget₂ SemigroupCat MagmaCat).Full where preimage f := f

/-!
Once we've shown that the forgetful functors to type reflect isomorphisms,
we automatically obtain that the `forget₂` functors between our concrete categories
reflect isomorphisms.
-/

example : ReflectsIsomorphisms (forget₂ SemigroupCat MagmaCat) := inferInstance
example : (forget₂ SemigroupCat MagmaCat).ReflectsIsomorphisms := inferInstance
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Homology/HomologicalBicomplex.lean
Expand Up @@ -63,7 +63,7 @@ def toGradedObjectFunctor : HomologicalComplex₂ C c₁ c₂ ⥤ GradedObject (
obj K := K.toGradedObject
map φ := toGradedObjectMap φ

instance : Faithful (toGradedObjectFunctor C c₁ c₂) where
instance : (toGradedObjectFunctor C c₁ c₂).Faithful where
map_injective {_ _ φ₁ φ₂} h := by
ext i₁ i₂
exact congr_fun h ⟨i₁, i₂⟩
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Homology/HomologicalComplex.lean
Expand Up @@ -350,7 +350,7 @@ def forget : HomologicalComplex V c ⥤ GradedObject ι V where
map f := f.f
#align homological_complex.forget HomologicalComplex.forget

instance : Faithful (forget V c) where
instance : (forget V c).Faithful where
map_injective h := by
ext i
exact congr_fun h i
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Homology/HomotopyCategory.lean
Expand Up @@ -67,9 +67,9 @@ def quotient : HomologicalComplex V c ⥤ HomotopyCategory V c :=
CategoryTheory.Quotient.functor _
#align homotopy_category.quotient HomotopyCategory.quotient

instance : Full (quotient V c) := Quotient.fullFunctor _
instance : (quotient V c).Full := Quotient.fullFunctor _

instance : EssSurj (quotient V c) := Quotient.essSurj_functor _
instance : (quotient V c).EssSurj := Quotient.essSurj_functor _

instance : (quotient V c).Additive where

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Homology/LocalCohomology.lean
Expand Up @@ -274,7 +274,7 @@ def SelfLERadical.cast (hJK : J.radical = K.radical) : SelfLERadical J ⥤ SelfL

-- TODO generalize this to the equivalence of full categories for any `iff`.
instance SelfLERadical.castIsEquivalence (hJK : J.radical = K.radical) :
IsEquivalence (SelfLERadical.cast hJK) where
(SelfLERadical.cast hJK).IsEquivalence where
inverse := SelfLERadical.cast hJK.symm
unitIso := Iso.refl _
counitIso := Iso.refl _
Expand Down
6 changes: 3 additions & 3 deletions Mathlib/Algebra/Homology/QuasiIso.lean
Expand Up @@ -203,7 +203,7 @@ end ToSingle₀
end HomologicalComplex.Hom

variable {A : Type*} [Category A] [Abelian A] {B : Type*} [Category B] [Abelian B] (F : A ⥤ B)
[Functor.Additive F] [PreservesFiniteLimits F] [PreservesFiniteColimits F] [Faithful F]
[Functor.Additive F] [PreservesFiniteLimits F] [PreservesFiniteColimits F] [F.Faithful]

theorem CategoryTheory.Functor.quasiIso'_of_map_quasiIso' {C D : HomologicalComplex A c}
(f : C ⟶ D) (hf : QuasiIso' ((F.mapHomologicalComplex _).map f)) : QuasiIso' f :=
Expand Down Expand Up @@ -438,7 +438,7 @@ instance quasiIsoAt_map_of_preservesHomology [hφ : QuasiIsoAt φ i] :
exact ShortComplex.quasiIso_map_of_preservesLeftHomology F
((shortComplexFunctor C₁ c i).map φ)

lemma quasiIsoAt_map_iff_of_preservesHomology [ReflectsIsomorphisms F] :
lemma quasiIsoAt_map_iff_of_preservesHomology [F.ReflectsIsomorphisms] :
QuasiIsoAt ((F.mapHomologicalComplex c).map φ) i ↔ QuasiIsoAt φ i := by
simp only [quasiIsoAt_iff]
exact ShortComplex.quasiIso_map_iff_of_preservesLeftHomology F
Expand All @@ -455,7 +455,7 @@ variable [∀ i, K.HasHomology i] [∀ i, L.HasHomology i]
instance quasiIso_map_of_preservesHomology [hφ : QuasiIso φ] :
QuasiIso ((F.mapHomologicalComplex c).map φ) where

lemma quasiIso_map_iff_of_preservesHomology [ReflectsIsomorphisms F] :
lemma quasiIso_map_iff_of_preservesHomology [F.ReflectsIsomorphisms] :
QuasiIso ((F.mapHomologicalComplex c).map φ) ↔ QuasiIso φ := by
simp only [quasiIso_iff, quasiIsoAt_map_iff_of_preservesHomology φ F]

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Homology/ShortComplex/Exact.lean
Expand Up @@ -241,7 +241,7 @@ variable (S)

lemma exact_map_iff_of_faithful [S.HasHomology]
(F : C ⥤ D) [F.PreservesZeroMorphisms] [F.PreservesLeftHomologyOf S]
[F.PreservesRightHomologyOf S] [Faithful F] :
[F.PreservesRightHomologyOf S] [F.Faithful] :
(S.map F).Exact ↔ S.Exact := by
constructor
· intro h
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Homology/ShortComplex/PreservesHomology.lean
Expand Up @@ -763,7 +763,7 @@ instance quasiIso_map_of_preservesLeftHomology

lemma quasiIso_map_iff_of_preservesLeftHomology
[F.PreservesLeftHomologyOf S₁] [F.PreservesLeftHomologyOf S₂]
[ReflectsIsomorphisms F] :
[F.ReflectsIsomorphisms] :
QuasiIso (F.mapShortComplex.map φ) ↔ QuasiIso φ := by
have γ : LeftHomologyMapData φ S₁.leftHomologyData S₂.leftHomologyData := default
rw [γ.quasiIso_iff, (γ.map F).quasiIso_iff, LeftHomologyMapData.map_φH]
Expand All @@ -785,7 +785,7 @@ instance quasiIso_map_of_preservesRightHomology

lemma quasiIso_map_iff_of_preservesRightHomology
[F.PreservesRightHomologyOf S₁] [F.PreservesRightHomologyOf S₂]
[ReflectsIsomorphisms F] :
[F.ReflectsIsomorphisms] :
QuasiIso (F.mapShortComplex.map φ) ↔ QuasiIso φ := by
have γ : RightHomologyMapData φ S₁.rightHomologyData S₂.rightHomologyData := default
rw [γ.quasiIso_iff, (γ.map F).quasiIso_iff, RightHomologyMapData.map_φH]
Expand Down

0 comments on commit 65b7aff

Please sign in to comment.