File: Mathlib/GroupTheory/Exponent.lean

full_name: AddMonoid.ExponentExists
code: /-- A predicate on a monoid saying that there is a positive integer `n` such that `g ^ n = 1`
  for all `g`. -/
@[to_additive
      "A predicate on an additive monoid saying that there is a positive integer `n` such\n
      that `n • g = 0` for all `g`."]
def ExponentExists 
goal: Prop

full_name: Monoid.ExponentExists
code: /-- A predicate on a monoid saying that there is a positive integer `n` such that `g ^ n = 1`
  for all `g`. -/
@[to_additive
      "A predicate on an additive monoid saying that there is a positive integer `n` such\n
      that `n • g = 0` for all `g`."]
def ExponentExists 
goal: Prop

full_name: Monoid.exponent
code: /-- The exponent of a group is the smallest positive integer `n` such that `g ^ n = 1` for all
  `g ∈ G` if it exists, otherwise it is zero by convention. -/
@[to_additive
      "The exponent of an additive group is the smallest positive integer `n` such that\n
      `n • g = 0` for all `g ∈ G` if it exists, otherwise it is zero by convention."]
noncomputable def exponent 
goal: ℕ

full_name: AddMonoid.exponent
code: /-- The exponent of a group is the smallest positive integer `n` such that `g ^ n = 1` for all
  `g ∈ G` if it exists, otherwise it is zero by convention. -/
@[to_additive
      "The exponent of an additive group is the smallest positive integer `n` such that\n
      `n • g = 0` for all `g ∈ G` if it exists, otherwise it is zero by convention."]
noncomputable def exponent 
goal: ℕ

full_name: AddMonoid.exponent_additive
code: @[simp]
theorem _root_.AddMonoid.exponent_additive :
    AddMonoid.exponent (Additive G) = exponent G 
goal: AddMonoid.exponent (Additive G) = Monoid.exponent G

full_name: Monoid.exponent_multiplicative
code: @[simp]
theorem exponent_multiplicative {G : Type*} [AddMonoid G] :
    exponent (Multiplicative G) = AddMonoid.exponent G 
goal: Monoid.exponent (Multiplicative G) = AddMonoid.exponent G

full_name: AddOpposite.exponent
code: @[to_additive (attr := simp)]
theorem _root_.MulOpposite.exponent : exponent (MulOpposite G) = exponent G 
goal: AddMonoid.exponent Gᵃᵒᵖ = AddMonoid.exponent G

full_name: MulOpposite.exponent
code: @[to_additive (attr := simp)]
theorem _root_.MulOpposite.exponent : exponent (MulOpposite G) = exponent G 
goal: Monoid.exponent Gᵐᵒᵖ = Monoid.exponent G

full_name: AddMonoid.ExponentExists.isOfFinAddOrder
code: @[to_additive]
theorem ExponentExists.isOfFinOrder (h : ExponentExists G) {g : G} : IsOfFinOrder g 
goal: IsOfFinAddOrder g

full_name: Monoid.ExponentExists.isOfFinOrder
code: @[to_additive]
theorem ExponentExists.isOfFinOrder (h : ExponentExists G) {g : G} : IsOfFinOrder g 
goal: IsOfFinOrder g

full_name: Monoid.ExponentExists.orderOf_pos
code: @[to_additive]
theorem ExponentExists.orderOf_pos (h : ExponentExists G) (g : G) : 0 < orderOf g 
goal: 0 < orderOf g

full_name: AddMonoid.ExponentExists.addOrderOf_pos
code: @[to_additive]
theorem ExponentExists.orderOf_pos (h : ExponentExists G) (g : G) : 0 < orderOf g 
goal: 0 < addOrderOf g

full_name: Monoid.exponent_ne_zero
code: @[to_additive]
theorem exponent_ne_zero : exponent G ≠ 0 ↔ ExponentExists G 
goal: Monoid.exponent G ≠ 0 ↔ Monoid.ExponentExists G

full_name: AddMonoid.exponent_ne_zero
code: @[to_additive]
theorem exponent_ne_zero : exponent G ≠ 0 ↔ ExponentExists G 
goal: AddMonoid.exponent G ≠ 0 ↔ AddMonoid.ExponentExists G

full_name: AddMonoid.exponentExists_iff_ne_zero
code: @[to_additive (attr := deprecated (since := "2024-01-27"))]
theorem exponentExists_iff_ne_zero : ExponentExists G ↔ exponent G ≠ 0 
goal: AddMonoid.ExponentExists G ↔ AddMonoid.exponent G ≠ 0

full_name: Monoid.exponentExists_iff_ne_zero
code: @[to_additive (attr := deprecated (since := "2024-01-27"))]
theorem exponentExists_iff_ne_zero : ExponentExists G ↔ exponent G ≠ 0 
goal: Monoid.ExponentExists G ↔ Monoid.exponent G ≠ 0

full_name: Monoid.exponent_pos
code: @[to_additive]
theorem exponent_pos : 0 < exponent G ↔ ExponentExists G 
goal: 0 < Monoid.exponent G ↔ Monoid.ExponentExists G

full_name: AddMonoid.exponent_pos
code: @[to_additive]
theorem exponent_pos : 0 < exponent G ↔ ExponentExists G 
goal: 0 < AddMonoid.exponent G ↔ AddMonoid.ExponentExists G

full_name: Monoid.exponent_eq_zero_iff
code: @[to_additive]
theorem exponent_eq_zero_iff : exponent G = 0 ↔ ¬ExponentExists G 
goal: Monoid.exponent G = 0 ↔ ¬Monoid.ExponentExists G

full_name: AddMonoid.exponent_eq_zero_iff
code: @[to_additive]
theorem exponent_eq_zero_iff : exponent G = 0 ↔ ¬ExponentExists G 
goal: AddMonoid.exponent G = 0 ↔ ¬AddMonoid.ExponentExists G

full_name: Monoid.exponent_eq_zero_of_order_zero
code: @[to_additive exponent_eq_zero_addOrder_zero]
theorem exponent_eq_zero_of_order_zero {g : G} (hg : orderOf g = 0) : exponent G = 0 
goal: Monoid.exponent G = 0

full_name: AddMonoid.exponent_eq_zero_addOrder_zero
code: @[to_additive exponent_eq_zero_addOrder_zero]
theorem exponent_eq_zero_of_order_zero {g : G} (hg : orderOf g = 0) : exponent G = 0 
goal: AddMonoid.exponent G = 0

full_name: AddMonoid.exponent_eq_zero_iff_forall
code: /-- The exponent is zero iff for all nonzero `n`, one can find a `g` such that `g ^ n ≠ 1`. -/
@[to_additive "The exponent is zero iff for all nonzero `n`, one can find a `g` such that
`n • g ≠ 0`."]
theorem exponent_eq_zero_iff_forall : exponent G = 0 ↔ ∀ n > 0, ∃ g : G, g ^ n ≠ 1 
goal: AddMonoid.exponent G = 0 ↔ ∀ n > 0, ∃ g, n • g ≠ 0

full_name: Monoid.exponent_eq_zero_iff_forall
code: /-- The exponent is zero iff for all nonzero `n`, one can find a `g` such that `g ^ n ≠ 1`. -/
@[to_additive "The exponent is zero iff for all nonzero `n`, one can find a `g` such that
`n • g ≠ 0`."]
theorem exponent_eq_zero_iff_forall : exponent G = 0 ↔ ∀ n > 0, ∃ g : G, g ^ n ≠ 1 
goal: Monoid.exponent G = 0 ↔ ∀ n > 0, ∃ g, g ^ n ≠ 1

full_name: Monoid.pow_exponent_eq_one
code: @[to_additive exponent_nsmul_eq_zero]
theorem pow_exponent_eq_one (g : G) : g ^ exponent G = 1 
goal: g ^ Monoid.exponent G = 1

full_name: AddMonoid.exponent_nsmul_eq_zero
code: @[to_additive exponent_nsmul_eq_zero]
theorem pow_exponent_eq_one (g : G) : g ^ exponent G = 1 
goal: AddMonoid.exponent G • g = 0

full_name: AddMonoid.nsmul_eq_mod_exponent
code: @[to_additive]
theorem pow_eq_mod_exponent {n : ℕ} (g : G) : g ^ n = g ^ (n % exponent G) 
goal: n • g = (n % AddMonoid.exponent G) • g

full_name: Monoid.pow_eq_mod_exponent
code: @[to_additive]
theorem pow_eq_mod_exponent {n : ℕ} (g : G) : g ^ n = g ^ (n % exponent G) 
goal: g ^ n = g ^ (n % Monoid.exponent G)

full_name: Monoid.exponent_pos_of_exists
code: @[to_additive]
theorem exponent_pos_of_exists (n : ℕ) (hpos : 0 < n) (hG : ∀ g : G, g ^ n = 1) :
    0 < exponent G 
goal: 0 < Monoid.exponent G

full_name: AddMonoid.exponent_pos_of_exists
code: @[to_additive]
theorem exponent_pos_of_exists (n : ℕ) (hpos : 0 < n) (hG : ∀ g : G, g ^ n = 1) :
    0 < exponent G 
goal: 0 < AddMonoid.exponent G

full_name: AddMonoid.exponent_min'
code: @[to_additive]
theorem exponent_min' (n : ℕ) (hpos : 0 < n) (hG : ∀ g : G, g ^ n = 1) : exponent G ≤ n 
goal: AddMonoid.exponent G ≤ n

full_name: Monoid.exponent_min'
code: @[to_additive]
theorem exponent_min' (n : ℕ) (hpos : 0 < n) (hG : ∀ g : G, g ^ n = 1) : exponent G ≤ n 
goal: Monoid.exponent G ≤ n

full_name: AddMonoid.exponent_min
code: @[to_additive]
theorem exponent_min (m : ℕ) (hpos : 0 < m) (hm : m < exponent G) : ∃ g : G, g ^ m ≠ 1 
goal: ∃ g, m • g ≠ 0

full_name: Monoid.exponent_min
code: @[to_additive]
theorem exponent_min (m : ℕ) (hpos : 0 < m) (hm : m < exponent G) : ∃ g : G, g ^ m ≠ 1 
goal: ∃ g, g ^ m ≠ 1

full_name: Monoid.exp_eq_one_iff
code: @[to_additive AddMonoid.exp_eq_one_iff]
theorem exp_eq_one_iff : exponent G = 1 ↔ Subsingleton G 
goal: Monoid.exponent G = 1 ↔ Subsingleton G

full_name: AddMonoid.exp_eq_one_iff
code: @[to_additive AddMonoid.exp_eq_one_iff]
theorem exp_eq_one_iff : exponent G = 1 ↔ Subsingleton G 
goal: AddMonoid.exponent G = 1 ↔ Subsingleton G

full_name: AddMonoid.exp_eq_one_of_subsingleton
code: @[to_additive (attr := simp) AddMonoid.exp_eq_one_of_subsingleton]
theorem exp_eq_one_of_subsingleton [hs : Subsingleton G] : exponent G = 1 
goal: AddMonoid.exponent G = 1

full_name: Monoid.exp_eq_one_of_subsingleton
code: @[to_additive (attr := simp) AddMonoid.exp_eq_one_of_subsingleton]
theorem exp_eq_one_of_subsingleton [hs : Subsingleton G] : exponent G = 1 
goal: Monoid.exponent G = 1

full_name: Monoid.order_dvd_exponent
code: @[to_additive addOrder_dvd_exponent]
theorem order_dvd_exponent (g : G) : orderOf g ∣ exponent G 
goal: orderOf g ∣ Monoid.exponent G

full_name: AddMonoid.addOrder_dvd_exponent
code: @[to_additive addOrder_dvd_exponent]
theorem order_dvd_exponent (g : G) : orderOf g ∣ exponent G 
goal: addOrderOf g ∣ AddMonoid.exponent G

full_name: Monoid.orderOf_le_exponent
code: @[to_additive]
theorem orderOf_le_exponent (h : ExponentExists G) (g : G) : orderOf g ≤ exponent G 
goal: orderOf g ≤ Monoid.exponent G

full_name: AddMonoid.addOrderOf_le_exponent
code: @[to_additive]
theorem orderOf_le_exponent (h : ExponentExists G) (g : G) : orderOf g ≤ exponent G 
goal: addOrderOf g ≤ AddMonoid.exponent G

full_name: Monoid.exponent_dvd_iff_forall_pow_eq_one
code: @[to_additive]
theorem exponent_dvd_iff_forall_pow_eq_one {n : ℕ} : exponent G ∣ n ↔ ∀ g : G, g ^ n = 1 
goal: Monoid.exponent G ∣ n ↔ ∀ (g : G), g ^ n = 1

full_name: AddMonoid.exponent_dvd_iff_forall_nsmul_eq_zero
code: @[to_additive]
theorem exponent_dvd_iff_forall_pow_eq_one {n : ℕ} : exponent G ∣ n ↔ ∀ g : G, g ^ n = 1 
goal: AddMonoid.exponent G ∣ n ↔ ∀ (g : G), n • g = 0

full_name: Monoid.exponent_dvd
code: @[to_additive]
theorem exponent_dvd {n : ℕ} : exponent G ∣ n ↔ ∀ g : G, orderOf g ∣ n 
goal: Monoid.exponent G ∣ n ↔ ∀ (g : G), orderOf g ∣ n

full_name: AddMonoid.exponent_dvd
code: @[to_additive]
theorem exponent_dvd {n : ℕ} : exponent G ∣ n ↔ ∀ g : G, orderOf g ∣ n 
goal: AddMonoid.exponent G ∣ n ↔ ∀ (g : G), addOrderOf g ∣ n

full_name: AddMonoid.exponent_dvd_of_forall_addOrderOf_dvd
code: @[to_additive (attr := deprecated (since := "2024-01-27"))]
theorem exponent_dvd_of_forall_orderOf_dvd (n : ℕ) (h : ∀ g : G, orderOf g ∣ n) : exponent G ∣ n 
goal: AddMonoid.exponent G ∣ n

full_name: Monoid.exponent_dvd_of_forall_orderOf_dvd
code: @[to_additive (attr := deprecated (since := "2024-01-27"))]
theorem exponent_dvd_of_forall_orderOf_dvd (n : ℕ) (h : ∀ g : G, orderOf g ∣ n) : exponent G ∣ n 
goal: Monoid.exponent G ∣ n

full_name: AddMonoid.lcm_addOrderOf_dvd_exponent
code: @[to_additive]
theorem lcm_orderOf_dvd_exponent [Fintype G] :
    (Finset.univ : Finset G).lcm orderOf ∣ exponent G 
goal: Finset.univ.lcm addOrderOf ∣ AddMonoid.exponent G

full_name: Monoid.lcm_orderOf_dvd_exponent
code: @[to_additive]
theorem lcm_orderOf_dvd_exponent [Fintype G] :
    (Finset.univ : Finset G).lcm orderOf ∣ exponent G 
goal: Finset.univ.lcm orderOf ∣ Monoid.exponent G

full_name: Nat.Prime.exists_orderOf_eq_pow_factorization_exponent
code: @[to_additive exists_addOrderOf_eq_pow_padic_val_nat_add_exponent]
theorem _root_.Nat.Prime.exists_orderOf_eq_pow_factorization_exponent {p : ℕ} (hp : p.Prime) :
    ∃ g : G, orderOf g = p ^ (exponent G).factorization p 
goal: ∃ g, orderOf g = p ^ (Monoid.exponent G).factorization p

full_name: Nat.Prime.exists_addOrderOf_eq_pow_padic_val_nat_add_exponent
code: @[to_additive exists_addOrderOf_eq_pow_padic_val_nat_add_exponent]
theorem _root_.Nat.Prime.exists_orderOf_eq_pow_factorization_exponent {p : ℕ} (hp : p.Prime) :
    ∃ g : G, orderOf g = p ^ (exponent G).factorization p 
goal: ∃ g, addOrderOf g = p ^ (AddMonoid.exponent G).factorization p

full_name: Commute.orderOf_mul_pow_eq_lcm
code: /-- If two commuting elements `x` and `y` of a monoid have order `n` and `m`, there is an element
of order `lcm n m`. The result actually gives an explicit (computable) element, written as the
product of a power of `x` and a power of `y`. See also the result below if you don't need the
explicit formula. -/
@[to_additive "If two commuting elements `x` and `y` of an additive monoid have order `n` and `m`,
there is an element of order `lcm n m`. The result actually gives an explicit (computable) element,
written as the sum of a multiple of `x` and a multiple of `y`. See also the result below if you
don't need the explicit formula."]
lemma _root_.Commute.orderOf_mul_pow_eq_lcm {x y : G} (h : Commute x y) (hx : orderOf x ≠ 0)
    (hy : orderOf y ≠ 0) :
    orderOf (x ^ (orderOf x / (factorizationLCMLeft (orderOf x) (orderOf y))) *
      y ^ (orderOf y / factorizationLCMRight (orderOf x) (orderOf y))) =
      Nat.lcm (orderOf x) (orderOf y) 
goal: orderOf
    (x ^ (orderOf x / (orderOf x).factorizationLCMLeft (orderOf y)) *
      y ^ (orderOf y / (orderOf x).factorizationLCMRight (orderOf y))) =
  (orderOf x).lcm (orderOf y)

full_name: AddCommute.addOrderOf_add_nsmul_eq_lcm
code: /-- If two commuting elements `x` and `y` of a monoid have order `n` and `m`, there is an element
of order `lcm n m`. The result actually gives an explicit (computable) element, written as the
product of a power of `x` and a power of `y`. See also the result below if you don't need the
explicit formula. -/
@[to_additive "If two commuting elements `x` and `y` of an additive monoid have order `n` and `m`,
there is an element of order `lcm n m`. The result actually gives an explicit (computable) element,
written as the sum of a multiple of `x` and a multiple of `y`. See also the result below if you
don't need the explicit formula."]
lemma _root_.Commute.orderOf_mul_pow_eq_lcm {x y : G} (h : Commute x y) (hx : orderOf x ≠ 0)
    (hy : orderOf y ≠ 0) :
    orderOf (x ^ (orderOf x / (factorizationLCMLeft (orderOf x) (orderOf y))) *
      y ^ (orderOf y / factorizationLCMRight (orderOf x) (orderOf y))) =
      Nat.lcm (orderOf x) (orderOf y) 
goal: addOrderOf
    ((addOrderOf x / (addOrderOf x).factorizationLCMLeft (addOrderOf y)) • x +
      (addOrderOf y / (addOrderOf x).factorizationLCMRight (addOrderOf y)) • y) =
  (addOrderOf x).lcm (addOrderOf y)

full_name: Commute.exists_orderOf_eq_lcm
code: /-- If two commuting elements `x` and `y` of a monoid have order `n` and `m`, then there is an
element of order `lcm n m` that lies in the subgroup generated by `x` and `y`. -/
@[to_additive "If two commuting elements `x` and `y` of an additive monoid have order `n` and `m`,
then there is an element of order `lcm n m` that lies in the additive subgroup generated by `x`
and `y`."]
theorem _root_.Commute.exists_orderOf_eq_lcm {x y : G} (h : Commute x y) :
    ∃ z ∈ closure {x, y}, orderOf z = Nat.lcm (orderOf x) (orderOf y) 
goal: ∃ z ∈ Submonoid.closure {x, y}, orderOf z = (orderOf x).lcm (orderOf y)

full_name: AddCommute.exists_addOrderOf_eq_lcm
code: /-- If two commuting elements `x` and `y` of a monoid have order `n` and `m`, then there is an
element of order `lcm n m` that lies in the subgroup generated by `x` and `y`. -/
@[to_additive "If two commuting elements `x` and `y` of an additive monoid have order `n` and `m`,
then there is an element of order `lcm n m` that lies in the additive subgroup generated by `x`
and `y`."]
theorem _root_.Commute.exists_orderOf_eq_lcm {x y : G} (h : Commute x y) :
    ∃ z ∈ closure {x, y}, orderOf z = Nat.lcm (orderOf x) (orderOf y) 
goal: ∃ z ∈ AddSubmonoid.closure {x, y}, addOrderOf z = (addOrderOf x).lcm (addOrderOf y)

full_name: Monoid.exponent_eq_prime_iff
code: /-- A nontrivial monoid has prime exponent `p` if and only if every non-identity element has
order `p`. -/
@[to_additive]
lemma exponent_eq_prime_iff {G : Type*} [Monoid G] [Nontrivial G] {p : ℕ} (hp : p.Prime) :
    Monoid.exponent G = p ↔ ∀ g : G, g ≠ 1 → orderOf g = p 
goal: Monoid.exponent G = p ↔ ∀ (g : G), g ≠ 1 → orderOf g = p

full_name: AddMonoid.exponent_eq_prime_iff
code: /-- A nontrivial monoid has prime exponent `p` if and only if every non-identity element has
order `p`. -/
@[to_additive]
lemma exponent_eq_prime_iff {G : Type*} [Monoid G] [Nontrivial G] {p : ℕ} (hp : p.Prime) :
    Monoid.exponent G = p ↔ ∀ g : G, g ≠ 1 → orderOf g = p 
goal: AddMonoid.exponent G = p ↔ ∀ (g : G), g ≠ 0 → addOrderOf g = p

full_name: Monoid.exponent_ne_zero_iff_range_orderOf_finite
code: @[to_additive]
theorem exponent_ne_zero_iff_range_orderOf_finite (h : ∀ g : G, 0 < orderOf g) :
    exponent G ≠ 0 ↔ (Set.range (orderOf : G → ℕ)).Finite 
goal: Monoid.exponent G ≠ 0 ↔ (Set.range orderOf).Finite

full_name: AddMonoid.exponent_ne_zero_iff_range_addOrderOf_finite
code: @[to_additive]
theorem exponent_ne_zero_iff_range_orderOf_finite (h : ∀ g : G, 0 < orderOf g) :
    exponent G ≠ 0 ↔ (Set.range (orderOf : G → ℕ)).Finite 
goal: AddMonoid.exponent G ≠ 0 ↔ (Set.range addOrderOf).Finite

full_name: AddMonoid.exponent_eq_zero_iff_range_addOrderOf_infinite
code: @[to_additive]
theorem exponent_eq_zero_iff_range_orderOf_infinite (h : ∀ g : G, 0 < orderOf g) :
    exponent G = 0 ↔ (Set.range (orderOf : G → ℕ)).Infinite 
goal: AddMonoid.exponent G = 0 ↔ (Set.range addOrderOf).Infinite

full_name: Monoid.exponent_eq_zero_iff_range_orderOf_infinite
code: @[to_additive]
theorem exponent_eq_zero_iff_range_orderOf_infinite (h : ∀ g : G, 0 < orderOf g) :
    exponent G = 0 ↔ (Set.range (orderOf : G → ℕ)).Infinite 
goal: Monoid.exponent G = 0 ↔ (Set.range orderOf).Infinite

full_name: Monoid.lcm_orderOf_eq_exponent
code: @[to_additive]
theorem lcm_orderOf_eq_exponent [Fintype G] : (Finset.univ : Finset G).lcm orderOf = exponent G 
goal: Finset.univ.lcm orderOf = Monoid.exponent G

full_name: AddMonoid.lcm_addOrderOf_eq_exponent
code: @[to_additive]
theorem lcm_orderOf_eq_exponent [Fintype G] : (Finset.univ : Finset G).lcm orderOf = exponent G 
goal: Finset.univ.lcm addOrderOf = AddMonoid.exponent G

full_name: AddMonoid.exponent_dvd_of_addMonoidHom
code: /--
If there exists an injective, multiplication-preserving map from `G` to `H`,
then the exponent of `G` divides the exponent of `H`.
-/
@[to_additive "If there exists an injective, addition-preserving map from `G` to `H`,
then the exponent of `G` divides the exponent of `H`."]
theorem exponent_dvd_of_monoidHom (e : G →* H) (e_inj : Function.Injective e) :
    Monoid.exponent G ∣ Monoid.exponent H 
goal: AddMonoid.exponent G ∣ AddMonoid.exponent H

full_name: Monoid.exponent_dvd_of_monoidHom
code: /--
If there exists an injective, multiplication-preserving map from `G` to `H`,
then the exponent of `G` divides the exponent of `H`.
-/
@[to_additive "If there exists an injective, addition-preserving map from `G` to `H`,
then the exponent of `G` divides the exponent of `H`."]
theorem exponent_dvd_of_monoidHom (e : G →* H) (e_inj : Function.Injective e) :
    Monoid.exponent G ∣ Monoid.exponent H 
goal: Monoid.exponent G ∣ Monoid.exponent H

full_name: Monoid.exponent_eq_of_mulEquiv
code: /--
If there exists a multiplication-preserving equivalence between `G` and `H`,
then the exponent of `G` is equal to the exponent of `H`.
-/
@[to_additive "If there exists a addition-preserving equivalence between `G` and `H`,
then the exponent of `G` is equal to the exponent of `H`."]
theorem exponent_eq_of_mulEquiv (e : G ≃* H) : Monoid.exponent G = Monoid.exponent H 
goal: Monoid.exponent G = Monoid.exponent H

full_name: AddMonoid.exponent_eq_of_addEquiv
code: /--
If there exists a multiplication-preserving equivalence between `G` and `H`,
then the exponent of `G` is equal to the exponent of `H`.
-/
@[to_additive "If there exists a addition-preserving equivalence between `G` and `H`,
then the exponent of `G` is equal to the exponent of `H`."]
theorem exponent_eq_of_mulEquiv (e : G ≃* H) : Monoid.exponent G = Monoid.exponent H 
goal: AddMonoid.exponent G = AddMonoid.exponent H

full_name: Submonoid.exponent_top
code: @[to_additive (attr := simp)]
theorem _root_.Submonoid.exponent_top :
    Monoid.exponent (⊤ : Submonoid G) = Monoid.exponent G 
goal: Monoid.exponent ↥⊤ = Monoid.exponent G

full_name: AddSubmonoid.exponent_top
code: @[to_additive (attr := simp)]
theorem _root_.Submonoid.exponent_top :
    Monoid.exponent (⊤ : Submonoid G) = Monoid.exponent G 
goal: AddMonoid.exponent ↥⊤ = AddMonoid.exponent G

full_name: AddSubmonoid.nsmul_exponent_eq_zero
code: @[to_additive]
theorem _root_.Submonoid.pow_exponent_eq_one {S : Submonoid G} {g : G} (g_in_s : g ∈ S) :
    g ^ (Monoid.exponent S) = 1 
goal: AddMonoid.exponent ↥S • g = 0

full_name: Submonoid.pow_exponent_eq_one
code: @[to_additive]
theorem _root_.Submonoid.pow_exponent_eq_one {S : Submonoid G} {g : G} (g_in_s : g ∈ S) :
    g ^ (Monoid.exponent S) = 1 
goal: g ^ Monoid.exponent ↥S = 1

full_name: AddMonoid.ExponentExists.of_finite
code: @[to_additive]
theorem ExponentExists.of_finite : ExponentExists G 
goal: AddMonoid.ExponentExists G

full_name: Monoid.ExponentExists.of_finite
code: @[to_additive]
theorem ExponentExists.of_finite : ExponentExists G 
goal: Monoid.ExponentExists G

full_name: AddMonoid.exponent_ne_zero_of_finite
code: @[to_additive]
theorem exponent_ne_zero_of_finite : exponent G ≠ 0 
goal: AddMonoid.exponent G ≠ 0

full_name: Monoid.exponent_ne_zero_of_finite
code: @[to_additive]
theorem exponent_ne_zero_of_finite : exponent G ≠ 0 
goal: Monoid.exponent G ≠ 0

full_name: Monoid.one_lt_exponent
code: @[to_additive AddMonoid.one_lt_exponent]
lemma one_lt_exponent [Nontrivial G] : 1 < Monoid.exponent G 
goal: 1 < Monoid.exponent G

full_name: AddMonoid.one_lt_exponent
code: @[to_additive AddMonoid.one_lt_exponent]
lemma one_lt_exponent [Nontrivial G] : 1 < Monoid.exponent G 
goal: 1 < AddMonoid.exponent G

full_name: Monoid.exists_orderOf_eq_exponent
code: @[to_additive]
theorem exists_orderOf_eq_exponent (hG : ExponentExists G) : ∃ g : G, orderOf g = exponent G 
goal: ∃ g, orderOf g = Monoid.exponent G

full_name: AddMonoid.exists_addOrderOf_eq_exponent
code: @[to_additive]
theorem exists_orderOf_eq_exponent (hG : ExponentExists G) : ∃ g : G, orderOf g = exponent G 
goal: ∃ g, addOrderOf g = AddMonoid.exponent G

full_name: Monoid.exponent_eq_iSup_orderOf
code: @[to_additive]
theorem exponent_eq_iSup_orderOf (h : ∀ g : G, 0 < orderOf g) :
    exponent G = ⨆ g : G, orderOf g 
goal: Monoid.exponent G = ⨆ g, orderOf g

full_name: AddMonoid.exponent_eq_iSup_addOrderOf
code: @[to_additive]
theorem exponent_eq_iSup_orderOf (h : ∀ g : G, 0 < orderOf g) :
    exponent G = ⨆ g : G, orderOf g 
goal: AddMonoid.exponent G = ⨆ g, addOrderOf g

full_name: Monoid.exponent_eq_iSup_orderOf'
code: @[to_additive]
theorem exponent_eq_iSup_orderOf' :
    exponent G = if ∃ g : G, orderOf g = 0 then 0 else ⨆ g : G, orderOf g 
goal: Monoid.exponent G = if ∃ g, orderOf g = 0 then 0 else ⨆ g, orderOf g

full_name: AddMonoid.exponent_eq_iSup_addOrderOf'
code: @[to_additive]
theorem exponent_eq_iSup_orderOf' :
    exponent G = if ∃ g : G, orderOf g = 0 then 0 else ⨆ g : G, orderOf g 
goal: AddMonoid.exponent G = if ∃ g, addOrderOf g = 0 then 0 else ⨆ g, addOrderOf g

full_name: Monoid.exponent_eq_max'_orderOf
code: @[to_additive]
theorem exponent_eq_max'_orderOf [Fintype G] :
    exponent G = ((@Finset.univ G _).image orderOf).max' ⟨1, by simp⟩ 
goal: Monoid.exponent G = (Finset.image orderOf Finset.univ).max' ⋯

full_name: AddMonoid.exponent_eq_max'_addOrderOf
code: @[to_additive]
theorem exponent_eq_max'_orderOf [Fintype G] :
    exponent G = ((@Finset.univ G _).image orderOf).max' ⟨1, by simp⟩ 
goal: AddMonoid.exponent G = (Finset.image addOrderOf Finset.univ).max' ⋯

full_name: Group.one_lt_exponent
code: @[to_additive (attr := deprecated Monoid.one_lt_exponent (since := "2024-02-17"))
  AddGroup.one_lt_exponent]
lemma Group.one_lt_exponent [Finite G] [Nontrivial G] : 1 < Monoid.exponent G 
goal: 1 < Monoid.exponent G

full_name: AddGroup.one_lt_exponent
code: @[to_additive (attr := deprecated Monoid.one_lt_exponent (since := "2024-02-17"))
  AddGroup.one_lt_exponent]
lemma Group.one_lt_exponent [Finite G] [Nontrivial G] : 1 < Monoid.exponent G 
goal: 1 < AddMonoid.exponent G

full_name: Group.exponent_dvd_card
code: theorem Group.exponent_dvd_card [Fintype G] : Monoid.exponent G ∣ Fintype.card G 
goal: Monoid.exponent G ∣ Fintype.card G

full_name: Group.exponent_dvd_nat_card
code: theorem Group.exponent_dvd_nat_card : Monoid.exponent G ∣ Nat.card G 
goal: Monoid.exponent G ∣ Nat.card G

full_name: Subgroup.exponent_toSubmonoid
code: @[to_additive]
theorem Subgroup.exponent_toSubmonoid (H : Subgroup G) :
    Monoid.exponent H.toSubmonoid = Monoid.exponent H 
goal: Monoid.exponent ↥H.toSubmonoid = Monoid.exponent ↥H

full_name: AddSubgroup.exponent_toAddSubmonoid
code: @[to_additive]
theorem Subgroup.exponent_toSubmonoid (H : Subgroup G) :
    Monoid.exponent H.toSubmonoid = Monoid.exponent H 
goal: AddMonoid.exponent ↥H.toAddSubmonoid = AddMonoid.exponent ↥H

full_name: Subgroup.exponent_top
code: @[to_additive (attr := simp)]
theorem Subgroup.exponent_top : Monoid.exponent (⊤ : Subgroup G) = Monoid.exponent G 
goal: Monoid.exponent ↥⊤ = Monoid.exponent G

full_name: AddSubgroup.exponent_top
code: @[to_additive (attr := simp)]
theorem Subgroup.exponent_top : Monoid.exponent (⊤ : Subgroup G) = Monoid.exponent G 
goal: AddMonoid.exponent ↥⊤ = AddMonoid.exponent G

full_name: AddSubgroup.nsmul_exponent_eq_zero
code: @[to_additive]
theorem Subgroup.pow_exponent_eq_one {H : Subgroup G} {g : G} (g_in_H : g ∈ H) :
    g ^ Monoid.exponent H = 1 
goal: AddMonoid.exponent ↥H • g = 0

full_name: Subgroup.pow_exponent_eq_one
code: @[to_additive]
theorem Subgroup.pow_exponent_eq_one {H : Subgroup G} {g : G} (g_in_H : g ∈ H) :
    g ^ Monoid.exponent H = 1 
goal: g ^ Monoid.exponent ↥H = 1

full_name: AddMonoid.exponent_pi_eq_zero
code: @[to_additive]
theorem Monoid.exponent_pi_eq_zero {ι : Type*} {M : ι → Type*} [∀ i, Monoid (M i)] {j : ι}
    (hj : exponent (M j) = 0) : exponent ((i : ι) → M i) = 0 
goal: AddMonoid.exponent ((i : ι) → M i) = 0

full_name: Monoid.exponent_pi_eq_zero
code: @[to_additive]
theorem Monoid.exponent_pi_eq_zero {ι : Type*} {M : ι → Type*} [∀ i, Monoid (M i)] {j : ι}
    (hj : exponent (M j) = 0) : exponent ((i : ι) → M i) = 0 
goal: Monoid.exponent ((i : ι) → M i) = 0

full_name: AddMonoidHom.exponent_dvd
code: /-- If `f : M₁ →⋆ M₂` is surjective, then the exponent of `M₂` divides the exponent of `M₁`. -/
@[to_additive]
theorem MonoidHom.exponent_dvd {F M₁ M₂ : Type*} [Monoid M₁] [Monoid M₂]
    [FunLike F M₁ M₂] [MonoidHomClass F M₁ M₂]
    {f : F} (hf : Function.Surjective f) : exponent M₂ ∣ exponent M₁ 
goal: AddMonoid.exponent M₂ ∣ AddMonoid.exponent M₁

full_name: MonoidHom.exponent_dvd
code: /-- If `f : M₁ →⋆ M₂` is surjective, then the exponent of `M₂` divides the exponent of `M₁`. -/
@[to_additive]
theorem MonoidHom.exponent_dvd {F M₁ M₂ : Type*} [Monoid M₁] [Monoid M₂]
    [FunLike F M₁ M₂] [MonoidHomClass F M₁ M₂]
    {f : F} (hf : Function.Surjective f) : exponent M₂ ∣ exponent M₁ 
goal: Monoid.exponent M₂ ∣ Monoid.exponent M₁

full_name: AddMonoid.exponent_pi
code: /-- The exponent of finite product of monoids is the `Finset.lcm` of the exponents of the
constituent monoids. -/
@[to_additive "The exponent of finite product of additive monoids is the `Finset.lcm` of the
exponents of the constituent additive monoids."]
theorem Monoid.exponent_pi {ι : Type*} [Fintype ι] {M : ι → Type*} [∀ i, Monoid (M i)] :
    exponent ((i : ι) → M i) = lcm univ (exponent <| M ·) 
goal: AddMonoid.exponent ((i : ι) → M i) = Finset.univ.lcm fun x => AddMonoid.exponent (M x)

full_name: Monoid.exponent_pi
code: /-- The exponent of finite product of monoids is the `Finset.lcm` of the exponents of the
constituent monoids. -/
@[to_additive "The exponent of finite product of additive monoids is the `Finset.lcm` of the
exponents of the constituent additive monoids."]
theorem Monoid.exponent_pi {ι : Type*} [Fintype ι] {M : ι → Type*} [∀ i, Monoid (M i)] :
    exponent ((i : ι) → M i) = lcm univ (exponent <| M ·) 
goal: Monoid.exponent ((i : ι) → M i) = Finset.univ.lcm fun x => Monoid.exponent (M x)

full_name: Monoid.exponent_prod
code: /-- The exponent of product of two monoids is the `lcm` of the exponents of the
individuaul monoids. -/
@[to_additive AddMonoid.exponent_prod "The exponent of product of two additive monoids is the `lcm`
of the exponents of the individuaul additive monoids."]
theorem Monoid.exponent_prod {M₁ M₂ : Type*} [Monoid M₁] [Monoid M₂] :
    exponent (M₁ × M₂) = lcm (exponent M₁) (exponent M₂) 
goal: Monoid.exponent (M₁ × M₂) = lcm (Monoid.exponent M₁) (Monoid.exponent M₂)

full_name: AddMonoid.exponent_prod
code: /-- The exponent of product of two monoids is the `lcm` of the exponents of the
individuaul monoids. -/
@[to_additive AddMonoid.exponent_prod "The exponent of product of two additive monoids is the `lcm`
of the exponents of the individuaul additive monoids."]
theorem Monoid.exponent_prod {M₁ M₂ : Type*} [Monoid M₁] [Monoid M₂] :
    exponent (M₁ × M₂) = lcm (exponent M₁) (exponent M₂) 
goal: AddMonoid.exponent (M₁ × M₂) = lcm (AddMonoid.exponent M₁) (AddMonoid.exponent M₂)

full_name: orderOf_eq_two_iff
code: @[to_additive]
lemma orderOf_eq_two_iff (hG : Monoid.exponent G = 2) {x : G} :
    orderOf x = 2 ↔ x ≠ 1 
goal: orderOf x = 2 ↔ x ≠ 1

full_name: addOrderOf_eq_two_iff
code: @[to_additive]
lemma orderOf_eq_two_iff (hG : Monoid.exponent G = 2) {x : G} :
    orderOf x = 2 ↔ x ≠ 1 
goal: addOrderOf x = 2 ↔ x ≠ 0

full_name: Commute.of_orderOf_dvd_two
code: @[to_additive]
theorem Commute.of_orderOf_dvd_two [IsCancelMul G] (h : ∀ g : G, orderOf g ∣ 2) (a b : G) :
    Commute a b 
goal: Commute a b

full_name: AddCommute.of_addOrderOf_dvd_two
code: @[to_additive]
theorem Commute.of_orderOf_dvd_two [IsCancelMul G] (h : ∀ g : G, orderOf g ∣ 2) (a b : G) :
    Commute a b 
goal: AddCommute a b

full_name: mul_comm_of_exponent_two
code: /-- In a cancellative monoid of exponent two, all elements commute. -/
@[to_additive]
lemma mul_comm_of_exponent_two [IsCancelMul G] (hG : Monoid.exponent G = 2) (a b : G) :
    a * b = b * a 
goal: a * b = b * a

full_name: add_comm_of_exponent_two
code: /-- In a cancellative monoid of exponent two, all elements commute. -/
@[to_additive]
lemma mul_comm_of_exponent_two [IsCancelMul G] (hG : Monoid.exponent G = 2) (a b : G) :
    a * b = b * a 
goal: a + b = b + a

full_name: commMonoidOfExponentTwo
code: /-- Any cancellative monoid of exponent two is abelian. -/
@[to_additive (attr := reducible) "Any additive group of exponent two is abelian."]
def commMonoidOfExponentTwo [IsCancelMul G] (hG : Monoid.exponent G = 2) : CommMonoid G 
goal: CommMonoid G

full_name: addCommMonoidOfExponentTwo
code: /-- Any cancellative monoid of exponent two is abelian. -/
@[to_additive (attr := reducible) "Any additive group of exponent two is abelian."]
def commMonoidOfExponentTwo [IsCancelMul G] (hG : Monoid.exponent G = 2) : CommMonoid G 
goal: AddCommMonoid G

full_name: inv_eq_self_of_exponent_two
code: /-- In a group of exponent two, every element is its own inverse. -/
@[to_additive]
lemma inv_eq_self_of_exponent_two (hG : Monoid.exponent G = 2) (x : G) :
    x⁻¹ = x 
goal: x⁻¹ = x

full_name: neg_eq_self_of_exponent_two
code: /-- In a group of exponent two, every element is its own inverse. -/
@[to_additive]
lemma inv_eq_self_of_exponent_two (hG : Monoid.exponent G = 2) (x : G) :
    x⁻¹ = x 
goal: -x = x

full_name: neg_eq_self_of_addOrderOf_eq_two
code: /-- If an element in a group has order two, then it is its own inverse. -/
@[to_additive]
lemma inv_eq_self_of_orderOf_eq_two {x : G} (hx : orderOf x = 2) :
    x⁻¹ = x 
goal: -x = x

full_name: inv_eq_self_of_orderOf_eq_two
code: /-- If an element in a group has order two, then it is its own inverse. -/
@[to_additive]
lemma inv_eq_self_of_orderOf_eq_two {x : G} (hx : orderOf x = 2) :
    x⁻¹ = x 
goal: x⁻¹ = x

full_name: instCommGroupOfExponentTwo
code: /-- Any group of exponent two is abelian. -/
@[to_additive (attr := reducible, deprecated (since := "2024-02-17"))
  "Any additive group of exponent two is abelian."]
def instCommGroupOfExponentTwo (hG : Monoid.exponent G = 2) : CommGroup G 
goal: CommGroup G

full_name: instAddCommGroupOfExponentTwo
code: /-- Any group of exponent two is abelian. -/
@[to_additive (attr := reducible, deprecated (since := "2024-02-17"))
  "Any additive group of exponent two is abelian."]
def instCommGroupOfExponentTwo (hG : Monoid.exponent G = 2) : CommGroup G 
goal: AddCommGroup G

full_name: add_not_mem_of_addOrderOf_eq_two
code: @[to_additive]
lemma mul_not_mem_of_orderOf_eq_two {x y : G} (hx : orderOf x = 2)
    (hy : orderOf y = 2) (hxy : x ≠ y) : x * y ∉ ({x, y, 1} : Set G) 
goal: x + y ∉ {x, y, 0}

full_name: mul_not_mem_of_orderOf_eq_two
code: @[to_additive]
lemma mul_not_mem_of_orderOf_eq_two {x y : G} (hx : orderOf x = 2)
    (hy : orderOf y = 2) (hxy : x ≠ y) : x * y ∉ ({x, y, 1} : Set G) 
goal: x * y ∉ {x, y, 1}

full_name: add_not_mem_of_exponent_two
code: @[to_additive]
lemma mul_not_mem_of_exponent_two (h : Monoid.exponent G = 2) {x y : G}
    (hx : x ≠ 1) (hy : y ≠ 1) (hxy : x ≠ y) : x * y ∉ ({x, y, 1} : Set G) 
goal: x + y ∉ {x, y, 0}

full_name: mul_not_mem_of_exponent_two
code: @[to_additive]
lemma mul_not_mem_of_exponent_two (h : Monoid.exponent G = 2) {x y : G}
    (hx : x ≠ 1) (hy : y ≠ 1) (hxy : x ≠ y) : x * y ∉ ({x, y, 1} : Set G) 
goal: x * y ∉ {x, y, 1}