@@ -16,18 +16,18 @@ public import Mathlib.CategoryTheory.Functor.OfSequence
1616/-!
1717# Factorization lemma
1818
19- In this file, we shall show that if `f : K ⟶ L` is a morphism between bounded below
19+ In this file, we show that if `f : K ⟶ L` is a morphism between bounded below
2020cochain complexes in an abelian category with enough injectives,
2121there exists a factorization `ι ≫ π = f` with `ι : K ⟶ K'` a monomorphism that is also
2222a quasimorphism and `π : K' ⟶ L` a morphism which degreewise is an epimorphism with
2323an injective kernel, while `K'` is also bounded below (with precise bounds depending
2424on the available bounds for `K` and `L`): this is
25- `CochainComplex.Plus.modelCategoryQuillen.cm5a` (TODO) . Using the factorization
25+ `CochainComplex.Plus.modelCategoryQuillen.cm5a`. Using the factorization
2626obtained in the file `Mathlib/Algebra/Homology/Factorizations/CM5b.lean`,
2727we may assume `f : K ⇨ L` is a monomorphism (a case which appears as
28- the lemma `CochainComplex.Plus.modelCategoryQuillen.cm5a_cof` (TODO) ).
28+ the lemma `CochainComplex.Plus.modelCategoryQuillen.cm5a_cof`).
2929
30- In the proof, the key (private) lemma shall be
30+ In the proof, the key (private) lemma is be
3131`CochainComplex.Plus.modelCategoryQuillen.cm5a_cof.step` which shows that
3232if `f` is a monomorphism which is a quasi-isomorphism in degrees `≤ n₀` and
3333`n₀ + 1 = n₁`, then `f` has a factorisation `ι ≫ π = f`
@@ -45,7 +45,7 @@ a projective system `ℕᵒᵖ ⥤ CochainComplex C ℤ`
4545(see `CochainComplex.Plus.modelCategoryQuillen.cm5a_cof.cochainComplexFunctor`).
4646Degreewise, this projective system is essentially constant, which allows
4747to take its limit, which shall be the intermediate object in the
48- lemma `cm5a_cof` (TODO) .
48+ lemma `cm5a_cof`.
4949
5050-/
5151
@@ -62,7 +62,7 @@ namespace cm5a_cof
6262/-- Given a morphism `f : K ⟶ L`, this is the property of factorisations
6363of `f` consisting of a monomorphism followed by a degreewise epimorphism
6464with injective kernel. -/
65- public def cofFib : ObjectProperty (Factorisation f) :=
65+ def cofFib : ObjectProperty (Factorisation f) :=
6666 fun F ↦ Mono F.ι ∧ degreewiseEpiWithInjectiveKernel F.π
6767
6868instance (F : (cofFib f).FullSubcategory) : Mono F.obj.ι :=
@@ -71,13 +71,13 @@ instance (F : (cofFib f).FullSubcategory) : Mono F.obj.ι :=
7171variable {f} in
7272/-- The property that the first morphism of a factorisation is
7373a quasi-isomorphisms in degrees `≤ n`. -/
74- public def quasiIsoLE (n : ℤ) : ObjectProperty (cofFib f).FullSubcategory :=
74+ def quasiIsoLE (n : ℤ) : ObjectProperty (cofFib f).FullSubcategory :=
7575 fun F ↦ ∀ i ≤ n, QuasiIsoAt F.obj.ι i
7676
7777variable {f} in
7878/-- The property that the second morphism of a factorisation is
7979an isomorphism in degrees `≤ n`. -/
80- public def isIsoLE (n : ℤ) : ObjectProperty (cofFib f).FullSubcategory :=
80+ def isIsoLE (n : ℤ) : ObjectProperty (cofFib f).FullSubcategory :=
8181 fun F ↦ ∀ i ≤ n, IsIso (F.obj.π.f i)
8282
8383namespace step₁
@@ -392,8 +392,6 @@ lemma quasiIsoAt_ι [Mono f] [Mono (homologyMap f n)] (q : ℤ) (hq : q ≤ n) :
392392
393393end step₂
394394
395- -- This lemma and a few definitions above are made public only in order to please CI.
396- -- They will be made private again when the proofs of `cm5a_cof` and `cm5a` are added.
397395open step₂ in
398396lemma step₂ [EnoughInjectives C] [Mono f] (n₀ n₁ : ℤ)
399397 (hf : ∀ i ≤ n₀, QuasiIsoAt f i) [Mono (homologyMap f n₁)] (hn₁ : n₀ + 1 = n₁ := by lia) :
@@ -403,7 +401,7 @@ lemma step₂ [EnoughInjectives C] [Mono f] (n₀ n₁ : ℤ)
403401 fun i hi ↦ quasiIsoAt_ι f n₁ (fun j hj ↦ hf j (by lia)) _ hi,
404402 isIso_π_f f n₁⟩
405403
406- public lemma step [EnoughInjectives C] [Mono f] (n₀ n₁ : ℤ) (hn₁ : n₀ + 1 = n₁ )
404+ lemma step [EnoughInjectives C] [Mono f] (n₀ n₁ : ℤ)
407405 (hf : ∀ i ≤ n₀, QuasiIsoAt f i) (hn₁ : n₀ + 1 = n₁ := by lia) :
408406 ∃ (F : (cofFib f).FullSubcategory), quasiIsoLE n₁ F ∧ isIsoLE n₀ F := by
409407 obtain ⟨F₁, h₁, h₂, _⟩ := step₁ f n₀ n₁ hf
@@ -416,14 +414,238 @@ public lemma step [EnoughInjectives C] [Mono f] (n₀ n₁ : ℤ) (hn₁ : n₀
416414 dsimp
417415 infer_instance
418416
417+ /-- The category of factorisations of `f` as a monomorphism that is a quasi-isomorphism
418+ in degrees `≤ n` followed by a degreewise epimorphism with an injective kernel. -/
419+ abbrev CofFibFactorizationQuasiIsoLE (n : ℤ) := (quasiIsoLE (f := f) n).FullSubcategory
420+
421+ variable [EnoughInjectives C]
422+
423+ namespace CofFibFactorizationQuasiIsoLE
424+
425+ /-- When `K` and `L` are both strictly `≥ n + 1`, this is the factorization `f ≫ 𝟙 L = f`
426+ of a monomorphism `f : K ⟶ L` as a monomorphism that is a quasi-isomorphism in degrees `≤ n`
427+ followed by a degreewise epimorphism with an injective kernel. -/
428+ def zero [Mono f] (n : ℤ) [K.IsStrictlyGE (n + 1 )] [L.IsStrictlyGE (n + 1 )] :
429+ CofFibFactorizationQuasiIsoLE f (n + (0 : ℕ)) :=
430+ .mk (.mk { mid := L, ι := f, π := 𝟙 L }
431+ ⟨by assumption, fun i ↦ epiWithInjectiveKernel_of_iso (𝟙 (L.X i))⟩)
432+ (fun i hi ↦ by
433+ dsimp
434+ rw [quasiIsoAt_iff_isIso_homologyMap]
435+ apply IsZero.isIso
436+ all_goals
437+ · rw [← exactAt_iff_isZero_homology]
438+ exact exactAt_of_isGE _ (n + 1 ) i)
439+
440+ variable {f} in
441+ lemma exists_next {n₀ : ℤ} (F : CofFibFactorizationQuasiIsoLE f n₀)
442+ (n₁ : ℤ) (hn₁ : n₀ + 1 = n₁) :
443+ ∃ (F' : CofFibFactorizationQuasiIsoLE f n₁) (g : F'.1 ⟶ F.1 ),
444+ ∀ (i : ℤ) (_ : i ≤ n₀), IsIso (g.hom.h.f i) := by
445+ obtain ⟨F₁₂, h₁, h₂⟩ := step F.obj.obj.ι n₀ n₁ F.property
446+ exact ⟨.mk (.mk { mid := F₁₂.obj.mid, ι := F₁₂.obj.ι, π := F₁₂.obj.π ≫ F.obj.obj.π }
447+ ⟨by dsimp; infer_instance,
448+ MorphismProperty.comp_mem _ _ _ F₁₂.property.2 F.obj.property.2 ⟩) h₁,
449+ ObjectProperty.homMk { h := F₁₂.obj.π }, h₂⟩
450+
451+ variable {f} in
452+ /-- Given `F : CofFibFactorizationQuasiIsoLE f n₀`, this is term in
453+ `CofFibFactorizationQuasiIsoLE f n₁` with `n₀ + 1 = n₁` that is given
454+ by the lemma `exists_next`. -/
455+ noncomputable def next {n₀ : ℤ} (F : CofFibFactorizationQuasiIsoLE f n₀)
456+ (n₁ : ℤ) (hn₁ : n₀ + 1 = n₁) :
457+ CofFibFactorizationQuasiIsoLE f n₁ :=
458+ (F.exists_next n₁ hn₁).choose
459+
460+ variable {f} in
461+ /-- Given `F : CofFibFactorizationQuasiIsoLE f n₀`, this is the morphism which relates
462+ the intermediate objects in the factorisations `F.next n₁ _` and `F`. -/
463+ noncomputable def fromNext {n₀ : ℤ} (F : CofFibFactorizationQuasiIsoLE f n₀)
464+ (n₁ : ℤ) (hn₁ : n₀ + 1 = n₁) :
465+ (F.next n₁ hn₁).obj ⟶ F.obj :=
466+ (F.exists_next n₁ hn₁).choose_spec.choose
467+
468+ variable {f} in
469+ lemma isIso_fromNext_hom_h_f {n₀ : ℤ} (F : CofFibFactorizationQuasiIsoLE f n₀)
470+ (n₁ : ℤ) (hn₁ : n₀ + 1 = n₁) (i : ℤ) (hi : i ≤ n₀) :
471+ IsIso ((F.fromNext n₁ hn₁).hom.h.f i) :=
472+ (F.exists_next n₁ hn₁).choose_spec.choose_spec i hi
473+
474+ /-- Assuming `f : K ⟶ L` is a monomorphism between complexes that are strictly `≥ n₀ + 1`,
475+ this is a dependent sequence of terms in `CofFibFactorizationQuasiIsoLE f (n₀ + q)`
476+ for all `q : ℕ`. -/
477+ noncomputable def sequence
478+ [Mono f] (n₀ : ℤ) [K.IsStrictlyGE (n₀ + 1 )] [L.IsStrictlyGE (n₀ + 1 )] :
479+ ∀ (q : ℕ), CofFibFactorizationQuasiIsoLE f (n₀ + q)
480+ | 0 => zero f n₀
481+ | q + 1 => (sequence n₀ q).next _ (by lia)
482+
483+ variable [Mono f] (n₀ : ℤ) [K.IsStrictlyGE (n₀ + 1 )] [L.IsStrictlyGE (n₀ + 1 )]
484+
485+ /-- The morphism `(sequence f n₀ (q + 1)).obj ⟶ (sequence f n₀ q).obj` given by `fromNext`. -/
486+ noncomputable def toSequenceNext (q : ℕ) :
487+ (sequence f n₀ (q + 1 )).obj ⟶ (sequence f n₀ q).obj :=
488+ (sequence f n₀ q).fromNext _ (by lia)
489+
490+ end CofFibFactorizationQuasiIsoLE
491+
492+ variable [Mono f] (n₀ : ℤ) [K.IsStrictlyGE (n₀ + 1 )] [L.IsStrictlyGE (n₀ + 1 )]
493+
494+ /-- Given a monomorphism `f : K ⟶ L` between complexes that are strictly `≥ n₀ + 1`,
495+ this is a projective system in `(cofFib f).FullSubcategory` given by the
496+ sequence of morphisms `CofFibFactorizationQuasiIsoLE.toSequenceNext`. -/
497+ noncomputable def functor : ℕᵒᵖ ⥤ (cofFib f).FullSubcategory :=
498+ (Functor.ofSequence (fun q ↦ (CofFibFactorizationQuasiIsoLE.toSequenceNext f n₀ q).op)).leftOp
499+
500+ lemma isIso_functor_map_hom_h_f {q₁ q₂ : ℕ} (hq : q₁ ≤ q₂) (i : ℤ) (hi : i ≤ n₀ + q₁) :
501+ IsIso (((functor f n₀).map (homOfLE hq).op).hom.h.f i) := by
502+ wlog hq' : q₁ + 1 = q₂ generalizing q₁ q₂
503+ · clear hq'
504+ obtain ⟨k, hk⟩ := Nat.le.dest hq
505+ induction k generalizing q₁ q₂ with
506+ | zero =>
507+ obtain rfl : q₁ = q₂ := by simpa using hk
508+ simp only [homOfLE_refl, op_id, CategoryTheory.Functor.map_id,
509+ ObjectProperty.FullSubcategory.id_hom, Factorisation.id_h, id_f]
510+ infer_instance
511+ | succ k h =>
512+ rw [← homOfLE_comp (show q₁ ≤ q₁ + k by lia) (show q₁ + k ≤ q₂ by lia),
513+ op_comp, Functor.map_comp]
514+ exact IsIso.comp_isIso' (this _ (by lia) (by lia)) (h _ (by lia) rfl)
515+ subst hq'
516+ dsimp [functor]
517+ rw [Functor.ofSequence_map_homOfLE_succ]
518+ exact CofFibFactorizationQuasiIsoLE.isIso_fromNext_hom_h_f _ _ _ _ hi
519+
520+ /-- Given a monomorphism `f : K ⟶ L` between complexes that are strictly `≥ n₀ + 1`,
521+ this is a projective system in `CochainComplex C ℤ`, whose limit shall give
522+ the intermediate object in the factorization lemma `cm5a_cof`. -/
523+ noncomputable abbrev cochainComplexFunctor : ℕᵒᵖ ⥤ CochainComplex C ℤ :=
524+ functor f n₀ ⋙ ObjectProperty.ι _ ⋙ Factorisation.forget
525+
526+ lemma isEventuallyConstantTo (i : ℤ) (q : ℕ) (h : i ≤ n₀ + q := by lia) :
527+ (cochainComplexFunctor f n₀ ⋙ eval _ _ i).IsEventuallyConstantTo (op q) :=
528+ fun _ _ ↦ isIso_functor_map_hom_h_f _ _ _ _ (by lia)
529+
530+ instance (i : ℤ) : HasLimit (cochainComplexFunctor f n₀ ⋙ eval _ _ i) :=
531+ (isEventuallyConstantTo f n₀ i (n₀ - i).natAbs).hasLimit
532+
533+ /-- Given a monomorphism `f : K ⟶ L` between complexes that are strictly `≥ n₀ + 1`,
534+ this is the limit of the projective system
535+ `cochainComplexFunctor f n₀ : Nᵒᵖ ⥤ CochainComplex C ℤ`: this is the
536+ intermediate object in the factorization lemma `cm5a_cof`. -/
537+ noncomputable abbrev mid : CochainComplex C ℤ := limit (cochainComplexFunctor f n₀)
538+
539+ /-- The projections from `mid f n₀`. -/
540+ noncomputable def midπ (q : ℕ) : mid f n₀ ⟶ ((functor f n₀).obj (op q)).obj.mid :=
541+ limit.π _ (op q)
542+
543+ @ [reassoc (attr := simp)]
544+ lemma midπ_w (q₁ q₂ : ℕ) (hq : q₁ ≤ q₂) :
545+ midπ f n₀ q₂ ≫ ((functor f n₀).map (homOfLE hq).op).hom.h =
546+ midπ f n₀ q₁ :=
547+ limit.w _ _
548+
549+ @ [reassoc (attr := simp)]
550+ lemma midπ_w_f (q₁ q₂ : ℕ) (hq : q₁ ≤ q₂) (i : ℤ) :
551+ (midπ f n₀ q₂).f i ≫ ((functor f n₀).map (homOfLE hq).op).hom.h.f i =
552+ (midπ f n₀ q₁).f i := by
553+ rw [← midπ_w f n₀ q₁ q₂ hq]
554+ dsimp
555+
556+ lemma isIso_midπ_f (q : ℕ) (i : ℤ) (h : i ≤ n₀ + q := by lia) :
557+ IsIso ((midπ f n₀ q).f i) :=
558+ isIso_π_f_of_isLimit_of_isEventuallyConstantTo _ (limit.isLimit _) _ _
559+ (isEventuallyConstantTo f n₀ _ _)
560+
561+ lemma quasiIsoAt_midπ (q : ℕ) (i : ℤ) (h : i + 1 ≤ n₀ + q) :
562+ QuasiIsoAt (midπ f n₀ q) i :=
563+ quasiIsoAt_π_of_isLimit_of_isEventuallyConstantTo _ (limit.isLimit _)
564+ (i - 1 ) i (i + 1 ) (by simp) (by simp) _
565+ (isEventuallyConstantTo f n₀ _ _)
566+ (isEventuallyConstantTo f n₀ _ _)
567+ (isEventuallyConstantTo f n₀ _ _)
568+
569+ /-- The first morphism `ι f n₀ : K ⟶ mid f n₀` of the factorization lemma `cm5a_cof`. -/
570+ noncomputable def ι : K ⟶ mid f n₀ :=
571+ limit.lift _ (Cone.mk _ { app q := ((functor f n₀).obj q).obj.ι })
572+
573+ set_option backward.isDefEq.respectTransparency false in
574+ @ [reassoc (attr := simp)]
575+ lemma ι_midπ (q : ℕ) : ι f n₀ ≫ midπ f n₀ q = ((functor f n₀).obj (op q)).obj.ι := by
576+ simp [ι, midπ]
577+
578+ @ [reassoc (attr := simp)]
579+ lemma ι_midπ_f (q : ℕ) (i : ℤ) : (ι f n₀).f i ≫ (midπ f n₀ q).f i =
580+ ((functor f n₀).obj (op q)).obj.ι.f i := by
581+ rw [← ι_midπ]
582+ dsimp
583+
584+ /-- The second morphism `π f n₀ : mid f n₀ ⟶ L` of the factorization lemma `cm5a_cof`. -/
585+ noncomputable def π : mid f n₀ ⟶ L := midπ f n₀ 0 ≫ ((functor f n₀).obj (op 0 )).obj.π
586+
587+ @ [reassoc (attr := simp)]
588+ lemma ι_π : ι f n₀ ≫ π f n₀ = f := by
589+ simp [π]
590+
591+ @ [reassoc (attr := simp)]
592+ lemma midπ_π (q : ℕ) : midπ f n₀ q ≫ ((functor f n₀).obj (op q)).obj.π = π f n₀ := by
593+ simp [π, ← midπ_w_assoc f n₀ 0 q (by lia)]
594+
595+ @ [reassoc (attr := simp)]
596+ lemma midπ_π_f (q : ℕ) (i : ℤ) :
597+ (midπ f n₀ q).f i ≫ ((functor f n₀).obj (op q)).obj.π.f i = (π f n₀).f i := by
598+ rw [← midπ_π f n₀ q]
599+ dsimp
600+
601+ set_option backward.isDefEq.respectTransparency false in
602+ instance : (mid f n₀).IsStrictlyGE (n₀ + 1 ) := by
603+ rw [isStrictlyGE_iff]
604+ intro i hi
605+ have := isIso_midπ_f f n₀ 0 i
606+ exact (L.isZero_of_isStrictlyGE (n₀ + 1 ) i).of_iso (asIso ((midπ f n₀ 0 ).f i))
607+
608+ instance : Mono (ι f n₀) :=
609+ HomologicalComplex.mono_of_mono_f _ (fun i ↦ by
610+ obtain ⟨q, _⟩ : ∃ (q : ℕ), IsIso ((midπ f n₀ q).f i) :=
611+ ⟨(i - n₀).natAbs, isIso_midπ_f f n₀ _ i⟩
612+ exact mono_of_mono_fac (ι_midπ_f f n₀ q i))
613+
614+ instance : QuasiIso (ι f n₀) where
615+ quasiIsoAt i := by
616+ obtain ⟨q, hq⟩ : ∃ (q : ℕ), i + 1 ≤ n₀ + q := ⟨(i + 1 - n₀).natAbs, by lia⟩
617+ have := quasiIsoAt_midπ f n₀ q i hq
618+ rw [← quasiIsoAt_iff_comp_right _ (midπ f n₀ q), ι_midπ]
619+ exact (CofFibFactorizationQuasiIsoLE.sequence f n₀ q).property i (by lia)
620+
621+ lemma degreewiseEpiWithInjectiveKernel_π : degreewiseEpiWithInjectiveKernel (π f n₀) := by
622+ intro i
623+ obtain ⟨q, hq⟩ : ∃ (q : ℕ), i ≤ n₀ + q := ⟨(i - n₀).natAbs, by lia⟩
624+ rw [← midπ_π_f f n₀ q]
625+ have := isIso_midπ_f f n₀ q i
626+ exact MorphismProperty.comp_mem _ _ _
627+ (epiWithInjectiveKernel_of_iso _)
628+ ((CofFibFactorizationQuasiIsoLE.sequence f n₀ q).obj.property.2 i)
629+
419630end cm5a_cof
420631
421- proof_wanted cm5a_cof (n : ℤ) [K.IsStrictlyGE n] [L.IsStrictlyGE n] [Mono f] [EnoughInjectives C] :
632+ variable [EnoughInjectives C]
633+
634+ open cm5a_cof in
635+ public lemma cm5a_cof (n : ℤ) [K.IsStrictlyGE n] [L.IsStrictlyGE n] [Mono f] :
422636 ∃ (K' : CochainComplex C ℤ) (_hK' : K'.IsStrictlyGE n) (ι : K ⟶ K') (π : K' ⟶ L),
423- Mono ι ∧ QuasiIso ι ∧ degreewiseEpiWithInjectiveKernel π ∧ ι ≫ π = f
637+ Mono ι ∧ QuasiIso ι ∧ degreewiseEpiWithInjectiveKernel π ∧ ι ≫ π = f := by
638+ obtain ⟨n, rfl⟩ : ∃ (q : ℤ), n = q + 1 := ⟨n - 1 , by simp⟩
639+ exact ⟨mid f n, inferInstance, ι f n, π f n, inferInstance,
640+ inferInstance, degreewiseEpiWithInjectiveKernel_π f n, ι_π f n⟩
424641
425- proof_wanted cm5a (n : ℤ) [K.IsStrictlyGE (n + 1 )] [L.IsStrictlyGE n] [EnoughInjectives C ] :
642+ public lemma cm5a (n : ℤ) [K.IsStrictlyGE (n + 1 )] [L.IsStrictlyGE n] :
426643 ∃ (K' : CochainComplex C ℤ) (_hK' : K'.IsStrictlyGE n) (ι : K ⟶ K') (π : K' ⟶ L),
427- Mono ι ∧ QuasiIso ι ∧ degreewiseEpiWithInjectiveKernel π ∧ ι ≫ π = f
644+ Mono ι ∧ QuasiIso ι ∧ degreewiseEpiWithInjectiveKernel π ∧ ι ≫ π = f := by
645+ have : K.IsStrictlyGE n := K.isStrictlyGE_of_ge n (n + 1 ) (by lia)
646+ obtain ⟨L', _, i, p, _, hp, _, rfl⟩ := cm5b f n
647+ obtain ⟨K', _, ι, π, _, _, hπ, rfl⟩ := cm5a_cof i n
648+ exact ⟨K', inferInstance, ι, π ≫ p, inferInstance, inferInstance,
649+ MorphismProperty.comp_mem _ _ _ hπ hp, by simp⟩
428650
429651end CochainComplex.Plus.modelCategoryQuillen
0 commit comments