File size: 8,499 Bytes
ae00908
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
import Mathlib
import OAI.Algebra.FinitisticAsymmetry.Triangular.InjectiveCorners

namespace OAI

noncomputable section

open CategoryTheory
namespace LittleFinitistic.CummingsConstruction
open CategoryTheory CategoryTheory.Limits HomologicalComplex
universe u
variable {k C ι : Type u} [Field k] [Ring C] [Algebra k C]
variable (χ : C →ₐ[k] (ι → k)) (i : ι)

def oldCharacter : T χ →+* k :=
  (Pi.evalRingHom (fun _ : Sum ι ι => k) (.inl i)).comp (augmentation χ).toRingHom

def newCharacter : T χ →+* k :=
  (Pi.evalRingHom (fun _ : Sum ι ι => k) (.inr i)).comp (augmentation χ).toRingHom

def newProjection : T χ →+* DualNumber k where
  toFun r := r.fst.2 i
  map_one' := rfl
  map_zero' := rfl
  map_add' _ _ := rfl
  map_mul' _ _ := rfl

abbrev oldSimple := (ModuleCat.restrictScalars (oldCharacter χ i)).obj (ModuleCat.of k k)
abbrev newSimple := (ModuleCat.restrictScalars (newCharacter χ i)).obj (ModuleCat.of k k)
abbrev newRegular := (ModuleCat.restrictScalars (newProjection χ i)).obj (ModuleCat.of (DualNumber k) (DualNumber k))
abbrev newInjectiveObj := ModuleCat.of (T χ) (NewInjective χ i)

def newRegularι : newRegular χ i ⟶ newInjectiveObj χ i := ModuleCat.ofHom
  (X := newRegular χ i) (Y := newInjectiveObj χ i) (show
    newRegular χ i →ₗ[T χ] newInjectiveObj χ i from {
  toFun := fun x => (0,x.fst,x.snd)
  map_add' := fun x y => by
    apply NewInjective.ext (χ := χ) (i := i)
    · exact (zero_add (0 : k)).symm
    · rfl
    · rfl
  map_smul' := fun r x => by
    apply NewInjective.ext (χ := χ) (i := i)
    · change (0 : k) = cval χ i r * 0
      simp
    · rfl
    · change ehead χ i r*x.snd + etail χ i r*x.fst =
        oval χ i r*0 + etail χ i r*x.fst + ehead χ i r*x.snd
      ring })

def newInjectiveπ : newInjectiveObj χ i ⟶ oldSimple χ i := ModuleCat.ofHom
  (X := newInjectiveObj χ i) (Y := oldSimple χ i) (show
    newInjectiveObj χ i →ₗ[T χ] oldSimple χ i from {
  toFun := fun x => x.1
  map_add' := fun _ _ => rfl
  map_smul' := fun _ _ => rfl })

def newRegularπ : newRegular χ i ⟶ newSimple χ i := ModuleCat.ofHom
  (X := newRegular χ i) (Y := newSimple χ i) (show
    newRegular χ i →ₗ[T χ] newSimple χ i from {
  toFun := fun x => x.fst
  map_add' := fun _ _ => rfl
  map_smul' := fun _ _ => rfl })

def newSimpleι : newSimple χ i ⟶ newRegular χ i := ModuleCat.ofHom
  (X := newSimple χ i) (Y := newRegular χ i) (show
    newSimple χ i →ₗ[T χ] newRegular χ i from {
  toFun := fun a => (0,a)
  map_add' := fun a b => by
    apply TrivSqZeroExt.ext
    · exact (zero_add (0 : k)).symm
    · rfl
  map_smul' := fun r a => by
    apply TrivSqZeroExt.ext
    · change (0 : k) = ehead χ i r * 0
      simp
    · change ehead χ i r*(show k from a) = ehead χ i r*(show k from a) + etail χ i r*0
      simp })

def newDifferential : newInjectiveObj χ i ⟶ newInjectiveObj χ i := ModuleCat.ofHom
  (X := newInjectiveObj χ i) (Y := newInjectiveObj χ i) (show
    newInjectiveObj χ i →ₗ[T χ] newInjectiveObj χ i from {
  toFun := fun x => (0,0,x.2.1)
  map_add' := fun x y => by
    apply NewInjective.ext (χ := χ) (i := i)
    · exact (zero_add (0 : k)).symm
    · exact (zero_add (0 : k)).symm
    · rfl
  map_smul' := fun r x => by
    apply NewInjective.ext (χ := χ) (i := i)
    · change (0 : k) = cval χ i r * 0
      simp
    · change (0 : k) = ehead χ i r * 0
      simp
    · change ehead χ i r*x.2.1 = oval χ i r*0 + etail χ i r*0 + ehead χ i r*x.2.1
      simp })

def epsDifferential : newRegular χ i ⟶ newRegular χ i := newRegularπ χ i ≫ newSimpleι χ i

@[simp] lemma newDifferential_sq : newDifferential χ i ≫ newDifferential χ i = 0 := by
  apply ModuleCat.hom_ext
  apply LinearMap.ext
  intro x
  rfl

@[simp] lemma epsDifferential_sq : epsDifferential χ i ≫ epsDifferential χ i = 0 := by
  apply ModuleCat.hom_ext
  apply LinearMap.ext
  intro x
  rfl

lemma newRegularι_comm : newRegularι χ i ≫ newDifferential χ i =
    epsDifferential χ i ≫ newRegularι χ i := by
  apply ModuleCat.hom_ext
  apply LinearMap.ext
  intro x
  rfl

lemma newInjectiveπ_comm : newDifferential χ i ≫ newInjectiveπ χ i = 0 := by
  apply ModuleCat.hom_ext
  apply LinearMap.ext
  intro x
  rfl

lemma newRegularι_π : newRegularι χ i ≫ newInjectiveπ χ i = 0 := by
  apply ModuleCat.hom_ext
  apply LinearMap.ext
  intro x
  rfl

lemma newRegular_exact :
    (ShortComplex.mk (newRegularι χ i) (newInjectiveπ χ i) (newRegularι_π χ i)).ShortExact where
  mono_f := by
    rw [ModuleCat.mono_iff_injective]
    intro x y h
    apply TrivSqZeroExt.ext
    · exact congrArg (fun z : NewInjective χ i => z.2.1) h
    · exact congrArg (fun z : NewInjective χ i => z.2.2) h
  epi_g := by
    rw [ModuleCat.epi_iff_surjective]
    intro a
    exact ⟨(a,0,0), rfl⟩
  exact := by
    rw [ShortComplex.moduleCat_exact_iff]
    intro x hx
    refine ⟨(x.2.1,x.2.2), ?_⟩
    apply NewInjective.ext (χ := χ) (i := i)
    · exact hx.symm
    · rfl
    · rfl

def periodicInjective : ChainComplex (ModuleCat (T χ)) ℕ :=
  ChainComplex.of (fun _ => newInjectiveObj χ i) (fun _ => newDifferential χ i)
    (fun _ => newDifferential_sq χ i)

def periodicRegular : ChainComplex (ModuleCat (T χ)) ℕ :=
  ChainComplex.of (fun _ => newRegular χ i) (fun _ => epsDifferential χ i)
    (fun _ => epsDifferential_sq χ i)

def periodicOld : ChainComplex (ModuleCat (T χ)) ℕ :=
  ChainComplex.of (fun _ => oldSimple χ i) (fun _ => 0) (fun _ => by simp)

def periodicι : periodicRegular χ i ⟶ periodicInjective χ i :=
  ChainComplex.ofHom (fun _ => newRegularι χ i) (fun n => by
    simpa [periodicInjective, periodicRegular] using newRegularι_comm χ i)

def periodicπ : periodicInjective χ i ⟶ periodicOld χ i :=
  ChainComplex.ofHom (fun _ => newInjectiveπ χ i) (fun n => by
    simpa [periodicInjective, periodicOld] using (newInjectiveπ_comm χ i).symm)

lemma periodicι_π : periodicι χ i ≫ periodicπ χ i = 0 := by
  apply HomologicalComplex.hom_ext
  intro n
  exact newRegularι_π χ i

lemma periodic_shortExact :
    (ShortComplex.mk (periodicι χ i) (periodicπ χ i) (periodicι_π χ i)).ShortExact where
  mono_f := HomologicalComplex.mono_of_mono_f _ (fun _ => (newRegular_exact χ i).mono_f)
  epi_g := HomologicalComplex.epi_of_epi_f _ (fun _ => (newRegular_exact χ i).epi_g)
  exact := HomologicalComplex.exact_of_degreewise_exact _ (fun _ => (newRegular_exact χ i).exact)

lemma epsDifferential_π : epsDifferential χ i ≫ newRegularπ χ i = 0 := by
  apply ModuleCat.hom_ext
  apply LinearMap.ext
  intro x
  rfl

lemma epsDifferential_exact :
    (ShortComplex.mk (epsDifferential χ i) (epsDifferential χ i)
      (epsDifferential_sq χ i)).Exact := by
  rw [ShortComplex.moduleCat_exact_iff]
  intro x hx
  have hx' : x.fst = 0 := congrArg TrivSqZeroExt.snd hx
  refine ⟨(x.snd,0), ?_⟩
  apply TrivSqZeroExt.ext
  · exact hx'.symm
  · rfl

lemma epsDifferential_π_exact :
    (ShortComplex.mk (epsDifferential χ i) (newRegularπ χ i)
      (epsDifferential_π χ i)).Exact := by
  rw [ShortComplex.moduleCat_exact_iff]
  intro x hx
  refine ⟨(x.snd,0), ?_⟩
  apply TrivSqZeroExt.ext
  · exact hx.symm
  · rfl

instance newRegularπ_epi : Epi (newRegularπ χ i) := by
  rw [ModuleCat.epi_iff_surjective]
  intro a
  exact ⟨(a,0), rfl⟩

def periodicAug : periodicRegular χ i ⟶ (ChainComplex.single₀ (ModuleCat (T χ))).obj
    (newSimple χ i) :=
  (ChainComplex.toSingle₀Equiv _ _).symm ⟨newRegularπ χ i, epsDifferential_π χ i⟩

instance periodicAug_quasiIso : QuasiIso (periodicAug χ i) := ⟨fun n => by
  cases n with
  | zero =>
    rw [ChainComplex.quasiIsoAt₀_iff, ShortComplex.quasiIso_iff_of_zeros']
    · exact ⟨epsDifferential_π_exact χ i, newRegularπ_epi χ i⟩
    all_goals rfl
  | succ n =>
    rw [quasiIsoAt_iff_exactAt']
    · rw [HomologicalComplex.exactAt_iff' _ (n+2) (n+1) n (by simp) (by simp)]
      have hd : ChainComplex.of.d (fun _ : ℕ => newRegular χ i)
          (fun _ : ℕ => epsDifferential χ i) (n+2) (n+1) = epsDifferential χ i :=
        ChainComplex.of_d _ _ (n+1)
      simpa only [HomologicalComplex.sc', HomologicalComplex.shortComplexFunctor',
        periodicRegular, hd, ChainComplex.of_d] using epsDifferential_exact χ i
    · apply ChainComplex.exactAt_succ_single_obj⟩

end LittleFinitistic.CummingsConstruction

end

end OAI