# mathlib3documentation

algebra.ring.basic

# Semirings and rings #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

This file gives lemmas about semirings, rings and domains. This is analogous to algebra.group.basic, the difference being that the former is about + and * separately, while the present file is about their interaction.

For the definitions of semirings and rings see algebra.ring.defs.

def add_hom.mul_left {R : Type u_1} [distrib R] (r : R) :
R

Left multiplication by an element of a type with distributive multiplication is an add_hom.

Equations
@[simp]
theorem add_hom.mul_left_apply {R : Type u_1} [distrib R] (r : R) :
@[simp]
theorem add_hom.mul_right_apply {R : Type u_1} [distrib R] (r : R) :
= λ (a : R), a * r
def add_hom.mul_right {R : Type u_1} [distrib R] (r : R) :
R

Left multiplication by an element of a type with distributive multiplication is an add_hom.

Equations
@[simp]
theorem map_bit0 {α : Type u} {β : Type v} {F : Type u_1} [ β] (f : F) (a : α) :
f (bit0 a) = bit0 (f a)

Additive homomorphisms preserve bit0.

def add_monoid_hom.mul_left {R : Type u_1} (r : R) :
R →+ R

Left multiplication by an element of a (semi)ring is an add_monoid_hom

Equations
@[simp]
theorem add_monoid_hom.coe_mul_left {R : Type u_1} (r : R) :
def add_monoid_hom.mul_right {R : Type u_1} (r : R) :
R →+ R

Right multiplication by an element of a (semi)ring is an add_monoid_hom

Equations
@[simp]
theorem add_monoid_hom.coe_mul_right {R : Type u_1} (r : R) :
= λ (_x : R), _x * r
theorem add_monoid_hom.mul_right_apply {R : Type u_1} (a r : R) :
= a * r
@[protected, instance]
def mul_opposite.has_distrib_neg {α : Type u} [has_mul α]  :
Equations
@[simp]
theorem inv_neg' {α : Type u} [group α] (a : α) :
theorem Vieta_formula_quadratic {α : Type u} {b c x : α} (h : x * x - b * x + c = 0) :
(y : α), y * y - b * y + c = 0 x + y = b x * y = c

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.

theorem succ_ne_self {α : Type u} [nontrivial α] (a : α) :
a + 1 a
theorem pred_ne_self {α : Type u} [nontrivial α] (a : α) :
a - 1 a
@[protected, instance]
theorem no_zero_divisors.to_is_domain (α : Type u) [ring α] [h : nontrivial α]  :
@[protected, instance]
def is_domain.to_no_zero_divisors (α : Type u) [ring α] [is_domain α] :