From 921160b8937290e01bbcc2e07528349d9963fef6 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Tue, 22 Oct 2024 19:47:28 +0200 Subject: [PATCH] fix: export `is_subfield_normal` and `principal_subfields` Closes #1656 --- src/NumField/NfAbs/NfAbs.jl | 3 +-- src/NumField/SimpleNumField/Subfields.jl | 9 +++++++++ src/exports.jl | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/NumField/NfAbs/NfAbs.jl b/src/NumField/NfAbs/NfAbs.jl index 17217cc91b..bffbadb3e7 100644 --- a/src/NumField/NfAbs/NfAbs.jl +++ b/src/NumField/NfAbs/NfAbs.jl @@ -470,7 +470,7 @@ end is_subfield_normal(K::AbsSimpleNumField, L::AbsSimpleNumField) -> Bool, NumFieldHom{AbsSimpleNumField, AbsSimpleNumField} Returns `true` and an injection from $K$ to $L$ if $K$ is a subfield of $L$. -Otherwise the function returns "false" and a morphism mapping everything to 0. +Otherwise the function returns `false` and a morphism mapping everything to `0`. This function assumes that $K$ is normal. """ @@ -481,7 +481,6 @@ function is_subfield_normal(K::AbsSimpleNumField, L::AbsSimpleNumField) end b, prim_img = _issubfield_normal(K, L) return b, hom(K, L, prim_img, check = false) - end ################################################################################ diff --git a/src/NumField/SimpleNumField/Subfields.jl b/src/NumField/SimpleNumField/Subfields.jl index f5cfe3ce2f..b6b12d3902 100644 --- a/src/NumField/SimpleNumField/Subfields.jl +++ b/src/NumField/SimpleNumField/Subfields.jl @@ -75,6 +75,15 @@ end Return the principal subfields of $L$ as pairs consisting of a subfield $k$ and an embedding $k \to L$. + +# Examples + +```jldoctest +julia> K, a = number_field(x^8 - x^4 + 1); + +julia> length(principal_subfields(K)) +8 +``` """ function principal_subfields(K::SimpleNumField) v = get_attribute(K, :principal_subfields) diff --git a/src/exports.jl b/src/exports.jl index b5e6d6d2bd..a7f1b1e77e 100644 --- a/src/exports.jl +++ b/src/exports.jl @@ -557,6 +557,7 @@ export is_snf export is_split export is_squarefree export is_subfield +export is_subfield_normal export is_subgroup export is_sublattice export is_sublattice_with_relations @@ -737,6 +738,7 @@ export prime_ideals_up_to export primes export primitive_closure export principal_generator +export principal_subfields export pselmer_group export pselmer_group_fac_elem export pseudo_basis