Documentation

Mathlib.Algebra.Prime.Lemmas

Associated, prime, and irreducible elements. #

In this file we define the predicate Prime p saying that an element of a commutative monoid with zero is prime. Namely, Prime p means that p isn't zero, it isn't a unit, and p ∣ a * b → p ∣ a ∨ p ∣ b for all a, b;

In decomposition monoids (e.g., , ), this predicate is equivalent to Irreducible, however this is not true in general.

We also define an equivalence relation Associated saying that two elements of a monoid differ by a multiplication by a unit. Then we show that the quotient type Associates is a monoid and prove basic properties of this quotient.

theorem comap_prime {M : Type u_1} {N : Type u_2} [CommMonoidWithZero M] [CommMonoidWithZero N] {F : Type u_3} {G : Type u_4} [FunLike F M N] [MonoidWithZeroHomClass F M N] [FunLike G N M] [MulHomClass G N M] (f : F) (g : G) {p : M} (hinv : ∀ (a : M), g (f a) = a) (hp : Prime (f p)) :
theorem MulEquiv.prime_iff {M : Type u_1} {N : Type u_2} [CommMonoidWithZero M] [CommMonoidWithZero N] {p : M} {E : Type u_5} [EquivLike E M N] [MulEquivClass E M N] (e : E) :
Prime (e p) Prime p
theorem Prime.left_dvd_or_dvd_right_of_dvd_mul {M : Type u_1} [CancelCommMonoidWithZero M] {p : M} (hp : Prime p) {a b : M} :
a p * bp a a b
theorem Prime.pow_dvd_of_dvd_mul_left {M : Type u_1} [CancelCommMonoidWithZero M] {p a b : M} (hp : Prime p) (n : ) (h : ¬p a) (h' : p ^ n a * b) :
p ^ n b
theorem Prime.pow_dvd_of_dvd_mul_right {M : Type u_1} [CancelCommMonoidWithZero M] {p a b : M} (hp : Prime p) (n : ) (h : ¬p b) (h' : p ^ n a * b) :
p ^ n a
theorem Prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd {M : Type u_1} [CancelCommMonoidWithZero M] {p a b : M} {n : } (hp : Prime p) (hpow : p ^ n.succ a ^ n.succ * b ^ n) (hb : ¬p ^ 2 b) :
p a
theorem prime_pow_succ_dvd_mul {M : Type u_3} [CancelCommMonoidWithZero M] {p x y : M} (h : Prime p) {i : } (hxy : p ^ (i + 1) x * y) :
p ^ (i + 1) x p y
theorem succ_dvd_or_succ_dvd_of_succ_sum_dvd_mul {M : Type u_1} [CancelCommMonoidWithZero M] {p : M} (hp : Prime p) {a b : M} {k l : } :
p ^ k ap ^ l bp ^ (k + l + 1) a * bp ^ (k + 1) a p ^ (l + 1) b
theorem Prime.not_isSquare {M : Type u_1} [CancelCommMonoidWithZero M] {p : M} (hp : Prime p) :
@[deprecated Prime.not_isSquare (since := "2025-04-17")]
theorem Prime.not_square {M : Type u_1} [CancelCommMonoidWithZero M] {p : M} (hp : Prime p) :

Alias of Prime.not_isSquare.

theorem IsSquare.not_prime {M : Type u_1} [CancelCommMonoidWithZero M] {a : M} (ha : IsSquare a) :
theorem not_prime_pow {M : Type u_1} [CancelCommMonoidWithZero M] {a : M} {n : } (hn : n 1) :
¬Prime (a ^ n)
theorem DvdNotUnit.not_unit {M : Type u_1} [CommMonoidWithZero M] {p q : M} (hp : DvdNotUnit p q) :
theorem DvdNotUnit.ne {M : Type u_1} [CancelCommMonoidWithZero M] {p q : M} (h : DvdNotUnit p q) :
p q
theorem pow_injective_of_not_isUnit {M : Type u_1} [CancelCommMonoidWithZero M] {q : M} (hq : ¬IsUnit q) (hq' : q 0) :
Function.Injective fun (n : ) => q ^ n
theorem pow_inj_of_not_isUnit {M : Type u_1} [CancelCommMonoidWithZero M] {q : M} (hq : ¬IsUnit q) (hq' : q 0) {m n : } :
q ^ m = q ^ n m = n