Theorem: UniqueFactorizationMonoid.multiplicity_eq_count_normalizedFactors
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: apply le_antisymm
state_before: α : Type u_1
R : Type u_2
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : NormalizationMonoid R
inst✝¹ : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
a b : R
ha : Irreducible a
hb : b ≠ 0
⊢ multiplicity a b = ↑(count (normalize a) (normalizedFactors b))
state_after: case a
α : Type u_1
R : Type u_2
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : NormalizationMonoid R
inst✝¹ : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
a b : R
ha : Irreducible a
hb : b ≠ 0
⊢ multiplicity a b ≤ ↑(count (normalize a) (normalizedFactors b))

case a
α : Type u_1
R : Type u_2
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : NormalizationMonoid R
inst✝¹ : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
a b : R
ha : Irreducible a
hb : b ≠ 0
⊢ ↑(count (normalize a) (normalizedFactors b)) ≤ multiplicity a b

tactic: rw [le_multiplicity_iff_replicate_le_normalizedFactors ha hb, ← le_count_iff_replicate_le]
state_before: case a
α : Type u_1
R : Type u_2
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : NormalizationMonoid R
inst✝¹ : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
a b : R
ha : Irreducible a
hb : b ≠ 0
⊢ ↑(count (normalize a) (normalizedFactors b)) ≤ multiplicity a b
state_after: no goals

tactic: apply PartENat.le_of_lt_add_one
state_before: case a
α : Type u_1
R : Type u_2
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : NormalizationMonoid R
inst✝¹ : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
a b : R
ha : Irreducible a
hb : b ≠ 0
⊢ multiplicity a b ≤ ↑(count (normalize a) (normalizedFactors b))
state_after: case a.h
α : Type u_1
R : Type u_2
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : NormalizationMonoid R
inst✝¹ : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
a b : R
ha : Irreducible a
hb : b ≠ 0
⊢ multiplicity a b < ↑(count (normalize a) (normalizedFactors b)) + 1

tactic: rw [← Nat.cast_one, ← Nat.cast_add, lt_iff_not_ge, ge_iff_le,
  le_multiplicity_iff_replicate_le_normalizedFactors ha hb, ← le_count_iff_replicate_le]
state_before: case a.h
α : Type u_1
R : Type u_2
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : NormalizationMonoid R
inst✝¹ : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
a b : R
ha : Irreducible a
hb : b ≠ 0
⊢ multiplicity a b < ↑(count (normalize a) (normalizedFactors b)) + 1
state_after: case a.h
α : Type u_1
R : Type u_2
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : NormalizationMonoid R
inst✝¹ : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
a b : R
ha : Irreducible a
hb : b ≠ 0
⊢ ¬count (normalize a) (normalizedFactors b) + 1 ≤ count (normalize a) (normalizedFactors b)

tactic: simp
state_before: case a.h
α : Type u_1
R : Type u_2
inst✝⁴ : CancelCommMonoidWithZero R
inst✝³ : UniqueFactorizationMonoid R
inst✝² : NormalizationMonoid R
inst✝¹ : DecidableRel Dvd.dvd
inst✝ : DecidableEq R
a b : R
ha : Irreducible a
hb : b ≠ 0
⊢ ¬count (normalize a) (normalizedFactors b) + 1 ≤ count (normalize a) (normalizedFactors b)
state_after: no goals