English
A prime element is irreducible in a CancelCommutativeMonoidWithZero.
Русский
Простая элемент является несводимым в CancelCommоdio With Zero.
LaTeX
$$Prime p → Irreducible p$$
Lean4
protected theorem irreducible (hp : Prime p) : Irreducible p :=
⟨hp.not_unit, fun a b ↦ by
rintro rfl
exact
(hp.dvd_or_dvd dvd_rfl).symm.imp
(isUnit_of_dvd_one <| (mul_dvd_mul_iff_right <| right_ne_zero_of_mul hp.ne_zero).mp <| dvd_mul_of_dvd_right · _)
(isUnit_of_dvd_one <| (mul_dvd_mul_iff_left <| left_ne_zero_of_mul hp.ne_zero).mp <| dvd_mul_of_dvd_left · _)⟩