Zulip Chat Archive
Stream: mathlib4
Topic: sum_congr under modulo
Yuval Filmus (Apr 14 2025 at 12:50):
Suppose I know that f x = g x (mod m). How can I deduce that sum x, f x = sum x, g x (mod m)?
It is easy to prove this by induction, but does it already exist in mathlib?
Aaron Liu (Apr 14 2025 at 12:50):
You can pass to ZMod m
Aaron Liu (Apr 14 2025 at 12:52):
I also see docs#Finset.sum_int_mod and docs#Finset.sum_nat_mod, so you can rewrite your goal with those.
Last updated: May 02 2025 at 03:31 UTC