Zulip Chat Archive

Stream: Is there code for X?

Topic: Prime fields


Xavier Roblot (Nov 14 2025 at 07:54):

Do you have anything about prime fields, in the sense of fields that do not contain any nontrivial subfield? I am mostly interested in something like this:

instance : Subsingleton (Subfield ) := sorry

Xavier Roblot (Nov 14 2025 at 12:18):

Well, here is what I came up with

import Mathlib.Algebra.Algebra.Rat
import Mathlib.Algebra.Field.Subfield.Basic

instance : Subsingleton (Subfield ) := by
  refine fun F G  Subfield.ext fun x  ?_⟩
  change (algebraMap  F x).val  _  (algebraMap  G x).val  _
  simp_rw [SetLike.coe_mem]

theorem Subfield.bot_eq_of_charZero {K : Type*} [Field K] [CharZero K] :
    ( : Subfield K) = (algebraMap  K).fieldRange := by
  rw [eq_comm, eq_bot_iff,  Subfield.map_bot (algebraMap  K),
    subsingleton_iff_bot_eq_top.mpr inferInstance,  RingHom.fieldRange_eq_map]

Kenny Lau (Nov 14 2025 at 12:41):

import Mathlib.Algebra.Field.Subfield.Basic
import Mathlib.Data.Rat.Cast.CharZero

instance : Subsingleton (Subfield ) := subsingleton_of_top_le_bot fun x _ 
  have h := Subsingleton.elim (( : Subfield ).subtype.comp (Rat.castHom _)) (.id _ :  →+* )
  (congr($h x) : _ = x)  Subtype.prop _

Xavier Roblot (Nov 15 2025 at 14:47):

#31655


Last updated: Dec 20 2025 at 21:32 UTC