Theorem: Polynomial.X_pow_sub_one_mul_cyclotomic_dvd_X_pow_sub_one_of_dvd
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
⊢ (X ^ d - 1) * cyclotomic n R ∣ X ^ n - 1
state_after: R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ (X ^ d - 1) * cyclotomic n R ∣ X ^ n - 1
tactic: have hdn := (Nat.mem_properDivisors.mp h).2
state_before: R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ (X ^ d - 1) * cyclotomic n R ∣ X ^ n - 1
state_after: case h
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ X ^ n - 1 = (X ^ d - 1) * cyclotomic n R * ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R
tactic: use ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R
state_before: case h
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ X ^ n - 1 = (X ^ d - 1) * cyclotomic n R * ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R
state_after: case h
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ (X ^ d - 1) * cyclotomic n R * ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R = X ^ n - 1
tactic: symm
state_before: case h
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ (X ^ d - 1) * cyclotomic n R * ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R = X ^ n - 1
state_after: case h.e'_2
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ (X ^ d - 1) * cyclotomic n R * ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R =
    (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R
tactic: convert X_pow_sub_one_mul_prod_cyclotomic_eq_X_pow_sub_one_of_dvd R h using 1
state_before: case h.e'_2
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ (X ^ d - 1) * cyclotomic n R * ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R =
    (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R
state_after: case h.e'_2
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ (X ^ d - 1) * (cyclotomic n R * ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R) =
    (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R
tactic: rw [mul_assoc]
state_before: case h.e'_2
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ (X ^ d - 1) * (cyclotomic n R * ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R) =
    (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R
state_after: case h.e'_2.e_a
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ cyclotomic n R * ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R = ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R
tactic: congr 1
state_before: case h.e'_2.e_a
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ cyclotomic n R * ∏ x ∈ n.properDivisors \ d.divisors, cyclotomic x R = ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R
state_after: case h.e'_2.e_a
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ n ∉ n.properDivisors \ d.divisors

case h.e'_2.e_a.h
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hdn : d < n
⊢ n ∉ d.divisors
tactic: rw [← Nat.insert_self_properDivisors hdn.ne_bot, insert_sdiff_of_not_mem, prod_insert]