Subrings
Let R
be a ring. This file defines the "bundled" subring type subring R
, a type
whose terms correspond to subrings of R
. This is the preferred way to talk
about subrings in mathlib. Unbundled subrings (s : set R
and is_subring s
)
are not in this file, and they will ultimately be deprecated.
We prove that subrings are a complete lattice, and that you can map
(pushforward) and
comap
(pull back) them along ring homomorphisms.
We define the closure
construction from set R
to subring R
, sending a subset of R
to the subring it generates, and prove that it is a Galois insertion.
Main definitions
Notation used here:
(R : Type u) [ring R] (S : Type u) [ring S] (f g : R →+* S)
(A : subring R) (B : subring S) (s : set R)
subring R
: the type of subrings of a ringR
.instance : complete_lattice (subring R)
: the complete lattice structure on the subrings.subring.closure
: subring closure of a set, i.e., the smallest subring that includes the set.subring.gi
:closure : set M → subring M
and coercioncoe : subring M → set M
form agalois_insertion
.comap f B : subring A
: the preimage of a subringB
along the ring homomorphismf
map f A : subring B
: the image of a subringA
along the ring homomorphismf
.f.range : subring B
: the range of the ring homomorphismf
.eq_locus f g : subring R
: given ring homomorphismsf g : R →+* S
, the subring ofR
wheref x = g x
Implementation notes
A subring is implemented as a subsemiring which is also an additive subgroup. The initial PR was as a submonoid which is also an additive subgroup.
Lattice inclusion (e.g. ≤
and ⊓
) is used rather than set notation (⊆
and ∩
), although
∈
is defined as membership of a subring's underlying set.
Tags
subring, subrings
Reinterpret a subring
as an add_subgroup
.
- carrier : set R
- one_mem' : 1 ∈ c.carrier
- mul_mem' : ∀ {a b : R}, a ∈ c.carrier → b ∈ c.carrier → a * b ∈ c.carrier
- zero_mem' : 0 ∈ c.carrier
- add_mem' : ∀ {a b : R}, a ∈ c.carrier → b ∈ c.carrier → a + b ∈ c.carrier
- neg_mem' : ∀ {x : R}, x ∈ c.carrier → -x ∈ c.carrier
subring R
is the type of subrings of R
. A subring of R
is a subset s
that is a
multiplicative submonoid and an additive subgroup. Note in particular that it shares the
same 0 and 1 as R.
Reinterpret a subring
as a subsemiring
.
Equations
- subring.has_coe = {coe := subring.carrier _inst_1}
Construct a subring
from a set satisfying is_subring
.
A subsemiring
containing -1 is a subring
.
A subring contains the ring's 1.
A subring contains the ring's 0.
A subring of a ring inherits a ring structure
Equations
- s.to_ring = {add := add_comm_group.add s.to_add_subgroup.to_add_comm_group, add_assoc := _, zero := add_comm_group.zero s.to_add_subgroup.to_add_comm_group, zero_add := _, add_zero := _, neg := add_comm_group.neg s.to_add_subgroup.to_add_comm_group, add_left_neg := _, add_comm := _, mul := monoid.mul s.to_submonoid.to_monoid, mul_assoc := _, one := monoid.one s.to_submonoid.to_monoid, one_mul := _, mul_one := _, left_distrib := _, right_distrib := _}
A subring of a comm_ring
is a comm_ring
.
Equations
- s.to_comm_ring = {add := ring.add s.to_ring, add_assoc := _, zero := ring.zero s.to_ring, zero_add := _, add_zero := _, neg := ring.neg s.to_ring, add_left_neg := _, add_comm := _, mul := ring.mul s.to_ring, mul_assoc := _, one := ring.one s.to_ring, one_mul := _, mul_one := _, left_distrib := _, right_distrib := _, mul_comm := _}
Partial order
Equations
- subring.partial_order = {le := λ (s t : subring R), ∀ ⦃x : R⦄, x ∈ s → x ∈ t, lt := partial_order.lt (partial_order.lift coe subring.ext'), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _}
top
comap
map
range
The range of a ring homomorphism, as a subring of the target.
Equations
- f.range = subring.map f ⊤
A subring of a commutative ring is a commutative ring.
Equations
- S.subset_comm_ring = {add := ring.add S.to_ring, add_assoc := _, zero := ring.zero S.to_ring, zero_add := _, add_zero := _, neg := ring.neg S.to_ring, add_left_neg := _, add_comm := _, mul := ring.mul S.to_ring, mul_assoc := _, one := ring.one S.to_ring, one_mul := _, mul_one := _, left_distrib := _, right_distrib := _, mul_comm := _}
A subring of an integral domain is an integral domain.
Equations
- subring.subring.domain S = {add := comm_ring.add S.subset_comm_ring, add_assoc := _, zero := comm_ring.zero S.subset_comm_ring, zero_add := _, add_zero := _, neg := comm_ring.neg S.subset_comm_ring, add_left_neg := _, add_comm := _, mul := comm_ring.mul S.subset_comm_ring, mul_assoc := _, one := comm_ring.one S.subset_comm_ring, one_mul := _, mul_one := _, left_distrib := _, right_distrib := _, mul_comm := _, exists_pair_ne := _, eq_zero_or_eq_zero_of_mul_eq_zero := _}
bot
Equations
- subring.has_bot = {bot := (int.cast_ring_hom R).range}
Equations
- subring.inhabited = {default := ⊥}
inf
Equations
- subring.has_Inf = {Inf := λ (s : set (subring R)), subring.mk' (⋂ (t : subring R) (H : t ∈ s), ↑t) (⨅ (t : subring R) (H : t ∈ s), t.to_submonoid) (⨅ (t : subring R) (H : t ∈ s), t.to_add_subgroup) _ _}
Subrings of a ring form a complete lattice.
Equations
- subring.complete_lattice = {sup := complete_lattice.sup (complete_lattice_of_Inf (subring R) subring.complete_lattice._proof_1), le := complete_lattice.le (complete_lattice_of_Inf (subring R) subring.complete_lattice._proof_1), lt := complete_lattice.lt (complete_lattice_of_Inf (subring R) subring.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 subring.has_inf, inf_le_left := _, inf_le_right := _, le_inf := _, top := ⊤, le_top := _, bot := ⊥, bot_le := _, Sup := complete_lattice.Sup (complete_lattice_of_Inf (subring R) subring.complete_lattice._proof_1), Inf := complete_lattice.Inf (complete_lattice_of_Inf (subring R) subring.complete_lattice._proof_1), le_Sup := _, Sup_le := _, Inf_le := _, le_Inf := _}
subring closure of a subset
The subring generated by a set includes the set.
An induction principle for closure membership. If p
holds for 0
, 1
, and all elements
of s
, and is preserved under addition, negation, and multiplication, then p
holds for all elements
of the closure of s
.
closure
forms a Galois insertion with the coercion to set.
Equations
- subring.gi R = {choice := λ (s : set R) (_x : ↑(subring.closure s) ≤ s), subring.closure s, gc := _, le_l_u := _, choice_eq := _}
Closure of a subring S
equals S
.
Product of subrings is isomorphic to their product as rings.
The underlying set of a non-empty directed Sup of subrings is just a union of the subrings. Note that this fails without the directedness assumption (the union of two subrings is typically not a subring)
Restriction of a ring homomorphism to its range interpreted as a subsemiring.
Equations
- f.range_restrict = f.cod_restrict' f.range _
The range of a surjective ring homomorphism is the whole of the codomain.
The subring of elements x : R
such that f x = g x
, i.e.,
the equalizer of f and g as a subring of R
The image under a ring homomorphism of the subring generated by a set equals the subring generated by the image of the set.
The ring homomorphism associated to an inclusion of subrings.
Equations
- subring.inclusion h = ↑(S.subtype.cod_restrict' T _)
Makes the identity isomorphism from a proof two subrings of a multiplicative monoid are equal.
Equations
- ring_equiv.subring_congr h = {to_fun := (equiv.set_congr _).to_fun, inv_fun := (equiv.set_congr _).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}