File size: 2,528 Bytes
216fb31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.Algebra.Finitistic.Bar.DerivedCountShift
import OAI.Algebra.Finitistic.Bar.DirectSumCoproduct
import Mathlib.LinearAlgebra.DirectSum.Basis
import Mathlib.Algebra.Homology.HomotopyCategory.KProjective

namespace OAI
open CategoryTheory CategoryTheory.Limits TensorProduct TrivSqZeroExt
open scoped TensorProduct DirectSum
noncomputable section
namespace DerivedBar
universe u
variable (k D X N : Type u) [Field k] [Ring D] [Algebra k D]
  [AddCommGroup X] [Module k X] [Module D X] [Module Dᵐᵒᵖ X]
  [SMulCommClass D Dᵐᵒᵖ X] [IsScalarTower k D X] [IsScalarTower k Dᵐᵒᵖ X]
  [AddCommGroup N] [Module k N]
open Multibar.Indexed
local instance countProjectiveShapeDecidableEq (n r : ℕ) : DecidableEq (Shape n r) :=
  Classical.decEq _

instance outerTensor_free {n r : ℕ} (p : Shape n r) :
    Module.Free D (outerTensor k D X N p) :=
  Module.Free.of_basis (Algebra.TensorProduct.basis D
    (Module.Free.chooseBasis k (tensor k D X N p)))

instance countWeight_free (n r : ℕ) :
    Module.Free D (SquareZero.twoSidedWeight k D X N n r) :=
  Module.Free.of_equiv (decomposition k D X N n r)

variable [Module (TrivSqZeroExt D X) N] [IsScalarTower k (TrivSqZeroExt D X) N]
  (hN : ∀ (x : X) (v : N), (inr x : TrivSqZeroExt D X) • v = 0)

instance countComplex_projective (r n : ℕ) :
    Projective ((SquareZero.twoSidedWeightComplex k D X N hN r).X n) := by
  change Projective (ModuleCat.of D (SquareZero.twoSidedWeight k D X N n r))
  infer_instance

instance countSum_projective (n : ℕ) :
    Projective ((directSumComplex (SquareZero.twoSidedWeightComplex k D X N hN)).X n) := by
  classical
  let (r : ℕ) : Module.Free D ((SquareZero.twoSidedWeightComplex k D X N hN r).X n) :=
    countWeight_free k D X N n r
  change Projective (ModuleCat.of D (⨁ r : ℕ, (SquareZero.twoSidedWeightComplex k D X N hN r).X n))
  infer_instance

instance integerCount_isKProjective (r : ℕ) :
    ((integerExtension D).obj (SquareZero.twoSidedWeightComplex k D X N hN r)).IsKProjective := by
  change CochainComplex.IsKProjective ((SquareZero.twoSidedWeightComplex k D X N hN r).extend
    ComplexShape.embeddingDownNat)
  infer_instance

instance integerCountSum_isKProjective :
    ((integerExtension D).obj (directSumComplex
      (SquareZero.twoSidedWeightComplex k D X N hN))).IsKProjective := by
  change CochainComplex.IsKProjective ((directSumComplex (SquareZero.twoSidedWeightComplex k D X N hN)).extend
    ComplexShape.embeddingDownNat)
  infer_instance
end DerivedBar

end

end OAI