New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat(algebra/module/basic): smul_add_hom_one #7461
Conversation
jcommelin
commented
May 4, 2021
src/algebra/module/basic.lean
Outdated
def cast_add_hom' (a : A) : ℕ →+ A := | ||
{ to_fun := λ n, n • a, | ||
map_zero' := zero_smul _ _, | ||
map_add' := λ m n, add_smul m n a } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this smul_add_hom ℕ A a
or similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Turns out you also need a flip
. Not sure if these are worth keeping, or that I should just use the (smul_add_hom _ _).flip
directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they're probably not worth keeping as is. If this comes up often you could probably come up with a nicer name for (smul_add_hom R M).flip
, but I don't think the special cases for int
and nat
are useful.
Okido, thanks for pointing to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
bors r+
Pull request successfully merged into master. Build succeeded: |