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
.
Left multiplication by an element of a type with distributive multiplication is an add_hom
.
Equations
- add_hom.mul_left r = {to_fun := has_mul.mul r, map_add' := _}
Additive homomorphisms preserve bit0
.
Left multiplication by an element of a (semi)ring is an add_monoid_hom
Equations
- add_monoid_hom.mul_left r = {to_fun := has_mul.mul r, map_zero' := _, map_add' := _}
Right multiplication by an element of a (semi)ring is an add_monoid_hom
Equations
- mul_opposite.has_distrib_neg = {neg := has_involutive_neg.neg (mul_opposite.has_involutive_neg α), neg_neg := _, neg_mul := _, mul_neg := _}
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.