Zulip Chat Archive
Stream: mathlib4
Topic: Proving a result modulo one small integer
Xavier Xarles (Aug 20 2025 at 15:53):
Is there an easy way to tell lean4 to prove a result in ZMod n for some small n by just trying all the elements modulo n?
For example, in my case I would like to show
import Mathlib.Data.ZMod.Basic
example (n: ZMod 12): 7*n^5+5*n^3 = 0 := sorry
Aaron Liu (Aug 20 2025 at 16:00):
import Mathlib.Data.ZMod.Basic
example (n : ZMod 12) : 7 * n ^ 5 + 5 * n ^ 3 = 0 := by decide +revert
Last updated: Dec 20 2025 at 21:32 UTC