Zulip Chat Archive

Stream: Is there code for X?

Topic: action on a constant is a linear_map


Eric Wieser (Jun 23 2021 at 07:48):

Do we have this definition somewhere?

def smul_lmap {R M : Type*} [semiring R] [add_comm_monoid M] [module R M] (m : M) : R →ₗ[R] M :=
{ to_fun := λ r, r  m,
  map_add' := λ r s, add_smul r s _,
  map_smul' := λ r x, smul_assoc _ _ _, }

docs#smul_const_hom (aka docs#distrib_mul_action.to_add_monoid_hom) and docs#smul_add_hom don't quite have as much structure as I want.

Eric Wieser (Jun 23 2021 at 07:49):

Wow, library_search found it, docs#linear_map.to_span_singleton

Kevin Buzzard (Jun 23 2021 at 08:11):

It's great when that works! The only caveat is that sometimes it finds eg the zero map :-)

Eric Wieser (Jun 23 2021 at 08:28):

That's what I expected it to find here

Oliver Nash (Jun 23 2021 at 08:53):

Sometimes suggest helps in these cases.


Last updated: Dec 20 2023 at 11:08 UTC