Semiring, ring etc structures on R × S
#
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
In this file we define two-binop (semiring
, ring
etc) structures on R × S
. We also prove
trivial simp
lemmas, and define the following operations on ring_hom
s and similarly for
non_unital_ring_hom
s:
Product of two distributive types is distributive.
Equations
- prod.distrib = {mul := has_mul.mul prod.has_mul, add := has_add.add prod.has_add, left_distrib := _, right_distrib := _}
Product of two non_unital_non_assoc_semiring
s is a non_unital_non_assoc_semiring
.
Equations
- prod.non_unital_non_assoc_semiring = {add := add_comm_monoid.add prod.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero prod.add_comm_monoid, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul prod.add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := mul_zero_class.mul prod.mul_zero_class, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _}
Product of two non_unital_semiring
s is a non_unital_semiring
.
Equations
- prod.non_unital_semiring = {add := non_unital_non_assoc_semiring.add prod.non_unital_non_assoc_semiring, add_assoc := _, zero := non_unital_non_assoc_semiring.zero prod.non_unital_non_assoc_semiring, zero_add := _, add_zero := _, nsmul := non_unital_non_assoc_semiring.nsmul prod.non_unital_non_assoc_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := non_unital_non_assoc_semiring.mul prod.non_unital_non_assoc_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _}
Product of two non_assoc_semiring
s is a non_assoc_semiring
.
Equations
- prod.non_assoc_semiring = {add := non_unital_non_assoc_semiring.add prod.non_unital_non_assoc_semiring, add_assoc := _, zero := non_unital_non_assoc_semiring.zero prod.non_unital_non_assoc_semiring, zero_add := _, add_zero := _, nsmul := non_unital_non_assoc_semiring.nsmul prod.non_unital_non_assoc_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := non_unital_non_assoc_semiring.mul prod.non_unital_non_assoc_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, one := mul_one_class.one prod.mul_one_class, one_mul := _, mul_one := _, nat_cast := add_monoid_with_one.nat_cast prod.add_monoid_with_one, nat_cast_zero := _, nat_cast_succ := _}
Product of two semirings is a semiring.
Equations
- prod.semiring = {add := add_comm_monoid.add prod.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero prod.add_comm_monoid, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul prod.add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := monoid_with_zero.mul prod.monoid_with_zero, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := monoid_with_zero.one prod.monoid_with_zero, one_mul := _, mul_one := _, nat_cast := add_monoid_with_one.nat_cast prod.add_monoid_with_one, nat_cast_zero := _, nat_cast_succ := _, npow := monoid_with_zero.npow prod.monoid_with_zero, npow_zero' := _, npow_succ' := _}
Product of two non_unital_comm_semiring
s is a non_unital_comm_semiring
.
Equations
- prod.non_unital_comm_semiring = {add := non_unital_semiring.add prod.non_unital_semiring, add_assoc := _, zero := non_unital_semiring.zero prod.non_unital_semiring, zero_add := _, add_zero := _, nsmul := non_unital_semiring.nsmul prod.non_unital_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := non_unital_semiring.mul prod.non_unital_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, mul_comm := _}
Product of two commutative semirings is a commutative semiring.
Equations
- prod.comm_semiring = {add := semiring.add prod.semiring, add_assoc := _, zero := semiring.zero prod.semiring, zero_add := _, add_zero := _, nsmul := semiring.nsmul prod.semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := semiring.mul prod.semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := semiring.one prod.semiring, one_mul := _, mul_one := _, nat_cast := semiring.nat_cast prod.semiring, nat_cast_zero := _, nat_cast_succ := _, npow := semiring.npow prod.semiring, npow_zero' := _, npow_succ' := _, mul_comm := _}
Equations
- prod.non_unital_non_assoc_ring = {add := add_comm_group.add prod.add_comm_group, add_assoc := _, zero := add_comm_group.zero prod.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul prod.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg prod.add_comm_group, sub := add_comm_group.sub prod.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul prod.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_unital_non_assoc_semiring.mul prod.non_unital_non_assoc_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _}
Equations
- prod.non_unital_ring = {add := add_comm_group.add prod.add_comm_group, add_assoc := _, zero := add_comm_group.zero prod.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul prod.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg prod.add_comm_group, sub := add_comm_group.sub prod.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul prod.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_unital_semiring.mul prod.non_unital_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _}
Equations
- prod.non_assoc_ring = {add := add_comm_group.add prod.add_comm_group, add_assoc := _, zero := add_comm_group.zero prod.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul prod.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg prod.add_comm_group, sub := add_comm_group.sub prod.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul prod.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_assoc_semiring.mul prod.non_assoc_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, one := non_assoc_semiring.one prod.non_assoc_semiring, one_mul := _, mul_one := _, nat_cast := non_assoc_semiring.nat_cast prod.non_assoc_semiring, nat_cast_zero := _, nat_cast_succ := _, int_cast := add_group_with_one.int_cast prod.add_group_with_one, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _}
Product of two rings is a ring.
Equations
- prod.ring = {add := add_comm_group.add prod.add_comm_group, add_assoc := _, zero := add_comm_group.zero prod.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul prod.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg prod.add_comm_group, sub := add_comm_group.sub prod.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul prod.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := add_group_with_one.int_cast prod.add_group_with_one, nat_cast := add_group_with_one.nat_cast prod.add_group_with_one, one := add_group_with_one.one prod.add_group_with_one, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := semiring.mul prod.semiring, mul_assoc := _, one_mul := _, mul_one := _, npow := semiring.npow prod.semiring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}
Product of two non_unital_comm_ring
s is a non_unital_comm_ring
.
Equations
- prod.non_unital_comm_ring = {add := non_unital_ring.add prod.non_unital_ring, add_assoc := _, zero := non_unital_ring.zero prod.non_unital_ring, zero_add := _, add_zero := _, nsmul := non_unital_ring.nsmul prod.non_unital_ring, nsmul_zero' := _, nsmul_succ' := _, neg := non_unital_ring.neg prod.non_unital_ring, sub := non_unital_ring.sub prod.non_unital_ring, sub_eq_add_neg := _, zsmul := non_unital_ring.zsmul prod.non_unital_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := non_unital_ring.mul prod.non_unital_ring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, mul_comm := _}
Product of two commutative rings is a commutative ring.
Equations
- prod.comm_ring = {add := ring.add prod.ring, add_assoc := _, zero := ring.zero prod.ring, zero_add := _, add_zero := _, nsmul := ring.nsmul prod.ring, nsmul_zero' := _, nsmul_succ' := _, neg := ring.neg prod.ring, sub := ring.sub prod.ring, sub_eq_add_neg := _, zsmul := ring.zsmul prod.ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := ring.int_cast prod.ring, nat_cast := ring.nat_cast prod.ring, one := ring.one prod.ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := ring.mul prod.ring, mul_assoc := _, one_mul := _, mul_one := _, npow := ring.npow prod.ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, mul_comm := _}
Given non-unital semirings R
, S
, the natural projection homomorphism from R × S
to R
.
Given non-unital semirings R
, S
, the natural projection homomorphism from R × S
to S
.
Combine two non-unital ring homomorphisms f : R →ₙ+* S
, g : R →ₙ+* T
into
f.prod g : R →ₙ+* S × T
given by (f.prod g) x = (f x, g x)
prod.map
as a non_unital_ring_hom
.
Equations
- f.prod_map g = (f.comp (non_unital_ring_hom.fst R S)).prod (g.comp (non_unital_ring_hom.snd R S))
Given semirings R
, S
, the natural projection homomorphism from R × S
to R
.
Given semirings R
, S
, the natural projection homomorphism from R × S
to S
.
Combine two ring homomorphisms f : R →+* S
, g : R →+* T
into f.prod g : R →+* S × T
given by (f.prod g) x = (f x, g x)
Equations
- f.prod_map g = (f.comp (ring_hom.fst R S)).prod (g.comp (ring_hom.snd R S))
Swapping components as an equivalence of (semi)rings.
Equations
- ring_equiv.prod_comm = {to_fun := add_equiv.prod_comm.to_fun, inv_fun := add_equiv.prod_comm.inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
Four-way commutativity of prod
. The name matches mul_mul_mul_comm
.
Equations
- ring_equiv.prod_prod_prod_comm R R' S S' = {to_fun := λ (rrss : (R × R') × S × S'), ((rrss.fst.fst, rrss.snd.fst), rrss.fst.snd, rrss.snd.snd), inv_fun := λ (rsrs : (R × S) × R' × S'), ((rsrs.fst.fst, rsrs.snd.fst), rsrs.fst.snd, rsrs.snd.snd), left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
A ring R
is isomorphic to R × S
when S
is the zero ring
A ring R
is isomorphic to S × R
when S
is the zero ring
The product of two nontrivial rings is not a domain
Order #
Equations
- prod.ordered_semiring = {add := semiring.add prod.semiring, add_assoc := _, zero := semiring.zero prod.semiring, zero_add := _, add_zero := _, nsmul := semiring.nsmul prod.semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := semiring.mul prod.semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := semiring.one prod.semiring, one_mul := _, mul_one := _, nat_cast := semiring.nat_cast prod.semiring, nat_cast_zero := _, nat_cast_succ := _, npow := semiring.npow prod.semiring, npow_zero' := _, npow_succ' := _, le := partial_order.le (prod.partial_order α β), lt := partial_order.lt (prod.partial_order α β), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _, zero_le_one := _, mul_le_mul_of_nonneg_left := _, mul_le_mul_of_nonneg_right := _}
Equations
- prod.ordered_comm_semiring = {add := comm_semiring.add prod.comm_semiring, add_assoc := _, zero := comm_semiring.zero prod.comm_semiring, zero_add := _, add_zero := _, nsmul := comm_semiring.nsmul prod.comm_semiring, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := comm_semiring.mul prod.comm_semiring, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := comm_semiring.one prod.comm_semiring, one_mul := _, mul_one := _, nat_cast := comm_semiring.nat_cast prod.comm_semiring, nat_cast_zero := _, nat_cast_succ := _, npow := comm_semiring.npow prod.comm_semiring, npow_zero' := _, npow_succ' := _, le := ordered_semiring.le prod.ordered_semiring, lt := ordered_semiring.lt prod.ordered_semiring, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _, zero_le_one := _, mul_le_mul_of_nonneg_left := _, mul_le_mul_of_nonneg_right := _, mul_comm := _}
Equations
- prod.ordered_ring = {add := ring.add prod.ring, add_assoc := _, zero := ring.zero prod.ring, zero_add := _, add_zero := _, nsmul := ring.nsmul prod.ring, nsmul_zero' := _, nsmul_succ' := _, neg := ring.neg prod.ring, sub := ring.sub prod.ring, sub_eq_add_neg := _, zsmul := ring.zsmul prod.ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := ring.int_cast prod.ring, nat_cast := ring.nat_cast prod.ring, one := ring.one prod.ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := ring.mul prod.ring, mul_assoc := _, one_mul := _, mul_one := _, npow := ring.npow prod.ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, le := ordered_semiring.le prod.ordered_semiring, lt := ordered_semiring.lt prod.ordered_semiring, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _, zero_le_one := _, mul_nonneg := _}
Equations
- prod.ordered_comm_ring = {add := comm_ring.add prod.comm_ring, add_assoc := _, zero := comm_ring.zero prod.comm_ring, zero_add := _, add_zero := _, nsmul := comm_ring.nsmul prod.comm_ring, nsmul_zero' := _, nsmul_succ' := _, neg := comm_ring.neg prod.comm_ring, sub := comm_ring.sub prod.comm_ring, sub_eq_add_neg := _, zsmul := comm_ring.zsmul prod.comm_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := comm_ring.int_cast prod.comm_ring, nat_cast := comm_ring.nat_cast prod.comm_ring, one := comm_ring.one prod.comm_ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := comm_ring.mul prod.comm_ring, mul_assoc := _, one_mul := _, mul_one := _, npow := comm_ring.npow prod.comm_ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, le := ordered_ring.le prod.ordered_ring, lt := ordered_ring.lt prod.ordered_ring, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := _, zero_le_one := _, mul_nonneg := _, mul_comm := _}