@@ -204,37 +204,52 @@ end IsPrecomplete
204204
205205namespace AdicCompletion
206206
207+ /-- `AdicCompletion` is the submodule of compatible families in
208+ `∀ n : ℕ, M ⧸ (I ^ n • ⊤)`. -/
209+ def submodule : Submodule R (∀ n : ℕ, M ⧸ (I ^ n • ⊤ : Submodule R M)) where
210+ carrier := { f | ∀ {m n} (hmn : m ≤ n), AdicCompletion.transitionMap I M hmn (f n) = f m }
211+ zero_mem' hmn := by rw [Pi.zero_apply, Pi.zero_apply, LinearMap.map_zero]
212+ add_mem' hf hg m n hmn := by
213+ rw [Pi.add_apply, Pi.add_apply, LinearMap.map_add, hf hmn, hg hmn]
214+ smul_mem' c f hf m n hmn := by rw [Pi.smul_apply, Pi.smul_apply, LinearMap.map_smul, hf hmn]
215+
216+ /-- Zero of `AdicCompletion I M`. -/
207217@[irreducible]
208218def zero : AdicCompletion I M := ⟨0 , by simp⟩
209219
210220instance : Zero (AdicCompletion I M) where
211221 zero := zero I M
212222
223+ /-- Addition in `AdicCompletion I M`. -/
213224@[irreducible]
214225def add (x y : AdicCompletion I M) : AdicCompletion I M :=
215226 ⟨x.val + y.val, by simp [x.property, y.property]⟩
216227
217228instance : Add (AdicCompletion I M) where
218229 add := add I M
219230
231+ /-- Negation in `AdicCompletion I M`. -/
220232@[irreducible]
221233def neg (x : AdicCompletion I M) : AdicCompletion I M :=
222234 ⟨- x.val, by simp [x.property]⟩
223235
224236instance : Neg (AdicCompletion I M) where
225237 neg := neg I M
226238
239+ /-- Subtraction in `AdicCompletion I M`. -/
227240@[irreducible]
228241def sub (x y : AdicCompletion I M) : AdicCompletion I M :=
229242 ⟨x.val - y.val, by simp [x.property, y.property]⟩
230243
231244instance : Sub (AdicCompletion I M) where
232245 sub := sub I M
233246
247+ /-- Natural scalar multiplication in `AdicCompletion I M`. -/
234248@[irreducible]
235249def nsmul (n : ℕ) (x : AdicCompletion I M) : AdicCompletion I M :=
236250 nsmulRec n x
237251
252+ /-- Integer scalar multiplication in `AdicCompletion I M`. -/
238253@[irreducible]
239254def zsmul (n : ℤ) (x : AdicCompletion I M) : AdicCompletion I M :=
240255 zsmulRec (nsmul I M) n x
@@ -255,6 +270,7 @@ instance : AddCommGroup (AdicCompletion I M) where
255270 add_left_neg a := Subtype.ext <| add_left_neg a.val
256271 add_comm x y := Subtype.ext <| add_comm x.val y.val
257272
273+ /-- Scalar multiplication in `AdicCompletion I M`. -/
258274@[irreducible]
259275def smul (r : R) (x : AdicCompletion I M) : AdicCompletion I M :=
260276 ⟨r • x.val, by simp [x.property]⟩
@@ -424,67 +440,57 @@ def AdicCauchySequence : Type _ := { f : ℕ → M // IsAdicCauchy I M f }
424440
425441namespace AdicCauchySequence
426442
427- instance : Zero (AdicCauchySequence I M) where
428- zero := ⟨0 , fun _ ↦ rfl⟩
429-
430- instance : Add (AdicCauchySequence I M) where
431- add x y := ⟨x.val + y.val, fun hmn ↦ SModEq.add (x.property hmn) (y.property hmn)⟩
432-
433- instance : Neg (AdicCauchySequence I M) where
434- neg x := ⟨- x.val, fun hmn ↦ SModEq.neg (x.property hmn)⟩
435-
436- instance : AddCommGroup (AdicCauchySequence I M) where
437- add_assoc x y z := Subtype.ext <| add_assoc x.val y.val z.val
438- sub x y := ⟨x.val - y.val, fun hmn ↦ SModEq.sub (x.property hmn) (y.property hmn)⟩
439- sub_eq_add_neg x y := Subtype.ext <| sub_eq_add_neg x.val y.val
440- zero_add a := Subtype.ext <| zero_add a.val
441- add_zero a := Subtype.ext <| add_zero a.val
442- nsmul := nsmulRec
443- zsmul := zsmulRec
444- add_left_neg a := Subtype.ext <| add_left_neg a.val
445- add_comm x y := Subtype.ext <| add_comm x.val y.val
446-
447- instance : Module R (AdicCauchySequence I M) where
448- smul r x := ⟨r • x.val, fun hmn ↦ SModEq.smul (x.property hmn) r⟩
449- one_smul x := Subtype.ext <| one_smul R x.val
450- mul_smul r s x := Subtype.ext <| mul_smul r s x.val
451- smul_add r x y := Subtype.ext <| smul_add r x.val y.val
452- add_smul r s x := Subtype.ext <| add_smul r s x.val
453- zero_smul x := Subtype.ext <| zero_smul R x.val
454- smul_zero r := Subtype.ext <| smul_zero r
455-
443+ /-- The type of `I`-adic cauchy sequences is a submodule of the product `ℕ → M`. -/
444+ def submodule : Submodule R (ℕ → M) where
445+ carrier := { f | IsAdicCauchy I M f }
446+ add_mem' := by
447+ intro f g hf hg m n hmn
448+ exact SModEq.add (hf hmn) (hg hmn)
449+ zero_mem' := by
450+ intro _ _ _
451+ rfl
452+ smul_mem' := by
453+ intro r f hf m n hmn
454+ exact SModEq.smul (hf hmn) r
455+
456+ /-- Zero in `AdicCauchySequence I M`. -/
456457@[irreducible]
457458def zero : AdicCauchySequence I M :=
458459 ⟨0 , fun _ ↦ rfl⟩
459460
460461instance : Zero (AdicCauchySequence I M) where
461462 zero := zero I M
462463
464+ /-- Addition in `AdicCauchySequence I M`. -/
463465@[irreducible]
464466def add (x y : AdicCauchySequence I M) : AdicCauchySequence I M :=
465467 ⟨x.val + y.val, fun hmn ↦ SModEq.add (x.property hmn) (y.property hmn)⟩
466468
467469instance : Add (AdicCauchySequence I M) where
468470 add := add I M
469471
472+ /-- Negation in `AdicCauchySequence I M`. -/
470473@[irreducible]
471474def neg (x : AdicCauchySequence I M) : AdicCauchySequence I M :=
472475 ⟨- x.val, fun hmn ↦ SModEq.neg (x.property hmn)⟩
473476
474477instance : Neg (AdicCauchySequence I M) where
475478 neg := neg I M
476479
480+ /-- Subtraction in `AdicCauchySequence I M`. -/
477481@[irreducible]
478482def sub (x y : AdicCauchySequence I M) : AdicCauchySequence I M :=
479483 ⟨x.val - y.val, fun hmn ↦ SModEq.sub (x.property hmn) (y.property hmn)⟩
480484
481485instance : Sub (AdicCauchySequence I M) where
482486 sub := sub I M
483487
488+ /-- Natural scalar multiplication in `AdicCauchySequence I M`. -/
484489@[irreducible]
485490def nsmul (n : ℕ) (x : AdicCauchySequence I M) : AdicCauchySequence I M :=
486491 nsmulRec n x
487492
493+ /-- Integer scalar multiplication in `AdicCauchySequence I M`. -/
488494@[irreducible]
489495def zsmul (n : ℤ) (x : AdicCauchySequence I M) : AdicCauchySequence I M :=
490496 zsmulRec (nsmul I M) n x
@@ -505,6 +511,7 @@ instance : AddCommGroup (AdicCauchySequence I M) where
505511 add_left_neg a := Subtype.ext <| add_left_neg a.val
506512 add_comm x y := Subtype.ext <| add_comm x.val y.val
507513
514+ /-- Scalar multiplication in `AdicCauchySequence I M`. -/
508515@[irreducible]
509516def smul (r : R) (x : AdicCauchySequence I M) : AdicCauchySequence I M :=
510517 ⟨r • x.val, fun hmn ↦ SModEq.smul (x.property hmn) r⟩
0 commit comments