Theorem: Nat.mul_divisors_filter_prime_pow
File: Mathlib/Data/Nat/Factorization/PrimePow.lean

tactic: rcases eq_or_ne a 0 with (rfl | ha)
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k a b : ℕ
hab : a.Coprime b
⊢ Finset.filter IsPrimePow (a * b).divisors = Finset.filter IsPrimePow (a.divisors ∪ b.divisors)
state_after: case inl
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k b : ℕ
hab : Coprime 0 b
⊢ Finset.filter IsPrimePow (0 * b).divisors = Finset.filter IsPrimePow (divisors 0 ∪ b.divisors)

case inr
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k a b : ℕ
hab : a.Coprime b
ha : a ≠ 0
⊢ Finset.filter IsPrimePow (a * b).divisors = Finset.filter IsPrimePow (a.divisors ∪ b.divisors)

tactic: rcases eq_or_ne b 0 with (rfl | hb)
state_before: case inr
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k a b : ℕ
hab : a.Coprime b
ha : a ≠ 0
⊢ Finset.filter IsPrimePow (a * b).divisors = Finset.filter IsPrimePow (a.divisors ∪ b.divisors)
state_after: case inr.inl
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k a : ℕ
ha : a ≠ 0
hab : a.Coprime 0
⊢ Finset.filter IsPrimePow (a * 0).divisors = Finset.filter IsPrimePow (a.divisors ∪ divisors 0)

case inr.inr
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k a b : ℕ
hab : a.Coprime b
ha : a ≠ 0
hb : b ≠ 0
⊢ Finset.filter IsPrimePow (a * b).divisors = Finset.filter IsPrimePow (a.divisors ∪ b.divisors)

tactic: ext n
state_before: case inr.inr
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k a b : ℕ
hab : a.Coprime b
ha : a ≠ 0
hb : b ≠ 0
⊢ Finset.filter IsPrimePow (a * b).divisors = Finset.filter IsPrimePow (a.divisors ∪ b.divisors)
state_after: case inr.inr.a
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k a b : ℕ
hab : a.Coprime b
ha : a ≠ 0
hb : b ≠ 0
n : ℕ
⊢ n ∈ Finset.filter IsPrimePow (a * b).divisors ↔ n ∈ Finset.filter IsPrimePow (a.divisors ∪ b.divisors)

tactic: simp only [ha, hb, Finset.mem_union, Finset.mem_filter, Nat.mul_eq_zero, and_true_iff, Ne,
  and_congr_left_iff, not_false_iff, Nat.mem_divisors, or_self_iff]
state_before: case inr.inr.a
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k a b : ℕ
hab : a.Coprime b
ha : a ≠ 0
hb : b ≠ 0
n : ℕ
⊢ n ∈ Finset.filter IsPrimePow (a * b).divisors ↔ n ∈ Finset.filter IsPrimePow (a.divisors ∪ b.divisors)
state_after: case inr.inr.a
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k a b : ℕ
hab : a.Coprime b
ha : a ≠ 0
hb : b ≠ 0
n : ℕ
⊢ IsPrimePow n → (n ∣ a * b ↔ n ∣ a ∨ n ∣ b)

tactic: apply hab.isPrimePow_dvd_mul
state_before: case inr.inr.a
R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k a b : ℕ
hab : a.Coprime b
ha : a ≠ 0
hb : b ≠ 0
n : ℕ
⊢ IsPrimePow n → (n ∣ a * b ↔ n ∣ a ∨ n ∣ b)
state_after: no goals

tactic: simp only [Nat.coprime_zero_left] at hab
state_before: case inl
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k b : ℕ
hab : Coprime 0 b
⊢ Finset.filter IsPrimePow (0 * b).divisors = Finset.filter IsPrimePow (divisors 0 ∪ b.divisors)
state_after: case inl
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k b : ℕ
hab : b = 1
⊢ Finset.filter IsPrimePow (0 * b).divisors = Finset.filter IsPrimePow (divisors 0 ∪ b.divisors)

tactic: simp [hab, Finset.filter_singleton, not_isPrimePow_one]
state_before: case inl
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k b : ℕ
hab : b = 1
⊢ Finset.filter IsPrimePow (0 * b).divisors = Finset.filter IsPrimePow (divisors 0 ∪ b.divisors)
state_after: no goals

tactic: simp only [Nat.coprime_zero_right] at hab
state_before: case inr.inl
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k a : ℕ
ha : a ≠ 0
hab : a.Coprime 0
⊢ Finset.filter IsPrimePow (a * 0).divisors = Finset.filter IsPrimePow (a.divisors ∪ divisors 0)
state_after: case inr.inl
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k a : ℕ
ha : a ≠ 0
hab : a = 1
⊢ Finset.filter IsPrimePow (a * 0).divisors = Finset.filter IsPrimePow (a.divisors ∪ divisors 0)

tactic: simp [hab, Finset.filter_singleton, not_isPrimePow_one]
state_before: case inr.inl
R : Type u_1
inst✝ : CommMonoidWithZero R
n p : R
k a : ℕ
ha : a ≠ 0
hab : a = 1
⊢ Finset.filter IsPrimePow (a * 0).divisors = Finset.filter IsPrimePow (a.divisors ∪ divisors 0)
state_after: no goals