l3lab/ntp-mathlib huggingface dataset:
/-- If `IsCyclotomicExtension {n} K L`, then `L` is the splitting field of `X ^ n - 1`. -/
theorem isSplittingField_X_pow_sub_one : IsSplittingField K L (X ^ (n : ℕ) - 1) :=
  { splits' := splits_X_pow_sub_one K L (mem_singleton n)
    adjoin_rootSet' := by
      rw [← ((iff_adjoin_eq_top {n} K L).1 inferInstance).2]
      congr
      

Proof state:
case e_s
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
⊢ rootSet (X ^ ↑n - 1) L = {b | ∃ n_1 ∈ {n}, b ^ ↑n_1 = 1}

Next tactic:
refine' Set.ext fun x => _
/-- If `IsCyclotomicExtension {n} K L`, then `L` is the splitting field of `X ^ n - 1`. -/
theorem isSplittingField_X_pow_sub_one : IsSplittingField K L (X ^ (n : ℕ) - 1) :=
  { splits' := splits_X_pow_sub_one K L (mem_singleton n)
    adjoin_rootSet' := by
      rw [← ((iff_adjoin_eq_top {n} K L).1 inferInstance).2]
      congr
      refine' Set.ext fun x => _
      

Proof state:
case e_s
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
x : L
⊢ x ∈ rootSet (X ^ ↑n - 1) L ↔ x ∈ {b | ∃ n_1 ∈ {n}, b ^ ↑n_1 = 1}

Next tactic:
simp only [Polynomial.map_pow, mem_singleton_iff, Multiset.mem_toFinset, exists_eq_left,
        mem_setOf_eq, Polynomial.map_X, Polynomial.map_one, Finset.mem_coe, Polynomial.map_sub]
/-- If `IsCyclotomicExtension {n} K L`, then `L` is the splitting field of `X ^ n - 1`. -/
theorem isSplittingField_X_pow_sub_one : IsSplittingField K L (X ^ (n : ℕ) - 1) :=
  { splits' := splits_X_pow_sub_one K L (mem_singleton n)
    adjoin_rootSet' := by
      rw [← ((iff_adjoin_eq_top {n} K L).1 inferInstance).2]
      congr
      refine' Set.ext fun x => _
      simp only [Polynomial.map_pow, mem_singleton_iff, Multiset.mem_toFinset, exists_eq_left,
        mem_setOf_eq, Polynomial.map_X, Polynomial.map_one, Finset.mem_coe, Polynomial.map_sub]
      

Proof state:
case e_s
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
x : L
⊢ x ∈ rootSet (X ^ ↑n - 1) L ↔ x ^ ↑n = 1

Next tactic:
simp only [mem_rootSet', map_sub, map_pow, aeval_one, aeval_X, sub_eq_zero, map_X,
        and_iff_right_iff_imp, Polynomial.map_sub, Polynomial.map_pow, Polynomial.map_one]
/-- If `IsCyclotomicExtension {n} K L`, then `L` is the splitting field of `X ^ n - 1`. -/
theorem isSplittingField_X_pow_sub_one : IsSplittingField K L (X ^ (n : ℕ) - 1) :=
  { splits' := splits_X_pow_sub_one K L (mem_singleton n)
    adjoin_rootSet' := by
      rw [← ((iff_adjoin_eq_top {n} K L).1 inferInstance).2]
      congr
      refine' Set.ext fun x => _
      simp only [Polynomial.map_pow, mem_singleton_iff, Multiset.mem_toFinset, exists_eq_left,
        mem_setOf_eq, Polynomial.map_X, Polynomial.map_one, Finset.mem_coe, Polynomial.map_sub]
      simp only [mem_rootSet', map_sub, map_pow, aeval_one, aeval_X, sub_eq_zero, map_X,
        and_iff_right_iff_imp, Polynomial.map_sub, Polynomial.map_pow, Polynomial.map_one]
      

Proof state:
case e_s
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
x : L
⊢ x ^ ↑n = 1 → X ^ ↑n - 1 ≠ 0

Next tactic:
exact fun _ => X_pow_sub_C_ne_zero n.pos (1 : L)
/-- If `IsCyclotomicExtension {n} K L`, then `L` is the splitting field of `cyclotomic n K`. -/
theorem splitting_field_cyclotomic : IsSplittingField K L (cyclotomic n K) :=
  { splits' := splits_cyclotomic K L (mem_singleton n)
    adjoin_rootSet' := by
      

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
⊢ adjoin K (rootSet (cyclotomic (↑n) K) L) = ⊤

Next tactic:
rw [← ((iff_adjoin_eq_top {n} K L).1 inferInstance).2]
/-- If `IsCyclotomicExtension {n} K L`, then `L` is the splitting field of `cyclotomic n K`. -/
theorem splitting_field_cyclotomic : IsSplittingField K L (cyclotomic n K) :=
  { splits' := splits_cyclotomic K L (mem_singleton n)
    adjoin_rootSet' := by
      rw [← ((iff_adjoin_eq_top {n} K L).1 inferInstance).2]
      

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
⊢ adjoin K (rootSet (cyclotomic (↑n) K) L) = adjoin K {b | ∃ n_1 ∈ {n}, b ^ ↑n_1 = 1}

Next tactic:
letI := Classical.decEq L
/-- If `IsCyclotomicExtension {n} K L`, then `L` is the splitting field of `cyclotomic n K`. -/
theorem splitting_field_cyclotomic : IsSplittingField K L (cyclotomic n K) :=
  { splits' := splits_cyclotomic K L (mem_singleton n)
    adjoin_rootSet' := by
      rw [← ((iff_adjoin_eq_top {n} K L).1 inferInstance).2]
      letI := Classical.decEq L
      -- todo: make `exists_prim_root` take an explicit `L`
      

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
this : DecidableEq L := Classical.decEq L
⊢ adjoin K (rootSet (cyclotomic (↑n) K) L) = adjoin K {b | ∃ n_1 ∈ {n}, b ^ ↑n_1 = 1}

Next tactic:
obtain ⟨ζ : L, hζ⟩ := IsCyclotomicExtension.exists_prim_root K (B := L) (mem_singleton n)
/-- If `IsCyclotomicExtension {n} K L`, then `L` is the splitting field of `cyclotomic n K`. -/
theorem splitting_field_cyclotomic : IsSplittingField K L (cyclotomic n K) :=
  { splits' := splits_cyclotomic K L (mem_singleton n)
    adjoin_rootSet' := by
      rw [← ((iff_adjoin_eq_top {n} K L).1 inferInstance).2]
      letI := Classical.decEq L
      -- todo: make `exists_prim_root` take an explicit `L`
      obtain ⟨ζ : L, hζ⟩ := IsCyclotomicExtension.exists_prim_root K (B := L) (mem_singleton n)
      

Proof state:
case intro
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {n} K L
this : DecidableEq L := Classical.decEq L
ζ : L
hζ : IsPrimitiveRoot ζ ↑n
⊢ adjoin K (rootSet (cyclotomic (↑n) K) L) = adjoin K {b | ∃ n_1 ∈ {n}, b ^ ↑n_1 = 1}

Next tactic:
exact adjoin_roots_cyclotomic_eq_adjoin_nth_roots hζ
instance : Field (CyclotomicField n K) := by
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
⊢ Field (CyclotomicField n K)

Next tactic:
delta CyclotomicField
instance : Field (CyclotomicField n K) := by
  delta CyclotomicField; 

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
⊢ Field (SplittingField (cyclotomic (↑n) K))

Next tactic:
infer_instance
instance algebra : Algebra K (CyclotomicField n K) := by
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
⊢ Algebra K (CyclotomicField n K)

Next tactic:
delta CyclotomicField
instance algebra : Algebra K (CyclotomicField n K) := by
  delta CyclotomicField; 

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
⊢ Algebra K (SplittingField (cyclotomic (↑n) K))

Next tactic:
infer_instance
instance : Inhabited (CyclotomicField n K) := by
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
⊢ Inhabited (CyclotomicField n K)

Next tactic:
delta CyclotomicField
instance : Inhabited (CyclotomicField n K) := by
  delta CyclotomicField; 

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : Algebra A B
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
⊢ Inhabited (SplittingField (cyclotomic (↑n) K))

Next tactic:
infer_instance
instance isCyclotomicExtension [NeZero ((n : ℕ) : K)] :
    IsCyclotomicExtension {n} K (CyclotomicField n K) := by
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : NeZero ↑↑n
⊢ IsCyclotomicExtension {n} K (CyclotomicField n K)

Next tactic:
haveI : NeZero ((n : ℕ) : CyclotomicField n K) :=
    NeZero.nat_of_injective (algebraMap K _).injective
instance isCyclotomicExtension [NeZero ((n : ℕ) : K)] :
    IsCyclotomicExtension {n} K (CyclotomicField n K) := by
  haveI : NeZero ((n : ℕ) : CyclotomicField n K) :=
    NeZero.nat_of_injective (algebraMap K _).injective
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : NeZero ↑↑n
this : NeZero ↑↑n
⊢ IsCyclotomicExtension {n} K (CyclotomicField n K)

Next tactic:
letI := Classical.decEq (CyclotomicField n K)
instance isCyclotomicExtension [NeZero ((n : ℕ) : K)] :
    IsCyclotomicExtension {n} K (CyclotomicField n K) := by
  haveI : NeZero ((n : ℕ) : CyclotomicField n K) :=
    NeZero.nat_of_injective (algebraMap K _).injective
  letI := Classical.decEq (CyclotomicField n K)
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : NeZero ↑↑n
this✝ : NeZero ↑↑n
this : DecidableEq (CyclotomicField n K) := Classical.decEq (CyclotomicField n K)
⊢ IsCyclotomicExtension {n} K (CyclotomicField n K)

Next tactic:
obtain ⟨ζ, hζ⟩ :=
    exists_root_of_splits (algebraMap K (CyclotomicField n K)) (SplittingField.splits _)
      (degree_cyclotomic_pos n K n.pos).ne'
instance isCyclotomicExtension [NeZero ((n : ℕ) : K)] :
    IsCyclotomicExtension {n} K (CyclotomicField n K) := by
  haveI : NeZero ((n : ℕ) : CyclotomicField n K) :=
    NeZero.nat_of_injective (algebraMap K _).injective
  letI := Classical.decEq (CyclotomicField n K)
  obtain ⟨ζ, hζ⟩ :=
    exists_root_of_splits (algebraMap K (CyclotomicField n K)) (SplittingField.splits _)
      (degree_cyclotomic_pos n K n.pos).ne'
  

Proof state:
case intro
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : NeZero ↑↑n
this✝ : NeZero ↑↑n
this : DecidableEq (CyclotomicField n K) := Classical.decEq (CyclotomicField n K)
ζ : CyclotomicField n K
hζ : eval₂ (algebraMap K (CyclotomicField n K)) ζ (cyclotomic (↑n) K) = 0
⊢ IsCyclotomicExtension {n} K (CyclotomicField n K)

Next tactic:
rw [← eval_map, ← IsRoot.def, map_cyclotomic, isRoot_cyclotomic_iff] at hζ
instance isCyclotomicExtension [NeZero ((n : ℕ) : K)] :
    IsCyclotomicExtension {n} K (CyclotomicField n K) := by
  haveI : NeZero ((n : ℕ) : CyclotomicField n K) :=
    NeZero.nat_of_injective (algebraMap K _).injective
  letI := Classical.decEq (CyclotomicField n K)
  obtain ⟨ζ, hζ⟩ :=
    exists_root_of_splits (algebraMap K (CyclotomicField n K)) (SplittingField.splits _)
      (degree_cyclotomic_pos n K n.pos).ne'
  rw [← eval_map, ← IsRoot.def, map_cyclotomic, isRoot_cyclotomic_iff] at hζ
-- Porting note: the first `?_` was `forall_eq.2 ⟨ζ, hζ⟩` that now fails.
  

Proof state:
case intro
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : NeZero ↑↑n
this✝ : NeZero ↑↑n
this : DecidableEq (CyclotomicField n K) := Classical.decEq (CyclotomicField n K)
ζ : CyclotomicField n K
hζ : IsPrimitiveRoot ζ ↑n
⊢ IsCyclotomicExtension {n} K (CyclotomicField n K)

Next tactic:
refine ⟨?_, ?_⟩
instance isCyclotomicExtension [NeZero ((n : ℕ) : K)] :
    IsCyclotomicExtension {n} K (CyclotomicField n K) := by
  haveI : NeZero ((n : ℕ) : CyclotomicField n K) :=
    NeZero.nat_of_injective (algebraMap K _).injective
  letI := Classical.decEq (CyclotomicField n K)
  obtain ⟨ζ, hζ⟩ :=
    exists_root_of_splits (algebraMap K (CyclotomicField n K)) (SplittingField.splits _)
      (degree_cyclotomic_pos n K n.pos).ne'
  rw [← eval_map, ← IsRoot.def, map_cyclotomic, isRoot_cyclotomic_iff] at hζ
-- Porting note: the first `?_` was `forall_eq.2 ⟨ζ, hζ⟩` that now fails.
  refine ⟨?_, ?_⟩
  · 

Proof state:
case intro.refine_1
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : NeZero ↑↑n
this✝ : NeZero ↑↑n
this : DecidableEq (CyclotomicField n K) := Classical.decEq (CyclotomicField n K)
ζ : CyclotomicField n K
hζ : IsPrimitiveRoot ζ ↑n
⊢ ∀ {n_1 : ℕ+}, n_1 ∈ {n} → ∃ r, IsPrimitiveRoot r ↑n_1

Next tactic:
simp only [mem_singleton_iff, forall_eq]
instance isCyclotomicExtension [NeZero ((n : ℕ) : K)] :
    IsCyclotomicExtension {n} K (CyclotomicField n K) := by
  haveI : NeZero ((n : ℕ) : CyclotomicField n K) :=
    NeZero.nat_of_injective (algebraMap K _).injective
  letI := Classical.decEq (CyclotomicField n K)
  obtain ⟨ζ, hζ⟩ :=
    exists_root_of_splits (algebraMap K (CyclotomicField n K)) (SplittingField.splits _)
      (degree_cyclotomic_pos n K n.pos).ne'
  rw [← eval_map, ← IsRoot.def, map_cyclotomic, isRoot_cyclotomic_iff] at hζ
-- Porting note: the first `?_` was `forall_eq.2 ⟨ζ, hζ⟩` that now fails.
  refine ⟨?_, ?_⟩
  · simp only [mem_singleton_iff, forall_eq]
    

Proof state:
case intro.refine_1
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : NeZero ↑↑n
this✝ : NeZero ↑↑n
this : DecidableEq (CyclotomicField n K) := Classical.decEq (CyclotomicField n K)
ζ : CyclotomicField n K
hζ : IsPrimitiveRoot ζ ↑n
⊢ ∃ r, IsPrimitiveRoot r ↑n

Next tactic:
exact ⟨ζ, hζ⟩
instance isCyclotomicExtension [NeZero ((n : ℕ) : K)] :
    IsCyclotomicExtension {n} K (CyclotomicField n K) := by
  haveI : NeZero ((n : ℕ) : CyclotomicField n K) :=
    NeZero.nat_of_injective (algebraMap K _).injective
  letI := Classical.decEq (CyclotomicField n K)
  obtain ⟨ζ, hζ⟩ :=
    exists_root_of_splits (algebraMap K (CyclotomicField n K)) (SplittingField.splits _)
      (degree_cyclotomic_pos n K n.pos).ne'
  rw [← eval_map, ← IsRoot.def, map_cyclotomic, isRoot_cyclotomic_iff] at hζ
-- Porting note: the first `?_` was `forall_eq.2 ⟨ζ, hζ⟩` that now fails.
  refine ⟨?_, ?_⟩
  · simp only [mem_singleton_iff, forall_eq]
    exact ⟨ζ, hζ⟩
  · 

Proof state:
case intro.refine_2
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : NeZero ↑↑n
this✝ : NeZero ↑↑n
this : DecidableEq (CyclotomicField n K) := Classical.decEq (CyclotomicField n K)
ζ : CyclotomicField n K
hζ : IsPrimitiveRoot ζ ↑n
⊢ ∀ (x : CyclotomicField n K), x ∈ adjoin K {b | ∃ n_1 ∈ {n}, b ^ ↑n_1 = 1}

Next tactic:
rw [← Algebra.eq_top_iff, ← SplittingField.adjoin_rootSet, eq_comm]
instance isCyclotomicExtension [NeZero ((n : ℕ) : K)] :
    IsCyclotomicExtension {n} K (CyclotomicField n K) := by
  haveI : NeZero ((n : ℕ) : CyclotomicField n K) :=
    NeZero.nat_of_injective (algebraMap K _).injective
  letI := Classical.decEq (CyclotomicField n K)
  obtain ⟨ζ, hζ⟩ :=
    exists_root_of_splits (algebraMap K (CyclotomicField n K)) (SplittingField.splits _)
      (degree_cyclotomic_pos n K n.pos).ne'
  rw [← eval_map, ← IsRoot.def, map_cyclotomic, isRoot_cyclotomic_iff] at hζ
-- Porting note: the first `?_` was `forall_eq.2 ⟨ζ, hζ⟩` that now fails.
  refine ⟨?_, ?_⟩
  · simp only [mem_singleton_iff, forall_eq]
    exact ⟨ζ, hζ⟩
  · rw [← Algebra.eq_top_iff, ← SplittingField.adjoin_rootSet, eq_comm]
    

Proof state:
case intro.refine_2
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : NeZero ↑↑n
this✝ : NeZero ↑↑n
this : DecidableEq (CyclotomicField n K) := Classical.decEq (CyclotomicField n K)
ζ : CyclotomicField n K
hζ : IsPrimitiveRoot ζ ↑n
⊢ adjoin K (rootSet (cyclotomic (↑n) K) (SplittingField (cyclotomic (↑n) K))) = adjoin K {b | ∃ n_1 ∈ {n}, b ^ ↑n_1 = 1}

Next tactic:
exact IsCyclotomicExtension.adjoin_roots_cyclotomic_eq_adjoin_nth_roots hζ
instance CyclotomicField.noZeroSMulDivisors : NoZeroSMulDivisors A (CyclotomicField n K) := by
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
⊢ NoZeroSMulDivisors A (CyclotomicField n K)

Next tactic:
refine' NoZeroSMulDivisors.of_algebraMap_injective _
instance CyclotomicField.noZeroSMulDivisors : NoZeroSMulDivisors A (CyclotomicField n K) := by
  refine' NoZeroSMulDivisors.of_algebraMap_injective _
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
⊢ Function.Injective ⇑(algebraMap A (CyclotomicField n K))

Next tactic:
rw [IsScalarTower.algebraMap_eq A K (CyclotomicField n K)]
instance CyclotomicField.noZeroSMulDivisors : NoZeroSMulDivisors A (CyclotomicField n K) := by
  refine' NoZeroSMulDivisors.of_algebraMap_injective _
  rw [IsScalarTower.algebraMap_eq A K (CyclotomicField n K)]
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
⊢ Function.Injective ⇑(RingHom.comp (algebraMap K (CyclotomicField n K)) (algebraMap A K))

Next tactic:
exact
    (Function.Injective.comp (NoZeroSMulDivisors.algebraMap_injective K (CyclotomicField n K))
      (IsFractionRing.injective A K) : _)
instance : CommRing (CyclotomicRing n A K) := by
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
⊢ CommRing (CyclotomicRing n A K)

Next tactic:
delta CyclotomicRing
instance : CommRing (CyclotomicRing n A K) := by
  delta CyclotomicRing; 

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
⊢ CommRing ↥(adjoin A {b | b ^ ↑n = 1})

Next tactic:
infer_instance
instance : IsDomain (CyclotomicRing n A K) := by
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
⊢ IsDomain (CyclotomicRing n A K)

Next tactic:
delta CyclotomicRing
instance : IsDomain (CyclotomicRing n A K) := by
  delta CyclotomicRing; 

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
⊢ IsDomain ↥(adjoin A {b | b ^ ↑n = 1})

Next tactic:
infer_instance
instance : Inhabited (CyclotomicRing n A K) := by
  

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
⊢ Inhabited (CyclotomicRing n A K)

Next tactic:
delta CyclotomicRing
instance : Inhabited (CyclotomicRing n A K) := by
  delta CyclotomicRing; 

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
⊢ Inhabited ↥(adjoin A {b | b ^ ↑n = 1})

Next tactic:
infer_instance
instance isCyclotomicExtension [NeZero ((n : ℕ) : A)] :
    IsCyclotomicExtension {n} A (CyclotomicRing n A K) where
  exists_prim_root := @fun a han => by
    

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Algebra K L
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : NeZero ↑↑n
a : ℕ+
han : a ∈ {n}
⊢ ∃ r, IsPrimitiveRoot r ↑a

Next tactic:
rw [mem_singleton_iff] at han
instance isCyclotomicExtension [NeZero ((n : ℕ) : A)] :
    IsCyclotomicExtension {n} A (CyclotomicRing n A K) where
  exists_prim_root := @fun a han => by
    rw [mem_singleton_iff] at han
    

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Algebra K L
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : NeZero ↑↑n
a : ℕ+
han : a = n
⊢ ∃ r, IsPrimitiveRoot r ↑a

Next tactic:
subst a
instance isCyclotomicExtension [NeZero ((n : ℕ) : A)] :
    IsCyclotomicExtension {n} A (CyclotomicRing n A K) where
  exists_prim_root := @fun a han => by
    rw [mem_singleton_iff] at han
    subst a
    

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Algebra K L
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : NeZero ↑↑n
⊢ ∃ r, IsPrimitiveRoot r ↑n

Next tactic:
haveI := NeZero.of_noZeroSMulDivisors A K n
instance isCyclotomicExtension [NeZero ((n : ℕ) : A)] :
    IsCyclotomicExtension {n} A (CyclotomicRing n A K) where
  exists_prim_root := @fun a han => by
    rw [mem_singleton_iff] at han
    subst a
    haveI := NeZero.of_noZeroSMulDivisors A K n
    

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Algebra K L
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : NeZero ↑↑n
this : NeZero ↑↑n
⊢ ∃ r, IsPrimitiveRoot r ↑n

Next tactic:
haveI := NeZero.of_noZeroSMulDivisors A (CyclotomicField n K) n
instance isCyclotomicExtension [NeZero ((n : ℕ) : A)] :
    IsCyclotomicExtension {n} A (CyclotomicRing n A K) where
  exists_prim_root := @fun a han => by
    rw [mem_singleton_iff] at han
    subst a
    haveI := NeZero.of_noZeroSMulDivisors A K n
    haveI := NeZero.of_noZeroSMulDivisors A (CyclotomicField n K) n
    

Proof state:
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁸ : CommRing A
inst✝⁷ : CommRing B
inst✝⁶ : Algebra A B
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Algebra K L
inst✝² : Algebra A K
inst✝¹ : IsFractionRing A K
inst✝ : NeZero ↑↑n
this✝ : NeZero ↑↑n
this : NeZero ↑↑n
⊢ ∃ r, IsPrimitiveRoot r ↑n

Next tactic:
obtain ⟨μ, hμ⟩ := (CyclotomicField.isCyclotomicExtension n K).exists_prim_root (mem_singleton n)