Properties and homomorphisms of semirings and rings

This file proves simple properties of semirings, rings and domains and their unit groups. It also defines homomorphisms of semirings and rings, both unbundled (e.g. is_semiring_hom f) and bundled (e.g. ring_hom a β, a.k.a. α +* β). The unbundled ones are deprecated and the plan is to slowly remove them from mathlib.

Main definitions

is_semiring_hom (deprecated), is_ring_hom (deprecated), ring_hom, nonzero_comm_semiring, nonzero_comm_ring, domain

Notations

→+* for bundled ring homs (also use for semiring homs)

Implementation notes

There's a coercion from bundled homs to fun, and the canonical notation is to use the bundled hom as a function via this coercion.

There is no semiring_hom -- the idea is that ring_hom is used. The constructor for a ring_hom between semirings needs a proof of map_zero, map_one and map_add as well as map_mul; a separate constructor ring_hom.mk' will construct ring homs between rings from monoid homs given only a proof that addition is preserved.

Throughout the section on ring_hom implicit {} brackets are often used instead of type class [] brackets. This is done when the instances can be inferred because they are implicit arguments to the type ring_hom. When they can be inferred from the type it is faster to use this method than to use type class inference.

Tags

is_ring_hom, is_semiring_hom, ring_hom, semiring_hom, semiring, comm_semiring, ring, comm_ring, domain, integral_domain, nonzero_comm_semiring, nonzero_comm_ring, units


zero_ne_one_or_forall_eq_0

Either zero and one are nonequal in a semiring, or the semiring is the zero ring.

eq_zero_of_zero_eq_one

If zero equals one in a semiring, the semiring is the zero ring.

subsingleton_of_zero_eq_one

If zero equals one in a semiring, all elements of that semiring are equal.

units.has_neg

Each element of the group of units of a ring has an additive inverse.

units.coe_neg

Representing an element of a ring's unit group as an element of the ring commutes with mapping this element to its additive inverse.

units.neg_inv

Mapping an element of a ring's unit group to its inverse commutes with mapping this element to its additive inverse.

units.neg_neg

An element of a ring's unit group equals the additive inverse of its additive inverse.

units.neg_mul

Multiplication of elements of a ring's unit group commutes with mapping the first argument to its additive inverse.

units.mul_neg

Multiplication of elements of a ring's unit group commutes with mapping the second argument to its additive inverse.

units.neg_mul_neg

Multiplication of the additive inverses of two elements of a ring's unit group equals multiplication of the two original elements.

units.neg_eq_neg_one_mul

The additive inverse of an element of a ring's unit group equals the additive inverse of one times the original element.

is_semiring_hom

Predicate for semiring homomorphisms (deprecated -- use the bundled ring_hom version).

is_semiring_hom.id

The identity map is a semiring homomorphism.

is_semiring_hom.comp

The composition of two semiring homomorphisms is a semiring homomorphism.

is_semiring_hom.is_add_monoid_hom

A semiring homomorphism is an additive monoid homomorphism.

is_semiring_hom.is_monoid_hom

A semiring homomorphism is a monoid homomorphism.

mul_neg_one

An element of a ring multiplied by the additive inverse of one is the element's additive inverse.

neg_one_mul

The additive inverse of one multiplied by an element of a ring is the element's additive inverse.

mul_add_eq_mul_add_iff_sub_mul_add_eq

An iff statement following from right distributivity in rings and the definition of subtraction.

sub_mul_add_eq_of_mul_add_eq_mul_add

A simplification of one side of an equation exploiting right distributivity in rings and the definition of subtraction.

ne_zero_and_ne_zero_of_mul_ne_zero

If the product of two elements of a ring is nonzero, both elements are nonzero.

zero_dvd_iff

Given an element a of a commutative semiring, there exists another element whose product with zero equals a iff a equals zero.

mul_self_sub_mul_self

Representation of a difference of two squares in a commutative ring as a product.

dvd_neg

An element a of a commutative ring divides the additive inverse of an element b iff a divides b.

neg_dvd

The additive inverse of an element a of a commutative ring divides another element b iff a divides b.

dvd_add_left

If an element a divides another element c in a commutative ring, a divides the sum of another element b with c iff a divides b.

dvd_add_right

If an element a divides another element b in a commutative ring, a divides the sum of b and another element c iff a divides c.

dvd_add_self_left

An element a divides the sum a + b if and only if a divides b.

dvd_add_self_right

An element a divides the sum b + a if and only if a divides b.

Vieta_formula_quadratic

Vieta's formula for a quadratic equation, relating the coefficients of the polynomial with its roots. This particular version states that if we have a root x of a monic quadratic polynomial, then there is another root y such that x + y is negative the a_1 coefficient and x * y is the a_0 coefficient.

is_ring_hom

Predicate for ring homomorphisms (deprecated -- use the bundled ring_hom version).

is_ring_hom.of_semiring

A map of rings that is a semiring homomorphism is also a ring homomorphism.

is_ring_hom.map_zero

Ring homomorphisms map zero to zero.

is_ring_hom.map_neg

Ring homomorphisms preserve additive inverses.

is_ring_hom.map_sub

Ring homomorphisms preserve subtraction.

is_ring_hom.id

The identity map is a ring homomorphism.

is_ring_hom.comp

The composition of two ring homomorphisms is a ring homomorphism.

is_ring_hom.is_semiring_hom

A ring homomorphism is also a semiring homomorphism.

ring_hom

Bundled semiring homomorphisms; use this for bundled ring homomorphisms too.

ring_hom.of

Interpret f : α β with is_semiring_hom f as a ring homomorphism.

ring_hom.map_zero

Ring homomorphisms map zero to zero.

ring_hom.map_one

Ring homomorphisms map one to one.

ring_hom.map_add

Ring homomorphisms preserve addition.

ring_hom.map_mul

Ring homomorphisms preserve multiplication.

ring_hom.id

The identity ring homomorphism from a semiring to itself.

ring_hom.comp

Composition of ring homomorphisms is a ring homomorphism.

ring_hom.map_neg

Ring homomorphisms preserve additive inverse.

ring_hom.map_sub

Ring homomorphisms preserve subtraction.

ring_hom.mk'

Makes a ring homomorphism from a monoid homomorphism of rings which preserves addition.

nonzero_comm_semiring

Predicate for commutative semirings in which zero does not equal one.

nonzero_comm_ring

Predicate for commutative rings in which zero does not equal one.

nonzero_comm_ring.to_nonzero_comm_semiring

A nonzero commutative ring is a nonzero commutative semiring.

integral_domain.to_nonzero_comm_ring

An integral domain is a nonzero commutative ring.

units.coe_ne_zero

An element of the unit group of a nonzero commutative semiring represented as an element of the semiring is nonzero.

nonzero_comm_ring.of_ne

Makes a nonzero commutative ring from a commutative ring containing at least two distinct elements.

nonzero_comm_semiring.of_ne

Makes a nonzero commutative semiring from a commutative semiring containing at least two distinct elements.

has_div_of_division_ring

this is needed for compatibility between Lean 3.4.2 and Lean 3.5.0c

domain

A domain is a ring with no zero divisors, i.e. satisfying the condition a * b = 0 a = 0 b = 0. Alternatively, a domain is an integral domain without assuming commutativity of multiplication.

mul_eq_zero

Simplification theorems for the definition of a domain.

mul_ne_zero'

The product of two nonzero elements of a domain is nonzero.

domain.mul_right_inj

Right multiplication by a nonzero element in a domain is injective.

domain.mul_left_inj

Left multiplication by a nonzero element in a domain is injective.

eq_zero_of_mul_eq_self_right'

An element of a domain fixed by right multiplication by an element other than one must be zero.

eq_zero_of_mul_eq_self_left'

An element of a domain fixed by left multiplication by an element other than one must be zero.

mul_ne_zero_comm'

For elements a, b of a domain, if ab is nonzero, so is ba.

integral_domain.to_domain

An integral domain is a domain.

eq_of_mul_eq_mul_right_of_ne_zero

Right multiplcation by a nonzero element of an integral domain is injective.

eq_of_mul_eq_mul_left_of_ne_zero

Left multiplication by a nonzero element of an integral domain is injective.

mul_dvd_mul_iff_left

Given two elements b, c of an integral domain and a nonzero element a, ab divides ac iff b divides c.

mul_dvd_mul_iff_right

Given two elements a, b of an integral domain and a nonzero element c, ac divides bc iff a divides b.

units.inv_eq_self_iff

In the unit group of an integral domain, a unit is its own inverse iff the unit is one or one's additive inverse.

units.coe_dvd

Elements of the unit group of a commutative semiring represented as elements of the semiring divide any element of the semiring.

units.dvd_coe_mul

In a commutative semiring, an element a divides an element b iff a divides all associates of b.

units.dvd_coe

An element of a commutative semiring divides a unit iff the element divides one.

units.coe_mul_dvd

In a commutative semiring, an element a divides an element b iff all associates of a divide b.

units.ne_zero

Every unit in a domain is nonzero.