# mathlibdocumentation

group_theory.order_of_element

# Order of an element #

This file defines the order of an element of a finite group. For a finite group G the order of g ∈ G is the minimal n ≥ 1 such that g ^ n = 1.

## Main definitions #

• order_of defines the order of an element a of a group G, by convention its value is 0 if a has infinite order.

## Tags #

order of an element

## TODO #

• Move the first declarations until the definition of order to other files.
• Yury's suggestion: Redefine order_of x := minimal_period (* x) 1, this should make to_additive easier.
def add_order_of {H : Type u} [add_monoid H] (x : H) :

add_order_of h is the additive order of the element x, i.e. the n ≥ 1, s. t. n • x = 0 if it exists. Otherwise, i.e. if x is of infinite order, then add_order_of x is 0 by convention.

Equations
def order_of {α : Type u} [monoid α] (a : α) :

order_of a is the order of the element a, i.e. the n ≥ 1, s.t. a ^ n = 1 if it exists. Otherwise, i.e. if a is of infinite order, then order_of a is 0 by convention.

Equations
@[simp]
theorem add_order_of_of_mul_eq_order_of {α : Type u} [monoid α] (a : α) :
@[simp]
theorem order_of_of_add_eq_add_order_of {H : Type u} [add_monoid H] (x : H) :
theorem add_order_of_pos' {H : Type u} [add_monoid H] {x : H} (h : ∃ (n : ), 0 < n n x = 0) :
theorem order_of_pos' {α : Type u} [monoid α] {a : α} (h : ∃ (n : ), 0 < n a ^ n = 1) :
0 <
theorem pow_order_of_eq_one {α : Type u} [monoid α] (a : α) :
a ^ = 1
theorem add_order_of_nsmul_eq_zero {H : Type u} [add_monoid H] (x : H) :
= 0
theorem add_order_of_eq_zero {H : Type u} [add_monoid H] {a : H} (h : ∀ (n : ), 0 < nn a 0) :
theorem order_of_eq_zero {α : Type u} [monoid α] {a : α} (h : ∀ (n : ), 0 < na ^ n 1) :
= 0
theorem add_order_of_le_of_nsmul_eq_zero' {H : Type u} [add_monoid H] {x : H} {m : } (h : m < ) :
¬(0 < m m x = 0)
theorem order_of_le_of_pow_eq_one' {α : Type u} {a : α} [monoid α] {m : } (h : m < ) :
¬(0 < m a ^ m = 1)
theorem add_order_of_le_of_nsmul_eq_zero {H : Type u} [add_monoid H] {x : H} {n : } (hn : 0 < n) (h : n x = 0) :
theorem order_of_le_of_pow_eq_one {α : Type u} {a : α} [monoid α] {n : } (hn : 0 < n) (h : a ^ n = 1) :
n
@[simp]
theorem order_of_one {α : Type u} [monoid α] :
= 1
@[simp]
theorem add_order_of_zero {H : Type u} [add_monoid H] :
@[simp]
theorem order_of_eq_one_iff {α : Type u} {a : α} [monoid α] :
= 1 a = 1
@[simp]
theorem add_order_of_eq_one_iff {H : Type u} [add_monoid H] {x : H} :
x = 0
theorem pow_eq_mod_order_of {α : Type u} {a : α} [monoid α] {n : } :
a ^ n = a ^ (n % order_of a)
theorem nsmul_eq_mod_add_order_of {H : Type u} [add_monoid H] {x : H} {n : } :
n x = (n % x
theorem order_of_dvd_of_pow_eq_one {α : Type u} {a : α} [monoid α] {n : } (h : a ^ n = 1) :
n
theorem add_order_of_dvd_of_nsmul_eq_zero {H : Type u} [add_monoid H] {x : H} {n : } (h : n x = 0) :
theorem add_order_of_dvd_iff_nsmul_eq_zero {H : Type u} [add_monoid H] {x : H} {n : } :
n x = 0
theorem order_of_dvd_iff_pow_eq_one {α : Type u} {a : α} [monoid α] {n : } :
n a ^ n = 1
theorem commute.order_of_mul_dvd_lcm {α : Type u} {a b : α} [monoid α] (h : b) :
theorem add_order_of_eq_prime {H : Type u} [add_monoid H] {x : H} {p : } [hp : fact (nat.prime p)] (hg : p x = 0) (hg1 : x 0) :
theorem order_of_eq_prime {α : Type u} {a : α} [monoid α] {p : } [hp : fact (nat.prime p)] (hg : a ^ p = 1) (hg1 : a 1) :
= p
theorem add_order_of_eq_add_order_of_iff {H : Type u} [add_monoid H] {x : H} {A : Type u_1} [add_monoid A] {y : A} :
∀ (n : ), n x = 0 n y = 0
theorem order_of_eq_order_of_iff {α : Type u} {a : α} [monoid α] {β : Type u_1} [monoid β] {b : β} :
∀ (n : ), a ^ n = 1 b ^ n = 1
theorem add_order_of_injective {A : Type u_1} {B : Type u_2} [add_monoid A] [add_monoid B] (f : A →+ B) (hf : function.injective f) (x : A) :
theorem order_of_injective {G : Type u_1} {H : Type u_2} [monoid G] [monoid H] (f : G →* H) (hf : function.injective f) (σ : G) :
order_of (f σ) =
@[simp]
theorem order_of_submonoid {G : Type u_1} [monoid G] {H : submonoid G} (σ : H) :
@[simp]
theorem order_of_add_submonoid {G : Type u_1} [add_monoid G] {H : add_submonoid G} (σ : H) :
@[simp]
theorem order_of_add_subgroup {G : Type u_1} [add_group G] {H : add_subgroup G} (σ : H) :
@[simp]
theorem order_of_subgroup {G : Type u_1} [group G] {H : subgroup G} (σ : H) :
theorem add_order_of_eq_prime_pow {H : Type u} [add_monoid H] {x : H} {p k : } (hprime : nat.prime p) (hnot : ¬p ^ k x = 0) (hfin : p ^ (k + 1) x = 0) :
= p ^ (k + 1)
theorem order_of_eq_prime_pow {α : Type u} {a : α} [monoid α] {p k : } (hprime : nat.prime p) (hnot : ¬a ^ p ^ k = 1) (hfin : a ^ p ^ (k + 1) = 1) :
= p ^ (k + 1)
theorem order_of_pow' {α : Type u} (a : α) [monoid α] {n : } (h : n 0) :
order_of (a ^ n) = / (order_of a).gcd n
theorem add_order_of_nsmul' {H : Type u} [add_monoid H] (x : H) {n : } (h : n 0) :
theorem order_of_pow'' {α : Type u} (a : α) [monoid α] (n : ) (h : ∃ (n : ), 0 < n a ^ n = 1) :
order_of (a ^ n) = / (order_of a).gcd n
theorem add_order_of_nsmul'' {H : Type u} [add_monoid H] (x : H) (n : ) (h : ∃ (n : ), 0 < n n x = 0) :
theorem pow_injective_aux {α : Type u} (a : α) {n m : } (h : n m) (hm : m < ) (eq : a ^ n = a ^ m) :
n = m
theorem nsmul_injective_aux {H : Type u} (x : H) {n m : } (h : n m) (hm : m < ) (eq : n x = m x) :
n = m
theorem nsmul_injective_of_lt_add_order_of {H : Type u} (x : H) {n m : } (hn : n < ) (hm : m < ) (eq : n x = m x) :
n = m
theorem pow_injective_of_lt_order_of {α : Type u} (a : α) {n m : } (hn : n < ) (hm : m < ) (eq : a ^ n = a ^ m) :
n = m
theorem gpow_eq_mod_order_of {α : Type u} {a : α} [group α] {i : } :
a ^ i = a ^ (i % (order_of a))
theorem gsmul_eq_mod_add_order_of {H : Type u} [add_group H] {x : H} {i : } :
theorem sum_card_add_order_of_eq_card_nsmul_eq_zero {H : Type u} [fintype H] [add_monoid H] [decidable_eq H] {n : } (hn : 0 < n) :
∑ (m : ) in finset.filter (λ (_x : ), _x n) (finset.range n.succ), (finset.filter (λ (x : H), = m) finset.univ).card = (finset.filter (λ (x : H), n x = 0) finset.univ).card
theorem sum_card_order_of_eq_card_pow_eq_one {α : Type u} [fintype α] [monoid α] [decidable_eq α] {n : } (hn : 0 < n) :
∑ (m : ) in finset.filter (λ (_x : ), _x n) (finset.range n.succ), (finset.filter (λ (a : α), = m) finset.univ).card = (finset.filter (λ (a : α), a ^ n = 1) finset.univ).card
theorem exists_pow_eq_one {α : Type u} [fintype α] (a : α) :
∃ (i : ), 0 < i a ^ i = 1

TODO: Use this to show that a finite left cancellative monoid is a group.

theorem exists_nsmul_eq_zero {H : Type u} [fintype H] (x : H) :
∃ (i : ), 0 < i i x = 0
theorem add_order_of_le_card_univ {H : Type u} [fintype H] {x : H} :
theorem order_of_le_card_univ {α : Type u} [fintype α] {a : α} :
theorem order_of_pos {α : Type u} [fintype α] (a : α) :
0 <

This is the same as order_of_pos' but with one fewer explicit assumption since this is automatic in case of a finite cancellative monoid.

theorem add_order_of_pos {H : Type u} [fintype H] (x : H) :

This is the same as add_order_of_pos' but with one fewer explicit assumption since this is automatic in case of a finite cancellative additive monoid.

theorem exists_pow_eq_self_of_coprime {n : } {α : Type u_1} [monoid α] {a : α} (h : n.coprime (order_of a)) :
∃ (m : ), (a ^ n) ^ m = a
theorem exists_nsmul_eq_self_of_coprime {n : } {H : Type u_1} [add_monoid H] (x : H) (h : n.coprime (add_order_of x)) :
∃ (m : ), m n x = x
theorem order_of_pow {α : Type u} [fintype α] {n : } (a : α) :
order_of (a ^ n) = / (order_of a).gcd n

This is the same as order_of_pow' and order_of_pow'' but with one assumption less which is automatic in the case of a finite cancellative monoid.

theorem add_order_of_nsmul {H : Type u} [fintype H] {n : } (x : H) :

This is the same as add_order_of_nsmul' and add_order_of_nsmul but with one assumption less which is automatic in the case of a finite cancellative additive monoid.

theorem mem_multiples_iff_mem_range_add_order_of {H : Type u} [fintype H] [decidable_eq H] {x x' : H} :
x' finset.image (λ (_x : ), _x x) (finset.range (add_order_of x))
theorem mem_powers_iff_mem_range_order_of {α : Type u} [fintype α] [decidable_eq α] {a a' : α} :
@[instance]
def decidable_multiples {H : Type u} [fintype H] [decidable_eq H] {x : H} :
Equations
@[instance]
def decidable_powers {α : Type u} {a : α} [fintype α] [decidable_eq α] :
Equations
theorem order_eq_card_powers {α : Type u} [fintype α] [decidable_eq α] {a : α} :
theorem add_order_of_eq_card_multiples {H : Type u} [fintype H] [decidable_eq H] {x : H} :
theorem exists_gpow_eq_one {α : Type u} [fintype α] [group α] (a : α) :
∃ (i : ) (H : i 0), a ^ i = 1
theorem exists_gsmul_eq_zero {H : Type u} [fintype H] [add_group H] (x : H) :
∃ (i : ) (H_1 : i 0), i •ℤ x = 0
theorem mem_multiples_iff_mem_gmultiples {H : Type u} [fintype H] [add_group H] {x y : H} :
theorem mem_powers_iff_mem_gpowers {α : Type u} [fintype α] [group α] {a x : α} :
theorem multiples_eq_gmultiples {H : Type u} [fintype H] [add_group H] (x : H) :
theorem powers_eq_gpowers {α : Type u} [fintype α] [group α] (a : α) :
theorem mem_gmultiples_iff_mem_range_add_order_of {H : Type u} [fintype H] [add_group H] [decidable_eq H] {x x' : H} :
x' finset.image (λ (_x : ), _x x) (finset.range (add_order_of x))
theorem mem_gpowers_iff_mem_range_order_of {α : Type u} [fintype α] [group α] [decidable_eq α] {a a' : α} :
@[instance]
def decidable_gmultiples {H : Type u} [fintype H] [add_group H] [decidable_eq H] {x : H} :
Equations
@[instance]
def decidable_gpowers {α : Type u} {a : α} [fintype α] [group α] [decidable_eq α] :
Equations
theorem order_eq_card_gpowers {α : Type u} [fintype α] [group α] [decidable_eq α] {a : α} :
theorem add_order_eq_card_gmultiples {H : Type u} [fintype H] [add_group H] [decidable_eq H] {x : H} :
theorem order_of_dvd_card_univ {α : Type u} {a : α} [fintype α] [group α] :
theorem add_order_of_dvd_card_univ {H : Type u} [fintype H] [add_group H] {x : H} :
@[simp]
theorem pow_card_eq_one {α : Type u} [fintype α] [group α] {a : α} :
= 1
@[simp]
theorem card_nsmul_eq_zero {H : Type u} [fintype H] [add_group H] {x : H} :
= 0
theorem image_range_add_order_of {H : Type u} [fintype H] [add_group H] [decidable_eq H] {x : H} :
theorem image_range_order_of {α : Type u} (a : α) [fintype α] [group α] [decidable_eq α] :
finset.image (λ (i : ), a ^ i) (finset.range (order_of a)) =

TODO: Generalise to submonoid.powers.

theorem gcd_nsmul_card_eq_zero_iff {H : Type u} [fintype H] [add_group H] {x : H} {n : } :
n x = 0 n.gcd (fintype.card H) x = 0
theorem pow_gcd_card_eq_one_iff {α : Type u} (a : α) [fintype α] [group α] {n : } :
a ^ n = 1 a ^ n.gcd (fintype.card α) = 1

TODO: Generalise to finite_cancel_monoid.