Zulip Chat Archive

Stream: Is there code for X?

Topic: le.to_submodule


Nicolò Cavalleri (Dec 28 2022 at 19:24):

I might have forgotten how to search but I cannot find anything like this:

def le.to_submodule {R : Type*} [semiring R] (M : Type*) [add_comm_monoid M] [module R M] {p p' : submodule R M}
  (h : p  p') : submodule R p' := ( : submodule R p).map (submodule.of_le h)

Does it already exist?

Adam Topaz (Dec 28 2022 at 19:50):

you can use docs#submodule.comap and docs#submodule.subtype

Adam Topaz (Dec 28 2022 at 19:51):

your h isn't even needed, and you will end up with the intersection of p and p' (as a submodule of p')


Last updated: Dec 20 2023 at 11:08 UTC