openAI-math-dataset / lean /OAI /Algebra /AuslanderReiten /Complete /CompleteResolutionTail.lean
roseking's picture
Add lean source and binary files (part 5)
d7f9a33 verified
Raw History Blame Contribute Delete
3.93 kB
13
def nonnegativeTail (P : ChainComplex (ModuleCat.{u} R) ℤ) :
    ChainComplex (ModuleCat.{u} R) ℕ :=
body · 3 lines
  ChainComplex.of (fun n => P.X (n : ℤ))
    (fun n => P.d ((n + 1 : ℕ) : ℤ) (n : ℤ))
    (fun _n => P.d_comp_d _ _ _)
20
theorem nonnegativeTail_d (P : ChainComplex (ModuleCat.{u} R) ℤ) (n : ℕ) :
    (nonnegativeTail P).d (n + 1) n = P.d ((n + 1 : ℕ) : ℤ) (n : ℤ) := by
proof · 1 line
  simp [nonnegativeTail]
24
abbrev CompleteCokernel (P : ChainComplex (ModuleCat.{u} R) ℤ) :=
body · 1 line
  P.X 0 ⧸ LinearMap.range (P.d 1 0).hom
27
def nonnegativeTailAugmentation (P : ChainComplex (ModuleCat.{u} R) ℤ) :
    nonnegativeTail P ⟶ (ChainComplex.single₀ (ModuleCat.{u} R)).obj
      (ModuleCat.of R (CompleteCokernel P)) :=
body · 5 lines
  (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 _⟩
37
theorem nonnegativeTailAugmentation_f_zero (P : ChainComplex (ModuleCat.{u} R) ℤ) :
    (nonnegativeTailAugmentation P).f 0 =
      ModuleCat.ofHom (LinearMap.range (P.d 1 0).hom).mkQ := by
proof · 1 line
  apply ChainComplex.toSingle₀Equiv_symm_apply_f_zero
42
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
proof · 11 lines
  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)
58
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
body · 26 lines
  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 _ _⟩
90
def transportProjectiveResolution {X Y : ModuleCat.{u} R}
    (Q : ProjectiveResolution X) (e : X ≅ Y) : ProjectiveResolution Y where
body · 3 lines
  complex := Q.complex
  projective := Q.projective
  π := Q.π ≫ (ChainComplex.single₀ (ModuleCat.{u} R)).map e.hom