File: Mathlib/GroupTheory/OrderOfElement.lean

full_name: isPeriodicPt_add_iff_nsmul_eq_zero
code: @[to_additive]
theorem isPeriodicPt_mul_iff_pow_eq_one (x : G) : IsPeriodicPt (x * ·) n 1 ↔ x ^ n = 1 
goal: Function.IsPeriodicPt (fun x_1 => x + x_1) n 0 ↔ n • x = 0

full_name: isPeriodicPt_mul_iff_pow_eq_one
code: @[to_additive]
theorem isPeriodicPt_mul_iff_pow_eq_one (x : G) : IsPeriodicPt (x * ·) n 1 ↔ x ^ n = 1 
goal: Function.IsPeriodicPt (fun x_1 => x * x_1) n 1 ↔ x ^ n = 1

full_name: IsOfFinOrder
code: /-- `IsOfFinOrder` is a predicate on an element `x` of a monoid to be of finite order, i.e. there
exists `n ≥ 1` such that `x ^ n = 1`. -/
@[to_additive "`IsOfFinAddOrder` is a predicate on an element `a` of an
additive monoid to be of finite order, i.e. there exists `n ≥ 1` such that `n • a = 0`."]
def IsOfFinOrder (x : G) : Prop 
goal: Prop

full_name: IsOfFinAddOrder
code: /-- `IsOfFinOrder` is a predicate on an element `x` of a monoid to be of finite order, i.e. there
exists `n ≥ 1` such that `x ^ n = 1`. -/
@[to_additive "`IsOfFinAddOrder` is a predicate on an element `a` of an
additive monoid to be of finite order, i.e. there exists `n ≥ 1` such that `n • a = 0`."]
def IsOfFinOrder (x : G) : Prop 
goal: Prop

full_name: isOfFinAddOrder_ofMul_iff
code: theorem isOfFinAddOrder_ofMul_iff : IsOfFinAddOrder (Additive.ofMul x) ↔ IsOfFinOrder x 
goal: IsOfFinAddOrder (Additive.ofMul x) ↔ IsOfFinOrder x

full_name: isOfFinOrder_ofAdd_iff
code: theorem isOfFinOrder_ofAdd_iff {α : Type*} [AddMonoid α] {x : α} :
    IsOfFinOrder (Multiplicative.ofAdd x) ↔ IsOfFinAddOrder x 
goal: IsOfFinOrder (Multiplicative.ofAdd x) ↔ IsOfFinAddOrder x

full_name: isOfFinAddOrder_iff_nsmul_eq_zero
code: @[to_additive]
theorem isOfFinOrder_iff_pow_eq_one : IsOfFinOrder x ↔ ∃ n, 0 < n ∧ x ^ n = 1 
goal: IsOfFinAddOrder x ↔ ∃ n, 0 < n ∧ n • x = 0

full_name: isOfFinOrder_iff_pow_eq_one
code: @[to_additive]
theorem isOfFinOrder_iff_pow_eq_one : IsOfFinOrder x ↔ ∃ n, 0 < n ∧ x ^ n = 1 
goal: IsOfFinOrder x ↔ ∃ n, 0 < n ∧ x ^ n = 1

full_name: isOfFinAddOrder_iff_zsmul_eq_zero
code: @[to_additive]
lemma isOfFinOrder_iff_zpow_eq_one {G} [Group G] {x : G} :
    IsOfFinOrder x ↔ ∃ (n : ℤ), n ≠ 0 ∧ x ^ n = 1 
goal: IsOfFinAddOrder x ↔ ∃ n, n ≠ 0 ∧ n • x = 0

full_name: isOfFinOrder_iff_zpow_eq_one
code: @[to_additive]
lemma isOfFinOrder_iff_zpow_eq_one {G} [Group G] {x : G} :
    IsOfFinOrder x ↔ ∃ (n : ℤ), n ≠ 0 ∧ x ^ n = 1 
goal: IsOfFinOrder x ↔ ∃ n, n ≠ 0 ∧ x ^ n = 1

full_name: not_isOfFinOrder_of_injective_pow
code: /-- See also `injective_pow_iff_not_isOfFinOrder`. -/
@[to_additive "See also `injective_nsmul_iff_not_isOfFinAddOrder`."]
theorem not_isOfFinOrder_of_injective_pow {x : G} (h : Injective fun n : ℕ => x ^ n) :
    ¬IsOfFinOrder x 
goal: ¬IsOfFinOrder x

full_name: not_isOfFinAddOrder_of_injective_nsmul
code: /-- See also `injective_pow_iff_not_isOfFinOrder`. -/
@[to_additive "See also `injective_nsmul_iff_not_isOfFinAddOrder`."]
theorem not_isOfFinOrder_of_injective_pow {x : G} (h : Injective fun n : ℕ => x ^ n) :
    ¬IsOfFinOrder x 
goal: ¬IsOfFinAddOrder x

full_name: IsOfFinOrder.pow
code: lemma IsOfFinOrder.pow {n : ℕ} : IsOfFinOrder a → IsOfFinOrder (a ^ n) 
goal: IsOfFinOrder a → IsOfFinOrder (a ^ n)

full_name: AddSubmonoid.isOfFinAddOrder_coe
code: /-- Elements of finite order are of finite order in submonoids. -/
@[to_additive "Elements of finite order are of finite order in submonoids."]
theorem Submonoid.isOfFinOrder_coe {H : Submonoid G} {x : H} :
    IsOfFinOrder (x : G) ↔ IsOfFinOrder x 
goal: IsOfFinAddOrder ↑x ↔ IsOfFinAddOrder x

full_name: Submonoid.isOfFinOrder_coe
code: /-- Elements of finite order are of finite order in submonoids. -/
@[to_additive "Elements of finite order are of finite order in submonoids."]
theorem Submonoid.isOfFinOrder_coe {H : Submonoid G} {x : H} :
    IsOfFinOrder (x : G) ↔ IsOfFinOrder x 
goal: IsOfFinOrder ↑x ↔ IsOfFinOrder x

full_name: AddMonoidHom.isOfFinAddOrder
code: /-- The image of an element of finite order has finite order. -/
@[to_additive "The image of an element of finite additive order has finite additive order."]
theorem MonoidHom.isOfFinOrder [Monoid H] (f : G →* H) {x : G} (h : IsOfFinOrder x) :
    IsOfFinOrder <| f x 
goal: IsOfFinAddOrder (f x)

full_name: MonoidHom.isOfFinOrder
code: /-- The image of an element of finite order has finite order. -/
@[to_additive "The image of an element of finite additive order has finite additive order."]
theorem MonoidHom.isOfFinOrder [Monoid H] (f : G →* H) {x : G} (h : IsOfFinOrder x) :
    IsOfFinOrder <| f x 
goal: IsOfFinOrder (f x)

full_name: IsOfFinAddOrder.apply
code: /-- If a direct product has finite order then so does each component. -/
@[to_additive "If a direct product has finite additive order then so does each component."]
theorem IsOfFinOrder.apply {η : Type*} {Gs : η → Type*} [∀ i, Monoid (Gs i)] {x : ∀ i, Gs i}
    (h : IsOfFinOrder x) : ∀ i, IsOfFinOrder (x i) 
goal: IsOfFinAddOrder (x i)

full_name: IsOfFinOrder.apply
code: /-- If a direct product has finite order then so does each component. -/
@[to_additive "If a direct product has finite additive order then so does each component."]
theorem IsOfFinOrder.apply {η : Type*} {Gs : η → Type*} [∀ i, Monoid (Gs i)] {x : ∀ i, Gs i}
    (h : IsOfFinOrder x) : ∀ i, IsOfFinOrder (x i) 
goal: IsOfFinOrder (x i)

full_name: isOfFinAddOrder_zero
code: /-- 1 is of finite order in any monoid. -/
@[to_additive "0 is of finite order in any additive monoid."]
theorem isOfFinOrder_one : IsOfFinOrder (1 : G) 
goal: IsOfFinAddOrder 0

full_name: isOfFinOrder_one
code: /-- 1 is of finite order in any monoid. -/
@[to_additive "0 is of finite order in any additive monoid."]
theorem isOfFinOrder_one : IsOfFinOrder (1 : G) 
goal: IsOfFinOrder 1

full_name: IsOfFinAddOrder.addGroupMultiples
code: /-- The submonoid generated by an element is a group if that element has finite order. -/
@[to_additive "The additive submonoid generated by an element is
an additive group if that element has finite order."]
noncomputable abbrev IsOfFinOrder.groupPowers (hx : IsOfFinOrder x) :
    Group (Submonoid.powers x) 
goal: AddGroup ↥(AddSubmonoid.multiples x)

full_name: IsOfFinOrder.groupPowers
code: /-- The submonoid generated by an element is a group if that element has finite order. -/
@[to_additive "The additive submonoid generated by an element is
an additive group if that element has finite order."]
noncomputable abbrev IsOfFinOrder.groupPowers (hx : IsOfFinOrder x) :
    Group (Submonoid.powers x) 
goal: Group ↥(Submonoid.powers x)

full_name: addOrderOf
code: /-- `orderOf x` is the order of the element `x`, i.e. the `n ≥ 1`, s.t. `x ^ n = 1` if it exists.
Otherwise, i.e. if `x` is of infinite order, then `orderOf x` is `0` by convention. -/
@[to_additive
  "`addOrderOf a` is the order of the element `a`, i.e. the `n ≥ 1`, s.t. `n • a = 0` if it
  exists. Otherwise, i.e. if `a` is of infinite order, then `addOrderOf a` is `0` by convention."]
noncomputable def orderOf (x : G) : ℕ 
goal: ℕ

full_name: orderOf
code: /-- `orderOf x` is the order of the element `x`, i.e. the `n ≥ 1`, s.t. `x ^ n = 1` if it exists.
Otherwise, i.e. if `x` is of infinite order, then `orderOf x` is `0` by convention. -/
@[to_additive
  "`addOrderOf a` is the order of the element `a`, i.e. the `n ≥ 1`, s.t. `n • a = 0` if it
  exists. Otherwise, i.e. if `a` is of infinite order, then `addOrderOf a` is `0` by convention."]
noncomputable def orderOf (x : G) : ℕ 
goal: ℕ

full_name: addOrderOf_ofMul_eq_orderOf
code: @[simp]
theorem addOrderOf_ofMul_eq_orderOf (x : G) : addOrderOf (Additive.ofMul x) = orderOf x 
goal: addOrderOf (Additive.ofMul x) = orderOf x

full_name: orderOf_ofAdd_eq_addOrderOf
code: @[simp]
lemma orderOf_ofAdd_eq_addOrderOf {α : Type*} [AddMonoid α] (a : α) :
    orderOf (Multiplicative.ofAdd a) = addOrderOf a 
goal: orderOf (Multiplicative.ofAdd a) = addOrderOf a

full_name: IsOfFinAddOrder.addOrderOf_pos
code: @[to_additive]
protected lemma IsOfFinOrder.orderOf_pos (h : IsOfFinOrder x) : 0 < orderOf x 
goal: 0 < addOrderOf x

full_name: IsOfFinOrder.orderOf_pos
code: @[to_additive]
protected lemma IsOfFinOrder.orderOf_pos (h : IsOfFinOrder x) : 0 < orderOf x 
goal: 0 < orderOf x

full_name: pow_orderOf_eq_one
code: @[to_additive addOrderOf_nsmul_eq_zero]
theorem pow_orderOf_eq_one (x : G) : x ^ orderOf x = 1 
goal: x ^ orderOf x = 1

full_name: addOrderOf_nsmul_eq_zero
code: @[to_additive addOrderOf_nsmul_eq_zero]
theorem pow_orderOf_eq_one (x : G) : x ^ orderOf x = 1 
goal: addOrderOf x • x = 0

full_name: orderOf_eq_zero
code: @[to_additive]
theorem orderOf_eq_zero (h : ¬IsOfFinOrder x) : orderOf x = 0 
goal: orderOf x = 0

full_name: addOrderOf_eq_zero
code: @[to_additive]
theorem orderOf_eq_zero (h : ¬IsOfFinOrder x) : orderOf x = 0 
goal: addOrderOf x = 0

full_name: orderOf_eq_zero_iff
code: @[to_additive]
theorem orderOf_eq_zero_iff : orderOf x = 0 ↔ ¬IsOfFinOrder x 
goal: orderOf x = 0 ↔ ¬IsOfFinOrder x

full_name: addOrderOf_eq_zero_iff
code: @[to_additive]
theorem orderOf_eq_zero_iff : orderOf x = 0 ↔ ¬IsOfFinOrder x 
goal: addOrderOf x = 0 ↔ ¬IsOfFinAddOrder x

full_name: orderOf_eq_zero_iff'
code: @[to_additive]
theorem orderOf_eq_zero_iff' : orderOf x = 0 ↔ ∀ n : ℕ, 0 < n → x ^ n ≠ 1 
goal: orderOf x = 0 ↔ ∀ (n : ℕ), 0 < n → x ^ n ≠ 1

full_name: addOrderOf_eq_zero_iff'
code: @[to_additive]
theorem orderOf_eq_zero_iff' : orderOf x = 0 ↔ ∀ n : ℕ, 0 < n → x ^ n ≠ 1 
goal: addOrderOf x = 0 ↔ ∀ (n : ℕ), 0 < n → n • x ≠ 0

full_name: addOrderOf_eq_iff
code: @[to_additive]
theorem orderOf_eq_iff {n} (h : 0 < n) :
    orderOf x = n ↔ x ^ n = 1 ∧ ∀ m, m < n → 0 < m → x ^ m ≠ 1 
goal: addOrderOf x = n ↔ n • x = 0 ∧ ∀ m < n, 0 < m → m • x ≠ 0

full_name: orderOf_eq_iff
code: @[to_additive]
theorem orderOf_eq_iff {n} (h : 0 < n) :
    orderOf x = n ↔ x ^ n = 1 ∧ ∀ m, m < n → 0 < m → x ^ m ≠ 1 
goal: orderOf x = n ↔ x ^ n = 1 ∧ ∀ m < n, 0 < m → x ^ m ≠ 1

full_name: addOrderOf_pos_iff
code: /-- A group element has finite order iff its order is positive. -/
@[to_additive
      "A group element has finite additive order iff its order is positive."]
theorem orderOf_pos_iff : 0 < orderOf x ↔ IsOfFinOrder x 
goal: 0 < addOrderOf x ↔ IsOfFinAddOrder x

full_name: orderOf_pos_iff
code: /-- A group element has finite order iff its order is positive. -/
@[to_additive
      "A group element has finite additive order iff its order is positive."]
theorem orderOf_pos_iff : 0 < orderOf x ↔ IsOfFinOrder x 
goal: 0 < orderOf x ↔ IsOfFinOrder x

full_name: IsOfFinOrder.mono
code: @[to_additive]
theorem IsOfFinOrder.mono [Monoid β] {y : β} (hx : IsOfFinOrder x) (h : orderOf y ∣ orderOf x) :
    IsOfFinOrder y 
goal: IsOfFinOrder y

full_name: IsOfFinAddOrder.mono
code: @[to_additive]
theorem IsOfFinOrder.mono [Monoid β] {y : β} (hx : IsOfFinOrder x) (h : orderOf y ∣ orderOf x) :
    IsOfFinOrder y 
goal: IsOfFinAddOrder y

full_name: nsmul_ne_zero_of_lt_addOrderOf
code: @[to_additive]
theorem pow_ne_one_of_lt_orderOf (n0 : n ≠ 0) (h : n < orderOf x) : x ^ n ≠ 1 
goal: n • x ≠ 0

full_name: pow_ne_one_of_lt_orderOf
code: @[to_additive]
theorem pow_ne_one_of_lt_orderOf (n0 : n ≠ 0) (h : n < orderOf x) : x ^ n ≠ 1 
goal: x ^ n ≠ 1

full_name: addOrderOf_le_of_nsmul_eq_zero
code: @[to_additive]
theorem orderOf_le_of_pow_eq_one (hn : 0 < n) (h : x ^ n = 1) : orderOf x ≤ n 
goal: addOrderOf x ≤ n

full_name: orderOf_le_of_pow_eq_one
code: @[to_additive]
theorem orderOf_le_of_pow_eq_one (hn : 0 < n) (h : x ^ n = 1) : orderOf x ≤ n 
goal: orderOf x ≤ n

full_name: orderOf_one
code: @[to_additive (attr := simp)]
theorem orderOf_one : orderOf (1 : G) = 1 
goal: orderOf 1 = 1

full_name: addOrderOf_zero
code: @[to_additive (attr := simp)]
theorem orderOf_one : orderOf (1 : G) = 1 
goal: addOrderOf 0 = 1

full_name: orderOf_eq_one_iff
code: @[to_additive (attr := simp) AddMonoid.addOrderOf_eq_one_iff]
theorem orderOf_eq_one_iff : orderOf x = 1 ↔ x = 1 
goal: orderOf x = 1 ↔ x = 1

full_name: AddMonoid.addOrderOf_eq_one_iff
code: @[to_additive (attr := simp) AddMonoid.addOrderOf_eq_one_iff]
theorem orderOf_eq_one_iff : orderOf x = 1 ↔ x = 1 
goal: addOrderOf x = 1 ↔ x = 0

full_name: mod_addOrderOf_nsmul
code: @[to_additive (attr := simp) mod_addOrderOf_nsmul]
lemma pow_mod_orderOf (x : G) (n : ℕ) : x ^ (n % orderOf x) = x ^ n 
goal: (n % addOrderOf x) • x = n • x

full_name: pow_mod_orderOf
code: @[to_additive (attr := simp) mod_addOrderOf_nsmul]
lemma pow_mod_orderOf (x : G) (n : ℕ) : x ^ (n % orderOf x) = x ^ n 
goal: x ^ (n % orderOf x) = x ^ n

full_name: orderOf_dvd_of_pow_eq_one
code: @[to_additive]
theorem orderOf_dvd_of_pow_eq_one (h : x ^ n = 1) : orderOf x ∣ n 
goal: orderOf x ∣ n

full_name: addOrderOf_dvd_of_nsmul_eq_zero
code: @[to_additive]
theorem orderOf_dvd_of_pow_eq_one (h : x ^ n = 1) : orderOf x ∣ n 
goal: addOrderOf x ∣ n

full_name: addOrderOf_dvd_iff_nsmul_eq_zero
code: @[to_additive]
theorem orderOf_dvd_iff_pow_eq_one {n : ℕ} : orderOf x ∣ n ↔ x ^ n = 1 
goal: addOrderOf x ∣ n ↔ n • x = 0

full_name: orderOf_dvd_iff_pow_eq_one
code: @[to_additive]
theorem orderOf_dvd_iff_pow_eq_one {n : ℕ} : orderOf x ∣ n ↔ x ^ n = 1 
goal: orderOf x ∣ n ↔ x ^ n = 1

full_name: orderOf_pow_dvd
code: @[to_additive addOrderOf_smul_dvd]
theorem orderOf_pow_dvd (n : ℕ) : orderOf (x ^ n) ∣ orderOf x 
goal: orderOf (x ^ n) ∣ orderOf x

full_name: addOrderOf_smul_dvd
code: @[to_additive addOrderOf_smul_dvd]
theorem orderOf_pow_dvd (n : ℕ) : orderOf (x ^ n) ∣ orderOf x 
goal: addOrderOf (n • x) ∣ addOrderOf x

full_name: nsmul_injOn_Iio_addOrderOf
code: @[to_additive]
lemma pow_injOn_Iio_orderOf : (Set.Iio <| orderOf x).InjOn (x ^ ·) 
goal: Set.InjOn (fun x_1 => x_1 • x) (Set.Iio (addOrderOf x))

full_name: pow_injOn_Iio_orderOf
code: @[to_additive]
lemma pow_injOn_Iio_orderOf : (Set.Iio <| orderOf x).InjOn (x ^ ·) 
goal: Set.InjOn (fun x_1 => x ^ x_1) (Set.Iio (orderOf x))

full_name: IsOfFinOrder.mem_powers_iff_mem_range_orderOf
code: @[to_additive]
protected lemma IsOfFinOrder.mem_powers_iff_mem_range_orderOf [DecidableEq G]
    (hx : IsOfFinOrder x) :
    y ∈ Submonoid.powers x ↔ y ∈ (Finset.range (orderOf x)).image (x ^ ·) 
goal: y ∈ Submonoid.powers x ↔ y ∈ Finset.image (fun x_1 => x ^ x_1) (Finset.range (orderOf x))

full_name: IsOfFinAddOrder.mem_multiples_iff_mem_range_addOrderOf
code: @[to_additive]
protected lemma IsOfFinOrder.mem_powers_iff_mem_range_orderOf [DecidableEq G]
    (hx : IsOfFinOrder x) :
    y ∈ Submonoid.powers x ↔ y ∈ (Finset.range (orderOf x)).image (x ^ ·) 
goal: y ∈ AddSubmonoid.multiples x ↔ y ∈ Finset.image (fun x_1 => x_1 • x) (Finset.range (addOrderOf x))

full_name: IsOfFinAddOrder.multiples_eq_image_range_addOrderOf
code: @[to_additive]
protected lemma IsOfFinOrder.powers_eq_image_range_orderOf [DecidableEq G] (hx : IsOfFinOrder x) :
    (Submonoid.powers x : Set G) = (Finset.range (orderOf x)).image (x ^ ·) 
goal: ↑(AddSubmonoid.multiples x) = ↑(Finset.image (fun x_1 => x_1 • x) (Finset.range (addOrderOf x)))

full_name: IsOfFinOrder.powers_eq_image_range_orderOf
code: @[to_additive]
protected lemma IsOfFinOrder.powers_eq_image_range_orderOf [DecidableEq G] (hx : IsOfFinOrder x) :
    (Submonoid.powers x : Set G) = (Finset.range (orderOf x)).image (x ^ ·) 
goal: ↑(Submonoid.powers x) = ↑(Finset.image (fun x_1 => x ^ x_1) (Finset.range (orderOf x)))

full_name: pow_eq_one_iff_modEq
code: @[to_additive]
theorem pow_eq_one_iff_modEq : x ^ n = 1 ↔ n ≡ 0 [MOD orderOf x] 
goal: x ^ n = 1 ↔ n ≡ 0 [MOD orderOf x]

full_name: nsmul_eq_zero_iff_modEq
code: @[to_additive]
theorem pow_eq_one_iff_modEq : x ^ n = 1 ↔ n ≡ 0 [MOD orderOf x] 
goal: n • x = 0 ↔ n ≡ 0 [MOD addOrderOf x]

full_name: orderOf_map_dvd
code: @[to_additive]
theorem orderOf_map_dvd {H : Type*} [Monoid H] (ψ : G →* H) (x : G) :
    orderOf (ψ x) ∣ orderOf x 
goal: orderOf (ψ x) ∣ orderOf x

full_name: addOrderOf_map_dvd
code: @[to_additive]
theorem orderOf_map_dvd {H : Type*} [Monoid H] (ψ : G →* H) (x : G) :
    orderOf (ψ x) ∣ orderOf x 
goal: addOrderOf (ψ x) ∣ addOrderOf x

full_name: exists_pow_eq_self_of_coprime
code: @[to_additive]
theorem exists_pow_eq_self_of_coprime (h : n.Coprime (orderOf x)) : ∃ m : ℕ, (x ^ n) ^ m = x 
goal: ∃ m, (x ^ n) ^ m = x

full_name: exists_nsmul_eq_self_of_coprime
code: @[to_additive]
theorem exists_pow_eq_self_of_coprime (h : n.Coprime (orderOf x)) : ∃ m : ℕ, (x ^ n) ^ m = x 
goal: ∃ m, m • n • x = x

full_name: addOrderOf_eq_of_nsmul_and_div_prime_nsmul
code: /-- If `x^n = 1`, but `x^(n/p) ≠ 1` for all prime factors `p` of `n`,
then `x` has order `n` in `G`. -/
@[to_additive addOrderOf_eq_of_nsmul_and_div_prime_nsmul "If `n * x = 0`, but `n/p * x ≠ 0` for
all prime factors `p` of `n`, then `x` has order `n` in `G`."]
theorem orderOf_eq_of_pow_and_pow_div_prime (hn : 0 < n) (hx : x ^ n = 1)
    (hd : ∀ p : ℕ, p.Prime → p ∣ n → x ^ (n / p) ≠ 1) : orderOf x = n 
goal: addOrderOf x = n

full_name: orderOf_eq_of_pow_and_pow_div_prime
code: /-- If `x^n = 1`, but `x^(n/p) ≠ 1` for all prime factors `p` of `n`,
then `x` has order `n` in `G`. -/
@[to_additive addOrderOf_eq_of_nsmul_and_div_prime_nsmul "If `n * x = 0`, but `n/p * x ≠ 0` for
all prime factors `p` of `n`, then `x` has order `n` in `G`."]
theorem orderOf_eq_of_pow_and_pow_div_prime (hn : 0 < n) (hx : x ^ n = 1)
    (hd : ∀ p : ℕ, p.Prime → p ∣ n → x ^ (n / p) ≠ 1) : orderOf x = n 
goal: orderOf x = n

full_name: addOrderOf_eq_addOrderOf_iff
code: @[to_additive]
theorem orderOf_eq_orderOf_iff {H : Type*} [Monoid H] {y : H} :
    orderOf x = orderOf y ↔ ∀ n : ℕ, x ^ n = 1 ↔ y ^ n = 1 
goal: addOrderOf x = addOrderOf y ↔ ∀ (n : ℕ), n • x = 0 ↔ n • y = 0

full_name: orderOf_eq_orderOf_iff
code: @[to_additive]
theorem orderOf_eq_orderOf_iff {H : Type*} [Monoid H] {y : H} :
    orderOf x = orderOf y ↔ ∀ n : ℕ, x ^ n = 1 ↔ y ^ n = 1 
goal: orderOf x = orderOf y ↔ ∀ (n : ℕ), x ^ n = 1 ↔ y ^ n = 1

full_name: orderOf_injective
code: /-- An injective homomorphism of monoids preserves orders of elements. -/
@[to_additive "An injective homomorphism of additive monoids preserves orders of elements."]
theorem orderOf_injective {H : Type*} [Monoid H] (f : G →* H) (hf : Function.Injective f) (x : G) :
    orderOf (f x) = orderOf x 
goal: orderOf (f x) = orderOf x

full_name: addOrderOf_injective
code: /-- An injective homomorphism of monoids preserves orders of elements. -/
@[to_additive "An injective homomorphism of additive monoids preserves orders of elements."]
theorem orderOf_injective {H : Type*} [Monoid H] (f : G →* H) (hf : Function.Injective f) (x : G) :
    orderOf (f x) = orderOf x 
goal: addOrderOf (f x) = addOrderOf x

full_name: AddEquiv.addOrderOf_eq
code: /-- A multiplicative equivalence preserves orders of elements. -/
@[to_additive (attr := simp) "An additive equivalence preserves orders of elements."]
lemma MulEquiv.orderOf_eq {H : Type*} [Monoid H] (e : G ≃* H) (x : G) :
    orderOf (e x) = orderOf x 
goal: addOrderOf (e x) = addOrderOf x

full_name: MulEquiv.orderOf_eq
code: /-- A multiplicative equivalence preserves orders of elements. -/
@[to_additive (attr := simp) "An additive equivalence preserves orders of elements."]
lemma MulEquiv.orderOf_eq {H : Type*} [Monoid H] (e : G ≃* H) (x : G) :
    orderOf (e x) = orderOf x 
goal: orderOf (e x) = orderOf x

full_name: Function.Injective.isOfFinAddOrder_iff
code: @[to_additive]
theorem Function.Injective.isOfFinOrder_iff [Monoid H] {f : G →* H} (hf : Injective f) :
    IsOfFinOrder (f x) ↔ IsOfFinOrder x 
goal: IsOfFinAddOrder (f x) ↔ IsOfFinAddOrder x

full_name: Function.Injective.isOfFinOrder_iff
code: @[to_additive]
theorem Function.Injective.isOfFinOrder_iff [Monoid H] {f : G →* H} (hf : Injective f) :
    IsOfFinOrder (f x) ↔ IsOfFinOrder x 
goal: IsOfFinOrder (f x) ↔ IsOfFinOrder x

full_name: orderOf_submonoid
code: @[to_additive (attr := norm_cast, simp)]
theorem orderOf_submonoid {H : Submonoid G} (y : H) : orderOf (y : G) = orderOf y 
goal: orderOf ↑y = orderOf y

full_name: addOrderOf_addSubmonoid
code: @[to_additive (attr := norm_cast, simp)]
theorem orderOf_submonoid {H : Submonoid G} (y : H) : orderOf (y : G) = orderOf y 
goal: addOrderOf ↑y = addOrderOf y

full_name: orderOf_units
code: @[to_additive]
theorem orderOf_units {y : Gˣ} : orderOf (y : G) = orderOf y 
goal: orderOf ↑y = orderOf y

full_name: addOrderOf_addUnits
code: @[to_additive]
theorem orderOf_units {y : Gˣ} : orderOf (y : G) = orderOf y 
goal: addOrderOf ↑y = addOrderOf y

full_name: IsOfFinOrder.val_unit
code: /-- If the order of `x` is finite, then `x` is a unit with inverse `x ^ (orderOf x - 1)`. -/
@[simps]
noncomputable
def IsOfFinOrder.unit {M} [Monoid M] {x : M} (hx : IsOfFinOrder x) : Mˣ 
goal: ↑hx.unit = x

full_name: IsOfFinOrder.unit
code: /-- If the order of `x` is finite, then `x` is a unit with inverse `x ^ (orderOf x - 1)`. -/
@[simps]
noncomputable
def IsOfFinOrder.unit {M} [Monoid M] {x : M} (hx : IsOfFinOrder x) : Mˣ 
goal: Mˣ

full_name: IsOfFinOrder.val_inv_unit
code: /-- If the order of `x` is finite, then `x` is a unit with inverse `x ^ (orderOf x - 1)`. -/
@[simps]
noncomputable
def IsOfFinOrder.unit {M} [Monoid M] {x : M} (hx : IsOfFinOrder x) : Mˣ 
goal: ↑hx.unit⁻¹ = x ^ (orderOf x - 1)

full_name: IsOfFinOrder.isUnit
code: lemma IsOfFinOrder.isUnit {M} [Monoid M] {x : M} (hx : IsOfFinOrder x) : IsUnit x 
goal: IsUnit x

full_name: addOrderOf_nsmul'
code: @[to_additive]
theorem orderOf_pow' (h : n ≠ 0) : orderOf (x ^ n) = orderOf x / gcd (orderOf x) n 
goal: addOrderOf (n • x) = addOrderOf x / (addOrderOf x).gcd n

full_name: orderOf_pow'
code: @[to_additive]
theorem orderOf_pow' (h : n ≠ 0) : orderOf (x ^ n) = orderOf x / gcd (orderOf x) n 
goal: orderOf (x ^ n) = orderOf x / (orderOf x).gcd n

full_name: addOrderOf_nsmul_of_dvd
code: @[to_additive]
lemma orderOf_pow_of_dvd {x : G} {n : ℕ} (hn : n ≠ 0) (dvd : n ∣ orderOf x) :
    orderOf (x ^ n) = orderOf x / n 
goal: addOrderOf (n • x) = addOrderOf x / n

full_name: orderOf_pow_of_dvd
code: @[to_additive]
lemma orderOf_pow_of_dvd {x : G} {n : ℕ} (hn : n ≠ 0) (dvd : n ∣ orderOf x) :
    orderOf (x ^ n) = orderOf x / n 
goal: orderOf (x ^ n) = orderOf x / n

full_name: orderOf_pow_orderOf_div
code: @[to_additive]
lemma orderOf_pow_orderOf_div {x : G} {n : ℕ} (hx : orderOf x ≠ 0) (hn : n ∣ orderOf x) :
    orderOf (x ^ (orderOf x / n)) = n 
goal: orderOf (x ^ (orderOf x / n)) = n

full_name: addOrderOf_nsmul_addOrderOf_sub
code: @[to_additive]
lemma orderOf_pow_orderOf_div {x : G} {n : ℕ} (hx : orderOf x ≠ 0) (hn : n ∣ orderOf x) :
    orderOf (x ^ (orderOf x / n)) = n 
goal: addOrderOf ((addOrderOf x / n) • x) = n

full_name: IsOfFinOrder.orderOf_pow
code: @[to_additive]
protected lemma IsOfFinOrder.orderOf_pow (h : IsOfFinOrder x) :
    orderOf (x ^ n) = orderOf x / gcd (orderOf x) n 
goal: orderOf (x ^ n) = orderOf x / (orderOf x).gcd n

full_name: IsOfFinAddOrder.addOrderOf_nsmul
code: @[to_additive]
protected lemma IsOfFinOrder.orderOf_pow (h : IsOfFinOrder x) :
    orderOf (x ^ n) = orderOf x / gcd (orderOf x) n 
goal: addOrderOf (n • x) = addOrderOf x / (addOrderOf x).gcd n

full_name: Nat.Coprime.addOrderOf_nsmul
code: @[to_additive]
lemma Nat.Coprime.orderOf_pow (h : (orderOf y).Coprime m) : orderOf (y ^ m) = orderOf y 
goal: addOrderOf (m • y) = addOrderOf y

full_name: Nat.Coprime.orderOf_pow
code: @[to_additive]
lemma Nat.Coprime.orderOf_pow (h : (orderOf y).Coprime m) : orderOf (y ^ m) = orderOf y 
goal: orderOf (y ^ m) = orderOf y

full_name: IsOfFinOrder.natCard_powers_le_orderOf
code: @[to_additive]
lemma IsOfFinOrder.natCard_powers_le_orderOf (ha : IsOfFinOrder a) :
    Nat.card (powers a : Set G) ≤ orderOf a 
goal: Nat.card ↑↑(Submonoid.powers a) ≤ orderOf a

full_name: IsOfFinAddOrder.natCard_multiples_le_addOrderOf
code: @[to_additive]
lemma IsOfFinOrder.natCard_powers_le_orderOf (ha : IsOfFinOrder a) :
    Nat.card (powers a : Set G) ≤ orderOf a 
goal: Nat.card ↑↑(AddSubmonoid.multiples a) ≤ addOrderOf a

full_name: IsOfFinAddOrder.finite_multiples
code: @[to_additive]
lemma IsOfFinOrder.finite_powers (ha : IsOfFinOrder a) : (powers a : Set G).Finite 
goal: (↑(AddSubmonoid.multiples a)).Finite

full_name: IsOfFinOrder.finite_powers
code: @[to_additive]
lemma IsOfFinOrder.finite_powers (ha : IsOfFinOrder a) : (powers a : Set G).Finite 
goal: (↑(Submonoid.powers a)).Finite

full_name: Commute.orderOf_mul_dvd_lcm
code: @[to_additive]
theorem orderOf_mul_dvd_lcm (h : Commute x y) :
    orderOf (x * y) ∣ Nat.lcm (orderOf x) (orderOf y) 
goal: orderOf (x * y) ∣ (orderOf x).lcm (orderOf y)

full_name: AddCommute.addOrderOf_add_dvd_lcm
code: @[to_additive]
theorem orderOf_mul_dvd_lcm (h : Commute x y) :
    orderOf (x * y) ∣ Nat.lcm (orderOf x) (orderOf y) 
goal: addOrderOf (x + y) ∣ (addOrderOf x).lcm (addOrderOf y)

full_name: Commute.orderOf_dvd_lcm_mul
code: @[to_additive]
theorem orderOf_dvd_lcm_mul (h : Commute x y):
    orderOf y ∣ Nat.lcm (orderOf x) (orderOf (x * y)) 
goal: orderOf y ∣ (orderOf x).lcm (orderOf (x * y))

full_name: AddCommute.addOrderOf_dvd_lcm_add
code: @[to_additive]
theorem orderOf_dvd_lcm_mul (h : Commute x y):
    orderOf y ∣ Nat.lcm (orderOf x) (orderOf (x * y)) 
goal: addOrderOf y ∣ (addOrderOf x).lcm (addOrderOf (x + y))

full_name: Commute.orderOf_mul_dvd_mul_orderOf
code: @[to_additive addOrderOf_add_dvd_mul_addOrderOf]
theorem orderOf_mul_dvd_mul_orderOf (h : Commute x y):
    orderOf (x * y) ∣ orderOf x * orderOf y 
goal: orderOf (x * y) ∣ orderOf x * orderOf y

full_name: AddCommute.addOrderOf_add_dvd_mul_addOrderOf
code: @[to_additive addOrderOf_add_dvd_mul_addOrderOf]
theorem orderOf_mul_dvd_mul_orderOf (h : Commute x y):
    orderOf (x * y) ∣ orderOf x * orderOf y 
goal: addOrderOf (x + y) ∣ addOrderOf x * addOrderOf y

full_name: Commute.orderOf_mul_eq_mul_orderOf_of_coprime
code: @[to_additive addOrderOf_add_eq_mul_addOrderOf_of_coprime]
theorem orderOf_mul_eq_mul_orderOf_of_coprime (h : Commute x y)
    (hco : (orderOf x).Coprime (orderOf y)) : orderOf (x * y) = orderOf x * orderOf y 
goal: orderOf (x * y) = orderOf x * orderOf y

full_name: AddCommute.addOrderOf_add_eq_mul_addOrderOf_of_coprime
code: @[to_additive addOrderOf_add_eq_mul_addOrderOf_of_coprime]
theorem orderOf_mul_eq_mul_orderOf_of_coprime (h : Commute x y)
    (hco : (orderOf x).Coprime (orderOf y)) : orderOf (x * y) = orderOf x * orderOf y 
goal: addOrderOf (x + y) = addOrderOf x * addOrderOf y

full_name: AddCommute.isOfFinAddOrder_add
code: /-- Commuting elements of finite order are closed under multiplication. -/
@[to_additive "Commuting elements of finite additive order are closed under addition."]
theorem isOfFinOrder_mul (h : Commute x y) (hx : IsOfFinOrder x) (hy : IsOfFinOrder y) :
    IsOfFinOrder (x * y) 
goal: IsOfFinAddOrder (x + y)

full_name: Commute.isOfFinOrder_mul
code: /-- Commuting elements of finite order are closed under multiplication. -/
@[to_additive "Commuting elements of finite additive order are closed under addition."]
theorem isOfFinOrder_mul (h : Commute x y) (hx : IsOfFinOrder x) (hy : IsOfFinOrder y) :
    IsOfFinOrder (x * y) 
goal: IsOfFinOrder (x * y)

full_name: Commute.orderOf_mul_eq_right_of_forall_prime_mul_dvd
code: /-- If each prime factor of `orderOf x` has higher multiplicity in `orderOf y`, and `x` commutes
  with `y`, then `x * y` has the same order as `y`. -/
@[to_additive addOrderOf_add_eq_right_of_forall_prime_mul_dvd
  "If each prime factor of
  `addOrderOf x` has higher multiplicity in `addOrderOf y`, and `x` commutes with `y`,
  then `x + y` has the same order as `y`."]
theorem orderOf_mul_eq_right_of_forall_prime_mul_dvd (h : Commute x y) (hy : IsOfFinOrder y)
    (hdvd : ∀ p : ℕ, p.Prime → p ∣ orderOf x → p * orderOf x ∣ orderOf y) :
    orderOf (x * y) = orderOf y 
goal: orderOf (x * y) = orderOf y

full_name: AddCommute.addOrderOf_add_eq_right_of_forall_prime_mul_dvd
code: /-- If each prime factor of `orderOf x` has higher multiplicity in `orderOf y`, and `x` commutes
  with `y`, then `x * y` has the same order as `y`. -/
@[to_additive addOrderOf_add_eq_right_of_forall_prime_mul_dvd
  "If each prime factor of
  `addOrderOf x` has higher multiplicity in `addOrderOf y`, and `x` commutes with `y`,
  then `x + y` has the same order as `y`."]
theorem orderOf_mul_eq_right_of_forall_prime_mul_dvd (h : Commute x y) (hy : IsOfFinOrder y)
    (hdvd : ∀ p : ℕ, p.Prime → p ∣ orderOf x → p * orderOf x ∣ orderOf y) :
    orderOf (x * y) = orderOf y 
goal: addOrderOf (x + y) = addOrderOf y

full_name: addOrderOf_eq_prime
code: @[to_additive]
theorem orderOf_eq_prime (hg : x ^ p = 1) (hg1 : x ≠ 1) : orderOf x = p 
goal: addOrderOf x = p

full_name: orderOf_eq_prime
code: @[to_additive]
theorem orderOf_eq_prime (hg : x ^ p = 1) (hg1 : x ≠ 1) : orderOf x = p 
goal: orderOf x = p

full_name: addOrderOf_eq_prime_pow
code: @[to_additive addOrderOf_eq_prime_pow]
theorem orderOf_eq_prime_pow (hnot : ¬x ^ p ^ n = 1) (hfin : x ^ p ^ (n + 1) = 1) :
    orderOf x = p ^ (n + 1) 
goal: addOrderOf x = p ^ (n + 1)

full_name: orderOf_eq_prime_pow
code: @[to_additive addOrderOf_eq_prime_pow]
theorem orderOf_eq_prime_pow (hnot : ¬x ^ p ^ n = 1) (hfin : x ^ p ^ (n + 1) = 1) :
    orderOf x = p ^ (n + 1) 
goal: orderOf x = p ^ (n + 1)

full_name: exists_addOrderOf_eq_prime_pow_iff
code: @[to_additive exists_addOrderOf_eq_prime_pow_iff]
theorem exists_orderOf_eq_prime_pow_iff :
    (∃ k : ℕ, orderOf x = p ^ k) ↔ ∃ m : ℕ, x ^ (p : ℕ) ^ m = 1 
goal: (∃ k, addOrderOf x = p ^ k) ↔ ∃ m, p ^ m • x = 0

full_name: exists_orderOf_eq_prime_pow_iff
code: @[to_additive exists_addOrderOf_eq_prime_pow_iff]
theorem exists_orderOf_eq_prime_pow_iff :
    (∃ k : ℕ, orderOf x = p ^ k) ↔ ∃ m : ℕ, x ^ (p : ℕ) ^ m = 1 
goal: (∃ k, orderOf x = p ^ k) ↔ ∃ m, x ^ p ^ m = 1

full_name: pow_eq_pow_iff_modEq
code: @[to_additive]
theorem pow_eq_pow_iff_modEq : x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x] 
goal: x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x]

full_name: nsmul_eq_nsmul_iff_modEq
code: @[to_additive]
theorem pow_eq_pow_iff_modEq : x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x] 
goal: n • x = m • x ↔ n ≡ m [MOD addOrderOf x]

full_name: injective_nsmul_iff_not_isOfFinAddOrder
code: @[to_additive (attr := simp)]
lemma injective_pow_iff_not_isOfFinOrder : Injective (fun n : ℕ ↦ x ^ n) ↔ ¬IsOfFinOrder x 
goal: (Function.Injective fun n => n • x) ↔ ¬IsOfFinAddOrder x

full_name: injective_pow_iff_not_isOfFinOrder
code: @[to_additive (attr := simp)]
lemma injective_pow_iff_not_isOfFinOrder : Injective (fun n : ℕ ↦ x ^ n) ↔ ¬IsOfFinOrder x 
goal: (Function.Injective fun n => x ^ n) ↔ ¬IsOfFinOrder x

full_name: pow_inj_mod
code: @[to_additive]
lemma pow_inj_mod {n m : ℕ} : x ^ n = x ^ m ↔ n % orderOf x = m % orderOf x 
goal: x ^ n = x ^ m ↔ n % orderOf x = m % orderOf x

full_name: nsmul_inj_mod
code: @[to_additive]
lemma pow_inj_mod {n m : ℕ} : x ^ n = x ^ m ↔ n % orderOf x = m % orderOf x 
goal: n • x = m • x ↔ n % addOrderOf x = m % addOrderOf x

full_name: nsmul_inj_iff_of_addOrderOf_eq_zero
code: @[to_additive]
theorem pow_inj_iff_of_orderOf_eq_zero (h : orderOf x = 0) {n m : ℕ} : x ^ n = x ^ m ↔ n = m 
goal: n • x = m • x ↔ n = m

full_name: pow_inj_iff_of_orderOf_eq_zero
code: @[to_additive]
theorem pow_inj_iff_of_orderOf_eq_zero (h : orderOf x = 0) {n m : ℕ} : x ^ n = x ^ m ↔ n = m 
goal: x ^ n = x ^ m ↔ n = m

full_name: infinite_not_isOfFinAddOrder
code: @[to_additive]
theorem infinite_not_isOfFinOrder {x : G} (h : ¬IsOfFinOrder x) :
    { y : G | ¬IsOfFinOrder y }.Infinite 
goal: {y | ¬IsOfFinAddOrder y}.Infinite

full_name: infinite_not_isOfFinOrder
code: @[to_additive]
theorem infinite_not_isOfFinOrder {x : G} (h : ¬IsOfFinOrder x) :
    { y : G | ¬IsOfFinOrder y }.Infinite 
goal: {y | ¬IsOfFinOrder y}.Infinite

full_name: finite_powers
code: @[to_additive (attr := simp)]
lemma finite_powers : (powers a : Set G).Finite ↔ IsOfFinOrder a 
goal: (↑(Submonoid.powers a)).Finite ↔ IsOfFinOrder a

full_name: finite_multiples
code: @[to_additive (attr := simp)]
lemma finite_powers : (powers a : Set G).Finite ↔ IsOfFinOrder a 
goal: (↑(AddSubmonoid.multiples a)).Finite ↔ IsOfFinAddOrder a

full_name: infinite_multiples
code: @[to_additive (attr := simp)]
lemma infinite_powers : (powers a : Set G).Infinite ↔ ¬ IsOfFinOrder a 
goal: (↑(AddSubmonoid.multiples a)).Infinite ↔ ¬IsOfFinAddOrder a

full_name: infinite_powers
code: @[to_additive (attr := simp)]
lemma infinite_powers : (powers a : Set G).Infinite ↔ ¬ IsOfFinOrder a 
goal: (↑(Submonoid.powers a)).Infinite ↔ ¬IsOfFinOrder a

full_name: finEquivMultiples
code: /-- The equivalence between `Fin (orderOf x)` and `Submonoid.powers x`, sending `i` to `x ^ i`."-/
@[to_additive "The equivalence between `Fin (addOrderOf a)` and
`AddSubmonoid.multiples a`, sending `i` to `i • a`."]
noncomputable def finEquivPowers (x : G) (hx : IsOfFinOrder x) : Fin (orderOf x) ≃ powers x 
goal: Fin (addOrderOf x) ≃ ↥(AddSubmonoid.multiples x)

full_name: finEquivPowers
code: /-- The equivalence between `Fin (orderOf x)` and `Submonoid.powers x`, sending `i` to `x ^ i`."-/
@[to_additive "The equivalence between `Fin (addOrderOf a)` and
`AddSubmonoid.multiples a`, sending `i` to `i • a`."]
noncomputable def finEquivPowers (x : G) (hx : IsOfFinOrder x) : Fin (orderOf x) ≃ powers x 
goal: Fin (orderOf x) ≃ ↥(Submonoid.powers x)

full_name: finEquivPowers_apply
code: @[to_additive (attr := simp)]
lemma finEquivPowers_apply (x : G) (hx) {n : Fin (orderOf x)} :
    finEquivPowers x hx n = ⟨x ^ (n : ℕ), n, rfl⟩ 
goal: (finEquivPowers x hx) n = ⟨x ^ ↑n, ⋯⟩

full_name: finEquivMultiples_apply
code: @[to_additive (attr := simp)]
lemma finEquivPowers_apply (x : G) (hx) {n : Fin (orderOf x)} :
    finEquivPowers x hx n = ⟨x ^ (n : ℕ), n, rfl⟩ 
goal: (finEquivMultiples x hx) n = ⟨↑n • x, ⋯⟩

full_name: finEquivPowers_symm_apply
code: @[to_additive (attr := simp)]
lemma finEquivPowers_symm_apply (x : G) (hx) (n : ℕ) {hn : ∃ m : ℕ, x ^ m = x ^ n} :
    (finEquivPowers x hx).symm ⟨x ^ n, hn⟩ = ⟨n % orderOf x, Nat.mod_lt _ hx.orderOf_pos⟩ 
goal: (finEquivPowers x hx).symm ⟨x ^ n, hn⟩ = ⟨n % orderOf x, ⋯⟩

full_name: finEquivMultiples_symm_apply
code: @[to_additive (attr := simp)]
lemma finEquivPowers_symm_apply (x : G) (hx) (n : ℕ) {hn : ∃ m : ℕ, x ^ m = x ^ n} :
    (finEquivPowers x hx).symm ⟨x ^ n, hn⟩ = ⟨n % orderOf x, Nat.mod_lt _ hx.orderOf_pos⟩ 
goal: (finEquivMultiples x hx).symm ⟨n • x, hn⟩ = ⟨n % addOrderOf x, ⋯⟩

full_name: Nat.card_addSubmonoidMultiples
code: /-- See also `orderOf_eq_card_powers`. -/
@[to_additive "See also `addOrder_eq_card_multiples`."]
lemma Nat.card_submonoidPowers : Nat.card (powers a) = orderOf a 
goal: Nat.card ↥(AddSubmonoid.multiples a) = addOrderOf a

full_name: Nat.card_submonoidPowers
code: /-- See also `orderOf_eq_card_powers`. -/
@[to_additive "See also `addOrder_eq_card_multiples`."]
lemma Nat.card_submonoidPowers : Nat.card (powers a) = orderOf a 
goal: Nat.card ↥(Submonoid.powers a) = orderOf a

full_name: isOfFinAddOrder_neg_iff
code: /-- Inverses of elements of finite order have finite order. -/
@[to_additive (attr := simp) "Inverses of elements of finite additive order
have finite additive order."]
theorem isOfFinOrder_inv_iff {x : G} : IsOfFinOrder x⁻¹ ↔ IsOfFinOrder x 
goal: IsOfFinAddOrder (-x) ↔ IsOfFinAddOrder x

full_name: isOfFinOrder_inv_iff
code: /-- Inverses of elements of finite order have finite order. -/
@[to_additive (attr := simp) "Inverses of elements of finite additive order
have finite additive order."]
theorem isOfFinOrder_inv_iff {x : G} : IsOfFinOrder x⁻¹ ↔ IsOfFinOrder x 
goal: IsOfFinOrder x⁻¹ ↔ IsOfFinOrder x

full_name: addOrderOf_dvd_iff_zsmul_eq_zero
code: @[to_additive]
theorem orderOf_dvd_iff_zpow_eq_one : (orderOf x : ℤ) ∣ i ↔ x ^ i = 1 
goal: ↑(addOrderOf x) ∣ i ↔ i • x = 0

full_name: orderOf_dvd_iff_zpow_eq_one
code: @[to_additive]
theorem orderOf_dvd_iff_zpow_eq_one : (orderOf x : ℤ) ∣ i ↔ x ^ i = 1 
goal: ↑(orderOf x) ∣ i ↔ x ^ i = 1

full_name: addOrderOf_neg
code: @[to_additive (attr := simp)]
theorem orderOf_inv (x : G) : orderOf x⁻¹ = orderOf x 
goal: addOrderOf (-x) = addOrderOf x

full_name: orderOf_inv
code: @[to_additive (attr := simp)]
theorem orderOf_inv (x : G) : orderOf x⁻¹ = orderOf x 
goal: orderOf x⁻¹ = orderOf x

full_name: Subgroup.orderOf_coe
code: @[to_additive (attr := norm_cast)] -- Porting note (#10618): simp can prove this (so removed simp)
lemma orderOf_coe (a : H) : orderOf (a : G) = orderOf a 
goal: orderOf ↑a = orderOf a

full_name: AddSubgroup.addOrderOf_coe
code: @[to_additive (attr := norm_cast)] -- Porting note (#10618): simp can prove this (so removed simp)
lemma orderOf_coe (a : H) : orderOf (a : G) = orderOf a 
goal: addOrderOf ↑a = addOrderOf a

full_name: AddSubgroup.addOrderOf_mk
code: @[to_additive (attr := simp)]
lemma orderOf_mk (a : G) (ha) : orderOf (⟨a, ha⟩ : H) = orderOf a 
goal: addOrderOf ⟨a, ha⟩ = addOrderOf a

full_name: Subgroup.orderOf_mk
code: @[to_additive (attr := simp)]
lemma orderOf_mk (a : G) (ha) : orderOf (⟨a, ha⟩ : H) = orderOf a 
goal: orderOf ⟨a, ha⟩ = orderOf a

full_name: mod_addOrderOf_zsmul
code: @[to_additive mod_addOrderOf_zsmul]
lemma zpow_mod_orderOf (x : G) (z : ℤ) : x ^ (z % (orderOf x : ℤ)) = x ^ z 
goal: (z % ↑(addOrderOf x)) • x = z • x

full_name: zpow_mod_orderOf
code: @[to_additive mod_addOrderOf_zsmul]
lemma zpow_mod_orderOf (x : G) (z : ℤ) : x ^ (z % (orderOf x : ℤ)) = x ^ z 
goal: x ^ (z % ↑(orderOf x)) = x ^ z

full_name: zsmul_smul_addOrderOf
code: @[to_additive (attr := simp) zsmul_smul_addOrderOf]
theorem zpow_pow_orderOf : (x ^ i) ^ orderOf x = 1 
goal: addOrderOf x • i • x = 0

full_name: zpow_pow_orderOf
code: @[to_additive (attr := simp) zsmul_smul_addOrderOf]
theorem zpow_pow_orderOf : (x ^ i) ^ orderOf x = 1 
goal: (x ^ i) ^ orderOf x = 1

full_name: IsOfFinAddOrder.zsmul
code: @[to_additive]
theorem IsOfFinOrder.zpow (h : IsOfFinOrder x) {i : ℤ} : IsOfFinOrder (x ^ i) 
goal: IsOfFinAddOrder (i • x)

full_name: IsOfFinOrder.zpow
code: @[to_additive]
theorem IsOfFinOrder.zpow (h : IsOfFinOrder x) {i : ℤ} : IsOfFinOrder (x ^ i) 
goal: IsOfFinOrder (x ^ i)

full_name: IsOfFinAddOrder.of_mem_zmultiples
code: @[to_additive]
theorem IsOfFinOrder.of_mem_zpowers (h : IsOfFinOrder x) (h' : y ∈ Subgroup.zpowers x) :
    IsOfFinOrder y 
goal: IsOfFinAddOrder y

full_name: IsOfFinOrder.of_mem_zpowers
code: @[to_additive]
theorem IsOfFinOrder.of_mem_zpowers (h : IsOfFinOrder x) (h' : y ∈ Subgroup.zpowers x) :
    IsOfFinOrder y 
goal: IsOfFinOrder y

full_name: addOrderOf_dvd_of_mem_zmultiples
code: @[to_additive]
theorem orderOf_dvd_of_mem_zpowers (h : y ∈ Subgroup.zpowers x) : orderOf y ∣ orderOf x 
goal: addOrderOf y ∣ addOrderOf x

full_name: orderOf_dvd_of_mem_zpowers
code: @[to_additive]
theorem orderOf_dvd_of_mem_zpowers (h : y ∈ Subgroup.zpowers x) : orderOf y ∣ orderOf x 
goal: orderOf y ∣ orderOf x

full_name: smul_eq_self_of_mem_zpowers
code: theorem smul_eq_self_of_mem_zpowers {α : Type*} [MulAction G α] (hx : x ∈ Subgroup.zpowers y)
    {a : α} (hs : y • a = a) : x • a = a 
goal: x • a = a

full_name: vadd_eq_self_of_mem_zmultiples
code: theorem vadd_eq_self_of_mem_zmultiples {α G : Type*} [AddGroup G] [AddAction G α] {x y : G}
    (hx : x ∈ AddSubgroup.zmultiples y) {a : α} (hs : y +ᵥ a = a) : x +ᵥ a = a 
goal: x +ᵥ a = a

full_name: IsOfFinOrder.mem_powers_iff_mem_zpowers
code: @[to_additive]
lemma IsOfFinOrder.mem_powers_iff_mem_zpowers (hx : IsOfFinOrder x) :
    y ∈ powers x ↔ y ∈ zpowers x 
goal: y ∈ Submonoid.powers x ↔ y ∈ Subgroup.zpowers x

full_name: IsOfFinAddOrder.mem_multiples_iff_mem_zmultiples
code: @[to_additive]
lemma IsOfFinOrder.mem_powers_iff_mem_zpowers (hx : IsOfFinOrder x) :
    y ∈ powers x ↔ y ∈ zpowers x 
goal: y ∈ AddSubmonoid.multiples x ↔ y ∈ AddSubgroup.zmultiples x

full_name: IsOfFinOrder.powers_eq_zpowers
code: @[to_additive]
lemma IsOfFinOrder.powers_eq_zpowers (hx : IsOfFinOrder x) : (powers x : Set G) = zpowers x 
goal: ↑(Submonoid.powers x) = ↑(Subgroup.zpowers x)

full_name: IsOfFinAddOrder.multiples_eq_zmultiples
code: @[to_additive]
lemma IsOfFinOrder.powers_eq_zpowers (hx : IsOfFinOrder x) : (powers x : Set G) = zpowers x 
goal: ↑(AddSubmonoid.multiples x) = ↑(AddSubgroup.zmultiples x)

full_name: IsOfFinAddOrder.mem_zmultiples_iff_mem_range_addOrderOf
code: @[to_additive]
lemma IsOfFinOrder.mem_zpowers_iff_mem_range_orderOf [DecidableEq G] (hx : IsOfFinOrder x) :
    y ∈ zpowers x ↔ y ∈ (Finset.range (orderOf x)).image (x ^ ·) 
goal: y ∈ AddSubgroup.zmultiples x ↔ y ∈ Finset.image (fun x_1 => x_1 • x) (Finset.range (addOrderOf x))

full_name: IsOfFinOrder.mem_zpowers_iff_mem_range_orderOf
code: @[to_additive]
lemma IsOfFinOrder.mem_zpowers_iff_mem_range_orderOf [DecidableEq G] (hx : IsOfFinOrder x) :
    y ∈ zpowers x ↔ y ∈ (Finset.range (orderOf x)).image (x ^ ·) 
goal: y ∈ Subgroup.zpowers x ↔ y ∈ Finset.image (fun x_1 => x ^ x_1) (Finset.range (orderOf x))

full_name: finEquivZMultiples
code: /-- The equivalence between `Fin (orderOf x)` and `Subgroup.zpowers x`, sending `i` to `x ^ i`. -/
@[to_additive "The equivalence between `Fin (addOrderOf a)` and
`Subgroup.zmultiples a`, sending `i` to `i • a`."]
noncomputable def finEquivZPowers (x : G) (hx : IsOfFinOrder x) :
    Fin (orderOf x) ≃ (zpowers x : Set G) 
goal: Fin (addOrderOf x) ≃ ↑↑(AddSubgroup.zmultiples x)

full_name: finEquivZPowers
code: /-- The equivalence between `Fin (orderOf x)` and `Subgroup.zpowers x`, sending `i` to `x ^ i`. -/
@[to_additive "The equivalence between `Fin (addOrderOf a)` and
`Subgroup.zmultiples a`, sending `i` to `i • a`."]
noncomputable def finEquivZPowers (x : G) (hx : IsOfFinOrder x) :
    Fin (orderOf x) ≃ (zpowers x : Set G) 
goal: Fin (orderOf x) ≃ ↑↑(Subgroup.zpowers x)

full_name: finEquivZMultiples_apply
code: @[to_additive (attr := simp, nolint simpNF)]
lemma finEquivZPowers_apply (hx) {n : Fin (orderOf x)} :
    finEquivZPowers x hx n = ⟨x ^ (n : ℕ), n, zpow_natCast x n⟩ 
goal: (finEquivZMultiples x hx) n = ⟨↑n • x, ⋯⟩

full_name: finEquivZPowers_apply
code: @[to_additive (attr := simp, nolint simpNF)]
lemma finEquivZPowers_apply (hx) {n : Fin (orderOf x)} :
    finEquivZPowers x hx n = ⟨x ^ (n : ℕ), n, zpow_natCast x n⟩ 
goal: (finEquivZPowers x hx) n = ⟨x ^ ↑n, ⋯⟩

full_name: finEquivZMultiples_symm_apply
code: @[to_additive (attr := simp, nolint simpNF)]
lemma finEquivZPowers_symm_apply (x : G) (hx) (n : ℕ) :
    (finEquivZPowers x hx).symm ⟨x ^ n, ⟨n, by simp⟩⟩ =
    ⟨n % orderOf x, Nat.mod_lt _ hx.orderOf_pos⟩ 
goal: (finEquivZMultiples x hx).symm ⟨n • x, ⋯⟩ = ⟨n % addOrderOf x, ⋯⟩

full_name: finEquivZPowers_symm_apply
code: @[to_additive (attr := simp, nolint simpNF)]
lemma finEquivZPowers_symm_apply (x : G) (hx) (n : ℕ) :
    (finEquivZPowers x hx).symm ⟨x ^ n, ⟨n, by simp⟩⟩ =
    ⟨n % orderOf x, Nat.mod_lt _ hx.orderOf_pos⟩ 
goal: (finEquivZPowers x hx).symm ⟨x ^ n, ⋯⟩ = ⟨n % orderOf x, ⋯⟩

full_name: IsOfFinOrder.mul
code: /-- Elements of finite order are closed under multiplication. -/
@[to_additive "Elements of finite additive order are closed under addition."]
theorem IsOfFinOrder.mul (hx : IsOfFinOrder x) (hy : IsOfFinOrder y) : IsOfFinOrder (x * y) 
goal: IsOfFinOrder (x * y)

full_name: IsOfFinAddOrder.add
code: /-- Elements of finite order are closed under multiplication. -/
@[to_additive "Elements of finite additive order are closed under addition."]
theorem IsOfFinOrder.mul (hx : IsOfFinOrder x) (hy : IsOfFinOrder y) : IsOfFinOrder (x * y) 
goal: IsOfFinAddOrder (x + y)

full_name: sum_card_orderOf_eq_card_pow_eq_one
code: @[to_additive]
theorem sum_card_orderOf_eq_card_pow_eq_one [Fintype G] [DecidableEq G] (hn : n ≠ 0) :
    (∑ m ∈ (Finset.range n.succ).filter (· ∣ n),
        (Finset.univ.filter fun x : G => orderOf x = m).card) =
      (Finset.univ.filter fun x : G => x ^ n = 1).card 
goal: ∑ m ∈ Finset.filter (fun x => x ∣ n) (Finset.range n.succ), (Finset.filter (fun x => orderOf x = m) Finset.univ).card =
  (Finset.filter (fun x => x ^ n = 1) Finset.univ).card

full_name: sum_card_addOrderOf_eq_card_nsmul_eq_zero
code: @[to_additive]
theorem sum_card_orderOf_eq_card_pow_eq_one [Fintype G] [DecidableEq G] (hn : n ≠ 0) :
    (∑ m ∈ (Finset.range n.succ).filter (· ∣ n),
        (Finset.univ.filter fun x : G => orderOf x = m).card) =
      (Finset.univ.filter fun x : G => x ^ n = 1).card 
goal: ∑ m ∈ Finset.filter (fun x => x ∣ n) (Finset.range n.succ),
    (Finset.filter (fun x => addOrderOf x = m) Finset.univ).card =
  (Finset.filter (fun x => n • x = 0) Finset.univ).card

full_name: addOrderOf_le_card_univ
code: @[to_additive]
theorem orderOf_le_card_univ [Fintype G] : orderOf x ≤ Fintype.card G 
goal: addOrderOf x ≤ Fintype.card G

full_name: orderOf_le_card_univ
code: @[to_additive]
theorem orderOf_le_card_univ [Fintype G] : orderOf x ≤ Fintype.card G 
goal: orderOf x ≤ Fintype.card G

full_name: isOfFinAddOrder_of_finite
code: @[to_additive]
lemma isOfFinOrder_of_finite (x : G) : IsOfFinOrder x 
goal: IsOfFinAddOrder x

full_name: isOfFinOrder_of_finite
code: @[to_additive]
lemma isOfFinOrder_of_finite (x : G) : IsOfFinOrder x 
goal: IsOfFinOrder x

full_name: orderOf_pos
code: /-- This is the same as `IsOfFinOrder.orderOf_pos` but with one fewer explicit assumption since this
is automatic in case of a finite cancellative monoid. -/
@[to_additive "This is the same as `IsOfFinAddOrder.addOrderOf_pos` but with one fewer explicit
assumption since this is automatic in case of a finite cancellative additive monoid."]
lemma orderOf_pos (x : G) : 0 < orderOf x 
goal: 0 < orderOf x

full_name: addOrderOf_pos
code: /-- This is the same as `IsOfFinOrder.orderOf_pos` but with one fewer explicit assumption since this
is automatic in case of a finite cancellative monoid. -/
@[to_additive "This is the same as `IsOfFinAddOrder.addOrderOf_pos` but with one fewer explicit
assumption since this is automatic in case of a finite cancellative additive monoid."]
lemma orderOf_pos (x : G) : 0 < orderOf x 
goal: 0 < addOrderOf x

full_name: orderOf_pow
code: /-- This is the same as `orderOf_pow'` and `orderOf_pow''` but with one assumption less which is
automatic in the case of a finite cancellative monoid. -/
@[to_additive "This is the same as `addOrderOf_nsmul'` and
`addOrderOf_nsmul` but with one assumption less which is automatic in the case of a
finite cancellative additive monoid."]
theorem orderOf_pow (x : G) : orderOf (x ^ n) = orderOf x / gcd (orderOf x) n 
goal: orderOf (x ^ n) = orderOf x / (orderOf x).gcd n

full_name: addOrderOf_nsmul
code: /-- This is the same as `orderOf_pow'` and `orderOf_pow''` but with one assumption less which is
automatic in the case of a finite cancellative monoid. -/
@[to_additive "This is the same as `addOrderOf_nsmul'` and
`addOrderOf_nsmul` but with one assumption less which is automatic in the case of a
finite cancellative additive monoid."]
theorem orderOf_pow (x : G) : orderOf (x ^ n) = orderOf x / gcd (orderOf x) n 
goal: addOrderOf (n • x) = addOrderOf x / (addOrderOf x).gcd n

full_name: mem_multiples_iff_mem_range_addOrderOf
code: @[to_additive]
theorem mem_powers_iff_mem_range_orderOf [DecidableEq G] :
    y ∈ powers x ↔ y ∈ (Finset.range (orderOf x)).image (x ^ ·) 
goal: y ∈ AddSubmonoid.multiples x ↔ y ∈ Finset.image (fun x_1 => x_1 • x) (Finset.range (addOrderOf x))

full_name: mem_powers_iff_mem_range_orderOf
code: @[to_additive]
theorem mem_powers_iff_mem_range_orderOf [DecidableEq G] :
    y ∈ powers x ↔ y ∈ (Finset.range (orderOf x)).image (x ^ ·) 
goal: y ∈ Submonoid.powers x ↔ y ∈ Finset.image (fun x_1 => x ^ x_1) (Finset.range (orderOf x))

full_name: multiplesEquivMultiples
code: /-- The equivalence between `Submonoid.powers` of two elements `x, y` of the same order, mapping
  `x ^ i` to `y ^ i`. -/
@[to_additive
  "The equivalence between `Submonoid.multiples` of two elements `a, b` of the same additive order,
  mapping `i • a` to `i • b`."]
noncomputable def powersEquivPowers (h : orderOf x = orderOf y) : powers x ≃ powers y 
goal: ↥(AddSubmonoid.multiples x) ≃ ↥(AddSubmonoid.multiples y)

full_name: powersEquivPowers
code: /-- The equivalence between `Submonoid.powers` of two elements `x, y` of the same order, mapping
  `x ^ i` to `y ^ i`. -/
@[to_additive
  "The equivalence between `Submonoid.multiples` of two elements `a, b` of the same additive order,
  mapping `i • a` to `i • b`."]
noncomputable def powersEquivPowers (h : orderOf x = orderOf y) : powers x ≃ powers y 
goal: ↥(Submonoid.powers x) ≃ ↥(Submonoid.powers y)

full_name: powersEquivPowers_apply
code: @[to_additive (attr := simp)]
theorem powersEquivPowers_apply (h : orderOf x = orderOf y) (n : ℕ) :
    powersEquivPowers h ⟨x ^ n, n, rfl⟩ = ⟨y ^ n, n, rfl⟩ 
goal: (powersEquivPowers h) ⟨x ^ n, ⋯⟩ = ⟨y ^ n, ⋯⟩

full_name: multiplesEquivMultiples_apply
code: @[to_additive (attr := simp)]
theorem powersEquivPowers_apply (h : orderOf x = orderOf y) (n : ℕ) :
    powersEquivPowers h ⟨x ^ n, n, rfl⟩ = ⟨y ^ n, n, rfl⟩ 
goal: (multiplesEquivMultiples h) ⟨n • x, ⋯⟩ = ⟨n • y, ⋯⟩

full_name: orderOf_eq_card_powers
code: @[to_additive]
lemma orderOf_eq_card_powers : orderOf x = Fintype.card (powers x : Set G) 
goal: orderOf x = Fintype.card ↑↑(Submonoid.powers x)

full_name: addOrderOf_eq_card_multiples
code: @[to_additive]
lemma orderOf_eq_card_powers : orderOf x = Fintype.card (powers x : Set G) 
goal: addOrderOf x = Fintype.card ↑↑(AddSubmonoid.multiples x)

full_name: exists_zpow_eq_one
code: @[to_additive]
theorem exists_zpow_eq_one (x : G) : ∃ (i : ℤ) (_ : i ≠ 0), x ^ (i : ℤ) = 1 
goal: ∃ i, ∃ (_ : i ≠ 0), x ^ i = 1

full_name: exists_zsmul_eq_zero
code: @[to_additive]
theorem exists_zpow_eq_one (x : G) : ∃ (i : ℤ) (_ : i ≠ 0), x ^ (i : ℤ) = 1 
goal: ∃ i, ∃ (_ : i ≠ 0), i • x = 0

full_name: mem_powers_iff_mem_zpowers
code: @[to_additive]
lemma mem_powers_iff_mem_zpowers : y ∈ powers x ↔ y ∈ zpowers x 
goal: y ∈ Submonoid.powers x ↔ y ∈ Subgroup.zpowers x

full_name: mem_multiples_iff_mem_zmultiples
code: @[to_additive]
lemma mem_powers_iff_mem_zpowers : y ∈ powers x ↔ y ∈ zpowers x 
goal: y ∈ AddSubmonoid.multiples x ↔ y ∈ AddSubgroup.zmultiples x

full_name: powers_eq_zpowers
code: @[to_additive]
lemma powers_eq_zpowers (x : G) : (powers x : Set G) = zpowers x 
goal: ↑(Submonoid.powers x) = ↑(Subgroup.zpowers x)

full_name: multiples_eq_zmultiples
code: @[to_additive]
lemma powers_eq_zpowers (x : G) : (powers x : Set G) = zpowers x 
goal: ↑(AddSubmonoid.multiples x) = ↑(AddSubgroup.zmultiples x)

full_name: mem_zpowers_iff_mem_range_orderOf
code: @[to_additive]
lemma mem_zpowers_iff_mem_range_orderOf [DecidableEq G] :
    y ∈ zpowers x ↔ y ∈ (Finset.range (orderOf x)).image (x ^ ·) 
goal: y ∈ Subgroup.zpowers x ↔ y ∈ Finset.image (fun x_1 => x ^ x_1) (Finset.range (orderOf x))

full_name: mem_zmultiples_iff_mem_range_addOrderOf
code: @[to_additive]
lemma mem_zpowers_iff_mem_range_orderOf [DecidableEq G] :
    y ∈ zpowers x ↔ y ∈ (Finset.range (orderOf x)).image (x ^ ·) 
goal: y ∈ AddSubgroup.zmultiples x ↔ y ∈ Finset.image (fun x_1 => x_1 • x) (Finset.range (addOrderOf x))

full_name: zpow_eq_one_iff_modEq
code: @[to_additive]
theorem zpow_eq_one_iff_modEq {n : ℤ} : x ^ n = 1 ↔ n ≡ 0 [ZMOD orderOf x] 
goal: x ^ n = 1 ↔ n ≡ 0 [ZMOD ↑(orderOf x)]

full_name: zsmul_eq_zero_iff_modEq
code: @[to_additive]
theorem zpow_eq_one_iff_modEq {n : ℤ} : x ^ n = 1 ↔ n ≡ 0 [ZMOD orderOf x] 
goal: n • x = 0 ↔ n ≡ 0 [ZMOD ↑(addOrderOf x)]

full_name: zsmul_eq_zsmul_iff_modEq
code: @[to_additive]
theorem zpow_eq_zpow_iff_modEq {m n : ℤ} : x ^ m = x ^ n ↔ m ≡ n [ZMOD orderOf x] 
goal: m • x = n • x ↔ m ≡ n [ZMOD ↑(addOrderOf x)]

full_name: zpow_eq_zpow_iff_modEq
code: @[to_additive]
theorem zpow_eq_zpow_iff_modEq {m n : ℤ} : x ^ m = x ^ n ↔ m ≡ n [ZMOD orderOf x] 
goal: x ^ m = x ^ n ↔ m ≡ n [ZMOD ↑(orderOf x)]

full_name: injective_zsmul_iff_not_isOfFinAddOrder
code: @[to_additive (attr := simp)]
theorem injective_zpow_iff_not_isOfFinOrder : (Injective fun n : ℤ => x ^ n) ↔ ¬IsOfFinOrder x 
goal: (Function.Injective fun n => n • x) ↔ ¬IsOfFinAddOrder x

full_name: injective_zpow_iff_not_isOfFinOrder
code: @[to_additive (attr := simp)]
theorem injective_zpow_iff_not_isOfFinOrder : (Injective fun n : ℤ => x ^ n) ↔ ¬IsOfFinOrder x 
goal: (Function.Injective fun n => x ^ n) ↔ ¬IsOfFinOrder x

full_name: zpowersEquivZPowers
code: /-- The equivalence between `Subgroup.zpowers` of two elements `x, y` of the same order, mapping
  `x ^ i` to `y ^ i`. -/
@[to_additive
  "The equivalence between `Subgroup.zmultiples` of two elements `a, b` of the same additive order,
  mapping `i • a` to `i • b`."]
noncomputable def zpowersEquivZPowers (h : orderOf x = orderOf y) :
    (Subgroup.zpowers x : Set G) ≃ (Subgroup.zpowers y : Set G) 
goal: ↑↑(Subgroup.zpowers x) ≃ ↑↑(Subgroup.zpowers y)

full_name: zmultiplesEquivZMultiples
code: /-- The equivalence between `Subgroup.zpowers` of two elements `x, y` of the same order, mapping
  `x ^ i` to `y ^ i`. -/
@[to_additive
  "The equivalence between `Subgroup.zmultiples` of two elements `a, b` of the same additive order,
  mapping `i • a` to `i • b`."]
noncomputable def zpowersEquivZPowers (h : orderOf x = orderOf y) :
    (Subgroup.zpowers x : Set G) ≃ (Subgroup.zpowers y : Set G) 
goal: ↑↑(AddSubgroup.zmultiples x) ≃ ↑↑(AddSubgroup.zmultiples y)

full_name: zmultiples_equiv_zmultiples_apply
code: @[to_additive (attr := simp, nolint simpNF) zmultiples_equiv_zmultiples_apply]
theorem zpowersEquivZPowers_apply (h : orderOf x = orderOf y) (n : ℕ) :
    zpowersEquivZPowers h ⟨x ^ n, n, zpow_natCast x n⟩ = ⟨y ^ n, n, zpow_natCast y n⟩ 
goal: (zmultiplesEquivZMultiples h) ⟨n • x, ⋯⟩ = ⟨n • y, ⋯⟩

full_name: zpowersEquivZPowers_apply
code: @[to_additive (attr := simp, nolint simpNF) zmultiples_equiv_zmultiples_apply]
theorem zpowersEquivZPowers_apply (h : orderOf x = orderOf y) (n : ℕ) :
    zpowersEquivZPowers h ⟨x ^ n, n, zpow_natCast x n⟩ = ⟨y ^ n, n, zpow_natCast y n⟩ 
goal: (zpowersEquivZPowers h) ⟨x ^ n, ⋯⟩ = ⟨y ^ n, ⋯⟩

full_name: Fintype.card_zpowers
code: /-- See also `Nat.card_addSubgroupZPowers`. -/
@[to_additive "See also `Nat.card_subgroup`."]
theorem Fintype.card_zpowers : Fintype.card (zpowers x) = orderOf x 
goal: Fintype.card ↥(Subgroup.zpowers x) = orderOf x

full_name: Fintype.card_zmultiples
code: /-- See also `Nat.card_addSubgroupZPowers`. -/
@[to_additive "See also `Nat.card_subgroup`."]
theorem Fintype.card_zpowers : Fintype.card (zpowers x) = orderOf x 
goal: Fintype.card ↥(AddSubgroup.zmultiples x) = addOrderOf x

full_name: card_zpowers_le
code: @[to_additive]
theorem card_zpowers_le (a : G) {k : ℕ} (k_pos : k ≠ 0)
    (ha : a ^ k = 1) : Fintype.card (Subgroup.zpowers a) ≤ k 
goal: Fintype.card ↥(Subgroup.zpowers a) ≤ k

full_name: card_zmultiples_le
code: @[to_additive]
theorem card_zpowers_le (a : G) {k : ℕ} (k_pos : k ≠ 0)
    (ha : a ^ k = 1) : Fintype.card (Subgroup.zpowers a) ≤ k 
goal: Fintype.card ↥(AddSubgroup.zmultiples a) ≤ k

full_name: orderOf_dvd_card
code: @[to_additive]
theorem orderOf_dvd_card : orderOf x ∣ Fintype.card G 
goal: orderOf x ∣ Fintype.card G

full_name: addOrderOf_dvd_card
code: @[to_additive]
theorem orderOf_dvd_card : orderOf x ∣ Fintype.card G 
goal: addOrderOf x ∣ Fintype.card G

full_name: addOrderOf_dvd_natCard
code: @[to_additive]
theorem orderOf_dvd_natCard {G : Type*} [Group G] (x : G) : orderOf x ∣ Nat.card G 
goal: addOrderOf x ∣ Nat.card G

full_name: orderOf_dvd_natCard
code: @[to_additive]
theorem orderOf_dvd_natCard {G : Type*} [Group G] (x : G) : orderOf x ∣ Nat.card G 
goal: orderOf x ∣ Nat.card G

full_name: Subgroup.orderOf_dvd_natCard
code: @[to_additive]
nonrec lemma Subgroup.orderOf_dvd_natCard (s : Subgroup G) (hx : x ∈ s) :
  orderOf x ∣ Nat.card s 
goal: orderOf x ∣ Nat.card ↥s

full_name: AddSubgroup.addOrderOf_dvd_natCard
code: @[to_additive]
nonrec lemma Subgroup.orderOf_dvd_natCard (s : Subgroup G) (hx : x ∈ s) :
  orderOf x ∣ Nat.card s 
goal: addOrderOf x ∣ Nat.card ↥s

full_name: Subgroup.orderOf_le_card
code: @[to_additive]
lemma Subgroup.orderOf_le_card (s : Subgroup G) (hs : (s : Set G).Finite) (hx : x ∈ s) :
    orderOf x ≤ Nat.card s 
goal: orderOf x ≤ Nat.card ↥s

full_name: AddSubgroup.addOrderOf_le_card
code: @[to_additive]
lemma Subgroup.orderOf_le_card (s : Subgroup G) (hs : (s : Set G).Finite) (hx : x ∈ s) :
    orderOf x ≤ Nat.card s 
goal: addOrderOf x ≤ Nat.card ↥s

full_name: AddSubmonoid.addOrderOf_le_card
code: @[to_additive]
lemma Submonoid.orderOf_le_card (s : Submonoid G) (hs : (s : Set G).Finite) (hx : x ∈ s) :
    orderOf x ≤ Nat.card s 
goal: addOrderOf x ≤ Nat.card ↥s

full_name: Submonoid.orderOf_le_card
code: @[to_additive]
lemma Submonoid.orderOf_le_card (s : Submonoid G) (hs : (s : Set G).Finite) (hx : x ∈ s) :
    orderOf x ≤ Nat.card s 
goal: orderOf x ≤ Nat.card ↥s

full_name: card_nsmul_eq_zero'
code: @[to_additive (attr := simp) card_nsmul_eq_zero']
theorem pow_card_eq_one' {G : Type*} [Group G] {x : G} : x ^ Nat.card G = 1 
goal: Nat.card G • x = 0

full_name: pow_card_eq_one'
code: @[to_additive (attr := simp) card_nsmul_eq_zero']
theorem pow_card_eq_one' {G : Type*} [Group G] {x : G} : x ^ Nat.card G = 1 
goal: x ^ Nat.card G = 1

full_name: pow_card_eq_one
code: @[to_additive (attr := simp) card_nsmul_eq_zero]
theorem pow_card_eq_one : x ^ Fintype.card G = 1 
goal: x ^ Fintype.card G = 1

full_name: card_nsmul_eq_zero
code: @[to_additive (attr := simp) card_nsmul_eq_zero]
theorem pow_card_eq_one : x ^ Fintype.card G = 1 
goal: Fintype.card G • x = 0

full_name: AddSubgroup.nsmul_index_mem
code: @[to_additive]
theorem Subgroup.pow_index_mem {G : Type*} [Group G] (H : Subgroup G) [Normal H] (g : G) :
    g ^ index H ∈ H 
goal: H.index • g ∈ H

full_name: Subgroup.pow_index_mem
code: @[to_additive]
theorem Subgroup.pow_index_mem {G : Type*} [Group G] (H : Subgroup G) [Normal H] (g : G) :
    g ^ index H ∈ H 
goal: g ^ H.index ∈ H

full_name: mod_card_nsmul
code: @[to_additive (attr := simp) mod_card_nsmul]
lemma pow_mod_card (a : G) (n : ℕ) : a ^ (n % card G) = a ^ n 
goal: (n % Fintype.card G) • a = n • a

full_name: pow_mod_card
code: @[to_additive (attr := simp) mod_card_nsmul]
lemma pow_mod_card (a : G) (n : ℕ) : a ^ (n % card G) = a ^ n 
goal: a ^ (n % Fintype.card G) = a ^ n

full_name: mod_card_zsmul
code: @[to_additive (attr := simp) mod_card_zsmul]
theorem zpow_mod_card (a : G) (n : ℤ) : a ^ (n % Fintype.card G : ℤ) = a ^ n 
goal: (n % ↑(Fintype.card G)) • a = n • a

full_name: zpow_mod_card
code: @[to_additive (attr := simp) mod_card_zsmul]
theorem zpow_mod_card (a : G) (n : ℤ) : a ^ (n % Fintype.card G : ℤ) = a ^ n 
goal: a ^ (n % ↑(Fintype.card G)) = a ^ n

full_name: mod_natCard_nsmul
code: @[to_additive (attr := simp) mod_natCard_nsmul]
lemma pow_mod_natCard (a : G) (n : ℕ) : a ^ (n % Nat.card G) = a ^ n 
goal: (n % Nat.card G) • a = n • a

full_name: pow_mod_natCard
code: @[to_additive (attr := simp) mod_natCard_nsmul]
lemma pow_mod_natCard (a : G) (n : ℕ) : a ^ (n % Nat.card G) = a ^ n 
goal: a ^ (n % Nat.card G) = a ^ n

full_name: mod_natCard_zsmul
code: @[to_additive (attr := simp) mod_natCard_zsmul]
lemma zpow_mod_natCard (a : G) (n : ℤ) : a ^ (n % Nat.card G : ℤ) = a ^ n 
goal: (n % ↑(Nat.card G)) • a = n • a

full_name: zpow_mod_natCard
code: @[to_additive (attr := simp) mod_natCard_zsmul]
lemma zpow_mod_natCard (a : G) (n : ℤ) : a ^ (n % Nat.card G : ℤ) = a ^ n 
goal: a ^ (n % ↑(Nat.card G)) = a ^ n

full_name: nsmulCoprime_symm_apply
code: /-- If `gcd(|G|,n)=1` then the `n`th power map is a bijection -/
@[to_additive (attr := simps) "If `gcd(|G|,n)=1` then the smul by `n` is a bijection"]
noncomputable def powCoprime {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : G ≃ G 
goal: (nsmulCoprime h).symm g = (Nat.card G).gcdB n • g

full_name: nsmulCoprime_apply
code: /-- If `gcd(|G|,n)=1` then the `n`th power map is a bijection -/
@[to_additive (attr := simps) "If `gcd(|G|,n)=1` then the smul by `n` is a bijection"]
noncomputable def powCoprime {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : G ≃ G 
goal: (nsmulCoprime h) g = n • g

full_name: powCoprime_symm_apply
code: /-- If `gcd(|G|,n)=1` then the `n`th power map is a bijection -/
@[to_additive (attr := simps) "If `gcd(|G|,n)=1` then the smul by `n` is a bijection"]
noncomputable def powCoprime {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : G ≃ G 
goal: (powCoprime h).symm g = g ^ (Nat.card G).gcdB n

full_name: powCoprime_apply
code: /-- If `gcd(|G|,n)=1` then the `n`th power map is a bijection -/
@[to_additive (attr := simps) "If `gcd(|G|,n)=1` then the smul by `n` is a bijection"]
noncomputable def powCoprime {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : G ≃ G 
goal: (powCoprime h) g = g ^ n

full_name: nsmulCoprime
code: /-- If `gcd(|G|,n)=1` then the `n`th power map is a bijection -/
@[to_additive (attr := simps) "If `gcd(|G|,n)=1` then the smul by `n` is a bijection"]
noncomputable def powCoprime {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : G ≃ G 
goal: G ≃ G

full_name: powCoprime
code: /-- If `gcd(|G|,n)=1` then the `n`th power map is a bijection -/
@[to_additive (attr := simps) "If `gcd(|G|,n)=1` then the smul by `n` is a bijection"]
noncomputable def powCoprime {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : G ≃ G 
goal: G ≃ G

full_name: powCoprime_one
code: @[to_additive] -- Porting note (#10618): simp can prove this (so removed simp)
theorem powCoprime_one {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : powCoprime h 1 = 1 
goal: (powCoprime h) 1 = 1

full_name: nsmulCoprime_zero
code: @[to_additive] -- Porting note (#10618): simp can prove this (so removed simp)
theorem powCoprime_one {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : powCoprime h 1 = 1 
goal: (nsmulCoprime h) 0 = 0

full_name: powCoprime_inv
code: @[to_additive] -- Porting note (#10618): simp can prove this (so removed simp)
theorem powCoprime_inv {G : Type*} [Group G] (h : (Nat.card G).Coprime n) {g : G} :
    powCoprime h g⁻¹ = (powCoprime h g)⁻¹ 
goal: (powCoprime h) g⁻¹ = ((powCoprime h) g)⁻¹

full_name: nsmulCoprime_neg
code: @[to_additive] -- Porting note (#10618): simp can prove this (so removed simp)
theorem powCoprime_inv {G : Type*} [Group G] (h : (Nat.card G).Coprime n) {g : G} :
    powCoprime h g⁻¹ = (powCoprime h g)⁻¹ 
goal: (nsmulCoprime h) (-g) = -(nsmulCoprime h) g

full_name: Nat.Coprime.nsmul_right_bijective
code: @[to_additive Nat.Coprime.nsmul_right_bijective]
lemma Nat.Coprime.pow_left_bijective (hn : (Nat.card G).Coprime n) : Bijective (· ^ n : G → G) 
goal: Function.Bijective fun x => n • x

full_name: Nat.Coprime.pow_left_bijective
code: @[to_additive Nat.Coprime.nsmul_right_bijective]
lemma Nat.Coprime.pow_left_bijective (hn : (Nat.card G).Coprime n) : Bijective (· ^ n : G → G) 
goal: Function.Bijective fun x => x ^ n

full_name: add_inf_eq_bot_of_coprime
code: @[to_additive add_inf_eq_bot_of_coprime]
theorem inf_eq_bot_of_coprime {G : Type*} [Group G] {H K : Subgroup G}
    (h : Nat.Coprime (Nat.card H) (Nat.card K)) : H ⊓ K = ⊥ 
goal: H ⊓ K = ⊥

full_name: inf_eq_bot_of_coprime
code: @[to_additive add_inf_eq_bot_of_coprime]
theorem inf_eq_bot_of_coprime {G : Type*} [Group G] {H K : Subgroup G}
    (h : Nat.Coprime (Nat.card H) (Nat.card K)) : H ⊓ K = ⊥ 
goal: H ⊓ K = ⊥

full_name: image_range_orderOf
code: @[to_additive]
theorem image_range_orderOf [DecidableEq G] :
    Finset.image (fun i => x ^ i) (Finset.range (orderOf x)) = (zpowers x : Set G).toFinset 
goal: Finset.image (fun i => x ^ i) (Finset.range (orderOf x)) = (↑(Subgroup.zpowers x)).toFinset

full_name: image_range_addOrderOf
code: @[to_additive]
theorem image_range_orderOf [DecidableEq G] :
    Finset.image (fun i => x ^ i) (Finset.range (orderOf x)) = (zpowers x : Set G).toFinset 
goal: Finset.image (fun i => i • x) (Finset.range (addOrderOf x)) = (↑(AddSubgroup.zmultiples x)).toFinset

full_name: pow_gcd_card_eq_one_iff
code: @[to_additive gcd_nsmul_card_eq_zero_iff]
theorem pow_gcd_card_eq_one_iff : x ^ n = 1 ↔ x ^ gcd n (Fintype.card G) = 1 
goal: x ^ n = 1 ↔ x ^ n.gcd (Fintype.card G) = 1

full_name: gcd_nsmul_card_eq_zero_iff
code: @[to_additive gcd_nsmul_card_eq_zero_iff]
theorem pow_gcd_card_eq_one_iff : x ^ n = 1 ↔ x ^ gcd n (Fintype.card G) = 1 
goal: n • x = 0 ↔ n.gcd (Fintype.card G) • x = 0

full_name: submonoidOfIdempotent
code: /-- A nonempty idempotent subset of a finite cancellative monoid is a submonoid -/
@[to_additive "A nonempty idempotent subset of a finite cancellative add monoid is a submonoid"]
def submonoidOfIdempotent {M : Type*} [LeftCancelMonoid M] [Finite M] (S : Set M)
    (hS1 : S.Nonempty) (hS2 : S * S = S) : Submonoid M 
goal: Submonoid M

full_name: addSubmonoidOfIdempotent
code: /-- A nonempty idempotent subset of a finite cancellative monoid is a submonoid -/
@[to_additive "A nonempty idempotent subset of a finite cancellative add monoid is a submonoid"]
def submonoidOfIdempotent {M : Type*} [LeftCancelMonoid M] [Finite M] (S : Set M)
    (hS1 : S.Nonempty) (hS2 : S * S = S) : Submonoid M 
goal: AddSubmonoid M

full_name: addSubgroupOfIdempotent
code: /-- A nonempty idempotent subset of a finite group is a subgroup -/
@[to_additive "A nonempty idempotent subset of a finite add group is a subgroup"]
def subgroupOfIdempotent {G : Type*} [Group G] [Finite G] (S : Set G) (hS1 : S.Nonempty)
    (hS2 : S * S = S) : Subgroup G 
goal: AddSubgroup G

full_name: subgroupOfIdempotent
code: /-- A nonempty idempotent subset of a finite group is a subgroup -/
@[to_additive "A nonempty idempotent subset of a finite add group is a subgroup"]
def subgroupOfIdempotent {G : Type*} [Group G] [Finite G] (S : Set G) (hS1 : S.Nonempty)
    (hS2 : S * S = S) : Subgroup G 
goal: Subgroup G

full_name: powCardSubgroup
code: /-- If `S` is a nonempty subset of a finite group `G`, then `S ^ |G|` is a subgroup -/
@[to_additive (attr := simps!) smulCardAddSubgroup
  "If `S` is a nonempty subset of a finite add group `G`, then `|G| • S` is a subgroup"]
def powCardSubgroup {G : Type*} [Group G] [Fintype G] (S : Set G) (hS : S.Nonempty) : Subgroup G 
goal: Subgroup G

full_name: smulCardAddSubgroup
code: /-- If `S` is a nonempty subset of a finite group `G`, then `S ^ |G|` is a subgroup -/
@[to_additive (attr := simps!) smulCardAddSubgroup
  "If `S` is a nonempty subset of a finite add group `G`, then `|G| • S` is a subgroup"]
def powCardSubgroup {G : Type*} [Group G] [Fintype G] (S : Set G) (hS : S.Nonempty) : Subgroup G 
goal: AddSubgroup G

full_name: smulCardAddSubgroup_coe
code: /-- If `S` is a nonempty subset of a finite group `G`, then `S ^ |G|` is a subgroup -/
@[to_additive (attr := simps!) smulCardAddSubgroup
  "If `S` is a nonempty subset of a finite add group `G`, then `|G| • S` is a subgroup"]
def powCardSubgroup {G : Type*} [Group G] [Fintype G] (S : Set G) (hS : S.Nonempty) : Subgroup G 
goal: ↑(smulCardAddSubgroup S hS) = Fintype.card G • S

full_name: powCardSubgroup_coe
code: /-- If `S` is a nonempty subset of a finite group `G`, then `S ^ |G|` is a subgroup -/
@[to_additive (attr := simps!) smulCardAddSubgroup
  "If `S` is a nonempty subset of a finite add group `G`, then `|G| • S` is a subgroup"]
def powCardSubgroup {G : Type*} [Group G] [Fintype G] (S : Set G) (hS : S.Nonempty) : Subgroup G 
goal: ↑(powCardSubgroup S hS) = S ^ Fintype.card G

full_name: IsOfFinOrder.eq_one
code: protected lemma IsOfFinOrder.eq_one (ha₀ : 0 ≤ a) (ha : IsOfFinOrder a) : a = 1 
goal: a = 1

full_name: IsOfFinOrder.eq_neg_one
code: protected lemma IsOfFinOrder.eq_neg_one (ha₀ : a ≤ 0) (ha : IsOfFinOrder a) : a = -1 
goal: a = -1

full_name: orderOf_abs_ne_one
code: theorem orderOf_abs_ne_one (h : |x| ≠ 1) : orderOf x = 0 
goal: orderOf x = 0

full_name: LinearOrderedRing.orderOf_le_two
code: theorem LinearOrderedRing.orderOf_le_two : orderOf x ≤ 2 
goal: orderOf x ≤ 2

full_name: Prod.orderOf
code: @[to_additive]
protected theorem Prod.orderOf (x : α × β) : orderOf x = (orderOf x.1).lcm (orderOf x.2) 
goal: orderOf x = (orderOf x.1).lcm (orderOf x.2)

full_name: Prod.addOrderOf
code: @[to_additive]
protected theorem Prod.orderOf (x : α × β) : orderOf x = (orderOf x.1).lcm (orderOf x.2) 
goal: addOrderOf x = (addOrderOf x.1).lcm (addOrderOf x.2)

full_name: addOrderOf_fst_dvd_addOrderOf
code: @[to_additive]
theorem orderOf_fst_dvd_orderOf : orderOf x.1 ∣ orderOf x 
goal: addOrderOf x.1 ∣ addOrderOf x

full_name: orderOf_fst_dvd_orderOf
code: @[to_additive]
theorem orderOf_fst_dvd_orderOf : orderOf x.1 ∣ orderOf x 
goal: orderOf x.1 ∣ orderOf x

full_name: addOrderOf_snd_dvd_addOrderOf
code: @[to_additive]
theorem orderOf_snd_dvd_orderOf : orderOf x.2 ∣ orderOf x 
goal: addOrderOf x.2 ∣ addOrderOf x

full_name: orderOf_snd_dvd_orderOf
code: @[to_additive]
theorem orderOf_snd_dvd_orderOf : orderOf x.2 ∣ orderOf x 
goal: orderOf x.2 ∣ orderOf x

full_name: IsOfFinAddOrder.fst
code: @[to_additive]
theorem IsOfFinOrder.fst {x : α × β} (hx : IsOfFinOrder x) : IsOfFinOrder x.1 
goal: IsOfFinAddOrder x.1

full_name: IsOfFinOrder.fst
code: @[to_additive]
theorem IsOfFinOrder.fst {x : α × β} (hx : IsOfFinOrder x) : IsOfFinOrder x.1 
goal: IsOfFinOrder x.1

full_name: IsOfFinAddOrder.snd
code: @[to_additive]
theorem IsOfFinOrder.snd {x : α × β} (hx : IsOfFinOrder x) : IsOfFinOrder x.2 
goal: IsOfFinAddOrder x.2

full_name: IsOfFinOrder.snd
code: @[to_additive]
theorem IsOfFinOrder.snd {x : α × β} (hx : IsOfFinOrder x) : IsOfFinOrder x.2 
goal: IsOfFinOrder x.2

full_name: IsOfFinAddOrder.prod_mk
code: @[to_additive IsOfFinAddOrder.prod_mk]
theorem IsOfFinOrder.prod_mk : IsOfFinOrder a → IsOfFinOrder b → IsOfFinOrder (a, b) 
goal: IsOfFinAddOrder a → IsOfFinAddOrder b → IsOfFinAddOrder (a, b)

full_name: IsOfFinOrder.prod_mk
code: @[to_additive IsOfFinAddOrder.prod_mk]
theorem IsOfFinOrder.prod_mk : IsOfFinOrder a → IsOfFinOrder b → IsOfFinOrder (a, b) 
goal: IsOfFinOrder a → IsOfFinOrder b → IsOfFinOrder (a, b)

full_name: Prod.addOrderOf_mk
code: @[to_additive]
lemma Prod.orderOf_mk : orderOf (a, b) = Nat.lcm (orderOf a) (orderOf b) 
goal: addOrderOf (a, b) = (addOrderOf a).lcm (addOrderOf b)

full_name: Prod.orderOf_mk
code: @[to_additive]
lemma Prod.orderOf_mk : orderOf (a, b) = Nat.lcm (orderOf a) (orderOf b) 
goal: orderOf (a, b) = (orderOf a).lcm (orderOf b)

full_name: Nat.cast_card_eq_zero
code: @[simp]
lemma Nat.cast_card_eq_zero (R) [AddGroupWithOne R] [Fintype R] : (Fintype.card R : R) = 0 
goal: ↑(Fintype.card R) = 0

full_name: CharP.addOrderOf_one
code: lemma CharP.addOrderOf_one : CharP R (addOrderOf (1 : R)) 
goal: CharP R (addOrderOf 1)

full_name: charP_of_ne_zero
code: lemma charP_of_ne_zero (hn : card R = p) (hR : ∀ i < p, (i : R) = 0 → i = 0) : CharP R p 
goal: CharP R p

full_name: charP_of_prime_pow_injective
code: lemma charP_of_prime_pow_injective (R) [Ring R] [Fintype R] (p n : ℕ) [hp : Fact p.Prime]
    (hn : card R = p ^ n) (hR : ∀ i ≤ n, (p : R) ^ i = 0 → i = n) : CharP R (p ^ n) 
goal: CharP R (p ^ n)

full_name: AddSemiconjBy.addOrderOf_eq
code: @[to_additive]
lemma orderOf_eq [Group G] (a : G) {x y : G} (h : SemiconjBy a x y) : orderOf x = orderOf y 
goal: addOrderOf x = addOrderOf y

full_name: SemiconjBy.orderOf_eq
code: @[to_additive]
lemma orderOf_eq [Group G] (a : G) {x y : G} (h : SemiconjBy a x y) : orderOf x = orderOf y 
goal: orderOf x = orderOf y