Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 708e2de

Browse files
committed
chore(group_theory/free_abelian_group): remove is_add_monoid_hom (#13349)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
1 parent 333e4be commit 708e2de

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/group_theory/free_abelian_group.lean

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import algebra.group.pi
88
import group_theory.free_group
99
import group_theory.abelianization
1010
import algebra.module.basic -- we use the ℤ-module structure on an add_comm_group in punit_equiv
11-
import deprecated.group -- someone who understands `seq` can remove this
1211

1312
/-!
1413
# Free abelian groups
@@ -177,10 +176,6 @@ corresponding to the evaluation of the induced map `free_abelian_group X → A`
177176
def lift_add_group_hom {α} (β) [add_comm_group β] (a : free_abelian_group α) : (α → β) →+ β :=
178177
add_monoid_hom.mk' (λ f, lift f a) (lift.add' a)
179178

180-
lemma is_add_group_hom_lift' {α} (β) [add_comm_group β] (a : free_abelian_group α) :
181-
is_add_group_hom (λf, (lift f a : β)) :=
182-
{ map_add := λ f g, lift.add' a f g }
183-
184179
section monad
185180

186181
variables {β : Type u}
@@ -254,25 +249,28 @@ neg_bind _ _
254249
f - g <*> x = (f <*> x) - (g <*> x) :=
255250
sub_bind _ _ _
256251

257-
lemma is_add_group_hom_seq (f : free_abelian_group (α → β)) : is_add_group_hom ((<*>) f) :=
258-
{ map_add := λ x y, show lift (<$> (x+y)) _ = _, by simp only [map_add]; exact
259-
@@is_add_hom.map_add _ _ _
260-
(@@free_abelian_group.is_add_group_hom_lift' (free_abelian_group β) _ _).to_is_add_hom _ _ }
252+
/-- If `f : free_abelian_group (α → β)`, then `f <*>` is an additive morphism
253+
`free_abelian_group α →+ free_abelian_group β`. -/
254+
def seq_add_group_hom (f : free_abelian_group (α → β)) :
255+
free_abelian_group α →+ free_abelian_group β :=
256+
add_monoid_hom.mk' ((<*>) f)
257+
(λ x y, show lift (<$> (x+y)) _ = _,
258+
by { simp only [map_add], exact lift.add' f _ _, })
261259

262260
@[simp] lemma seq_zero (f : free_abelian_group (α → β)) : f <*> 0 = 0 :=
263-
is_add_group_hom.map_zero (is_add_group_hom_seq f)
261+
(seq_add_group_hom f).map_zero
264262

265263
@[simp] lemma seq_add (f : free_abelian_group (α → β)) (x y : free_abelian_group α) :
266264
f <*> (x + y) = (f <*> x) + (f <*> y) :=
267-
is_add_hom.map_add (is_add_group_hom_seq f).to_is_add_hom _ _
265+
(seq_add_group_hom f).map_add x y
268266

269267
@[simp] lemma seq_neg (f : free_abelian_group (α → β)) (x : free_abelian_group α) :
270268
f <*> (-x) = -(f <*> x) :=
271-
is_add_group_hom.map_neg (is_add_group_hom_seq f) _
269+
(seq_add_group_hom f).map_neg x
272270

273271
@[simp] lemma seq_sub (f : free_abelian_group (α → β)) (x y : free_abelian_group α) :
274272
f <*> (x - y) = (f <*> x) - (f <*> y) :=
275-
is_add_group_hom.map_sub (is_add_group_hom_seq f) _ _
273+
(seq_add_group_hom f).map_sub x y
276274

277275
instance : is_lawful_monad free_abelian_group.{u} :=
278276
{ id_map := λ α x, free_abelian_group.induction_on' x (map_zero id) (λ x, map_pure id x)

0 commit comments

Comments
 (0)