Theorem: FiniteField.forall_pow_eq_one_iff
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: obtain ⟨x, hx⟩ := IsCyclic.exists_generator (α := Kˣ)
state_before: K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
⊢ (∀ (x : Kˣ), x ^ i = 1) ↔ q - 1 ∣ i
state_after: case intro
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ (∀ (x : Kˣ), x ^ i = 1) ↔ q - 1 ∣ i

tactic: rw [← Fintype.card_units, ← orderOf_eq_card_of_forall_mem_zpowers hx,
  orderOf_dvd_iff_pow_eq_one]
state_before: case intro
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ (∀ (x : Kˣ), x ^ i = 1) ↔ q - 1 ∣ i
state_after: case intro
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ (∀ (x : Kˣ), x ^ i = 1) ↔ x ^ i = 1

tactic: constructor
state_before: case intro
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ (∀ (x : Kˣ), x ^ i = 1) ↔ x ^ i = 1
state_after: case intro.mp
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ (∀ (x : Kˣ), x ^ i = 1) → x ^ i = 1

case intro.mpr
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ x ^ i = 1 → ∀ (x : Kˣ), x ^ i = 1

tactic: intro h
state_before: case intro.mp
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ (∀ (x : Kˣ), x ^ i = 1) → x ^ i = 1
state_after: case intro.mp
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
h : ∀ (x : Kˣ), x ^ i = 1
⊢ x ^ i = 1

tactic: apply h
state_before: case intro.mp
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
h : ∀ (x : Kˣ), x ^ i = 1
⊢ x ^ i = 1
state_after: no goals

tactic: intro h y
state_before: case intro.mpr
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
⊢ x ^ i = 1 → ∀ (x : Kˣ), x ^ i = 1
state_after: case intro.mpr
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
h : x ^ i = 1
y : Kˣ
⊢ y ^ i = 1

tactic: simp_rw [← mem_powers_iff_mem_zpowers] at hx
state_before: case intro.mpr
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Subgroup.zpowers x
h : x ^ i = 1
y : Kˣ
⊢ y ^ i = 1
state_after: case intro.mpr
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
h : x ^ i = 1
y : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Submonoid.powers x
⊢ y ^ i = 1

tactic: rcases hx y with ⟨j, rfl⟩
state_before: case intro.mpr
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
h : x ^ i = 1
y : Kˣ
hx : ∀ (x_1 : Kˣ), x_1 ∈ Submonoid.powers x
⊢ y ^ i = 1
state_after: case intro.mpr.intro
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
h : x ^ i = 1
hx : ∀ (x_1 : Kˣ), x_1 ∈ Submonoid.powers x
j : ℕ
⊢ (fun x_1 => x ^ x_1) j ^ i = 1

tactic: rw [← pow_mul, mul_comm, pow_mul, h, one_pow]
state_before: case intro.mpr.intro
K : Type u_1
R : Type u_2
inst✝¹ : Field K
inst✝ : Fintype K
i : ℕ
x : Kˣ
h : x ^ i = 1
hx : ∀ (x_1 : Kˣ), x_1 ∈ Submonoid.powers x
j : ℕ
⊢ (fun x_1 => x ^ x_1) j ^ i = 1
state_after: no goals