AlgebraicAnalysis/Module/FilteredTwoTermPages.lean

AlgebraicAnalysis library · bbbbf3fc358ca8100b158cec4cf47f336ab70163

1 module
2 public import Mathlib.LinearAlgebra.Quotient.Basic
3 public import Mathlib.Tactic
4 
5 @[expose] public section
6 
7 /-!
8 # Pages of a filtered two-term complex
9 
10 This file constructs the `Z_r` and `B_r` subquotients for a two-term filtered
11 complex. The page differential is induced by the original differential on
12 representatives; no successor-page equivalence is part of the input.
13 
14 We use a decreasing, integer-indexed filtration `G`, as obtained from an
15 increasing filtration `F` by `G p = F (-p)`.
16 -/
17 
18 namespace AlgebraicAnalysis.FilteredTwoTermPages
19 
20 universe u v
21 
22 variable {k : Type u} [Ring k]
23 variable {M : Type v} [AddCommGroup M] [Module k M]
24 
25 /-- A filtration-preserving two-term complex `M --f--> M`. -/
26 structure FilteredTwoTerm (k : Type u) (M : Type v) [Ring k]
27     [AddCommGroup M] [Module k M] where
28   /-- The decreasing filtration on the underlying module. -/
29   G : ℤ → Submodule k M
30   antitone : Antitone G
31   /-- The differential of the two-term complex. -/
32   f : M →ₗ[k] M
33   map_le : ∀ p, (G p).map f ≤ G p
34 
35 namespace FilteredTwoTerm
36 
37 variable (K : FilteredTwoTerm k M)
38 
39 /-- The numerator of `Z_r` in the source. -/
40 def cycles (r : ℕ) (p : ℤ) : Submodule k M :=
41   K.G p ⊓ (K.G (p + r)).comap K.f
42 
43 /-- The numerator of `B_r` in the target. -/
44 def boundaries (r : ℕ) (p : ℤ) : Submodule k M :=
45   (K.G p ⊓ (K.G (p - r + 1)).map K.f) ⊔ K.G (p + 1)
46 
47 theorem next_le (p : ℤ) : K.G (p + 1) ≤ K.G p :=
48   K.antitone (by omega)
49 
50 theorem boundaries_le (r : ℕ) (p : ℤ) : K.boundaries r p ≤ K.G p := by
51   apply sup_le
52   · exact inf_le_left
53   · exact K.next_le p
54 
55 /-- The actual source page.  Using the intersection numerator gives the
56 canonical model
57 `(G^p ∩ f⁻¹G^{p+r}) / (G^{p+1} ∩ f⁻¹G^{p+r})`, equivalent to the displayed
58 `(intersection + G^{p+1})/G^{p+1}` formula. -/
59 abbrev SourcePage (r : ℕ) (p : ℤ) :=
60   K.cycles r p ⧸ (K.G (p + 1)).comap (K.cycles r p).subtype
61 
62 /-- The actual target page `G^p/B_r`. -/
63 abbrev TargetPage (r : ℕ) (p : ℤ) :=
64   K.G p ⧸ (K.boundaries r p).comap (K.G p).subtype
65 
66 -- Explicit instances also resolve these groups inside dependent direct sums.
67 instance sourcePageAddCommGroup (r : ℕ) (p : ℤ) : AddCommGroup (K.SourcePage r p) :=
68   inferInstanceAs (AddCommGroup
69     (K.cycles r p ⧸ (K.G (p + 1)).comap (K.cycles r p).subtype))
70 
71 instance targetPageAddCommGroup (r : ℕ) (p : ℤ) : AddCommGroup (K.TargetPage r p) :=
72   inferInstanceAs (AddCommGroup
73     (K.G p ⧸ (K.boundaries r p).comap (K.G p).subtype))
74 
75 def restrictedDrop (r : ℕ) (p : ℤ) :
76     K.cycles r p →ₗ[k] K.G (p + r) :=
77   (K.f.comp (K.cycles r p).subtype).codRestrict (K.G (p + r))
78     (fun x => x.property.2)
79 
80 theorem drop_denominator (r : ℕ) (p : ℤ) :
81     (K.G (p + 1)).comap (K.cycles r p).subtype ≤
82       ((K.boundaries r (p + r)).comap (K.G (p + r)).subtype).comap
83         (K.restrictedDrop r p) := by
84   intro x hx
85   change K.f (x : M) ∈ K.boundaries r (p + r)
86   apply Submodule.mem_sup.mpr
87   refine ⟨K.f (x : M), ⟨x.property.2, ?_⟩, 0, Submodule.zero_mem _, by simp⟩
88   refine ⟨x, ?_, ?_⟩
89   · simpa using hx
90   rfl
91 
92 /-- The page differential, formed by applying `f` to a representative. -/
93 def drop (r : ℕ) (p : ℤ) :
94     K.SourcePage r p →ₗ[k] K.TargetPage r (p + r) :=
95   Submodule.mapQ _ _ (K.restrictedDrop r p) (K.drop_denominator r p)
96 
97 /-- Representative formula for the page differential. -/
98 @[simp] theorem drop_mk (r : ℕ) (p : ℤ) (x : K.cycles r p) :
99     K.drop r p (Submodule.Quotient.mk x) =
100       Submodule.Quotient.mk (K.restrictedDrop r p x) := rfl
101 
102 /-- Cycle numerators decrease from page `r` to page `r+1`. -/
103 theorem cycles_succ_le (r : ℕ) (p : ℤ) :
104     K.cycles (r + 1) p ≤ K.cycles r p := by
105   intro x hx
106   exact ⟨hx.1, K.antitone (by push_cast; omega) hx.2⟩
107 
108 /-- Boundary numerators increase from page `r` to page `r+1`. -/
109 theorem boundaries_le_succ (r : ℕ) (p : ℤ) :
110     K.boundaries r p ≤ K.boundaries (r + 1) p := by
111   apply sup_le
112   · apply le_sup_of_le_left
113     intro x hx
114     refine ⟨hx.1, ?_⟩
115     rcases hx.2 with ⟨z, hz, rfl⟩
116     refine ⟨z, K.antitone (by push_cast; omega) hz, rfl⟩
117   · exact le_sup_of_le_right le_rfl
118 
119 /-- A representative in `Z_{r+1}` is killed by the `r`-page differential. -/
120 theorem drop_mk_eq_zero_of_mem_cycles_succ (r : ℕ) (p : ℤ)
121     (x : K.cycles r p) (hx : (x : M) ∈ K.cycles (r + 1) p) :
122     K.drop r p (Submodule.Quotient.mk x) = 0 := by
123   rw [K.drop_mk]
124   rw [Submodule.Quotient.mk_eq_zero]
125   change K.f (x : M) ∈ K.boundaries r (p + r)
126   have hind : p + (r + 1 : ℕ) = p + (r : ℕ) + 1 := by
127     push_cast
128     omega
129   exact Submodule.mem_sup.mpr
130     ⟨0, Submodule.zero_mem _, K.f (x : M), (hind ▸ hx.2), by simp⟩
131 
132 /-- Conversely, a representative killed by `d_r` can be changed by an
133 element of `G^{p+1}` to a representative in `Z_{r+1}`. -/
134 theorem exists_cycles_succ_rep_of_drop_mk_eq_zero (r : ℕ) (p : ℤ)
135     (x : K.cycles r p) (hx : K.drop r p (Submodule.Quotient.mk x) = 0) :
136     ∃ z ∈ K.G (p + 1), (x : M) - z ∈ K.cycles (r + 1) p := by
137   rw [K.drop_mk, Submodule.Quotient.mk_eq_zero] at hx
138   rcases Submodule.mem_sup.mp hx with ⟨a, ha, e, he, hsum⟩
139   rcases ha.2 with ⟨z, hz, rfl⟩
140   change K.f z + e = K.f (x : M) at hsum
141   refine ⟨z, ?_, ?_⟩
142   · simpa using hz
143   refine ⟨Submodule.sub_mem _ x.property.1 (K.next_le p (by simpa using hz)), ?_⟩
144   have hind : p + (r + 1 : ℕ) = p + (r : ℕ) + 1 := by
145     push_cast
146     omega
147   rw [hind]
148   have hfe : K.f ((x : M) - z) = e := by
149     rw [map_sub, ← hsum]
150     simp
151   change K.f ((x : M) - z) ∈ K.G (p + (r : ℤ) + 1)
152   rw [hfe]
153   exact he
154 
155 /-- Every new boundary representative is a drop plus a lower-filtration term. -/
156 theorem mem_boundaries_succ_rep (r : ℕ) (p : ℤ)
157     {y : M} (hy : y ∈ K.boundaries (r + 1) p) :
158     ∃ z ∈ K.G (p - r), ∃ e ∈ K.G (p + 1), y = K.f z + e := by
159   rcases Submodule.mem_sup.mp hy with ⟨y', hy', e, he, hsum⟩
160   rcases hy' with ⟨hyp, z, hz, rfl⟩
161   have hind : p - ((r + 1 : ℕ) : ℤ) + 1 = p - (r : ℤ) := by
162     push_cast
163     omega
164   exact ⟨z, hind ▸ hz,
165     e, he, hsum.symm⟩
166 
167 /-- Surjectivity exhausts the target boundary numerators. -/
168 theorem exists_mem_boundaries_of_surjective
169     (hG : ∀ z : M, ∃ s : ℤ, z ∈ K.G s)
170     (hf : Function.Surjective K.f) {p : ℤ} {y : M} (hy : y ∈ K.G p) :
171     ∃ r : ℕ, y ∈ K.boundaries r p := by
172   obtain ⟨z, rfl⟩ := hf y
173   obtain ⟨s, hs⟩ := hG z
174   obtain ⟨r, hr⟩ : ∃ r : ℕ, p - r + 1 ≤ s := by
175     refine ⟨Int.toNat (p - s + 1), ?_⟩
176     omega
177   refine ⟨r, Submodule.mem_sup.mpr ?_⟩
178   exact ⟨K.f z, ⟨hy, ⟨z, K.antitone hr hs, rfl⟩⟩,
179     0, Submodule.zero_mem _, by simp⟩
180 
181 end FilteredTwoTerm
182 
183 end AlgebraicAnalysis.FilteredTwoTermPages
184