File size: 3,932 Bytes
d7f9a33 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | import Mathlib.Algebra.Category.ModuleCat.Projective
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat
import Mathlib.CategoryTheory.Abelian.Projective.Resolution
namespace OAI
noncomputable section
open CategoryTheory
namespace ArExplicit
universe u
variable {R : Type u} [Ring R]
def nonnegativeTail (P : ChainComplex (ModuleCat.{u} R) ℤ) :
ChainComplex (ModuleCat.{u} R) ℕ :=
ChainComplex.of (fun n => P.X (n : ℤ))
(fun n => P.d ((n + 1 : ℕ) : ℤ) (n : ℤ))
(fun _n => P.d_comp_d _ _ _)
@[simp]
theorem nonnegativeTail_d (P : ChainComplex (ModuleCat.{u} R) ℤ) (n : ℕ) :
(nonnegativeTail P).d (n + 1) n = P.d ((n + 1 : ℕ) : ℤ) (n : ℤ) := by
simp [nonnegativeTail]
abbrev CompleteCokernel (P : ChainComplex (ModuleCat.{u} R) ℤ) :=
P.X 0 ⧸ LinearMap.range (P.d 1 0).hom
def nonnegativeTailAugmentation (P : ChainComplex (ModuleCat.{u} R) ℤ) :
nonnegativeTail P ⟶ (ChainComplex.single₀ (ModuleCat.{u} R)).obj
(ModuleCat.of R (CompleteCokernel P)) :=
(ChainComplex.toSingle₀Equiv _ _).symm
⟨ModuleCat.ofHom (LinearMap.range (P.d 1 0).hom).mkQ, by
rw [nonnegativeTail_d]
apply ModuleCat.hom_ext
exact LinearMap.range_mkQ_comp _⟩
@[simp]
theorem nonnegativeTailAugmentation_f_zero (P : ChainComplex (ModuleCat.{u} R) ℤ) :
(nonnegativeTailAugmentation P).f 0 =
ModuleCat.ofHom (LinearMap.range (P.d 1 0).hom).mkQ := by
apply ChainComplex.toSingle₀Equiv_symm_apply_f_zero
theorem nonnegativeTail_exactAt (P : ChainComplex (ModuleCat.{u} R) ℤ)
(hex : ∀ n : ℤ, LinearMap.range (P.d (n + 1) n).hom =
LinearMap.ker (P.d n (n - 1)).hom) (n : ℕ) :
(nonnegativeTail P).ExactAt (n + 1) := by
rw [HomologicalComplex.exactAt_iff' _ (n + 1 + 1) (n + 1) n (by simp) (by simp)]
rw [ShortComplex.moduleCat_exact_iff_range_eq_ker]
change LinearMap.range ((nonnegativeTail P).d (n + 1 + 1) (n + 1)).hom =
LinearMap.ker ((nonnegativeTail P).d (n + 1) n).hom
rw [nonnegativeTail_d, nonnegativeTail_d]
have aux (i j l : ℤ) (hi : i = j + 1) (hl : l = j - 1) :
LinearMap.range (P.d i j).hom = LinearMap.ker (P.d j l).hom := by
subst i
subst l
exact hex j
exact aux _ _ _ (by omega) (by omega)
def completeCokernelResolution (P : ChainComplex (ModuleCat.{u} R) ℤ)
(hproj : ∀ n : ℤ, Module.Projective R (P.X n))
(hex : ∀ n : ℤ, LinearMap.range (P.d (n + 1) n).hom =
LinearMap.ker (P.d n (n - 1)).hom) :
ProjectiveResolution (ModuleCat.of R (CompleteCokernel P)) where
complex := nonnegativeTail P
projective n := by
let := hproj (n : ℤ)
exact (P.X (n : ℤ)).projective_of_categoryTheory_projective
π := nonnegativeTailAugmentation P
quasiIso := ⟨fun n => by
cases n with
| zero =>
rw [ChainComplex.quasiIsoAt₀_iff, ShortComplex.quasiIso_iff_of_zeros']
· constructor
· rw [ShortComplex.moduleCat_exact_iff_range_eq_ker]
change LinearMap.range ((nonnegativeTail P).d 1 0).hom =
LinearMap.ker ((nonnegativeTailAugmentation P).f 0).hom
rw [nonnegativeTail_d, nonnegativeTailAugmentation_f_zero]
exact (Submodule.ker_mkQ _).symm
· rw [ModuleCat.epi_iff_surjective]
change Function.Surjective (LinearMap.range (P.d 1 0).hom).mkQ
exact Submodule.mkQ_surjective _
· change (nonnegativeTail P).d 0 0 = 0
exact (nonnegativeTail P).shape _ _ (by simp)
· rfl
· rfl
| succ n =>
rw [quasiIsoAt_iff_exactAt']
· exact nonnegativeTail_exactAt P hex n
· exact ChainComplex.exactAt_succ_single_obj _ _⟩
def transportProjectiveResolution {X Y : ModuleCat.{u} R}
(Q : ProjectiveResolution X) (e : X ≅ Y) : ProjectiveResolution Y where
complex := Q.complex
projective := Q.projective
π := Q.π ≫ (ChainComplex.single₀ (ModuleCat.{u} R)).map e.hom
end ArExplicit
end
end OAI
|