Theorem: Nat.divisors_filter_squarefree
File: Mathlib/Data/Nat/Squarefree.lean

tactic: rw [(Finset.nodup _).ext ((Finset.nodup _).map_on _)]
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
⊢ (filter Squarefree n.divisors).val = Multiset.map (fun x => x.val.prod) (normalizedFactors n).toFinset.powerset.val
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
⊢ ∀ (a : ℕ),
    a ∈ (filter Squarefree n.divisors).val ↔
      a ∈ Multiset.map (fun x => x.val.prod) (normalizedFactors n).toFinset.powerset.val

s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
⊢ ∀ x ∈ (normalizedFactors n).toFinset.powerset.val,
    ∀ y ∈ (normalizedFactors n).toFinset.powerset.val, x.val.prod = y.val.prod → x = y

tactic: intro a
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
⊢ ∀ (a : ℕ),
    a ∈ (filter Squarefree n.divisors).val ↔
      a ∈ Multiset.map (fun x => x.val.prod) (normalizedFactors n).toFinset.powerset.val
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
a : ℕ
⊢ a ∈ (filter Squarefree n.divisors).val ↔
    a ∈ Multiset.map (fun x => x.val.prod) (normalizedFactors n).toFinset.powerset.val

tactic: simp only [Multiset.mem_filter, id, Multiset.mem_map, Finset.filter_val, ← Finset.mem_def,
  mem_divisors]
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
a : ℕ
⊢ a ∈ (filter Squarefree n.divisors).val ↔
    a ∈ Multiset.map (fun x => x.val.prod) (normalizedFactors n).toFinset.powerset.val
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
a : ℕ
⊢ (a ∣ n ∧ n ≠ 0) ∧ Squarefree a ↔ ∃ a_1 ∈ (normalizedFactors n).toFinset.powerset, a_1.val.prod = a

tactic: constructor
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
a : ℕ
⊢ (a ∣ n ∧ n ≠ 0) ∧ Squarefree a ↔ ∃ a_1 ∈ (normalizedFactors n).toFinset.powerset, a_1.val.prod = a
state_after: case mp
s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
a : ℕ
⊢ (a ∣ n ∧ n ≠ 0) ∧ Squarefree a → ∃ a_2 ∈ (normalizedFactors n).toFinset.powerset, a_2.val.prod = a

case mpr
s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
a : ℕ
⊢ (∃ a_1 ∈ (normalizedFactors n).toFinset.powerset, a_1.val.prod = a) → (a ∣ n ∧ n ≠ 0) ∧ Squarefree a

tactic: rintro ⟨⟨an, h0⟩, hsq⟩
state_before: case mp
s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
a : ℕ
⊢ (a ∣ n ∧ n ≠ 0) ∧ Squarefree a → ∃ a_2 ∈ (normalizedFactors n).toFinset.powerset, a_2.val.prod = a
state_after: case mp.intro.intro
s : Finset ℕ
m n✝ p n : ℕ
h0✝ : n ≠ 0
a : ℕ
hsq : Squarefree a
an : a ∣ n
h0 : n ≠ 0
⊢ ∃ a_1 ∈ (normalizedFactors n).toFinset.powerset, a_1.val.prod = a

tactic: use (UniqueFactorizationMonoid.normalizedFactors a).toFinset
state_before: case mp.intro.intro
s : Finset ℕ
m n✝ p n : ℕ
h0✝ : n ≠ 0
a : ℕ
hsq : Squarefree a
an : a ∣ n
h0 : n ≠ 0
⊢ ∃ a_1 ∈ (normalizedFactors n).toFinset.powerset, a_1.val.prod = a
state_after: case h
s : Finset ℕ
m n✝ p n : ℕ
h0✝ : n ≠ 0
a : ℕ
hsq : Squarefree a
an : a ∣ n
h0 : n ≠ 0
⊢ (normalizedFactors a).toFinset ∈ (normalizedFactors n).toFinset.powerset ∧ (normalizedFactors a).toFinset.val.prod = a

tactic: simp only [id, Finset.mem_powerset]
state_before: case h
s : Finset ℕ
m n✝ p n : ℕ
h0✝ : n ≠ 0
a : ℕ
hsq : Squarefree a
an : a ∣ n
h0 : n ≠ 0
⊢ (normalizedFactors a).toFinset ∈ (normalizedFactors n).toFinset.powerset ∧ (normalizedFactors a).toFinset.val.prod = a
state_after: case h
s : Finset ℕ
m n✝ p n : ℕ
h0✝ : n ≠ 0
a : ℕ
hsq : Squarefree a
an : a ∣ n
h0 : n ≠ 0
⊢ (normalizedFactors a).toFinset ⊆ (normalizedFactors n).toFinset ∧ (normalizedFactors a).toFinset.val.prod = a

tactic: rcases an with ⟨b, rfl⟩
state_before: case h
s : Finset ℕ
m n✝ p n : ℕ
h0✝ : n ≠ 0
a : ℕ
hsq : Squarefree a
an : a ∣ n
h0 : n ≠ 0
⊢ (normalizedFactors a).toFinset ⊆ (normalizedFactors n).toFinset ∧ (normalizedFactors a).toFinset.val.prod = a
state_after: case h.intro
s : Finset ℕ
m n p a : ℕ
hsq : Squarefree a
b : ℕ
h0✝ h0 : a * b ≠ 0
⊢ (normalizedFactors a).toFinset ⊆ (normalizedFactors (a * b)).toFinset ∧ (normalizedFactors a).toFinset.val.prod = a

tactic: rw [mul_ne_zero_iff] at h0
state_before: case h.intro
s : Finset ℕ
m n p a : ℕ
hsq : Squarefree a
b : ℕ
h0✝ h0 : a * b ≠ 0
⊢ (normalizedFactors a).toFinset ⊆ (normalizedFactors (a * b)).toFinset ∧ (normalizedFactors a).toFinset.val.prod = a
state_after: case h.intro
s : Finset ℕ
m n p a : ℕ
hsq : Squarefree a
b : ℕ
h0✝ : a * b ≠ 0
h0 : a ≠ 0 ∧ b ≠ 0
⊢ (normalizedFactors a).toFinset ⊆ (normalizedFactors (a * b)).toFinset ∧ (normalizedFactors a).toFinset.val.prod = a

tactic: rw [UniqueFactorizationMonoid.squarefree_iff_nodup_normalizedFactors h0.1] at hsq
state_before: case h.intro
s : Finset ℕ
m n p a : ℕ
hsq : Squarefree a
b : ℕ
h0✝ : a * b ≠ 0
h0 : a ≠ 0 ∧ b ≠ 0
⊢ (normalizedFactors a).toFinset ⊆ (normalizedFactors (a * b)).toFinset ∧ (normalizedFactors a).toFinset.val.prod = a
state_after: case h.intro
s : Finset ℕ
m n p a : ℕ
hsq : (normalizedFactors a).Nodup
b : ℕ
h0✝ : a * b ≠ 0
h0 : a ≠ 0 ∧ b ≠ 0
⊢ (normalizedFactors a).toFinset ⊆ (normalizedFactors (a * b)).toFinset ∧ (normalizedFactors a).toFinset.val.prod = a

tactic: rw [Multiset.toFinset_subset, Multiset.toFinset_val, hsq.dedup, ← associated_iff_eq,
  normalizedFactors_mul h0.1 h0.2]
state_before: case h.intro
s : Finset ℕ
m n p a : ℕ
hsq : (normalizedFactors a).Nodup
b : ℕ
h0✝ : a * b ≠ 0
h0 : a ≠ 0 ∧ b ≠ 0
⊢ (normalizedFactors a).toFinset ⊆ (normalizedFactors (a * b)).toFinset ∧ (normalizedFactors a).toFinset.val.prod = a
state_after: case h.intro
s : Finset ℕ
m n p a : ℕ
hsq : (normalizedFactors a).Nodup
b : ℕ
h0✝ : a * b ≠ 0
h0 : a ≠ 0 ∧ b ≠ 0
⊢ normalizedFactors a ⊆ normalizedFactors a + normalizedFactors b ∧ Associated (normalizedFactors a).prod a

tactic: exact ⟨Multiset.subset_of_le (Multiset.le_add_right _ _), normalizedFactors_prod h0.1⟩
state_before: case h.intro
s : Finset ℕ
m n p a : ℕ
hsq : (normalizedFactors a).Nodup
b : ℕ
h0✝ : a * b ≠ 0
h0 : a ≠ 0 ∧ b ≠ 0
⊢ normalizedFactors a ⊆ normalizedFactors a + normalizedFactors b ∧ Associated (normalizedFactors a).prod a
state_after: no goals

tactic: rintro ⟨s, hs, rfl⟩
state_before: case mpr
s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
a : ℕ
⊢ (∃ a_1 ∈ (normalizedFactors n).toFinset.powerset, a_1.val.prod = a) → (a ∣ n ∧ n ≠ 0) ∧ Squarefree a
state_after: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s ∈ (normalizedFactors n).toFinset.powerset
⊢ (s.val.prod ∣ n ∧ n ≠ 0) ∧ Squarefree s.val.prod

tactic: rw [Finset.mem_powerset, ← Finset.val_le_iff, Multiset.toFinset_val] at hs
state_before: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s ∈ (normalizedFactors n).toFinset.powerset
⊢ (s.val.prod ∣ n ∧ n ≠ 0) ∧ Squarefree s.val.prod
state_after: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
⊢ (s.val.prod ∣ n ∧ n ≠ 0) ∧ Squarefree s.val.prod

tactic: have hs0 : s.val.prod ≠ 0 := by
  rw [Ne, Multiset.prod_eq_zero_iff]
  intro con
  apply
    not_irreducible_zero
      (irreducible_of_normalized_factor 0 (Multiset.mem_dedup.1 (Multiset.mem_of_le hs con)))
state_before: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
⊢ (s.val.prod ∣ n ∧ n ≠ 0) ∧ Squarefree s.val.prod
state_after: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
⊢ (s.val.prod ∣ n ∧ n ≠ 0) ∧ Squarefree s.val.prod

tactic: rw [(normalizedFactors_prod h0).symm.dvd_iff_dvd_right]
state_before: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
⊢ (s.val.prod ∣ n ∧ n ≠ 0) ∧ Squarefree s.val.prod
state_after: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
⊢ (s.val.prod ∣ (normalizedFactors n).prod ∧ n ≠ 0) ∧ Squarefree s.val.prod

tactic: refine ⟨⟨Multiset.prod_dvd_prod_of_le (le_trans hs (Multiset.dedup_le _)), h0⟩, ?_⟩
state_before: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
⊢ (s.val.prod ∣ (normalizedFactors n).prod ∧ n ≠ 0) ∧ Squarefree s.val.prod
state_after: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
⊢ Squarefree s.val.prod

tactic: have h :=
  UniqueFactorizationMonoid.factors_unique irreducible_of_normalized_factor
    (fun x hx =>
      irreducible_of_normalized_factor x
        (Multiset.mem_of_le (le_trans hs (Multiset.dedup_le _)) hx))
    (normalizedFactors_prod hs0)
state_before: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
⊢ Squarefree s.val.prod
state_after: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
h : Multiset.Rel Associated (normalizedFactors s.val.prod) s.val
⊢ Squarefree s.val.prod

tactic: rw [associated_eq_eq, Multiset.rel_eq] at h
state_before: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
h : Multiset.Rel Associated (normalizedFactors s.val.prod) s.val
⊢ Squarefree s.val.prod
state_after: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
h : normalizedFactors s.val.prod = s.val
⊢ Squarefree s.val.prod

tactic: rw [UniqueFactorizationMonoid.squarefree_iff_nodup_normalizedFactors hs0, h]
state_before: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
h : normalizedFactors s.val.prod = s.val
⊢ Squarefree s.val.prod
state_after: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
h : normalizedFactors s.val.prod = s.val
⊢ s.val.Nodup

tactic: apply s.nodup
state_before: case mpr.intro.intro
s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
hs0 : s.val.prod ≠ 0
h : normalizedFactors s.val.prod = s.val
⊢ s.val.Nodup
state_after: no goals

tactic: rw [Ne, Multiset.prod_eq_zero_iff]
state_before: s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
⊢ s.val.prod ≠ 0
state_after: s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
⊢ 0 ∉ s.val

tactic: intro con
state_before: s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
⊢ 0 ∉ s.val
state_after: s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
con : 0 ∈ s.val
⊢ False

tactic: apply
  not_irreducible_zero
    (irreducible_of_normalized_factor 0 (Multiset.mem_dedup.1 (Multiset.mem_of_le hs con)))
state_before: s✝ : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
s : Finset ℕ
hs : s.val ≤ (normalizedFactors n).dedup
con : 0 ∈ s.val
⊢ False
state_after: no goals

tactic: intro x hx y hy h
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
⊢ ∀ x ∈ (normalizedFactors n).toFinset.powerset.val,
    ∀ y ∈ (normalizedFactors n).toFinset.powerset.val, x.val.prod = y.val.prod → x = y
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ∈ (normalizedFactors n).toFinset.powerset.val
y : Finset ℕ
hy : y ∈ (normalizedFactors n).toFinset.powerset.val
h : x.val.prod = y.val.prod
⊢ x = y

tactic: rw [← Finset.val_inj, ← Multiset.rel_eq, ← associated_eq_eq]
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ∈ (normalizedFactors n).toFinset.powerset.val
y : Finset ℕ
hy : y ∈ (normalizedFactors n).toFinset.powerset.val
h : x.val.prod = y.val.prod
⊢ x = y
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ∈ (normalizedFactors n).toFinset.powerset.val
y : Finset ℕ
hy : y ∈ (normalizedFactors n).toFinset.powerset.val
h : x.val.prod = y.val.prod
⊢ Multiset.Rel (fun x x_1 => Associated x x_1) x.val y.val

tactic: rw [← Finset.mem_def, Finset.mem_powerset] at hx hy
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ∈ (normalizedFactors n).toFinset.powerset.val
y : Finset ℕ
hy : y ∈ (normalizedFactors n).toFinset.powerset.val
h : x.val.prod = y.val.prod
⊢ Multiset.Rel (fun x x_1 => Associated x x_1) x.val y.val
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
⊢ Multiset.Rel (fun x x_1 => Associated x x_1) x.val y.val

tactic: apply UniqueFactorizationMonoid.factors_unique _ _ (associated_iff_eq.2 h)
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
⊢ Multiset.Rel (fun x x_1 => Associated x x_1) x.val y.val
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
⊢ ∀ x_1 ∈ x.val, Irreducible x_1

s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
⊢ ∀ x ∈ y.val, Irreducible x

tactic: intro z hz
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
⊢ ∀ x_1 ∈ x.val, Irreducible x_1
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ x.val
⊢ Irreducible z

tactic: apply irreducible_of_normalized_factor z
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ x.val
⊢ Irreducible z
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ x.val
⊢ z ∈ normalizedFactors ?m.125808

s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ x.val
⊢ ℕ

tactic: rw [← Multiset.mem_toFinset]
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ x.val
⊢ z ∈ normalizedFactors ?m.125808
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ x.val
⊢ z ∈ (normalizedFactors ?m.125808).toFinset

s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ x.val
⊢ ℕ

tactic: apply hx hz
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ x.val
⊢ z ∈ (normalizedFactors ?m.125808).toFinset

s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ x.val
⊢ ℕ
state_after: no goals

tactic: intro z hz
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
⊢ ∀ x ∈ y.val, Irreducible x
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ y.val
⊢ Irreducible z

tactic: apply irreducible_of_normalized_factor z
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ y.val
⊢ Irreducible z
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ y.val
⊢ z ∈ normalizedFactors ?m.126013

s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ y.val
⊢ ℕ

tactic: rw [← Multiset.mem_toFinset]
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ y.val
⊢ z ∈ normalizedFactors ?m.126013
state_after: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ y.val
⊢ z ∈ (normalizedFactors ?m.126013).toFinset

s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ y.val
⊢ ℕ

tactic: apply hy hz
state_before: s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ y.val
⊢ z ∈ (normalizedFactors ?m.126013).toFinset

s : Finset ℕ
m n✝ p n : ℕ
h0 : n ≠ 0
x : Finset ℕ
hx : x ⊆ (normalizedFactors n).toFinset
y : Finset ℕ
hy : y ⊆ (normalizedFactors n).toFinset
h : x.val.prod = y.val.prod
z : ℕ
hz : z ∈ y.val
⊢ ℕ
state_after: no goals