Theorem: Polynomial.int_coeff_of_cyclotomic'
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: refine' lifts_and_degree_eq_and_monic _ (cyclotomic'.monic n K)
state_before: K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ : K
n : ℕ
h : IsPrimitiveRoot ζ n
⊢ ∃ P, map (Int.castRingHom K) P = cyclotomic' n K ∧ degree P = degree (cyclotomic' n K) ∧ Monic P

tactic: induction' n using Nat.strong_induction_on with k ihk generalizing ζ
state_before: K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ : K
n : ℕ
h : IsPrimitiveRoot ζ n
⊢ cyclotomic' n K ∈ lifts (Int.castRingHom K)

tactic: rcases k.eq_zero_or_pos with (rfl | hpos)
state_before: case h
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
⊢ cyclotomic' k K ∈ lifts (Int.castRingHom K)

tactic: let B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
state_before: case h.inr
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
⊢ cyclotomic' k K ∈ lifts (Int.castRingHom K)

tactic: have Bmo : B.Monic := by
  apply monic_prod_of_monic
  intro i _
  exact cyclotomic'.monic i K
state_before: case h.inr
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
⊢ cyclotomic' k K ∈ lifts (Int.castRingHom K)

tactic: have Bint : B ∈ lifts (Int.castRingHom K) := by
  refine' Subsemiring.prod_mem (lifts (Int.castRingHom K)) _
  intro x hx
  have xsmall := (Nat.mem_properDivisors.1 hx).2
  obtain ⟨d, hd⟩ := (Nat.mem_properDivisors.1 hx).1
  rw [mul_comm] at hd
  exact ihk x xsmall (h.pow hpos hd)
state_before: case h.inr
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
⊢ cyclotomic' k K ∈ lifts (Int.castRingHom K)

tactic: replace Bint := lifts_and_degree_eq_and_monic Bint Bmo
state_before: case h.inr
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
Bint : B ∈ lifts (Int.castRingHom K)
⊢ cyclotomic' k K ∈ lifts (Int.castRingHom K)

tactic: obtain ⟨B₁, hB₁, _, hB₁mo⟩ := Bint
state_before: case h.inr
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
Bint : ∃ q, map (Int.castRingHom K) q = B ∧ degree q = degree B ∧ Monic q
⊢ cyclotomic' k K ∈ lifts (Int.castRingHom K)

tactic: let Q₁ : ℤ[X] := (X ^ k - 1) /ₘ B₁
state_before: case h.inr.intro.intro.intro
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
B₁ : ℤ[X]
hB₁ : map (Int.castRingHom K) B₁ = B
left✝ : degree B₁ = degree B
hB₁mo : Monic B₁
⊢ cyclotomic' k K ∈ lifts (Int.castRingHom K)

tactic: replace huniq := div_modByMonic_unique (cyclotomic' k K) (0 : K[X]) Bmo huniq
state_before: case h.inr.intro.intro.intro
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
B₁ : ℤ[X]
hB₁ : map (Int.castRingHom K) B₁ = B
left✝ : degree B₁ = degree B
hB₁mo : Monic B₁
Q₁ : ℤ[X] := (X ^ k - 1) /ₘ B₁
huniq : 0 + B * cyclotomic' k K = X ^ k - 1 ∧ degree 0 < degree B
⊢ cyclotomic' k K ∈ lifts (Int.castRingHom K)

tactic: simp only [lifts, RingHom.mem_rangeS]
state_before: case h.inr.intro.intro.intro
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
B₁ : ℤ[X]
hB₁ : map (Int.castRingHom K) B₁ = B
left✝ : degree B₁ = degree B
hB₁mo : Monic B₁
Q₁ : ℤ[X] := (X ^ k - 1) /ₘ B₁
huniq : (X ^ k - 1) /ₘ B = cyclotomic' k K ∧ (X ^ k - 1) %ₘ B = 0
⊢ cyclotomic' k K ∈ lifts (Int.castRingHom K)

tactic: use Q₁
state_before: case h.inr.intro.intro.intro
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
B₁ : ℤ[X]
hB₁ : map (Int.castRingHom K) B₁ = B
left✝ : degree B₁ = degree B
hB₁mo : Monic B₁
Q₁ : ℤ[X] := (X ^ k - 1) /ₘ B₁
huniq : (X ^ k - 1) /ₘ B = cyclotomic' k K ∧ (X ^ k - 1) %ₘ B = 0
⊢ ∃ x, ↑(mapRingHom (Int.castRingHom K)) x = cyclotomic' k K

tactic: rw [coe_mapRingHom, map_divByMonic (Int.castRingHom K) hB₁mo, hB₁, ← huniq.1]
state_before: case h.inr.intro.intro.intro
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
B₁ : ℤ[X]
hB₁ : map (Int.castRingHom K) B₁ = B
left✝ : degree B₁ = degree B
hB₁mo : Monic B₁
Q₁ : ℤ[X] := (X ^ k - 1) /ₘ B₁
huniq : (X ^ k - 1) /ₘ B = cyclotomic' k K ∧ (X ^ k - 1) %ₘ B = 0
⊢ ↑(mapRingHom (Int.castRingHom K)) Q₁ = cyclotomic' k K

tactic: simp
state_before: case h.inr.intro.intro.intro
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
B₁ : ℤ[X]
hB₁ : map (Int.castRingHom K) B₁ = B
left✝ : degree B₁ = degree B
hB₁mo : Monic B₁
Q₁ : ℤ[X] := (X ^ k - 1) /ₘ B₁
huniq : (X ^ k - 1) /ₘ B = cyclotomic' k K ∧ (X ^ k - 1) %ₘ B = 0
⊢ map (Int.castRingHom K) (X ^ k - 1) /ₘ B = (X ^ k - 1) /ₘ B

tactic: use 1
state_before: case h.inl
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
ζ : K
ihk : ∀ (m : ℕ), m < 0 → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
h : IsPrimitiveRoot ζ 0
⊢ cyclotomic' 0 K ∈ lifts (Int.castRingHom K)

tactic: simp only [cyclotomic'_zero, coe_mapRingHom, Polynomial.map_one]
state_before: case h.inl
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
ζ : K
ihk : ∀ (m : ℕ), m < 0 → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
h : IsPrimitiveRoot ζ 0
⊢ ↑(mapRingHom (Int.castRingHom K)) 1 = cyclotomic' 0 K

tactic: apply monic_prod_of_monic
state_before: K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
⊢ Monic B

tactic: intro i _
state_before: case hs
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
⊢ ∀ (i : ℕ), i ∈ Nat.properDivisors k → Monic (cyclotomic' i K)

tactic: exact cyclotomic'.monic i K
state_before: case hs
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
i : ℕ
a✝ : i ∈ Nat.properDivisors k
⊢ Monic (cyclotomic' i K)

tactic: refine' Subsemiring.prod_mem (lifts (Int.castRingHom K)) _
state_before: K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
⊢ B ∈ lifts (Int.castRingHom K)

tactic: intro x hx
state_before: K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
⊢ ∀ (c : ℕ), c ∈ Nat.properDivisors k → cyclotomic' c K ∈ lifts (Int.castRingHom K)

tactic: have xsmall := (Nat.mem_properDivisors.1 hx).2
state_before: K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
x : ℕ
hx : x ∈ Nat.properDivisors k
⊢ cyclotomic' x K ∈ lifts (Int.castRingHom K)

tactic: obtain ⟨d, hd⟩ := (Nat.mem_properDivisors.1 hx).1
state_before: K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
x : ℕ
hx : x ∈ Nat.properDivisors k
xsmall : x < k
⊢ cyclotomic' x K ∈ lifts (Int.castRingHom K)

tactic: rw [mul_comm] at hd
state_before: case intro
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
x : ℕ
hx : x ∈ Nat.properDivisors k
xsmall : x < k
d : ℕ
hd : k = x * d
⊢ cyclotomic' x K ∈ lifts (Int.castRingHom K)

tactic: exact ihk x xsmall (h.pow hpos hd)
state_before: case intro
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
x : ℕ
hx : x ∈ Nat.properDivisors k
xsmall : x < k
d : ℕ
hd : k = d * x
⊢ cyclotomic' x K ∈ lifts (Int.castRingHom K)

tactic: constructor
state_before: K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
B₁ : ℤ[X]
hB₁ : map (Int.castRingHom K) B₁ = B
left✝ : degree B₁ = degree B
hB₁mo : Monic B₁
Q₁ : ℤ[X] := (X ^ k - 1) /ₘ B₁
⊢ 0 + B * cyclotomic' k K = X ^ k - 1 ∧ degree 0 < degree B

tactic: rw [zero_add, mul_comm, ← prod_cyclotomic'_eq_X_pow_sub_one hpos h, ←
  Nat.cons_self_properDivisors hpos.ne', Finset.prod_cons]
state_before: case left
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
B₁ : ℤ[X]
hB₁ : map (Int.castRingHom K) B₁ = B
left✝ : degree B₁ = degree B
hB₁mo : Monic B₁
Q₁ : ℤ[X] := (X ^ k - 1) /ₘ B₁
⊢ 0 + B * cyclotomic' k K = X ^ k - 1

tactic: simpa only [degree_zero, bot_lt_iff_ne_bot, Ne.def, degree_eq_bot] using Bmo.ne_zero
state_before: case right
K✝ : Type ?u.247792
inst✝² : Field K✝
K : Type u_1
inst✝¹ : CommRing K
inst✝ : IsDomain K
ζ✝ : K
n : ℕ
h✝ : IsPrimitiveRoot ζ✝ n
k : ℕ
ihk : ∀ (m : ℕ), m < k → ∀ {ζ : K}, IsPrimitiveRoot ζ m → cyclotomic' m K ∈ lifts (Int.castRingHom K)
ζ : K
h : IsPrimitiveRoot ζ k
hpos : k > 0
B : K[X] := ∏ i in Nat.properDivisors k, cyclotomic' i K
Bmo : Monic B
B₁ : ℤ[X]
hB₁ : map (Int.castRingHom K) B₁ = B
left✝ : degree B₁ = degree B
hB₁mo : Monic B₁
Q₁ : ℤ[X] := (X ^ k - 1) /ₘ B₁
⊢ degree 0 < degree B