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

tactic: have hdiva : p ^ get (multiplicity p a) ((finite_mul_iff hp).1 h).1 ∣ a := pow_multiplicity_dvd _
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯
state_after: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯

tactic: have hdivb : p ^ get (multiplicity p b) ((finite_mul_iff hp).1 h).2 ∣ b := pow_multiplicity_dvd _
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯
state_after: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯

tactic: have hpoweq :
  p ^ (get (multiplicity p a) ((finite_mul_iff hp).1 h).1 +
        get (multiplicity p b) ((finite_mul_iff hp).1 h).2) =
    p ^ get (multiplicity p a) ((finite_mul_iff hp).1 h).1 *
      p ^ get (multiplicity p b) ((finite_mul_iff hp).1 h).2 := by
  simp [pow_add]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯
state_after: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯

tactic: have hdiv :
  p ^ (get (multiplicity p a) ((finite_mul_iff hp).1 h).1 +
        get (multiplicity p b) ((finite_mul_iff hp).1 h).2) ∣
    a * b := by
  rw [hpoweq]; apply mul_dvd_mul <;> assumption
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯
state_after: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
hdiv : p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) ∣ a * b
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯

tactic: have hsucc :
  ¬p ^ (get (multiplicity p a) ((finite_mul_iff hp).1 h).1 +
            get (multiplicity p b) ((finite_mul_iff hp).1 h).2 +
          1) ∣
      a * b :=
  fun h =>
  not_or_of_not (is_greatest' _ (lt_succ_self _)) (is_greatest' _ (lt_succ_self _))
    (_root_.succ_dvd_or_succ_dvd_of_succ_sum_dvd_mul hp hdiva hdivb h)
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
hdiv : p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) ∣ a * b
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯
state_after: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
hdiv : p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) ∣ a * b
hsucc : ¬p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯ + 1) ∣ a * b
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯

tactic: rw [← PartENat.natCast_inj, PartENat.natCast_get, eq_coe_iff]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
hdiv : p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) ∣ a * b
hsucc : ¬p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯ + 1) ∣ a * b
⊢ (multiplicity p (a * b)).get h = (multiplicity p a).get ⋯ + (multiplicity p b).get ⋯
state_after: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
hdiv : p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) ∣ a * b
hsucc : ¬p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯ + 1) ∣ a * b
⊢ p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) ∣ a * b ∧
    ¬p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯ + 1) ∣ a * b

tactic: exact ⟨hdiv, hsucc⟩
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
hdiv : p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) ∣ a * b
hsucc : ¬p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯ + 1) ∣ a * b
⊢ p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) ∣ a * b ∧
    ¬p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯ + 1) ∣ a * b
state_after: no goals

tactic: simp [pow_add]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
⊢ p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
state_after: no goals

tactic: rw [hpoweq]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
⊢ p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) ∣ a * b
state_after: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
⊢ p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯ ∣ a * b

tactic: apply mul_dvd_mul <;> assumption
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
p a b : α
hp : Prime p
h : (multiplicity p (a * b)).Dom
hdiva : p ^ (multiplicity p a).get ⋯ ∣ a
hdivb : p ^ (multiplicity p b).get ⋯ ∣ b
hpoweq :
  p ^ ((multiplicity p a).get ⋯ + (multiplicity p b).get ⋯) =
    p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯
⊢ p ^ (multiplicity p a).get ⋯ * p ^ (multiplicity p b).get ⋯ ∣ a * b
state_after: no goals