Theorem: Nat.multiplicative_factorization'
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: apply Nat.recOnPosPrimePosCoprime
state_before: β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
⊢ ∀ {n : ℕ}, f n = Finsupp.prod (factorization n) fun p k => f (p ^ k)

tactic: rintro p k hp -
state_before: case hp
β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
⊢ ∀ (p n : ℕ), Prime p → 0 < n → f (p ^ n) = Finsupp.prod (factorization (p ^ n)) fun p k => f (p ^ k)

tactic: simp only [hp.factorization_pow]
state_before: case hp
β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
p k : ℕ
hp : Prime p
⊢ f (p ^ k) = Finsupp.prod (factorization (p ^ k)) fun p k => f (p ^ k)

tactic: rw [prod_single_index _]
state_before: case hp
β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
p k : ℕ
hp : Prime p
⊢ f (p ^ k) = Finsupp.prod (single p k) fun p k => f (p ^ k)

tactic: simp [hf1]
state_before: β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
p k : ℕ
hp : Prime p
⊢ f (p ^ 0) = 1

tactic: simp [hf0]
state_before: case h0
β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
⊢ f 0 = Finsupp.prod (factorization 0) fun p k => f (p ^ k)

tactic: rw [factorization_one, hf1]
state_before: case h1
β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
⊢ f 1 = Finsupp.prod (factorization 1) fun p k => f (p ^ k)

tactic: simp
state_before: case h1
β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
⊢ 1 = Finsupp.prod 0 fun p k => f (p ^ k)

tactic: intro a b _ _ hab ha hb
state_before: case h
β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
⊢ ∀ (a b : ℕ),
    1 < a →
      1 < b →
        coprime a b →
          (f a = Finsupp.prod (factorization a) fun p k => f (p ^ k)) →
            (f b = Finsupp.prod (factorization b) fun p k => f (p ^ k)) →
              f (a * b) = Finsupp.prod (factorization (a * b)) fun p k => f (p ^ k)

tactic: rw [h_mult a b hab, ha, hb, factorization_mul_of_coprime hab, ← prod_add_index_of_disjoint]
state_before: case h
β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
a b : ℕ
a✝¹ : 1 < a
a✝ : 1 < b
hab : coprime a b
ha : f a = Finsupp.prod (factorization a) fun p k => f (p ^ k)
hb : f b = Finsupp.prod (factorization b) fun p k => f (p ^ k)
⊢ f (a * b) = Finsupp.prod (factorization (a * b)) fun p k => f (p ^ k)

tactic: exact factorization_disjoint_of_coprime hab
state_before: case h.hd
β : Type u_1
inst✝ : CommMonoid β
f : ℕ → β
h_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y
hf0 : f 0 = 1
hf1 : f 1 = 1
a b : ℕ
a✝¹ : 1 < a
a✝ : 1 < b
hab : coprime a b
ha : f a = Finsupp.prod (factorization a) fun p k => f (p ^ k)
hb : f b = Finsupp.prod (factorization b) fun p k => f (p ^ k)
⊢ _root_.Disjoint (factorization a).support (factorization b).support