Skip to content

Commit

Permalink
chore(algebra/module/basic): golf a proof (#8723)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Aug 17, 2021
1 parent 579ec7d commit e0656d1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/algebra/module/basic.lean
Expand Up @@ -249,13 +249,7 @@ instance semiring.to_opposite_module [semiring R] : module Rᵒᵖ R :=

/-- A ring homomorphism `f : R →+* M` defines a module structure by `r • x = f r * x`. -/
def ring_hom.to_module [semiring R] [semiring S] (f : R →+* S) : module R S :=
{ smul := λ r x, f r * x,
smul_add := λ r x y, by unfold has_scalar.smul; rw [mul_add],
add_smul := λ r s x, by unfold has_scalar.smul; rw [f.map_add, add_mul],
mul_smul := λ r s x, by unfold has_scalar.smul; rw [f.map_mul, mul_assoc],
one_smul := λ x, show f 1 * x = _, by rw [f.map_one, one_mul],
zero_smul := λ x, show f 0 * x = 0, by rw [f.map_zero, zero_mul],
smul_zero := λ r, mul_zero (f r) }
module.comp_hom S f

section add_comm_monoid

Expand Down

0 comments on commit e0656d1

Please sign in to comment.