Theorem: UniqueFactorizationMonoid.mem_normalizedFactors_iff
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: constructor
state_before: α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
⊢ p ∈ normalizedFactors x ↔ Prime p ∧ p ∣ x
state_after: case mp
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
⊢ p ∈ normalizedFactors x → Prime p ∧ p ∣ x

case mpr
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
⊢ Prime p ∧ p ∣ x → p ∈ normalizedFactors x

tactic: intro h
state_before: case mp
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
⊢ p ∈ normalizedFactors x → Prime p ∧ p ∣ x
state_after: case mp
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
h : p ∈ normalizedFactors x
⊢ Prime p ∧ p ∣ x

tactic: exact ⟨prime_of_normalized_factor p h, dvd_of_mem_normalizedFactors h⟩
state_before: case mp
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
h : p ∈ normalizedFactors x
⊢ Prime p ∧ p ∣ x
state_after: no goals

tactic: rintro ⟨hprime, hdvd⟩
state_before: case mpr
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
⊢ Prime p ∧ p ∣ x → p ∈ normalizedFactors x
state_after: case mpr.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
hprime : Prime p
hdvd : p ∣ x
⊢ p ∈ normalizedFactors x

tactic: obtain ⟨q, hqmem, hqeq⟩ := exists_mem_normalizedFactors_of_dvd hx hprime.irreducible hdvd
state_before: case mpr.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
hprime : Prime p
hdvd : p ∣ x
⊢ p ∈ normalizedFactors x
state_after: case mpr.intro.intro.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
hprime : Prime p
hdvd : p ∣ x
q : α
hqmem : q ∈ normalizedFactors x
hqeq : p ~ᵤ q
⊢ p ∈ normalizedFactors x

tactic: rw [associated_iff_eq] at hqeq
state_before: case mpr.intro.intro.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
hprime : Prime p
hdvd : p ∣ x
q : α
hqmem : q ∈ normalizedFactors x
hqeq : p ~ᵤ q
⊢ p ∈ normalizedFactors x
state_after: case mpr.intro.intro.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
hprime : Prime p
hdvd : p ∣ x
q : α
hqmem : q ∈ normalizedFactors x
hqeq : p = q
⊢ p ∈ normalizedFactors x

tactic: exact hqeq ▸ hqmem
state_before: case mpr.intro.intro.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : NormalizationMonoid α
inst✝¹ : UniqueFactorizationMonoid α
inst✝ : Unique αˣ
p x : α
hx : x ≠ 0
hprime : Prime p
hdvd : p ∣ x
q : α
hqmem : q ∈ normalizedFactors x
hqeq : p = q
⊢ p ∈ normalizedFactors x
state_after: no goals