Documentation

Mathlib.FieldTheory.Subfield

Subfields #

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 IsSubfield 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 ring R.

• instance : CompleteLattice (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 coercion (↑) : Subfield M → Set M form a GaloisInsertion.

• comap f B : Subfield K : the preimage of a subfield B along the ring homomorphism f

• map f A : Subfield L : the image of a subfield A along the ring homomorphism f.

• prod A B : Subfield (K × L) : the product of subfields

• f.fieldRange : Subfield B : the range of the ring homomorphism f.

• eqLocusField f g : Subfield K : given ring homomorphisms f g : K →+* R, the subfield of K where f x = g x

Implementation notes #

A subfield is implemented as a subring which 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

class SubfieldClass (S : Type u_1) (K : Type u_2) [] [SetLike S K] extends , :

SubfieldClass S K states S is a type of subsets s ⊆ K closed under field operations.

Instances
instance SubfieldClass.toSubgroupClass {K : Type u} [] (S : Type u_1) [SetLike S K] [h : ] :

A subfield contains 1, products and inverses.

Be assured that we're not actually proving that subfields are subgroups: SubgroupClass is really an abbreviation of SubgroupWithOrWithoutZeroClass.

theorem SubfieldClass.coe_rat_mem {K : Type u} [] {S : Type u_1} [SetLike S K] [h : ] (s : S) (x : ) :
x s
instance SubfieldClass.instRatCastSubtypeMemInstMembership {K : Type u} [] {S : Type u_1} [SetLike S K] [h : ] (s : S) :
RatCast { x // x s }
@[simp]
theorem SubfieldClass.coe_rat_cast {K : Type u} [] {S : Type u_1} [SetLike S K] [h : ] (s : S) (x : ) :
x = x
theorem SubfieldClass.rat_smul_mem {K : Type u} [] {S : Type u_1} [SetLike S K] [h : ] (s : S) (a : ) (x : { x // x s }) :
a x s
instance SubfieldClass.instSMulRatSubtypeMemInstMembership {K : Type u} [] {S : Type u_1} [SetLike S K] [h : ] (s : S) :
SMul { x // x s }
@[simp]
theorem SubfieldClass.coe_rat_smul {K : Type u} [] {S : Type u_1} [SetLike S K] [h : ] (s : S) (a : ) (x : { x // x s }) :
↑(a x) = a x
instance SubfieldClass.toField {K : Type u} [] (S : Type u_1) [SetLike S K] [h : ] (s : S) :
Field { x // x s }

A subfield inherits a field structure

instance SubfieldClass.toLinearOrderedField (S : Type u_1) {K : Type u_2} [SetLike S K] [] (s : S) :
LinearOrderedField { x // x s }

A subfield of a LinearOrderedField is a LinearOrderedField.

structure Subfield (K : Type u) [] extends :
• carrier : Set K
• mul_mem' : ∀ {a b : K}, a s.carrierb s.carriera * b s.carrier
• one_mem' : 1 s.carrier
• add_mem' : ∀ {a b : K}, a s.carrierb s.carriera + b s.carrier
• zero_mem' : 0 s.carrier
• neg_mem' : ∀ {x : K}, x s.carrier-x s.carrier
• inv_mem' : ∀ (x : K), x s.carrierx⁻¹ s.carrier

A subfield is closed under multiplicative inverses.

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
def Subfield.toAddSubgroup {K : Type u} [] (s : ) :

The underlying AddSubgroup of a subfield.

Instances For
theorem Subfield.mem_carrier {K : Type u} [] {s : } {x : K} :
x s.carrier x s
@[simp]
theorem Subfield.mem_mk {K : Type u} [] {S : } {x : K} (h : ∀ (x : K), x S.carrierx⁻¹ S.carrier) :
x { toSubring := S, inv_mem' := h } x S
@[simp]
theorem Subfield.coe_set_mk {K : Type u} [] (S : ) (h : ∀ (x : K), x S.carrierx⁻¹ S.carrier) :
{ toSubring := S, inv_mem' := h } = S
@[simp]
theorem Subfield.mk_le_mk {K : Type u} [] {S : } {S' : } (h : ∀ (x : K), x S.carrierx⁻¹ S.carrier) (h' : ∀ (x : K), x S'.carrierx⁻¹ S'.carrier) :
{ toSubring := S, inv_mem' := h } { toSubring := S', inv_mem' := h' } S S'
theorem Subfield.ext {K : Type u} [] {S : } {T : } (h : ∀ (x : K), x S x T) :
S = T

Two subfields are equal if they have the same elements.

def Subfield.copy {K : Type u} [] (S : ) (s : Set K) (hs : s = S) :

Copy of a subfield with a new carrier equal to the old one. Useful to fix definitional equalities.

Instances For
@[simp]
theorem Subfield.coe_copy {K : Type u} [] (S : ) (s : Set K) (hs : s = S) :
↑(Subfield.copy S s hs) = s
theorem Subfield.copy_eq {K : Type u} [] (S : ) (s : Set K) (hs : s = S) :
Subfield.copy S s hs = S
@[simp]
theorem Subfield.coe_toSubring {K : Type u} [] (s : ) :
s.toSubring = s
@[simp]
theorem Subfield.mem_toSubring {K : Type u} [] (s : ) (x : K) :
x s.toSubring x s
def Subring.toSubfield {K : Type u} [] (s : ) (hinv : ∀ (x : K), x sx⁻¹ s) :

A Subring containing inverses is a Subfield.

Instances For
theorem Subfield.one_mem {K : Type u} [] (s : ) :
1 s

A subfield contains the field's 1.

theorem Subfield.zero_mem {K : Type u} [] (s : ) :
0 s

A subfield contains the field's 0.

theorem Subfield.mul_mem {K : Type u} [] (s : ) {x : K} {y : K} :
x sy sx * y s

A subfield is closed under multiplication.

theorem Subfield.add_mem {K : Type u} [] (s : ) {x : K} {y : K} :
x sy sx + y s

A subfield is closed under addition.

theorem Subfield.neg_mem {K : Type u} [] (s : ) {x : K} :
x s-x s

A subfield is closed under negation.

theorem Subfield.sub_mem {K : Type u} [] (s : ) {x : K} {y : K} :
x sy sx - y s

A subfield is closed under subtraction.

theorem Subfield.inv_mem {K : Type u} [] (s : ) {x : K} :
x sx⁻¹ s

A subfield is closed under inverses.

theorem Subfield.div_mem {K : Type u} [] (s : ) {x : K} {y : K} :
x sy sx / y s

A subfield is closed under division.

theorem Subfield.list_prod_mem {K : Type u} [] (s : ) {l : List K} :
(∀ (x : K), x lx s) → s

Product of a list of elements in a subfield is in the subfield.

theorem Subfield.list_sum_mem {K : Type u} [] (s : ) {l : List K} :
(∀ (x : K), x lx s) → s

Sum of a list of elements in a subfield is in the subfield.

theorem Subfield.multiset_prod_mem {K : Type u} [] (s : ) (m : ) :
(∀ (a : K), a ma s) →

Product of a multiset of elements in a subfield is in the subfield.

theorem Subfield.multiset_sum_mem {K : Type u} [] (s : ) (m : ) :
(∀ (a : K), a ma s) →

Sum of a multiset of elements in a Subfield is in the Subfield.

theorem Subfield.prod_mem {K : Type u} [] (s : ) {ι : Type u_1} {t : } {f : ιK} (h : ∀ (c : ι), c tf c s) :
(Finset.prod t fun i => f i) s

Product of elements of a subfield indexed by a Finset is in the subfield.

theorem Subfield.sum_mem {K : Type u} [] (s : ) {ι : Type u_1} {t : } {f : ιK} (h : ∀ (c : ι), c tf c s) :
(Finset.sum t fun i => f i) s

Sum of elements in a Subfield indexed by a Finset is in the Subfield.

theorem Subfield.pow_mem {K : Type u} [] (s : ) {x : K} (hx : x s) (n : ) :
x ^ n s
theorem Subfield.zsmul_mem {K : Type u} [] (s : ) {x : K} (hx : x s) (n : ) :
n x s
theorem Subfield.coe_int_mem {K : Type u} [] (s : ) (n : ) :
n s
theorem Subfield.zpow_mem {K : Type u} [] (s : ) {x : K} (hx : x s) (n : ) :
x ^ n s
instance Subfield.toField {K : Type u} [] (s : ) :
Field { x // x s }

A subfield inherits a field structure

instance Subfield.toLinearOrderedField {K : Type u_1} (s : ) :
LinearOrderedField { x // x s }

A subfield of a LinearOrderedField is a LinearOrderedField.

@[simp]
theorem Subfield.coe_add {K : Type u} [] (s : ) (x : { x // x s }) (y : { x // x s }) :
↑(x + y) = x + y
@[simp]
theorem Subfield.coe_sub {K : Type u} [] (s : ) (x : { x // x s }) (y : { x // x s }) :
↑(x - y) = x - y
@[simp]
theorem Subfield.coe_neg {K : Type u} [] (s : ) (x : { x // x s }) :
↑(-x) = -x
@[simp]
theorem Subfield.coe_mul {K : Type u} [] (s : ) (x : { x // x s }) (y : { x // x s }) :
↑(x * y) = x * y
@[simp]
theorem Subfield.coe_div {K : Type u} [] (s : ) (x : { x // x s }) (y : { x // x s }) :
↑(x / y) = x / y
@[simp]
theorem Subfield.coe_inv {K : Type u} [] (s : ) (x : { x // x s }) :
x⁻¹ = (x)⁻¹
@[simp]
theorem Subfield.coe_zero {K : Type u} [] (s : ) :
0 = 0
@[simp]
theorem Subfield.coe_one {K : Type u} [] (s : ) :
1 = 1
def Subfield.subtype {K : Type u} [] (s : ) :
{ x // x s } →+* K

The embedding from a subfield of the field K to K.

Instances For
instance Subfield.toAlgebra {K : Type u} [] (s : ) :
Algebra { x // x s } K
@[simp]
theorem Subfield.coe_subtype {K : Type u} [] (s : ) :
↑() = Subtype.val
theorem Subfield.toSubring_subtype_eq_subtype (F : Type u_1) [] (S : ) :
Subring.subtype S.toSubring =

Partial order #

theorem Subfield.mem_toSubmonoid {K : Type u} [] {s : } {x : K} :
x s.toSubmonoid x s
@[simp]
theorem Subfield.coe_toSubmonoid {K : Type u} [] (s : ) :
s.toSubmonoid = s
@[simp]
theorem Subfield.mem_toAddSubgroup {K : Type u} [] {s : } {x : K} :
x s
@[simp]
theorem Subfield.coe_toAddSubgroup {K : Type u} [] (s : ) :
= s

top #

instance Subfield.instTopSubfield {K : Type u} [] :
Top ()

The subfield of K containing all elements of K.

@[simp]
theorem Subfield.mem_top {K : Type u} [] (x : K) :
@[simp]
theorem Subfield.coe_top {K : Type u} [] :
= Set.univ
@[simp]
theorem Subfield.topEquiv_apply {K : Type u} [] (r : { x // x }) :
Subfield.topEquiv r = r
@[simp]
theorem Subfield.topEquiv_symm_apply_coe {K : Type u} [] (r : K) :
↑(↑(RingEquiv.symm Subfield.topEquiv) r) = r
def Subfield.topEquiv {K : Type u} [] :
{ x // x } ≃+* K

The ring equiv between the top element of Subfield K and K.

Instances For

comap #

def Subfield.comap {K : Type u} {L : Type v} [] [] (f : K →+* L) (s : ) :

The preimage of a subfield along a ring homomorphism is a subfield.

Instances For
@[simp]
theorem Subfield.coe_comap {K : Type u} {L : Type v} [] [] (f : K →+* L) (s : ) :
↑() = f ⁻¹' s
@[simp]
theorem Subfield.mem_comap {K : Type u} {L : Type v} [] [] {s : } {f : K →+* L} {x : K} :
x f x s
theorem Subfield.comap_comap {K : Type u} {L : Type v} {M : Type w} [] [] [] (s : ) (g : L →+* M) (f : K →+* L) :

map #

def Subfield.map {K : Type u} {L : Type v} [] [] (f : K →+* L) (s : ) :

The image of a subfield along a ring homomorphism is a subfield.

Instances For
@[simp]
theorem Subfield.coe_map {K : Type u} {L : Type v} [] [] (s : ) (f : K →+* L) :
↑() = f '' s
@[simp]
theorem Subfield.mem_map {K : Type u} {L : Type v} [] [] {f : K →+* L} {s : } {y : L} :
y x, x s f x = y
theorem Subfield.map_map {K : Type u} {L : Type v} {M : Type w} [] [] [] (s : ) (g : L →+* M) (f : K →+* L) :
theorem Subfield.map_le_iff_le_comap {K : Type u} {L : Type v} [] [] {f : K →+* L} {s : } {t : } :
t s
theorem Subfield.gc_map_comap {K : Type u} {L : Type v} [] [] (f : K →+* L) :

range #

def RingHom.fieldRange {K : Type u} {L : Type v} [] [] (f : K →+* L) :

The range of a ring homomorphism, as a subfield of the target. See Note [range copy pattern].

Instances For
@[simp]
theorem RingHom.coe_fieldRange {K : Type u} {L : Type v} [] [] (f : K →+* L) :
↑() =
@[simp]
theorem RingHom.mem_fieldRange {K : Type u} {L : Type v} [] [] {f : K →+* L} {y : L} :
x, f x = y
theorem RingHom.fieldRange_eq_map {K : Type u} {L : Type v} [] [] (f : K →+* L) :
theorem RingHom.map_fieldRange {K : Type u} {L : Type v} {M : Type w} [] [] [] (g : L →+* M) (f : K →+* L) :
instance RingHom.fintypeFieldRange {K : Type u} {L : Type v} [] [] [] [] (f : K →+* L) :
Fintype { x // }

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.

inf #

instance Subfield.instInfSubfield {K : Type u} [] :
Inf ()

The inf of two subfields is their intersection.

@[simp]
theorem Subfield.coe_inf {K : Type u} [] (p : ) (p' : ) :
↑(p p') = p.carrier p'.carrier
@[simp]
theorem Subfield.mem_inf {K : Type u} [] {p : } {p' : } {x : K} :
x p p' x p x p'
@[simp]
theorem Subfield.coe_sInf {K : Type u} [] (S : Set ()) :
↑(sInf S) = ⋂ (s : ) (_ : s S), s
theorem Subfield.mem_sInf {K : Type u} [] {S : Set ()} {x : K} :
x sInf S ∀ (p : ), p Sx p
@[simp]
theorem Subfield.sInf_toSubring {K : Type u} [] (s : Set ()) :
(sInf s).toSubring = ⨅ (t : ) (_ : t s), t.toSubring
theorem Subfield.isGLB_sInf {K : Type u} [] (S : Set ()) :
IsGLB S (sInf S)

Subfields of a ring form a complete lattice.

subfield closure of a subset #

def Subfield.closure {K : Type u} [] (s : Set K) :

The Subfield generated by a set.

Instances For
theorem Subfield.mem_closure_iff {K : Type u} [] {s : Set K} {x : K} :
y, z, y / z = x
theorem Subfield.subring_closure_le {K : Type u} [] (s : Set K) :
().toSubring
@[simp]
theorem Subfield.subset_closure {K : Type u} [] {s : Set K} :
s ↑()

The subfield generated by a set includes the set.

theorem Subfield.not_mem_of_not_mem_closure {K : Type u} [] {s : Set K} {P : K} (hP : ¬) :
¬P s
theorem Subfield.mem_closure {K : Type u} [] {x : K} {s : Set K} :
∀ (S : ), s Sx S
@[simp]
theorem Subfield.closure_le {K : Type u} [] {s : Set K} {t : } :
s t

A subfield t includes closure s if and only if it includes s.

theorem Subfield.closure_mono {K : Type u} [] ⦃s : Set K ⦃t : Set K (h : s t) :

Subfield closure of a set is monotone in its argument: if s ⊆ t, then closure s ≤ closure t.

theorem Subfield.closure_eq_of_le {K : Type u} [] {s : Set K} {t : } (h₁ : s t) (h₂ : ) :
theorem Subfield.closure_induction {K : Type u} [] {s : Set K} {p : KProp} {x : K} (h : ) (Hs : (x : K) → x sp x) (H1 : p 1) (Hadd : (x y : K) → p xp yp (x + y)) (Hneg : (x : K) → p xp (-x)) (Hinv : (x : K) → p xp x⁻¹) (Hmul : (x y : K) → p xp yp (x * y)) :
p x

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.

def Subfield.gi (K : Type u) [] :
GaloisInsertion Subfield.closure SetLike.coe

closure forms a Galois insertion with the coercion to set.

Instances For
theorem Subfield.closure_eq {K : Type u} [] (s : ) :

Closure of a subfield S equals S.

@[simp]
theorem Subfield.closure_empty {K : Type u} [] :
@[simp]
theorem Subfield.closure_univ {K : Type u} [] :
theorem Subfield.closure_union {K : Type u} [] (s : Set K) (t : Set K) :
theorem Subfield.closure_iUnion {K : Type u} [] {ι : Sort u_1} (s : ιSet K) :
Subfield.closure (⋃ (i : ι), s i) = ⨆ (i : ι), Subfield.closure (s i)
theorem Subfield.closure_sUnion {K : Type u} [] (s : Set (Set K)) :
= ⨆ (t : Set K) (_ : t s),
theorem Subfield.map_sup {K : Type u} {L : Type v} [] [] (s : ) (t : ) (f : K →+* L) :
theorem Subfield.map_iSup {K : Type u} {L : Type v} [] [] {ι : Sort u_1} (f : K →+* L) (s : ι) :
Subfield.map f (iSup s) = ⨆ (i : ι), Subfield.map f (s i)
theorem Subfield.comap_inf {K : Type u} {L : Type v} [] [] (s : ) (t : ) (f : K →+* L) :
theorem Subfield.comap_iInf {K : Type u} {L : Type v} [] [] {ι : Sort u_1} (f : K →+* L) (s : ι) :
Subfield.comap f (iInf s) = ⨅ (i : ι), Subfield.comap f (s i)
@[simp]
theorem Subfield.map_bot {K : Type u} {L : Type v} [] [] (f : K →+* L) :
@[simp]
theorem Subfield.comap_top {K : Type u} {L : Type v} [] [] (f : K →+* L) :
theorem Subfield.mem_iSup_of_directed {K : Type u} [] {ι : Sort u_1} [hι : ] {S : ι} (hS : Directed (fun x x_1 => x x_1) S) {x : K} :
x ⨆ (i : ι), S i i, x S i

The underlying set of a non-empty directed sSup 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)

theorem Subfield.coe_iSup_of_directed {K : Type u} [] {ι : Sort u_1} [hι : ] {S : ι} (hS : Directed (fun x x_1 => x x_1) S) :
↑(⨆ (i : ι), S i) = ⋃ (i : ι), ↑(S i)
theorem Subfield.mem_sSup_of_directedOn {K : Type u} [] {S : Set ()} (Sne : ) (hS : DirectedOn (fun x x_1 => x x_1) S) {x : K} :
x sSup S s, s S x s
theorem Subfield.coe_sSup_of_directedOn {K : Type u} [] {S : Set ()} (Sne : ) (hS : DirectedOn (fun x x_1 => x x_1) S) :
↑(sSup S) = ⋃ (s : ) (_ : s S), s
def RingHom.rangeRestrictField {K : Type u} {L : Type v} [] [] (f : K →+* L) :
K →+* { x // }

Restriction of a ring homomorphism to its range interpreted as a subfield.

Instances For
@[simp]
theorem RingHom.coe_rangeRestrictField {K : Type u} {L : Type v} [] [] (f : K →+* L) (x : K) :
↑() = f x
def RingHom.eqLocusField {K : Type u} {L : Type v} [] [] (f : K →+* L) (g : K →+* L) :

The subfield of elements x : R such that f x = g x, i.e., the equalizer of f and g as a subfield of R

Instances For
theorem RingHom.eqOn_field_closure {K : Type u} {L : Type v} [] [] {f : K →+* L} {g : K →+* L} {s : Set K} (h : Set.EqOn (f) (g) s) :
Set.EqOn f g ↑()

If two ring homomorphisms are equal on a set, then they are equal on its subfield closure.

theorem RingHom.eq_of_eqOn_subfield_top {K : Type u} {L : Type v} [] [] {f : K →+* L} {g : K →+* L} (h : Set.EqOn f g ) :
f = g
theorem RingHom.eq_of_eqOn_of_field_closure_eq_top {K : Type u} {L : Type v} [] [] {s : Set K} (hs : ) {f : K →+* L} {g : K →+* L} (h : Set.EqOn (f) (g) s) :
f = g
theorem RingHom.field_closure_preimage_le {K : Type u} {L : Type v} [] [] (f : K →+* L) (s : Set L) :
theorem RingHom.map_field_closure {K : Type u} {L : Type v} [] [] (f : K →+* L) (s : Set K) :

The image under a ring homomorphism of the subfield generated by a set equals the subfield generated by the image of the set.

def Subfield.inclusion {K : Type u} [] {S : } {T : } (h : S T) :
{ x // x S } →+* { x // x T }

The ring homomorphism associated to an inclusion of subfields.

Instances For
@[simp]
theorem Subfield.fieldRange_subtype {K : Type u} [] (s : ) :
def RingEquiv.subfieldCongr {K : Type u} [] {s : } {t : } (h : s = t) :
{ x // x s } ≃+* { x // x t }

Makes the identity isomorphism from a proof two subfields of a multiplicative monoid are equal.

Instances For
theorem Subfield.closure_preimage_le {K : Type u} {L : Type v} [] [] (f : K →+* L) (s : Set L) :