Zulip Chat Archive

Stream: new members

Topic: How do I prove this problem in lean4


Yanpeng Dong (Aug 01 2024 at 08:27):

Show that every submodule of the quotient module M/N can be expressed as (L+N)/N for some submodule L of M.

Andrew Yang (Aug 01 2024 at 11:03):

docs#Submodule.map_comap_eq_of_surjective is essentially the same statement

Junjie Bai (Aug 02 2024 at 08:37):

When I tried to use the theorem you provided to solve this problem, I encountered some issues. When I attempted to substitute \( f \) with the quotient map (Submodule.Quotient.mk) in the theorem, Lean prompted me that some instances were missing, such as Funlike. Here is my code:

variable {R M F : Type} [CommRing R] [AddCommGroup M] [Module R M] {N L s: Submodule R M} [Module R (M  N)]

def f := Submodule.Quotient.mk (M := M) (p := N)

example (P : Submodule R (M  N)) :  (L : Submodule R M), L.map f (L.comap f) = L := by sorry

How can I solve this issue?

Andrew Yang (Aug 02 2024 at 09:37):

First of all, you shoudn't write Module R (M ⧸ N). This means, "Suppose there exists an arbitrary R-module structure on M ⧸ N". You should leave this out and let lean find the right R-module structure on its own.
Second, L.map f (L.comap f) doesn't parse. Maybe you meant (L.map f).comap f = L or L.map f = P.

Junjie Bai (Aug 02 2024 at 13:13):

Thanks for pointing out these! I have change these problems, but (L.map f) will cause an error that "failed to synthesize
FunLike (?m.25475 → ?m.25475 ⧸ ?m.25479) M ?m.25462"
here is my code, how can i solve this?

variable {L : Submodule R M}

#check L.map

example (P : Submodule R (M  N)) :  (L : Submodule R M), L.map f = P := by sorry

Edward van de Meent (Aug 02 2024 at 13:22):

the issue is that lean needs to know that f is a semilinear map, not just any map, between M and M ⧸ N. rather than Submodule.Quotient.mk, try using Submodule.mkQ

Edward van de Meent (Aug 02 2024 at 13:24):

you can tell that using mkQ will work because the type shows that it is indeed a linear map.


Last updated: May 02 2025 at 03:31 UTC