The areas / V06. Rings, fields and ordered algebra
Mathlib.Algebra.Ring.Subring.Defs
92 declarations. Mathlib docs · Source
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 IsSubring 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 : CompleteLattice (Subring R): the complete lattice structure on the subrings. -
Subring.center: the center of a ringR. -
Subring.closure: subring closure of a set, i.e., the smallest subring that includes the set. -
Subring.gi:closure : Set M → Subring Mand coercion(↑) : Subring M → et Mform aGaloisInsertion. -
comap f B : Subring A: the preimage of a subringBalong the ring homomorphismf -
map f A : Subring B: the image of a subringAalong the ring homomorphismf. -
prod A B : Subring (R × S): the product of subrings -
f.range : Subring B: the range of the ring homomorphismf. -
eqLocus f g : Subring R: given ring homomorphismsf g : R →+* S, the subring ofRwheref 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
Partial order
def Subring.ctorIdx E1 #
{R : Type u} → {inst : NonAssocRing R} → Subring R → ℕ
theorem Subring.mk.inj E1 #
∀ {R : Type u} {inst : NonAssocRing R} {toSubsemiring : Subsemiring R}
{neg_mem' : ∀ {x : R}, x ∈ toSubsemiring.carrier → -x ∈ toSubsemiring.carrier} {toSubsemiring_1 : Subsemiring R}
{neg_mem'_1 : ∀ {x : R}, x ∈ toSubsemiring_1.carrier → -x ∈ toSubsemiring_1.carrier},
{ toSubsemiring := toSubsemiring, neg_mem' := neg_mem' } =
{ toSubsemiring := toSubsemiring_1, neg_mem' := neg_mem'_1 } →
toSubsemiring = toSubsemiring_1
theorem Subring.mk.injEq E0 #
∀ {R : Type u} [inst : NonAssocRing R] (toSubsemiring : Subsemiring R)
(neg_mem' : ∀ {x : R}, x ∈ toSubsemiring.carrier → -x ∈ toSubsemiring.carrier) (toSubsemiring_1 : Subsemiring R)
(neg_mem'_1 : ∀ {x : R}, x ∈ toSubsemiring_1.carrier → -x ∈ toSubsemiring_1.carrier),
({ toSubsemiring := toSubsemiring, neg_mem' := neg_mem' } =
{ toSubsemiring := toSubsemiring_1, neg_mem' := neg_mem'_1 }) =
(toSubsemiring = toSubsemiring_1)
class SubringClass E1 #
(S : Type u_1) → (R : outParam (Type u)) → [NonAssocRing R] → [SetLike S R] → Prop
SubringClass S R states that S is a type of subsets s ⊆ R that
are both a multiplicative submonoid and an additive subgroup.
ctor SubringClass.mk E0 #
∀ {S : Type u_1} {R : outParam (Type u)} [inst : NonAssocRing R] [inst_1 : SetLike S R]
[toSubsemiringClass : SubsemiringClass S R] [toNegMemClass : NegMemClass S R], SubringClass S R
instance SubringClass.toNegMemClass E0 #
∀ {S : Type u_1} {R : outParam (Type u)} {inst : NonAssocRing R} {inst_1 : SetLike S R} [self : SubringClass S R],
NegMemClass S R
instance SubringClass.toSubsemiringClass E0 #
∀ {S : Type u_1} {R : outParam (Type u)} {inst : NonAssocRing R} {inst_1 : SetLike S R} [self : SubringClass S R],
SubsemiringClass S R
instance SubringClass.addSubgroupClass E0 #
∀ (S : Type u_1) (R : Type u) [inst : SetLike S R] [inst_1 : NonAssocRing R] [h : SubringClass S R],
AddSubgroupClass S R
instance SubringClass.nonUnitalSubringClass E0 #
∀ (S : Type u_1) (R : Type u) [inst : SetLike S R] [inst_1 : NonAssocRing R] [SubringClass S R],
NonUnitalSubringClass S R
theorem intCast_mem E0 #
∀ {R : Type u} {S : Type v} [inst : NonAssocRing R] [inst_1 : SetLike S R] [hSR : SubringClass S R] (s : S) (n : ℤ),
↑n ∈ s
instance SubringClass.toHasIntCast E0 #
{R : Type u} →
{S : Type v} → [inst : NonAssocRing R] → [inst_1 : SetLike S R] → [hSR : SubringClass S R] → (s : S) → IntCast ↥s
instance SubringClass.toNonAssocRing E0 #
{R : Type u} →
{S : Type v} → [inst : NonAssocRing R] → [inst_1 : SetLike S R] → [hSR : SubringClass S R] → (s : S) → NonAssocRing ↥s
A subring of a non-unital ring inherits a non-unital ring structure
instance SubringClass.toRing E0 #
{S : Type v} → (s : S) → {R : Type u_1} → [inst : Ring R] → [inst_1 : SetLike S R] → [SubringClass S R] → Ring ↥s
A subring of a ring inherits a ring structure
instance SubringClass.toNonAssocCommRing E0 #
{S : Type v} →
(s : S) →
{R : Type u_1} → [inst : NonAssocCommRing R] → [inst_1 : SetLike S R] → [SubringClass S R] → NonAssocCommRing ↥s
A subring of a NonAssocCommRing is a NonAssocCommRing.
instance SubringClass.toCommRing E0 #
{S : Type v} →
(s : S) → {R : Type u_1} → [inst : CommRing R] → [inst_1 : SetLike S R] → [SubringClass S R] → CommRing ↥s
A subring of a CommRing is a CommRing.
instance SubringClass.instIsDomainSubtypeMem E0 #
∀ {S : Type v} (s : S) {R : Type u_1} [inst : Ring R] [IsDomain R] [inst_2 : SetLike S R] [inst_3 : SubringClass S R],
IsDomain ↥s
A subring of a domain is a domain.
def SubringClass.subtype E1 #
{R : Type u} →
{S : Type v} → [inst : NonAssocRing R] → [inst_1 : SetLike S R] → [hSR : SubringClass S R] → (s : S) → ↥s →+* R
The natural ring hom from a subring of ring R to R.
theorem SubringClass.subtype_apply E0 #
∀ {R : Type u} {S : Type v} [inst : NonAssocRing R] [inst_1 : SetLike S R] [hSR : SubringClass S R] {s : S} (x : ↥s),
(SubringClass.subtype s) x = ↑x
theorem SubringClass.subtype_injective E1 #
∀ {R : Type u} {S : Type v} [inst : NonAssocRing R] [inst_1 : SetLike S R] [hSR : SubringClass S R] (s : S),
Function.Injective ⇑(SubringClass.subtype s)
theorem SubringClass.coe_subtype E0 #
∀ {R : Type u} {S : Type v} [inst : NonAssocRing R] [inst_1 : SetLike S R] [hSR : SubringClass S R] (s : S),
⇑(SubringClass.subtype s) = Subtype.val
theorem SubringClass.coe_natCast E0 #
∀ {R : Type u} {S : Type v} [inst : NonAssocRing R] [inst_1 : SetLike S R] [hSR : SubringClass S R] (s : S) (n : ℕ),
↑↑n = ↑n
theorem SubringClass.coe_intCast E0 #
∀ {R : Type u} {S : Type v} [inst : NonAssocRing R] [inst_1 : SetLike S R] [hSR : SubringClass S R] (s : S) (n : ℤ),
↑↑n = ↑n
structure Subring E3 #
(R : Type u) → [NonAssocRing R] → Type u
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.
abbrev Subring.toSubsemiring E1 #
{R : Type u} → [inst : NonAssocRing R] → Subring R → Subsemiring R
Reinterpret a Subring as a Subsemiring.
theorem Subring.neg_mem' E1 #
∀ {R : Type u} [inst : NonAssocRing R] (self : Subring R) {x : R}, x ∈ self.carrier → -x ∈ self.carrier
G is closed under negation
abbrev Subring.toAddSubgroup E1 #
{R : Type u} → [inst : NonAssocRing R] → Subring R → AddSubgroup R
Reinterpret a Subring as an AddSubgroup.
ctor Subring.mk E0 #
{R : Type u} →
[inst : NonAssocRing R] →
(toSubsemiring : Subsemiring R) → (∀ {x : R}, x ∈ toSubsemiring.carrier → -x ∈ toSubsemiring.carrier) → Subring R
theorem Subring.toSubsemiring_injective E1 #
∀ {R : Type u} [inst : NonAssocRing R], Function.Injective Subring.toSubsemiring
theorem Subring.toSubsemiring_inj E0 #
∀ {R : Type u} [inst : NonAssocRing R] {s t : Subring R}, s.toSubsemiring = t.toSubsemiring ↔ s = t
instance Subring.instSetLike E0 #
{R : Type u} → [inst : NonAssocRing R] → SetLike (Subring R) R
theorem Subring.toAddSubgroup_injective E1 #
∀ {R : Type u} [inst : NonAssocRing R], Function.Injective Subring.toAddSubgroup
theorem Subring.toSubmonoid_injective E1 #
∀ {R : Type u} [inst : NonAssocRing R], Function.Injective fun s ↦ s.toSubmonoid
instance Subring.instPartialOrder E0 #
{R : Type u} → [inst : NonAssocRing R] → PartialOrder (Subring R)
def Subring.ofClass E1 #
{S : Type u_1} → {R : Type u_2} → [inst : NonAssocRing R] → [inst_1 : SetLike S R] → [SubringClass S R] → S → Subring R
The actual Subring obtained from an element of a SubringClass.
theorem Subring.coe_ofClass E0 #
∀ {S : Type u_1} {R : Type u_2} [inst : NonAssocRing R] [inst_1 : SetLike S R] [inst_2 : SubringClass S R] (s : S),
↑(Subring.ofClass s) = ↑s
instance Subring.instCanLiftSetCoeAndMemOfNatForallForallForallForallHAddForallForallForallForallHMulForallForallNeg E0 #
∀ {R : Type u} [inst : NonAssocRing R],
CanLift (Set R) (Subring R) SetLike.coe fun s ↦
0 ∈ s ∧
(∀ {x y : R}, x ∈ s → y ∈ s → x + y ∈ s) ∧
1 ∈ s ∧ (∀ {x y : R}, x ∈ s → y ∈ s → x * y ∈ s) ∧ ∀ {x : R}, x ∈ s → -x ∈ s
instance Subring.instSubringClass E0 #
∀ {R : Type u} [inst : NonAssocRing R], SubringClass (Subring R) R
def Subring.toNonUnitalSubring E1 #
{R : Type u} → [inst : NonAssocRing R] → Subring R → NonUnitalSubring R
Turn a Subring into a NonUnitalSubring by forgetting that it contains 1.
theorem Subring.mem_toSubsemiring E0 #
∀ {R : Type u} [inst : NonAssocRing R] {s : Subring R} {x : R}, x ∈ s.toSubsemiring ↔ x ∈ s
theorem Subring.mem_carrier E0 #
∀ {R : Type u} [inst : NonAssocRing R] {s : Subring R} {x : R}, x ∈ s.carrier ↔ x ∈ s
theorem Subring.mem_mk E0 #
∀ {R : Type u} [inst : NonAssocRing R] {S : Subsemiring R} {x : R} (h : ∀ {x : R}, x ∈ S.carrier → -x ∈ S.carrier),
x ∈ { toSubsemiring := S, neg_mem' := h } ↔ x ∈ S
theorem Subring.coe_set_mk E0 #
∀ {R : Type u} [inst : NonAssocRing R] (S : Subsemiring R) (h : ∀ {x : R}, x ∈ S.carrier → -x ∈ S.carrier),
↑{ toSubsemiring := S, neg_mem' := h } = ↑S
theorem Subring.mk_le_mk E0 #
∀ {R : Type u} [inst : NonAssocRing R] {S S' : Subsemiring R} (h₁ : ∀ {x : R}, x ∈ S.carrier → -x ∈ S.carrier)
(h₂ : ∀ {x : R}, x ∈ S'.carrier → -x ∈ S'.carrier),
{ toSubsemiring := S, neg_mem' := h₁ } ≤ { toSubsemiring := S', neg_mem' := h₂ } ↔ S ≤ S'
theorem Subring.one_mem_toNonUnitalSubring E1 #
∀ {R : Type u} [inst : NonAssocRing R] (S : Subring R), 1 ∈ S.toNonUnitalSubring
theorem Subring.ext E1 #
∀ {R : Type u} [inst : NonAssocRing R] {S T : Subring R}, (∀ (x : R), x ∈ S ↔ x ∈ T) → S = T
Two subrings are equal if they have the same elements.
theorem Subring.ext_iff E0 #
∀ {R : Type u} [inst : NonAssocRing R] {S T : Subring R}, S = T ↔ ∀ (x : R), x ∈ S ↔ x ∈ T
def Subring.copy E1 #
{R : Type u} → [inst : NonAssocRing R] → (S : Subring R) → (s : Set R) → s = ↑S → Subring R
Copy of a subring with a new carrier equal to the old one. Useful to fix definitional
equalities.
theorem Subring.copy_toSubsemiring E0 #
∀ {R : Type u} [inst : NonAssocRing R] (S : Subring R) (s : Set R) (hs : s = ↑S),
(S.copy s hs).toSubsemiring = { carrier := s, mul_mem' := ⋯, one_mem' := ⋯, add_mem' := ⋯, zero_mem' := ⋯ }
theorem Subring.coe_copy E0 #
∀ {R : Type u} [inst : NonAssocRing R] (S : Subring R) (s : Set R) (hs : s = ↑S), ↑(S.copy s hs) = s
theorem Subring.copy_eq E0 #
∀ {R : Type u} [inst : NonAssocRing R] (S : Subring R) (s : Set R) (hs : s = ↑S), S.copy s hs = S
def Subring.mk' E1 #
{R : Type u} →
[inst : NonAssocRing R] → (s : Set R) → (sm : Submonoid R) → (sa : AddSubgroup R) → ↑sm = s → ↑sa = s → Subring R
Construct a Subring R from a set s, a submonoid sm, and an additive
subgroup sa such that x ∈ s ↔ x ∈ sm ↔ x ∈ sa.
theorem Subring.coe_mk' E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Set R) (sm : Submonoid R) (sa : AddSubgroup R) (hm : ↑sm = s)
(ha : ↑sa = s), ↑(Subring.mk' s sm sa hm ha) = s
theorem Subring.mem_mk' E0 #
∀ {R : Type u} [inst : NonAssocRing R] {s : Set R} {sm : Submonoid R} (hm : ↑sm = s) {sa : AddSubgroup R} (ha : ↑sa = s)
{x : R}, x ∈ Subring.mk' s sm sa hm ha ↔ x ∈ s
theorem Subring.mk'_toSubmonoid E0 #
∀ {R : Type u} [inst : NonAssocRing R] {s : Set R} {sm : Submonoid R} (hm : ↑sm = s) {sa : AddSubgroup R}
(ha : ↑sa = s), (Subring.mk' s sm sa hm ha).toSubmonoid = sm
theorem Subring.mk'_toAddSubgroup E0 #
∀ {R : Type u} [inst : NonAssocRing R] {s : Set R} {sm : Submonoid R} (hm : ↑sm = s) {sa : AddSubgroup R}
(ha : ↑sa = s), (Subring.mk' s sm sa hm ha).toAddSubgroup = sa
def Subsemiring.toSubring E1 #
{R : Type u} → [inst : NonAssocRing R] → (s : Subsemiring R) → -1 ∈ s → Subring R
A Subsemiring containing -1 is a Subring.
theorem Subsemiring.toSubring_toSubsemiring E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subsemiring R) (hneg : -1 ∈ s), (s.toSubring hneg).toSubsemiring = s
theorem Subring.one_mem E1 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R), 1 ∈ s
A subring contains the ring's 1.
theorem Subring.zero_mem E1 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R), 0 ∈ s
A subring contains the ring's 0.
theorem Subring.mul_mem E1 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) {x y : R}, x ∈ s → y ∈ s → x * y ∈ s
A subring is closed under multiplication.
theorem Subring.add_mem E1 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) {x y : R}, x ∈ s → y ∈ s → x + y ∈ s
A subring is closed under addition.
theorem Subring.neg_mem E1 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) {x : R}, x ∈ s → -x ∈ s
A subring is closed under negation.
theorem Subring.sub_mem E1 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) {x y : R}, x ∈ s → y ∈ s → x - y ∈ s
A subring is closed under subtraction
instance Subring.toRing E0 #
{R : Type u_1} → [inst : Ring R] → (s : Subring R) → Ring ↥s
A subring of a ring inherits a ring structure
theorem Subring.zsmul_mem E1 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) {x : R}, x ∈ s → ∀ (n : ℤ), n • x ∈ s
theorem Subring.pow_mem E1 #
∀ {R : Type u_1} [inst : Ring R] (s : Subring R) {x : R}, x ∈ s → ∀ (n : ℕ), x ^ n ∈ s
theorem Subring.coe_add E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) (x y : ↥s), ↑(x + y) = ↑x + ↑y
theorem Subring.coe_neg E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) (x : ↥s), ↑(-x) = -↑x
theorem Subring.coe_mul E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) (x y : ↥s), ↑(x * y) = ↑x * ↑y
theorem Subring.coe_zero E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R), ↑0 = 0
theorem Subring.coe_one E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R), ↑1 = 1
theorem Subring.coe_pow E0 #
∀ {R : Type u_1} [inst : Ring R] (s : Subring R) (x : ↥s) (n : ℕ), ↑(x ^ n) = ↑x ^ n
theorem Subring.coe_eq_zero_iff E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) {x : ↥s}, ↑x = 0 ↔ x = 0
theorem Subring.mk_eq_zero E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) {x : R} (hx : x ∈ s), ⟨x, hx⟩ = 0 ↔ x = 0
instance Subring.toCommRing E0 #
{R : Type u_1} → [inst : CommRing R] → (s : Subring R) → CommRing ↥s
A subring of a CommRing is a CommRing.
instance Subring.instNontrivialSubtypeMem E0 #
∀ {R : Type u_1} [inst : NonAssocRing R] [Nontrivial R] (s : Subring R), Nontrivial ↥s
A subring of a non-trivial ring is non-trivial.
instance Subring.instNoZeroDivisorsSubtypeMem E0 #
∀ {R : Type u_1} [inst : NonAssocRing R] [NoZeroDivisors R] (s : Subring R), NoZeroDivisors ↥s
A subring of a ring with no zero divisors has no zero divisors.
instance Subring.instIsDomainSubtypeMem E0 #
∀ {R : Type u_1} [inst : Ring R] [IsDomain R] (s : Subring R), IsDomain ↥s
A subring of a domain is a domain.
def Subring.subtype E1 #
{R : Type u} → [inst : NonAssocRing R] → (s : Subring R) → ↥s →+* R
The natural ring hom from a subring of ring R to R.
theorem Subring.subtype_apply E0 #
∀ {R : Type u} [inst : NonAssocRing R] {s : Subring R} (x : ↥s), s.subtype x = ↑x
theorem Subring.subtype_injective E1 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R), Function.Injective ⇑s.subtype
theorem Subring.coe_subtype E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R), ⇑s.subtype = Subtype.val
theorem Subring.coe_natCast E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) (n : ℕ), ↑↑n = ↑n
theorem Subring.coe_intCast E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R) (n : ℤ), ↑↑n = ↑n
theorem Subring.coe_toSubsemiring E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R), ↑s.toSubsemiring = ↑s
theorem Subring.mem_toSubmonoid E0 #
∀ {R : Type u} [inst : NonAssocRing R] {s : Subring R} {x : R}, x ∈ s.toSubmonoid ↔ x ∈ s
theorem Subring.coe_toSubmonoid E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R), ↑s.toSubmonoid = ↑s
theorem Subring.mem_toAddSubgroup E0 #
∀ {R : Type u} [inst : NonAssocRing R] {s : Subring R} {x : R}, x ∈ s.toAddSubgroup ↔ x ∈ s
theorem Subring.coe_toAddSubgroup E0 #
∀ {R : Type u} [inst : NonAssocRing R] (s : Subring R), ↑s.toAddSubgroup = ↑s
def NonUnitalSubring.toSubring E1 #
{R : Type u} → [inst : NonAssocRing R] → (S : NonUnitalSubring R) → 1 ∈ S → Subring R
Turn a non-unital subring containing 1 into a subring.
theorem Subring.toNonUnitalSubring_toSubring E1 #
∀ {R : Type u} [inst : NonAssocRing R] (S : Subring R), S.toNonUnitalSubring.toSubring ⋯ = S
theorem NonUnitalSubring.toSubring_toNonUnitalSubring E1 #
∀ {R : Type u} [inst : NonAssocRing R] (S : NonUnitalSubring R) (h1 : 1 ∈ S), (S.toSubring h1).toNonUnitalSubring = S