Skip to content

Commit

Permalink
Minor tweaks (#3936)
Browse files Browse the repository at this point in the history
* Fix abelian_closure docstring

* Sort src/exports.jl

* Merge Oscar.disc_log and Oscar.DiscLog.disc_log

* Add AlgClosure{T} docstring
  • Loading branch information
fingolfin authored Jul 17, 2024
1 parent fea99ab commit efd6412
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Rings/AbelianClosure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const _QQAbGen_sparse = QQAbFieldGen(_QQAb_sparse)
################################################################################

@doc raw"""
abelian_closure(QQ::RationalField)
abelian_closure(QQ::QQField; sparse::Bool = false)
Return a pair `(K, z)` consisting of the abelian closure `K` of the rationals
and a generator `z` that can be used to construct primitive roots of unity in
Expand Down
7 changes: 7 additions & 0 deletions src/Rings/AlgClosureFp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ import ..Oscar: algebraic_closure, base_field, base_ring, base_ring_type, charac
elem_type, embedding, has_preimage_with_preimage, IntegerUnion, is_unit, map_entries,
minpoly, parent_type, promote_rule, roots

"""
AlgClosure{T} <: AbstractAlgebra.Field
Type for the algebraic closure of a finite field.
See [`algebraic_closure`](@ref).
"""
struct AlgClosure{T} <: AbstractAlgebra.Field
# T <: FinField
k::T
Expand Down
7 changes: 2 additions & 5 deletions src/Rings/FinField.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module DiscLog # TODO: move to Hecke
using Oscar
import Oscar.Nemo
import Oscar.Hecke
import Oscar: disc_log, is_primitive

function __init__()
Hecke.add_verbosity_scope(:DiscLog)
Expand All @@ -24,7 +25,7 @@ end

@attr Fac{ZZRingElem} factored_order(K::FinField) = factor(size(K)-1)

function Oscar.is_primitive(a::FinFieldElem, f::Fac{ZZRingElem} = factored_order(parent(a)))
function is_primitive(a::FinFieldElem, f::Fac{ZZRingElem} = factored_order(parent(a)))
iszero(a) && return false
n = size(parent(a))-1
for p = keys(f.fac)
Expand Down Expand Up @@ -64,8 +65,4 @@ function disc_log(a::T) where {T <: FinFieldElem}
return crt([x[2] for x = res], [x[1] for x= res])
end

export disc_log

end # module DiscLog

export disc_log
17 changes: 9 additions & 8 deletions src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ export SimpleGluing
export SimplicialComplex
export Singular
export Sp
export SubObjectIterator
export SubFPGroup
export SubFPGroupElem
export SubObjectIterator
export SubPcGroup
export SubPcGroupElem
export SubQuoHom
Expand Down Expand Up @@ -193,8 +193,8 @@ export add_edge!
export add_gluing!
export add_vertex!
export add_vertices!
export adjacency_tree
export adjacency_matrix
export adjacency_tree
export adjacent_chamber
export adjoint_ideal
export adjunction_process
Expand Down Expand Up @@ -253,8 +253,8 @@ export anticanonical_divisor
export anticanonical_divisor_class
export approximate_class_fusion
export archimedean_solid
export arrangement_polynomial
export arithmetic_genus
export arrangement_polynomial
export as_dictionary
export as_gset
export ascending_compositions
Expand Down Expand Up @@ -356,8 +356,6 @@ export collector
export coloops
export column
export combinatorial_symmetries
export composition
export compositions
export comm
export comm!
export common_components
Expand All @@ -377,7 +375,9 @@ export complete_graph
export complex_projective_plane
export components
export compose
export composition
export composition_series, has_composition_series, set_composition_series
export compositions
export cone
export cone_from_equations
export cone_from_inequalities
Expand Down Expand Up @@ -513,6 +513,7 @@ export explicit_zonotope
export exponent, has_exponent, set_exponent
export exponents
export ext
export ext_of_degree
export extension_field
export exterior_derivative
export exterior_power
Expand Down Expand Up @@ -569,8 +570,8 @@ export fundamental_invariants
export g_vector
export galois_group
export galois_ideal
export galois_quotient
export galois_orbit_sum
export galois_quotient
export gelfand_tsetlin_polytope
export gen
export general_linear_group
Expand Down Expand Up @@ -778,8 +779,8 @@ export is_feasible
export is_finalized
export is_finite, has_is_finite, set_is_finite
export is_finite_dimensional_vector_space
export is_finitely_generated, has_is_finitely_generated, set_is_finitely_generated
export is_finite_order
export is_finitely_generated, has_is_finitely_generated, set_is_finitely_generated
export is_flat
export is_full_direct_product
export is_full_semidirect_product
Expand Down Expand Up @@ -885,9 +886,9 @@ export is_two_sided
export is_unipotent
export is_unit
export is_unital
export is_vertex_transitive
export is_vertical_k_separation
export is_very_ample
export is_vertex_transitive
export is_weakly_connected
export is_welldefined
export is_z_graded
Expand Down

0 comments on commit efd6412

Please sign in to comment.