English
A prime element x and a factorization a = x^n * a0 yields the count of x in the span of x and a0 equal to n.
Русский
При простом x, разложение a0 = x^n * a, счёт \n x в спане даёт n.
LaTeX
$$count_associates_eq'$$
Lean4
/-- Variant of `UniqueFactorizationMonoid.count_normalizedFactors_eq` for associated Ideals. -/
theorem count_associates_eq' [DecidableEq (Associates (Ideal R))]
[∀ (p : Associates <| Ideal R), Decidable (Irreducible p)] {a x : R} (hx : Prime x) {n : ℕ} (hle : x ^ n ∣ a)
(hlt : ¬x ^ (n + 1) ∣ a) : (Associates.mk (span { x })).count (Associates.mk (span { a })).factors = n :=
by
obtain ⟨q, hq⟩ := hle
apply Ideal.count_associates_eq hx _ hq
contrapose! hlt with hdvd
obtain ⟨q', hq'⟩ := hdvd
use q'
rw [hq, hq']
ring