AlgebraicAnalysis library · bbbbf3fc358ca8100b158cec4cf47f336ab70163
1 module 2 public import AlgebraicAnalysis.Module.FilteredTwoTermPages 3 public import Mathlib.LinearAlgebra.Isomorphisms 4 5 @[expose] public section 6 7 /-! 8 # Filtered operators on two-term pages 9 10 A filtered operator of degree `d` shifts `G p` into `G (p - d)` and commutes 11 with the two-term differential. This file constructs its maps on the concrete 12 source and target pages, proves compatibility with `drop`, and proves that an 13 operator is unchanged on pages after adding one that shifts an additional 14 filtration level. 15 -/ 16 17 namespace AlgebraicAnalysis.FilteredTwoTermPages 18 19 universe u v 20 21 variable {k : Type u} [Ring k] 22 variable {M : Type v} [AddCommGroup M] [Module k M] 23 24 namespace FilteredTwoTerm 25 26 variable (K : FilteredTwoTerm k M) 27 28 /-- A `k`-linear operator of filtration degree `d` commuting with the 29 two-term differential. -/ 30 structure PageOperator (d : ℤ) where 31 /-- The underlying endomorphism of the filtered module. -/ 32 g : M →ₗ[k] M 33 commute : K.f.comp g = g.comp K.f 34 shift : ∀ p x, x ∈ K.G p → g x ∈ K.G (p - d) 35 36 namespace PageOperator 37 38 variable {K} {d : ℤ} (P : K.PageOperator d) 39 40 /-- Composition of filtered operators. -/ 41 def comp {e : ℤ} (Q : K.PageOperator e) : K.PageOperator (d + e) where 42 g := P.g.comp Q.g 43 commute := by 44 apply LinearMap.ext 45 intro x 46 change K.f (P.g (Q.g x)) = P.g (Q.g (K.f x)) 47 have hp := LinearMap.congr_fun P.commute (Q.g x) 48 have hq := LinearMap.congr_fun Q.commute x 49 change K.f (P.g (Q.g x)) = P.g (K.f (Q.g x)) at hp 50 change K.f (Q.g x) = Q.g (K.f x) at hq 51 rw [hp, hq] 52 shift := by 53 intro p x hx 54 have hQ := Q.shift p x hx 55 have hP := P.shift (p - e) (Q.g x) hQ 56 simpa [sub_eq_add_neg, add_assoc, add_comm, add_left_comm] using hP 57 58 /-- The reverse-order composition, given the same canonical sum degree. -/ 59 def reverseComp {e : ℤ} (Q : K.PageOperator e) : K.PageOperator (d + e) where 60 g := Q.g.comp P.g 61 commute := by 62 apply LinearMap.ext 63 intro x 64 change K.f (Q.g (P.g x)) = Q.g (P.g (K.f x)) 65 have hq := LinearMap.congr_fun Q.commute (P.g x) 66 have hp := LinearMap.congr_fun P.commute x 67 change K.f (Q.g (P.g x)) = Q.g (K.f (P.g x)) at hq 68 change K.f (P.g x) = P.g (K.f x) at hp 69 rw [hq, hp] 70 shift := by 71 intro p x hx 72 have hP := P.shift p x hx 73 have hQ := Q.shift (p - d) (P.g x) hP 74 simpa [sub_eq_add_neg, add_assoc, add_comm, add_left_comm] using hQ 75 76 theorem coe_castG {p q : ℤ} (h : p = q) (x : K.G p) : 77 ((h ▸ x : K.G q) : M) = (x : M) := by 78 subst q 79 rfl 80 81 theorem commute_apply (x : M) : K.f (P.g x) = P.g (K.f x) := by 82 exact LinearMap.congr_fun P.commute x 83 84 /-- The restriction of the operator to a source-page cycle numerator. -/ 85 def sourceRestricted (r : ℕ) (p : ℤ) : 86 K.cycles r p →ₗ[k] K.cycles r (p - d) := 87 (P.g.comp (K.cycles r p).subtype).codRestrict (K.cycles r (p - d)) (by 88 intro x 89 refine ⟨P.shift p (x : M) x.property.1, ?_⟩ 90 change K.f (P.g (x : M)) ∈ K.G (p - d + r) 91 rw [P.commute_apply] 92 have h := P.shift (p + r) (K.f (x : M)) x.property.2 93 have hindex : p + (r : ℤ) - d = p - d + (r : ℤ) := by omega 94 rwa [hindex] at h) 95 96 theorem sourceRestricted_denominator (r : ℕ) (p : ℤ) : 97 (K.G (p + 1)).comap (K.cycles r p).subtype ≤ 98 ((K.G (p - d + 1)).comap (K.cycles r (p - d)).subtype).comap 99 (P.sourceRestricted r p) := by 100 intro x hx 101 change P.g (x : M) ∈ K.G (p - d + 1) 102 have h := P.shift (p + 1) (x : M) hx 103 have hindex : p + 1 - d = p - d + 1 := by omega 104 rwa [hindex] at h 105 106 /-- The operator induced on a source page. -/ 107 def sourceMap (r : ℕ) (p : ℤ) : 108 K.SourcePage r p →ₗ[k] K.SourcePage r (p - d) := 109 Submodule.mapQ _ _ (P.sourceRestricted r p) 110 (P.sourceRestricted_denominator r p) 111 112 @[simp] theorem sourceMap_mk (r : ℕ) (p : ℤ) (x : K.cycles r p) : 113 P.sourceMap r p (Submodule.Quotient.mk x) = 114 Submodule.Quotient.mk (P.sourceRestricted r p x) := 115 Submodule.mapQ_apply _ _ _ _ 116 117 /-- Transport between equal source-page indices. -/ 118 def sourcePageCast (r : ℕ) {p q : ℤ} (h : p = q) : 119 K.SourcePage r p ≃ₗ[k] K.SourcePage r q := by 120 subst q 121 exact LinearEquiv.refl k _ 122 123 @[simp] theorem sourcePageCast_mk (r : ℕ) {p q : ℤ} (h : p = q) 124 (x : K.cycles r p) : 125 sourcePageCast (K := K) r h (Submodule.Quotient.mk x) = 126 Submodule.Quotient.mk (h ▸ x) := by 127 subst q 128 rfl 129 130 /-- The restriction of the operator to a target-page filtration piece. -/ 131 def targetRestricted (p : ℤ) : K.G p →ₗ[k] K.G (p - d) := 132 (P.g.comp (K.G p).subtype).codRestrict (K.G (p - d)) 133 (fun x => P.shift p (x : M) x.property) 134 135 theorem maps_boundaries (r : ℕ) (p : ℤ) {x : M} 136 (hx : x ∈ K.boundaries r p) : P.g x ∈ K.boundaries r (p - d) := by 137 rcases Submodule.mem_sup.mp hx with ⟨a, ha, e, he, rfl⟩ 138 rw [map_add] 139 apply Submodule.add_mem 140 · apply Submodule.mem_sup.mpr 141 refine ⟨P.g a, ⟨P.shift p a ha.1, ?_⟩, 0, Submodule.zero_mem _, by simp⟩ 142 rcases ha.2 with ⟨z, hz, rfl⟩ 143 refine ⟨P.g z, ?_, ?_⟩ 144 · have h := P.shift (p - r + 1) z hz 145 have hindex : p - (r : ℤ) + 1 - d = p - d - (r : ℤ) + 1 := by omega 146 rwa [hindex] at h 147 · exact P.commute_apply z 148 · apply Submodule.mem_sup.mpr 149 have h := P.shift (p + 1) e he 150 have hindex : p + 1 - d = p - d + 1 := by omega 151 rw [hindex] at h 152 exact ⟨0, Submodule.zero_mem _, P.g e, h, by simp⟩ 153 154 theorem targetRestricted_denominator (r : ℕ) (p : ℤ) : 155 (K.boundaries r p).comap (K.G p).subtype ≤ 156 ((K.boundaries r (p - d)).comap (K.G (p - d)).subtype).comap 157 (P.targetRestricted p) := by 158 intro x hx 159 exact P.maps_boundaries r p hx 160 161 /-- The operator induced on a target page. -/ 162 def targetMap (r : ℕ) (p : ℤ) : 163 K.TargetPage r p →ₗ[k] K.TargetPage r (p - d) := 164 Submodule.mapQ _ _ (P.targetRestricted p) 165 (P.targetRestricted_denominator r p) 166 167 @[simp] theorem targetMap_mk (r : ℕ) (p : ℤ) (x : K.G p) : 168 P.targetMap r p (Submodule.Quotient.mk x) = 169 Submodule.Quotient.mk (P.targetRestricted p x) := 170 Submodule.mapQ_apply _ _ _ _ 171 172 /-- Transport between target-page indices known to be equal. -/ 173 def targetPageCast (r : ℕ) {p q : ℤ} (h : p = q) : 174 K.TargetPage r p ≃ₗ[k] K.TargetPage r q := by 175 subst q 176 exact LinearEquiv.refl k _ 177 178 @[simp] theorem targetPageCast_mk (r : ℕ) {p q : ℤ} (h : p = q) 179 (x : K.G p) : 180 targetPageCast (K := K) r h (Submodule.Quotient.mk x) = 181 Submodule.Quotient.mk (h ▸ x) := by 182 subst q 183 rfl 184 185 def targetRestrictedAtDrop (r : ℕ) (p : ℤ) : 186 K.G (p + r) →ₗ[k] K.G (p - d + r) := 187 (P.g.comp (K.G (p + r)).subtype).codRestrict (K.G (p - d + r)) (by 188 intro x 189 have h := P.shift (p + r) (x : M) x.property 190 have hindex : p + (r : ℤ) - d = p - d + (r : ℤ) := by omega 191 rwa [hindex] at h) 192 193 theorem targetRestrictedAtDrop_denominator (r : ℕ) (p : ℤ) : 194 (K.boundaries r (p + r)).comap (K.G (p + r)).subtype ≤ 195 ((K.boundaries r (p - d + r)).comap (K.G (p - d + r)).subtype).comap 196 (P.targetRestrictedAtDrop r p) := by 197 intro x hx 198 have h := P.maps_boundaries r (p + r) hx 199 have hindex : p + (r : ℤ) - d = p - d + (r : ℤ) := by omega 200 rwa [hindex] at h 201 202 /-- The target-page operator at the codomain index of `drop`, reindexed by 203 the identity `(p+r)-d = (p-d)+r`. -/ 204 def targetMapAtDrop (r : ℕ) (p : ℤ) : 205 K.TargetPage r (p + r) →ₗ[k] K.TargetPage r (p - d + r) := 206 Submodule.mapQ _ _ (P.targetRestrictedAtDrop r p) 207 (P.targetRestrictedAtDrop_denominator r p) 208 209 @[simp] theorem targetMapAtDrop_mk (r : ℕ) (p : ℤ) (x : K.G (p + r)) : 210 P.targetMapAtDrop r p (Submodule.Quotient.mk x) = 211 Submodule.Quotient.mk (P.targetRestrictedAtDrop r p x) := 212 Submodule.mapQ_apply _ _ _ _ 213 214 /-- `targetMapAtDrop` is the general target-page map followed by the canonical 215 reindexing isomorphism. -/ 216 theorem targetMapAtDrop_eq_cast_targetMap (r : ℕ) (p : ℤ) : 217 P.targetMapAtDrop r p = 218 (targetPageCast (K := K) r 219 (by omega : p + (r : ℤ) - d = p - d + (r : ℤ))).toLinearMap.comp 220 (P.targetMap r (p + r)) := by 221 let hindex : p + (r : ℤ) - d = p - d + (r : ℤ) := by omega 222 change P.targetMapAtDrop r p = 223 (targetPageCast (K := K) r hindex).toLinearMap.comp 224 (P.targetMap r (p + r)) 225 apply LinearMap.ext 226 intro y 227 refine Submodule.Quotient.induction_on 228 ((K.boundaries r (p + r)).comap (K.G (p + r)).subtype) y ?_ 229 intro x 230 rw [P.targetMapAtDrop_mk, LinearMap.comp_apply, P.targetMap_mk] 231 change Submodule.Quotient.mk (P.targetRestrictedAtDrop r p x) = 232 targetPageCast (K := K) r _ 233 (Submodule.Quotient.mk (P.targetRestricted (p + r) x)) 234 rw [targetPageCast_mk] 235 congr 1 236 apply Subtype.ext 237 change P.g (x : M) = 238 ((hindex ▸ P.targetRestricted (p + r) x : K.G (p - d + r)) : M) 239 rw [coe_castG] 240 rfl 241 242 /-- The source and reindexed target operator maps commute with the page 243 differential. -/ 244 theorem targetMapAtDrop_drop (r : ℕ) (p : ℤ) (x : K.SourcePage r p) : 245 P.targetMapAtDrop r p (K.drop r p x) = 246 K.drop r (p - d) (P.sourceMap r p x) := by 247 refine Submodule.Quotient.induction_on 248 ((K.G (p + 1)).comap (K.cycles r p).subtype) x ?_ 249 intro z 250 rw [K.drop_mk, P.targetMapAtDrop_mk, P.sourceMap_mk, K.drop_mk] 251 change Submodule.Quotient.mk (⟨P.g (K.f (z : M)), _⟩ : K.G (p - d + r)) = 252 Submodule.Quotient.mk (⟨K.f (P.g (z : M)), _⟩ : K.G (p - d + r)) 253 congr 2 254 exact (P.commute_apply (z : M)).symm 255 256 /-- Compatibility of the general source and target page maps with `drop`, 257 with the unavoidable target-index transport made explicit. -/ 258 theorem targetMap_drop (r : ℕ) (p : ℤ) (x : K.SourcePage r p) : 259 targetPageCast (K := K) r 260 (by omega : p + (r : ℤ) - d = p - d + (r : ℤ)) 261 (P.targetMap r (p + r) (K.drop r p x)) = 262 K.drop r (p - d) (P.sourceMap r p x) := by 263 let hindex : p + (r : ℤ) - d = p - d + (r : ℤ) := by omega 264 change ((targetPageCast (K := K) r hindex).toLinearMap.comp 265 (P.targetMap r (p + r))) (K.drop r p x) = _ 266 rw [← P.targetMapAtDrop_eq_cast_targetMap r p] 267 exact P.targetMapAtDrop_drop r p x 268 269 /-- Two degree-`d` operators have the same symbol when their difference shifts 270 one additional filtration level. -/ 271 def SameSymbol (Q : K.PageOperator d) : Prop := 272 ∀ p x, x ∈ K.G p → (P.g - Q.g) x ∈ K.G (p - d + 1) 273 274 theorem sourceMap_eq_of_sameSymbol {Q : K.PageOperator d} 275 (hPQ : P.SameSymbol Q) (r : ℕ) (p : ℤ) : 276 P.sourceMap r p = Q.sourceMap r p := by 277 apply LinearMap.ext 278 intro y 279 refine Submodule.Quotient.induction_on 280 ((K.G (p + 1)).comap (K.cycles r p).subtype) y ?_ 281 intro x 282 rw [P.sourceMap_mk, Q.sourceMap_mk] 283 apply (Submodule.Quotient.eq _).2 284 change P.g (x : M) - Q.g (x : M) ∈ K.G (p - d + 1) 285 simpa using hPQ p (x : M) x.property.1 286 287 theorem targetMap_eq_of_sameSymbol {Q : K.PageOperator d} 288 (hPQ : P.SameSymbol Q) (r : ℕ) (p : ℤ) : 289 P.targetMap r p = Q.targetMap r p := by 290 apply LinearMap.ext 291 intro y 292 refine Submodule.Quotient.induction_on 293 ((K.boundaries r p).comap (K.G p).subtype) y ?_ 294 intro x 295 rw [P.targetMap_mk, Q.targetMap_mk] 296 apply (Submodule.Quotient.eq _).2 297 change P.g (x : M) - Q.g (x : M) ∈ K.boundaries r (p - d) 298 exact Submodule.mem_sup.mpr 299 ⟨0, Submodule.zero_mem _, P.g (x : M) - Q.g (x : M), 300 hPQ p (x : M) x.property, by simp⟩ 301 302 theorem targetMapAtDrop_eq_of_sameSymbol {Q : K.PageOperator d} 303 (hPQ : P.SameSymbol Q) (r : ℕ) (p : ℤ) : 304 P.targetMapAtDrop r p = Q.targetMapAtDrop r p := by 305 rw [P.targetMapAtDrop_eq_cast_targetMap, 306 Q.targetMapAtDrop_eq_cast_targetMap, 307 P.targetMap_eq_of_sameSymbol hPQ r (p + r)] 308 309 #print axioms sourceMap 310 #print axioms targetMap 311 #print axioms targetMapAtDrop_drop 312 #print axioms targetMap_drop 313 #print axioms targetMapAtDrop_eq_cast_targetMap 314 #print axioms sourceMap_eq_of_sameSymbol 315 #print axioms targetMap_eq_of_sameSymbol 316 #print axioms targetMapAtDrop_eq_of_sameSymbol 317 318 end PageOperator 319 320 end FilteredTwoTerm 321 322 end AlgebraicAnalysis.FilteredTwoTermPages 323