Bundled non-unital subsemirings #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
We define bundled non-unital subsemirings and some standard constructions:
complete_lattice
structure, subtype
and inclusion
ring homomorphisms, non-unital subsemiring
map
, comap
and range (srange
) of a non_unital_ring_hom
etc.
- to_add_submonoid_class : add_submonoid_class S R
- mul_mem : ∀ {s : S} {a b : R}, a ∈ s → b ∈ s → a * b ∈ s
non_unital_subsemiring_class S R
states that S
is a type of subsets s ⊆ R
that
are both an additive submonoid and also a multiplicative subsemigroup.
Instances of this typeclass
Instances of other typeclasses for non_unital_subsemiring_class
- non_unital_subsemiring_class.has_sizeof_inst
A non-unital subsemiring of a non_unital_non_assoc_semiring
inherits a
non_unital_non_assoc_semiring
structure
The natural non-unital ring hom from a non-unital subsemiring of a non-unital semiring R
to
R
.
Equations
- non_unital_subsemiring_class.subtype s = {to_fun := coe coe_to_lift, map_mul' := _, map_zero' := _, map_add' := _}
A non-unital subsemiring of a non_unital_semiring
is a non_unital_semiring
.
Equations
A non-unital subsemiring of a non_unital_comm_semiring
is a non_unital_comm_semiring
.
Note: currently, there are no ordered versions of non-unital rings.
Reinterpret a non_unital_subsemiring
as an add_submonoid
.
- carrier : set R
- add_mem' : ∀ {a b : R}, a ∈ self.carrier → b ∈ self.carrier → a + b ∈ self.carrier
- zero_mem' : 0 ∈ self.carrier
- mul_mem' : ∀ {a b : R}, a ∈ self.carrier → b ∈ self.carrier → a * b ∈ self.carrier
A non-unital subsemiring of a non-unital semiring R
is a subset s
that is both an additive
submonoid and a semigroup.
Instances for non_unital_subsemiring
- non_unital_subsemiring.has_sizeof_inst
- non_unital_subsemiring.set_like
- non_unital_subsemiring.non_unital_subsemiring_class
- non_unital_subsemiring.has_top
- non_unital_subsemiring.has_bot
- non_unital_subsemiring.inhabited
- non_unital_subsemiring.has_inf
- non_unital_subsemiring.has_Inf
- non_unital_subsemiring.complete_lattice
Reinterpret a non_unital_subsemiring
as a subsemigroup
.
Equations
- non_unital_subsemiring.set_like = {coe := non_unital_subsemiring.carrier _inst_1, coe_injective' := _}
Equations
Two non-unital subsemirings are equal if they have the same elements.
Copy of a non-unital subsemiring with a new carrier
equal to the old one. Useful to fix
definitional equalities.
Construct a non_unital_subsemiring R
from a set s
, a subsemigroup sg
, and an additive
submonoid sa
such that x ∈ s ↔ x ∈ sg ↔ x ∈ sa
.
Note: currently, there are no ordered versions of non-unital rings.
The non-unital subsemiring R
of the non-unital semiring R
.
The preimage of a non-unital subsemiring along a non-unital ring homomorphism is a non-unital subsemiring.
The image of a non-unital subsemiring along a ring homomorphism is a non-unital subsemiring.
A non-unital subsemiring is isomorphic to its image under an injective function
The range of a non-unital ring homomorphism is a non-unital subsemiring. See note [range copy pattern].
Equations
Instances for ↥non_unital_ring_hom.srange
The range of a morphism of non-unital semirings is finite if the domain is a finite.
Equations
The inf of two non-unital subsemirings is their intersection.
Equations
- non_unital_subsemiring.has_Inf = {Inf := λ (s : set (non_unital_subsemiring R)), non_unital_subsemiring.mk' (⋂ (t : non_unital_subsemiring R) (H : t ∈ s), ↑t) (⨅ (t : non_unital_subsemiring R) (H : t ∈ s), t.to_subsemigroup) _ (⨅ (t : non_unital_subsemiring R) (H : t ∈ s), t.to_add_submonoid) _}
Non-unital subsemirings of a non-unital semiring form a complete lattice.
Equations
- non_unital_subsemiring.complete_lattice = {sup := complete_lattice.sup (complete_lattice_of_Inf (non_unital_subsemiring R) non_unital_subsemiring.complete_lattice._proof_1), le := complete_lattice.le (complete_lattice_of_Inf (non_unital_subsemiring R) non_unital_subsemiring.complete_lattice._proof_1), lt := complete_lattice.lt (complete_lattice_of_Inf (non_unital_subsemiring R) non_unital_subsemiring.complete_lattice._proof_1), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := has_inf.inf non_unital_subsemiring.has_inf, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := complete_lattice.Sup (complete_lattice_of_Inf (non_unital_subsemiring R) non_unital_subsemiring.complete_lattice._proof_1), le_Sup := _, Sup_le := _, Inf := complete_lattice.Inf (complete_lattice_of_Inf (non_unital_subsemiring R) non_unital_subsemiring.complete_lattice._proof_1), Inf_le := _, le_Inf := _, top := ⊤, bot := ⊥, le_top := _, bot_le := _}
The center of a semiring R
is the set of elements that commute with everything in R
Equations
- non_unital_subsemiring.center R = {carrier := set.center R (distrib.to_has_mul R), add_mem' := _, zero_mem' := _, mul_mem' := _}
Instances for ↥non_unital_subsemiring.center
Equations
- non_unital_subsemiring.decidable_mem_center = λ (_x : R), decidable_of_iff' (∀ (g : R), g * _x = _x * g) non_unital_subsemiring.mem_center_iff
The center is commutative.
Equations
- non_unital_subsemiring.center.non_unital_comm_semiring = {add := non_unital_semiring.add (non_unital_subsemiring_class.to_non_unital_semiring (non_unital_subsemiring.center R)), add_assoc := _, zero := non_unital_semiring.zero (non_unital_subsemiring_class.to_non_unital_semiring (non_unital_subsemiring.center R)), zero_add := _, add_zero := _, nsmul := non_unital_semiring.nsmul (non_unital_subsemiring_class.to_non_unital_semiring (non_unital_subsemiring.center R)), nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := comm_semigroup.mul subsemigroup.center.comm_semigroup, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, mul_comm := _}
The centralizer of a set as non-unital subsemiring.
Equations
- non_unital_subsemiring.centralizer s = {carrier := s.centralizer (distrib.to_has_mul R), add_mem' := _, zero_mem' := _, mul_mem' := _}
The non_unital_subsemiring
generated by a set.
Equations
- non_unital_subsemiring.closure s = has_Inf.Inf {S : non_unital_subsemiring R | s ⊆ ↑S}
The non-unital subsemiring generated by a set includes the set.
A non-unital subsemiring S
includes closure s
if and only if it includes s
.
Subsemiring closure of a set is monotone in its argument: if s ⊆ t
,
then closure s ≤ closure t
.
The additive closure of a non-unital subsemigroup is a non-unital subsemiring.
Equations
- M.non_unital_subsemiring_closure = {carrier := (add_submonoid.closure ↑M).carrier, add_mem' := _, zero_mem' := _, mul_mem' := _}
The non_unital_subsemiring
generated by a multiplicative subsemigroup coincides with the
non_unital_subsemiring.closure
of the subsemigroup itself .
The elements of the non-unital subsemiring closure of M
are exactly the elements of the
additive closure of a multiplicative subsemigroup M
.
An induction principle for closure membership. If p
holds for 0
, 1
, and all elements
of s
, and is preserved under addition and multiplication, then p
holds for all elements
of the closure of s
.
An induction principle for closure membership for predicates with two arguments.
closure
forms a Galois insertion with the coercion to set.
Equations
- non_unital_subsemiring.gi R = {choice := λ (s : set R) (_x : ↑(non_unital_subsemiring.closure s) ≤ s), non_unital_subsemiring.closure s, gc := _, le_l_u := _, choice_eq := _}
Closure of a non-unital subsemiring S
equals S
.
Given non_unital_subsemiring
s s
, t
of semirings R
, S
respectively, s.prod t
is
s × t
as a non-unital subsemiring of R × S
.
Product of non-unital subsemirings is isomorphic to their product as semigroups.
Restriction of a non-unital ring homomorphism to a non-unital subsemiring of the codomain.
Restriction of a non-unital ring homomorphism to its range interpreted as a non-unital subsemiring.
This is the bundled version of set.range_factorization
.
The range of a surjective non-unital ring homomorphism is the whole of the codomain.
The non-unital subsemiring of elements x : R
such that f x = g x
If two non-unital ring homomorphisms are equal on a set, then they are equal on its non-unital subsemiring closure.
The image under a ring homomorphism of the subsemiring generated by a set equals the subsemiring generated by the image of the set.
The non-unital ring homomorphism associated to an inclusion of non-unital subsemirings.
Makes the identity isomorphism from a proof two non-unital subsemirings of a multiplicative monoid are equal.
Equations
- ring_equiv.non_unital_subsemiring_congr h = {to_fun := (equiv.set_congr _).to_fun, inv_fun := (equiv.set_congr _).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
Restrict a non-unital ring homomorphism with a left inverse to a ring isomorphism to its
non_unital_ring_hom.srange
.
Equations
- ring_equiv.sof_left_inverse' h = {to_fun := ⇑(non_unital_ring_hom.srange_restrict f), inv_fun := λ (x : ↥(non_unital_ring_hom.srange f)), g (⇑(non_unital_subsemiring_class.subtype (non_unital_ring_hom.srange f)) x), left_inv := h, right_inv := _, map_mul' := _, map_add' := _}
Given an equivalence e : R ≃+* S
of non-unital semirings and a non-unital subsemiring
s
of R
, non_unital_subsemiring_map e s
is the induced equivalence between s
and
s.map e
Equations
- e.non_unital_subsemiring_map s = {to_fun := (e.to_add_equiv.add_submonoid_map s.to_add_submonoid).to_fun, inv_fun := (e.to_add_equiv.add_submonoid_map s.to_add_submonoid).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}