-- Mathlib/FieldTheory/KummerExtension.lean
theorem Polynomial.separable_X_pow_sub_C_of_irreducible : (X ^ n - C a).Separable

Proof state:
case neg
K : Type u
inst✝ : Field K
n : ℕ
hζ✝ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : ¬n = 1
ζ : K
hζ : ζ ∈ primitiveRoots n K
⊢ (X ^ n - C a).Separable

Tactic:
rw [mem_primitiveRoots (Nat.pos_of_ne_zero <| ne_zero_of_irreducible_X_pow_sub_C H)] at hζ

Result:
case neg
K : Type u
inst✝ : Field K
n : ℕ
hζ✝ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : ¬n = 1
ζ : K
hζ : IsPrimitiveRoot ζ n
⊢ (X ^ n - C a).Separable

Proof state:
case neg
K : Type u
inst✝ : Field K
n : ℕ
hζ✝ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : ¬n = 1
ζ : K
hζ : IsPrimitiveRoot ζ n
⊢ (X ^ n - C a).Separable

Tactic:
rw [← separable_map (algebraMap K K[n√a]), Polynomial.map_sub, Polynomial.map_pow, map_C, map_X,
  AdjoinRoot.algebraMap_eq,
  X_pow_sub_C_eq_prod (hζ.map_of_injective (algebraMap K _).injective) hn
  (root_X_pow_sub_C_pow n a), separable_prod_X_sub_C_iff']

Result:
case neg
K : Type u
inst✝ : Field K
n : ℕ
hζ✝ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : ¬n = 1
ζ : K
hζ : IsPrimitiveRoot ζ n
⊢ ∀ x ∈ Finset.range n,
    ∀ y ∈ Finset.range n,
      (algebraMap K K[n√a]) ζ ^ x * root (X ^ n - C a) = (algebraMap K K[n√a]) ζ ^ y * root (X ^ n - C a) → x = y

Proof state:
case pos
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : n = 1
⊢ (X - C a).Separable

Tactic:
exact separable_X_sub_C

Result:
no goals

Proof state:
case neg
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : ¬n = 1
⊢ (X ^ n - C a).Separable

Tactic:
have ⟨ζ, hζ⟩ := hζ

Result:
case neg
K : Type u
inst✝ : Field K
n : ℕ
hζ✝ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : ¬n = 1
ζ : K
hζ : ζ ∈ primitiveRoots n K
⊢ (X ^ n - C a).Separable

Proof state:
case neg
K : Type u
inst✝ : Field K
n : ℕ
hζ✝ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝¹ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this✝ : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : ¬n = 1
ζ : K
hζ : IsPrimitiveRoot ζ n
this : MonoidHomClass (K →+* K[n√a]) K K[n√a]
⊢ ∀ x ∈ Finset.range n,
    ∀ y ∈ Finset.range n,
      (algebraMap K K[n√a]) ζ ^ x * root (X ^ n - C a) = (algebraMap K K[n√a]) ζ ^ y * root (X ^ n - C a) → x = y

Tactic:
exact (hζ.map_of_injective (algebraMap K K[n√a]).injective).injOn_pow_mul
  (root_X_pow_sub_C_ne_zero (lt_of_le_of_ne (show 1 ≤ n from hn) (Ne.symm hn')) _)

Result:
no goals

Proof state:
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
⊢ (X ^ n - C a).Separable

Tactic:
have hn := Nat.pos_iff_ne_zero.mpr (ne_zero_of_irreducible_X_pow_sub_C H)

Result:
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
⊢ (X ^ n - C a).Separable

Proof state:
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
⊢ (X ^ n - C a).Separable

Tactic:
letI := Fact.mk H

Result:
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this : Fact (Irreducible (X ^ n - C a)) := { out := H }
⊢ (X ^ n - C a).Separable

Proof state:
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this : Fact (Irreducible (X ^ n - C a)) := { out := H }
⊢ (X ^ n - C a).Separable

Tactic:
letI : Algebra K K[n√a] := inferInstance

Result:
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
⊢ (X ^ n - C a).Separable

Proof state:
case pos
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : n = 1
⊢ (X ^ n - C a).Separable

Tactic:
rw [hn', pow_one]

Result:
case pos
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : n = 1
⊢ (X - C a).Separable

Proof state:
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
⊢ (X ^ n - C a).Separable

Tactic:
by_cases hn' : n = 1

Result:
case pos
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : n = 1
⊢ (X ^ n - C a).Separable

case neg
K : Type u
inst✝ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : ¬n = 1
⊢ (X ^ n - C a).Separable

Proof state:
case neg
K : Type u
inst✝ : Field K
n : ℕ
hζ✝ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : ¬n = 1
ζ : K
hζ : IsPrimitiveRoot ζ n
⊢ ∀ x ∈ Finset.range n,
    ∀ y ∈ Finset.range n,
      (algebraMap K K[n√a]) ζ ^ x * root (X ^ n - C a) = (algebraMap K K[n√a]) ζ ^ y * root (X ^ n - C a) → x = y

Tactic:
have : MonoidHomClass (K →+* K[n√a]) K K[n√a] := inferInstance

Result:
case neg
K : Type u
inst✝ : Field K
n : ℕ
hζ✝ : (primitiveRoots n K).Nonempty
a : K
H : Irreducible (X ^ n - C a)
this✝¹ : Fact (Irreducible (X ^ n - C a)) := { out := H }
this✝ : Algebra K K[n√a] := inferInstance
hn : 0 < n
hn' : ¬n = 1
ζ : K
hζ : IsPrimitiveRoot ζ n
this : MonoidHomClass (K →+* K[n√a]) K K[n√a]
⊢ ∀ x ∈ Finset.range n,
    ∀ y ∈ Finset.range n,
      (algebraMap K K[n√a]) ζ ^ x * root (X ^ n - C a) = (algebraMap K K[n√a]) ζ ^ y * root (X ^ n - C a) → x = y