Theorem: multiplicity.pow'
File: Mathlib/RingTheory/Multiplicity.lean

tactic: intro k
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a : α
hp : Prime p
ha : Finite p a
⊢ ∀ {k : ℕ}, (multiplicity p (a ^ k)).get ⋯ = k * (multiplicity p a).get ha
state_after: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a : α
hp : Prime p
ha : Finite p a
k : ℕ
⊢ (multiplicity p (a ^ k)).get ⋯ = k * (multiplicity p a).get ha

tactic: induction' k with k hk
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a : α
hp : Prime p
ha : Finite p a
k : ℕ
⊢ (multiplicity p (a ^ k)).get ⋯ = k * (multiplicity p a).get ha
state_after: case zero
α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a : α
hp : Prime p
ha : Finite p a
⊢ (multiplicity p (a ^ 0)).get ⋯ = 0 * (multiplicity p a).get ha

case succ
α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a : α
hp : Prime p
ha : Finite p a
k : ℕ
hk : (multiplicity p (a ^ k)).get ⋯ = k * (multiplicity p a).get ha
⊢ (multiplicity p (a ^ (k + 1))).get ⋯ = (k + 1) * (multiplicity p a).get ha

tactic: simp [one_right hp.not_unit]
state_before: case zero
α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a : α
hp : Prime p
ha : Finite p a
⊢ (multiplicity p (a ^ 0)).get ⋯ = 0 * (multiplicity p a).get ha
state_after: no goals

tactic: have : multiplicity p (a ^ (k + 1)) = multiplicity p (a * a ^ k) := by rw [_root_.pow_succ']
state_before: case succ
α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a : α
hp : Prime p
ha : Finite p a
k : ℕ
hk : (multiplicity p (a ^ k)).get ⋯ = k * (multiplicity p a).get ha
⊢ (multiplicity p (a ^ (k + 1))).get ⋯ = (k + 1) * (multiplicity p a).get ha
state_after: case succ
α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a : α
hp : Prime p
ha : Finite p a
k : ℕ
hk : (multiplicity p (a ^ k)).get ⋯ = k * (multiplicity p a).get ha
this : multiplicity p (a ^ (k + 1)) = multiplicity p (a * a ^ k)
⊢ (multiplicity p (a ^ (k + 1))).get ⋯ = (k + 1) * (multiplicity p a).get ha

tactic: rw [get_eq_get_of_eq _ _ this,
  multiplicity.mul' hp, hk, add_mul, one_mul, add_comm]
state_before: case succ
α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a : α
hp : Prime p
ha : Finite p a
k : ℕ
hk : (multiplicity p (a ^ k)).get ⋯ = k * (multiplicity p a).get ha
this : multiplicity p (a ^ (k + 1)) = multiplicity p (a * a ^ k)
⊢ (multiplicity p (a ^ (k + 1))).get ⋯ = (k + 1) * (multiplicity p a).get ha
state_after: no goals

tactic: rw [_root_.pow_succ']
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a : α
hp : Prime p
ha : Finite p a
k : ℕ
hk : (multiplicity p (a ^ k)).get ⋯ = k * (multiplicity p a).get ha
⊢ multiplicity p (a ^ (k + 1)) = multiplicity p (a * a ^ k)
state_after: no goals