Subfields #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
Let K
be a field. This file defines the "bundled" subfield type subfield K
, a type
whose terms correspond to subfields of K
. This is the preferred way to talk
about subfields in mathlib. Unbundled subfields (s : set K
and is_subfield s
)
are not in this file, and they will ultimately be deprecated.
We prove that subfields 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 subfield R
, sending a subset of R
to the subfield it generates, and prove that it is a Galois insertion.
Main definitions #
Notation used here:
(K : Type u) [field K] (L : Type u) [field L] (f g : K →+* L)
(A : subfield K) (B : subfield L) (s : set K)
-
subfield R
: the type of subfields of a ringR
. -
instance : complete_lattice (subfield R)
: the complete lattice structure on the subfields. -
subfield.closure
: subfield closure of a set, i.e., the smallest subfield that includes the set. -
subfield.gi
:closure : set M → subfield M
and coercioncoe : subfield M → set M
form agalois_insertion
. -
comap f B : subfield K
: the preimage of a subfieldB
along the ring homomorphismf
-
map f A : subfield L
: the image of a subfieldA
along the ring homomorphismf
. -
f.field_range : subfield B
: the range of the ring homomorphismf
. -
eq_locus_field f g : subfield K
: given ring homomorphismsf g : K →+* R
, the subfield ofK
wheref x = g x
Implementation notes #
A subfield is implemented as a subring which is is closed under ⁻¹
.
Lattice inclusion (e.g. ≤
and ⊓
) is used rather than set notation (⊆
and ∩
), although
∈
is defined as membership of a subfield's underlying set.
Tags #
subfield, subfields
- to_subring_class : subring_class S K
- to_inv_mem_class : inv_mem_class S K
subfield_class S K
states S
is a type of subsets s ⊆ K
closed under field operations.
Instances of this typeclass
A subfield contains 1
, products and inverses.
Be assured that we're not actually proving that subfields are subgroups:
subgroup_class
is really an abbreviation of subgroup_with_or_without_zero_class
.
A subfield inherits a field structure
Equations
- subfield_class.to_field S s = function.injective.field coe _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
A subfield of a linear_ordered_field
is a linear_ordered_field
.
Equations
- subfield_class.to_linear_ordered_field S s = function.injective.linear_ordered_field coe _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- carrier : set K
- mul_mem' : ∀ {a b : K}, a ∈ self.carrier → b ∈ self.carrier → a * b ∈ self.carrier
- one_mem' : 1 ∈ self.carrier
- add_mem' : ∀ {a b : K}, a ∈ self.carrier → b ∈ self.carrier → a + b ∈ self.carrier
- zero_mem' : 0 ∈ self.carrier
- neg_mem' : ∀ {x : K}, x ∈ self.carrier → -x ∈ self.carrier
- inv_mem' : ∀ (x : K), x ∈ self.carrier → x⁻¹ ∈ self.carrier
subfield R
is the type of subfields of R
. A subfield 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.
Instances for subfield
The underlying add_subgroup
of a subfield.
Equations
- s.to_add_subgroup = {carrier := s.to_subring.to_add_subgroup.carrier, add_mem' := _, zero_mem' := _, neg_mem' := _}
The underlying submonoid of a subfield.
Equations
- s.to_submonoid = {carrier := s.to_subring.to_submonoid.carrier, mul_mem' := _, one_mem' := _}
Equations
- subfield.set_like = {coe := subfield.carrier _inst_1, coe_injective' := _}
Copy of a subfield with a new carrier
equal to the old one. Useful to fix definitional
equalities.
A subfield of a linear_ordered_field
is a linear_ordered_field
.
Equations
- s.to_linear_ordered_field = function.injective.linear_ordered_field coe _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Equations
- s.to_algebra = s.subtype.to_algebra
Partial order #
top #
The ring equiv between the top element of subfield K
and K
.
Equations
comap #
The preimage of a subfield along a ring homomorphism is a subfield.
Equations
- subfield.comap f s = {carrier := (subring.comap f s.to_subring).carrier, mul_mem' := _, one_mem' := _, add_mem' := _, zero_mem' := _, neg_mem' := _, inv_mem' := _}
map #
The image of a subfield along a ring homomorphism is a subfield.
Equations
- subfield.map f s = {carrier := (subring.map f s.to_subring).carrier, mul_mem' := _, one_mem' := _, add_mem' := _, zero_mem' := _, neg_mem' := _, inv_mem' := _}
range #
The range of a ring homomorphism, as a subfield of the target. See Note [range copy pattern].
Equations
- f.field_range = (subfield.map f ⊤).copy (set.range ⇑f) _
Instances for ↥ring_hom.field_range
The range of a morphism of fields is a fintype, if the domain is a fintype.
Note that this instance can cause a diamond with subtype.fintype
if L
is also a fintype.
Equations
inf #
The inf of two subfields is their intersection.
Subfields of a ring form a complete lattice.
Equations
- subfield.complete_lattice = {sup := complete_lattice.sup (complete_lattice_of_Inf (subfield K) subfield.is_glb_Inf), le := complete_lattice.le (complete_lattice_of_Inf (subfield K) subfield.is_glb_Inf), lt := complete_lattice.lt (complete_lattice_of_Inf (subfield K) subfield.is_glb_Inf), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := has_inf.inf subfield.has_inf, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := complete_lattice.Sup (complete_lattice_of_Inf (subfield K) subfield.is_glb_Inf), le_Sup := _, Sup_le := _, Inf := complete_lattice.Inf (complete_lattice_of_Inf (subfield K) subfield.is_glb_Inf), Inf_le := _, le_Inf := _, top := ⊤, bot := complete_lattice.bot (complete_lattice_of_Inf (subfield K) subfield.is_glb_Inf), le_top := _, bot_le := _}
subfield closure of a subset #
The subfield
generated by a set.
The subfield generated by a set includes the set.
An induction principle for closure membership. If p
holds for 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
- subfield.gi K = {choice := λ (s : set K) (_x : ↑(subfield.closure s) ≤ s), subfield.closure s, gc := _, le_l_u := _, choice_eq := _}
Closure of a subfield S
equals S
.
The underlying set of a non-empty directed Sup of subfields is just a union of the subfields. Note that this fails without the directedness assumption (the union of two subfields is typically not a subfield)
Restriction of a ring homomorphism to its range interpreted as a subfield.
Equations
The image under a ring homomorphism of the subfield generated by a set equals the subfield generated by the image of the set.
The ring homomorphism associated to an inclusion of subfields.
Equations
- subfield.inclusion h = S.subtype.cod_restrict T _
Makes the identity isomorphism from a proof two subfields of a multiplicative monoid are equal.
Equations
- ring_equiv.subfield_congr h = {to_fun := (equiv.set_congr _).to_fun, inv_fun := (equiv.set_congr _).inv_fun, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}