Theorem: PNat.factorMultiset_mul
File: Mathlib/Data/PNat/Factors.lean

tactic: let u := factorMultiset n
state_before: n m : ℕ+
⊢ (n * m).factorMultiset = n.factorMultiset + m.factorMultiset
state_after: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
⊢ (n * m).factorMultiset = n.factorMultiset + m.factorMultiset

tactic: let v := factorMultiset m
state_before: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
⊢ (n * m).factorMultiset = n.factorMultiset + m.factorMultiset
state_after: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
⊢ (n * m).factorMultiset = n.factorMultiset + m.factorMultiset

tactic: have : n = u.prod := (prod_factorMultiset n).symm
state_before: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
⊢ (n * m).factorMultiset = n.factorMultiset + m.factorMultiset
state_after: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this : n = u.prod
⊢ (n * m).factorMultiset = n.factorMultiset + m.factorMultiset

tactic: rw [this]
state_before: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this : n = u.prod
⊢ (n * m).factorMultiset = n.factorMultiset + m.factorMultiset
state_after: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this : n = u.prod
⊢ (u.prod * m).factorMultiset = u.prod.factorMultiset + m.factorMultiset

tactic: have : m = v.prod := (prod_factorMultiset m).symm
state_before: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this : n = u.prod
⊢ (u.prod * m).factorMultiset = u.prod.factorMultiset + m.factorMultiset
state_after: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this✝ : n = u.prod
this : m = v.prod
⊢ (u.prod * m).factorMultiset = u.prod.factorMultiset + m.factorMultiset

tactic: rw [this]
state_before: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this✝ : n = u.prod
this : m = v.prod
⊢ (u.prod * m).factorMultiset = u.prod.factorMultiset + m.factorMultiset
state_after: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this✝ : n = u.prod
this : m = v.prod
⊢ (u.prod * v.prod).factorMultiset = u.prod.factorMultiset + v.prod.factorMultiset

tactic: rw [← PrimeMultiset.prod_add]
state_before: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this✝ : n = u.prod
this : m = v.prod
⊢ (u.prod * v.prod).factorMultiset = u.prod.factorMultiset + v.prod.factorMultiset
state_after: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this✝ : n = u.prod
this : m = v.prod
⊢ (u + v).prod.factorMultiset = u.prod.factorMultiset + v.prod.factorMultiset

tactic: repeat' rw [PrimeMultiset.factorMultiset_prod]
state_before: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this✝ : n = u.prod
this : m = v.prod
⊢ (u + v).prod.factorMultiset = u.prod.factorMultiset + v.prod.factorMultiset
state_after: no goals

tactic: rw [PrimeMultiset.factorMultiset_prod]
state_before: n m : ℕ+
u : PrimeMultiset := n.factorMultiset
v : PrimeMultiset := m.factorMultiset
this✝ : n = u.prod
this : m = v.prod
⊢ u + v = u + v.prod.factorMultiset
state_after: no goals