Theorem: Associates.dvd_of_mem_factors
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: by_cases ha0 : a = 0
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : Associates α
hp : Irreducible p
hm : p ∈ factors a
⊢ p ∣ a

tactic: obtain ⟨a0, nza, ha'⟩ := exists_non_zero_rep ha0
state_before: case neg
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : Associates α
hp : Irreducible p
hm : p ∈ factors a
ha0 : ¬a = 0
⊢ p ∣ a

tactic: rw [← Associates.factors_prod a]
state_before: case neg.intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : Associates α
hp : Irreducible p
hm : p ∈ factors a
ha0 : ¬a = 0
a0 : α
nza : a0 ≠ 0
ha' : Associates.mk a0 = a
⊢ p ∣ a

tactic: rw [← ha', factors_mk a0 nza] at hm⊢
state_before: case neg.intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : Associates α
hp : Irreducible p
hm : p ∈ factors a
ha0 : ¬a = 0
a0 : α
nza : a0 ≠ 0
ha' : Associates.mk a0 = a
⊢ p ∣ FactorSet.prod (factors a)

tactic: rw [prod_coe]
state_before: case neg.intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : Associates α
hp : Irreducible p
ha0 : ¬a = 0
a0 : α
hm : p ∈ ↑(factors' a0)
nza : a0 ≠ 0
ha' : Associates.mk a0 = a
⊢ p ∣ FactorSet.prod ↑(factors' a0)

tactic: apply Multiset.dvd_prod
state_before: case neg.intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : Associates α
hp : Irreducible p
ha0 : ¬a = 0
a0 : α
hm : p ∈ ↑(factors' a0)
nza : a0 ≠ 0
ha' : Associates.mk a0 = a
⊢ p ∣ prod (map Subtype.val (factors' a0))

tactic: apply Multiset.mem_map.mpr
state_before: case neg.intro.intro.a
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : Associates α
hp : Irreducible p
ha0 : ¬a = 0
a0 : α
hm : p ∈ ↑(factors' a0)
nza : a0 ≠ 0
ha' : Associates.mk a0 = a
⊢ p ∈ map Subtype.val (factors' a0)

tactic: exact ⟨⟨p, hp⟩, mem_factorSet_some.mp hm, rfl⟩
state_before: case neg.intro.intro.a
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : Associates α
hp : Irreducible p
ha0 : ¬a = 0
a0 : α
hm : p ∈ ↑(factors' a0)
nza : a0 ≠ 0
ha' : Associates.mk a0 = a
⊢ ∃ a, a ∈ factors' a0 ∧ ↑a = p

tactic: rw [ha0]
state_before: case pos
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : Associates α
hp : Irreducible p
hm : p ∈ factors a
ha0 : a = 0
⊢ p ∣ a

tactic: exact dvd_zero p
state_before: case pos
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a p : Associates α
hp : Irreducible p
hm : p ∈ factors a
ha0 : a = 0
⊢ p ∣ 0