Zulip Chat Archive

Stream: Is there code for X?

Topic: pow_eq_zpow_mod


Kevin Buzzard (Jul 30 2023 at 20:28):

Do we have this?

import Mathlib.Tactic

theorem Group.pow_eq_zpow_mod {G : Type _} [Group G] {x : G} (m : ) {n : } (h : x ^ n = 1) :
    x ^ m = x ^ (m % (n : )) := by
  have h2 : x ^ m = x ^ ((n : ) * (m / (n : )) + m % (n : )) :=
    congr_arg (fun a => x ^ a) ((Int.add_comm _ _).trans (Int.emod_add_ediv _ _)).symm
  simp [h, h2, zpow_add, zpow_mul]

I found it useful recently. Or should I be using something else? If we want it, does it go in Algebra.GroupPower.Lemmas?

Scott Morrison (Jul 30 2023 at 22:13):

Sounds good.

#find_home Group.pow_eq_zpow_mod     -- Mathlib.Algebra.GroupPower.Lemmas

Eric Wieser (Jul 30 2023 at 22:21):

Another option would presumably be to go via docs#orderOf and show it divides n?

Yaël Dillies (Jul 31 2023 at 06:39):

Why not make n an integer? And if you want to have a look I have similar lemmas here.


Last updated: Dec 20 2023 at 11:08 UTC