# Documentation

Mathlib.Algebra.Divisibility.Basic

# Divisibility #

This file defines the basics of the divisibility relation in the context of (Comm) Monoids.

## Main definitions #

• semigroupDvd

## Implementation notes #

The divisibility relation is defined for all monoids, and as such, depends on the order of multiplication if the monoid is not commutative. There are two possible conventions for divisibility in the noncommutative context, and this relation follows the convention for ordinals, so a | b is defined as ∃ c, b = a * c.

## Tags #

divisibility, divides

instance semigroupDvd {α : Type u_1} [] :
Dvd α

There are two possible conventions for divisibility, which coincide in a CommMonoid. This matches the convention for ordinals.

theorem Dvd.intro {α : Type u_1} [] {a : α} {b : α} (c : α) (h : a * c = b) :
a b
theorem dvd_of_mul_right_eq {α : Type u_1} [] {a : α} {b : α} (c : α) (h : a * c = b) :
a b

Alias of Dvd.intro.

theorem exists_eq_mul_right_of_dvd {α : Type u_1} [] {a : α} {b : α} (h : a b) :
c, b = a * c
theorem dvd_def {α : Type u_1} [] {a : α} {b : α} :
a b c, b = a * c
theorem dvd_iff_exists_eq_mul_right {α : Type u_1} [] {a : α} {b : α} :
a b c, b = a * c

Alias of dvd_def.

theorem Dvd.elim {α : Type u_1} [] {P : Prop} {a : α} {b : α} (H₁ : a b) (H₂ : (c : α) → b = a * cP) :
P
theorem dvd_trans {α : Type u_1} [] {a : α} {b : α} {c : α} :
a bb ca c
theorem Dvd.dvd.trans {α : Type u_1} [] {a : α} {b : α} {c : α} :
a bb ca c

Alias of dvd_trans.

instance instIsTransDvdSemigroupDvd {α : Type u_1} [] :
IsTrans α Dvd.dvd

Transitivity of | for use in calc blocks.

@[simp]
theorem dvd_mul_right {α : Type u_1} [] (a : α) (b : α) :
a a * b
theorem dvd_mul_of_dvd_left {α : Type u_1} [] {a : α} {b : α} (h : a b) (c : α) :
a b * c
theorem Dvd.dvd.mul_right {α : Type u_1} [] {a : α} {b : α} (h : a b) (c : α) :
a b * c

Alias of dvd_mul_of_dvd_left.

theorem dvd_of_mul_right_dvd {α : Type u_1} [] {a : α} {b : α} {c : α} (h : a * b c) :
a c
theorem map_dvd {M : Type u_2} {N : Type u_3} [] [] {F : Type u_4} [MulHomClass F M N] (f : F) {a : M} {b : M} :
a bf a f b
theorem MulHom.map_dvd {M : Type u_2} {N : Type u_3} [] [] (f : M →ₙ* N) {a : M} {b : M} :
a bf a f b
theorem MonoidHom.map_dvd {M : Type u_2} {N : Type u_3} [] [] (f : M →* N) {a : M} {b : M} :
a bf a f b
@[simp]
theorem dvd_refl {α : Type u_1} [] (a : α) :
a a
theorem dvd_rfl {α : Type u_1} [] {a : α} :
a a
instance instIsReflDvdSemigroupDvdToSemigroup {α : Type u_1} [] :
IsRefl α fun x x_1 => x x_1
theorem one_dvd {α : Type u_1} [] (a : α) :
1 a
theorem dvd_of_eq {α : Type u_1} [] {a : α} {b : α} (h : a = b) :
a b
theorem Eq.dvd {α : Type u_1} [] {a : α} {b : α} (h : a = b) :
a b

Alias of dvd_of_eq.

theorem Dvd.intro_left {α : Type u_1} [] {a : α} {b : α} (c : α) (h : c * a = b) :
a b
theorem dvd_of_mul_left_eq {α : Type u_1} [] {a : α} {b : α} (c : α) (h : c * a = b) :
a b

Alias of Dvd.intro_left.

theorem exists_eq_mul_left_of_dvd {α : Type u_1} [] {a : α} {b : α} (h : a b) :
c, b = c * a
theorem dvd_iff_exists_eq_mul_left {α : Type u_1} [] {a : α} {b : α} :
a b c, b = c * a
theorem Dvd.elim_left {α : Type u_1} [] {a : α} {b : α} {P : Prop} (h₁ : a b) (h₂ : (c : α) → b = c * aP) :
P
@[simp]
theorem dvd_mul_left {α : Type u_1} [] (a : α) (b : α) :
a b * a
theorem dvd_mul_of_dvd_right {α : Type u_1} [] {a : α} {b : α} (h : a b) (c : α) :
a c * b
theorem Dvd.dvd.mul_left {α : Type u_1} [] {a : α} {b : α} (h : a b) (c : α) :
a c * b

Alias of dvd_mul_of_dvd_right.

theorem mul_dvd_mul {α : Type u_1} [] {a : α} {b : α} {c : α} {d : α} :
a bc da * c b * d
theorem dvd_of_mul_left_dvd {α : Type u_1} [] {a : α} {b : α} {c : α} (h : a * b c) :
b c
theorem mul_dvd_mul_left {α : Type u_1} [] (a : α) {b : α} {c : α} (h : b c) :
a * b a * c
theorem mul_dvd_mul_right {α : Type u_1} [] {a : α} {b : α} (h : a b) (c : α) :
a * c b * c
theorem pow_dvd_pow_of_dvd {α : Type u_1} [] {a : α} {b : α} (h : a b) (n : ) :
a ^ n b ^ n