R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
⊢ cyclotomic n R = (X ^ n - 1) /ₘ ∏ i in Nat.properDivisors n, cyclotomic i R
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
⊢ cyclotomic n R = (X ^ n - 1) /ₘ ∏ i in Nat.properDivisors n, cyclotomic i R
nontriviality R
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
⊢ cyclotomic n R =
    (cyclotomic n R * ∏ x in Nat.properDivisors n, cyclotomic x R) /ₘ ∏ i in Nat.properDivisors n, cyclotomic i R
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
⊢ cyclotomic n R = (X ^ n - 1) /ₘ ∏ i in Nat.properDivisors n, cyclotomic i R
rw [← prod_cyclotomic_eq_X_pow_sub_one hpos, ← Nat.cons_self_properDivisors hpos.ne',
  Finset.prod_cons]
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ cyclotomic n R =
    (cyclotomic n R * ∏ x in Nat.properDivisors n, cyclotomic x R) /ₘ ∏ i in Nat.properDivisors n, cyclotomic i R
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
⊢ cyclotomic n R =
    (cyclotomic n R * ∏ x in Nat.properDivisors n, cyclotomic x R) /ₘ ∏ i in Nat.properDivisors n, cyclotomic i R
have prod_monic : (∏ i in Nat.properDivisors n, cyclotomic i R).Monic := by
  apply monic_prod_of_monic
  intro i _
  exact cyclotomic.monic i R
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ 0 + (∏ i in Nat.properDivisors n, cyclotomic i R) * cyclotomic n R =
      cyclotomic n R * ∏ x in Nat.properDivisors n, cyclotomic x R ∧
    degree 0 < degree (∏ i in Nat.properDivisors n, cyclotomic i R)
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ cyclotomic n R =
    (cyclotomic n R * ∏ x in Nat.properDivisors n, cyclotomic x R) /ₘ ∏ i in Nat.properDivisors n, cyclotomic i R
rw [(div_modByMonic_unique (cyclotomic n R) 0 prod_monic _).1]
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ (∏ i in Nat.properDivisors n, cyclotomic i R) * cyclotomic n R =
      cyclotomic n R * ∏ i in Nat.properDivisors n, cyclotomic i R ∧
    ⊥ < degree (∏ i in Nat.properDivisors n, cyclotomic i R)
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ 0 + (∏ i in Nat.properDivisors n, cyclotomic i R) * cyclotomic n R =
      cyclotomic n R * ∏ x in Nat.properDivisors n, cyclotomic x R ∧
    degree 0 < degree (∏ i in Nat.properDivisors n, cyclotomic i R)
simp only [degree_zero, zero_add]
case left
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ (∏ i in Nat.properDivisors n, cyclotomic i R) * cyclotomic n R =
    cyclotomic n R * ∏ i in Nat.properDivisors n, cyclotomic i R

case right
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ ⊥ < degree (∏ i in Nat.properDivisors n, cyclotomic i R)
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ (∏ i in Nat.properDivisors n, cyclotomic i R) * cyclotomic n R =
      cyclotomic n R * ∏ i in Nat.properDivisors n, cyclotomic i R ∧
    ⊥ < degree (∏ i in Nat.properDivisors n, cyclotomic i R)
constructor
case right
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ degree (∏ i in Nat.properDivisors n, cyclotomic i R) ≠ ⊥
case right
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ ⊥ < degree (∏ i in Nat.properDivisors n, cyclotomic i R)
rw [bot_lt_iff_ne_bot]
case right
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
h : degree (∏ i in Nat.properDivisors n, cyclotomic i R) = ⊥
⊢ False
case right
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ degree (∏ i in Nat.properDivisors n, cyclotomic i R) ≠ ⊥
intro h
no goals
case right
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
h : degree (∏ i in Nat.properDivisors n, cyclotomic i R) = ⊥
⊢ False
exact Monic.ne_zero prod_monic (degree_eq_bot.1 h)
case hs
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
⊢ ∀ (i : ℕ), i ∈ Nat.properDivisors n → Monic (cyclotomic i R)
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
⊢ Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
apply monic_prod_of_monic
case hs
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
i : ℕ
a✝ : i ∈ Nat.properDivisors n
⊢ Monic (cyclotomic i R)
case hs
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
⊢ ∀ (i : ℕ), i ∈ Nat.properDivisors n → Monic (cyclotomic i R)
intro i _
no goals
case hs
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
i : ℕ
a✝ : i ∈ Nat.properDivisors n
⊢ Monic (cyclotomic i R)
exact cyclotomic.monic i R
no goals
case left
R : Type u_1
inst✝ : CommRing R
n : ℕ
hpos : 0 < n
✝ : Nontrivial R
prod_monic : Monic (∏ i in Nat.properDivisors n, cyclotomic i R)
⊢ (∏ i in Nat.properDivisors n, cyclotomic i R) * cyclotomic n R =
    cyclotomic n R * ∏ i in Nat.properDivisors n, cyclotomic i R
rw [mul_comm]