diff --git a/src/CharTable.jl b/src/CharTable.jl index d11a4e9..0a99926 100644 --- a/src/CharTable.jl +++ b/src/CharTable.jl @@ -1,5 +1,3 @@ -import Base: getindex, eltype, length, iterate - abstract type Table end abstract type AbstractGenericCharacter end @@ -189,7 +187,7 @@ struct SimpleGenericCharacter{T} <: AbstractGenericCharacter degree::T # Degree of the characters in this type end -AbstractAlgebra.parent(c::AbstractGenericCharacter) = c.parent +parent(c::AbstractGenericCharacter) = c.parent getindex(c::AbstractGenericCharacter, i::Integer) = c.values[i] eltype(::Type{SimpleGenericCharacter{T}}) where T<:NfPoly = T diff --git a/src/GenericCharacter.jl b/src/GenericCharacter.jl index a47b8b3..c75287b 100644 --- a/src/GenericCharacter.jl +++ b/src/GenericCharacter.jl @@ -1,6 +1,3 @@ -import Oscar: tensor_product, norm, scalar_product -import Base: * - # TODO deal with ParameterSubstitution when creating new characters, this is not done in the original implementation. @doc raw""" diff --git a/src/GenericCharacterTables.jl b/src/GenericCharacterTables.jl index cc747c3..3e42dda 100644 --- a/src/GenericCharacterTables.jl +++ b/src/GenericCharacterTables.jl @@ -21,6 +21,7 @@ import Oscar.AbstractAlgebra.Generic const NfPoly = Union{PolyRingElem{QQFieldElem}, PolyRingElem{AbsSimpleNumFieldElem}} +include("Imports.jl") include("GenericCyclotomics.jl") include("ParameterExceptions.jl") include("GenericCyclotomicFractions.jl") diff --git a/src/GenericConjugacyClasses.jl b/src/GenericConjugacyClasses.jl index 14fe9c6..fc0ab9e 100644 --- a/src/GenericConjugacyClasses.jl +++ b/src/GenericConjugacyClasses.jl @@ -1,5 +1,3 @@ -import Oscar: norm, scalar_product, class_multiplication_coefficient, order, number_of_conjugacy_classes - abstract type AbstractGenericConjugacyClass end @doc raw""" diff --git a/src/GenericCyclotomicFractions.jl b/src/GenericCyclotomicFractions.jl index de0bab8..805416c 100644 --- a/src/GenericCyclotomicFractions.jl +++ b/src/GenericCyclotomicFractions.jl @@ -1,6 +1,3 @@ -import Oscar.AbstractAlgebra: evaluate -import Base: show, isone, iszero, one, zero, conj, inv, +, -, *, //, == - # This models fractions of sums of cyclotomics. # The simplification is currently only very basic. # According to the original implementation diff --git a/src/GenericCyclotomics.jl b/src/GenericCyclotomics.jl index c03f800..f1abd68 100644 --- a/src/GenericCyclotomics.jl +++ b/src/GenericCyclotomics.jl @@ -1,15 +1,4 @@ -using Oscar.Random: Random, SamplerTrivial, GLOBAL_RNG -using Oscar.RandomExtensions: RandomExtensions, Make2, AbstractRNG - -import Oscar.AbstractAlgebra: parent_type, elem_type, base_ring, base_ring_type, parent, is_domain_type, - is_exact_type, canonical_unit, isequal, divexact, zero!, mul!, add!, get_cached!, is_unit, - characteristic, Ring, RingElem, expressify, evaluate, normal_form, divexact -import Oscar: pretty, Indent, Dedent -import Base: show, +, -, *, ^, ==, inv, isone, iszero, one, zero, rand, deepcopy_internal, hash, conj, promote_rule - -import Compat - -if Compat.pkgversion(Oscar.AbstractAlgebra) >= v"0.42.0" +if pkgversion(Oscar.AbstractAlgebra) >= v"0.42.0" const ZZUPoly = Generic.UnivPoly{ZZRingElem} const UPoly = Generic.UnivPoly{QQFieldElem} const UPolyRing = Generic.UniversalPolyRing{QQFieldElem} diff --git a/src/Imports.jl b/src/Imports.jl new file mode 100644 index 0000000..9afe971 --- /dev/null +++ b/src/Imports.jl @@ -0,0 +1,69 @@ +import Base: + *, + +, + -, + //, + ==, + ^, + conj, + deepcopy_internal, + eltype, + getindex, + hash, + inv, + isone, + iszero, + iterate, + length, + one, + promote_rule, + rand, + show, + zero + +import Compat: + pkgversion + +import Oscar.Random: + GLOBAL_RNG, + Random, + SamplerTrivial + +import Oscar.RandomExtensions: + AbstractRNG, + RandomExtensions, + Make2 + +import Oscar: + add!, + base_ring, + base_ring_type, + canonical_unit, + characteristic, + class_multiplication_coefficient, + Dedent, + degree, + divexact, + elem_type, + evaluate, + expressify, + get_cached!, + Indent, + is_domain_type, + isequal, + is_exact_type, + is_unit, + mul!, + norm, + normal_form, + number_of_conjugacy_classes, + order, + parent, + parent_type, + pretty, + Ring, + RingElem, + scalar_product, + tensor_product, + zero! + diff --git a/src/Parameter.jl b/src/Parameter.jl index 3b618b1..99b11ce 100644 --- a/src/Parameter.jl +++ b/src/Parameter.jl @@ -1,5 +1,3 @@ -import Base: show, getindex, eltype, length, iterate - @doc raw""" Parameter diff --git a/src/ParameterExceptions.jl b/src/ParameterExceptions.jl index 21fed32..d506446 100644 --- a/src/ParameterExceptions.jl +++ b/src/ParameterExceptions.jl @@ -1,5 +1,3 @@ -import Oscar.AbstractAlgebra: evaluate - @doc raw""" is_integer(x::UPolyFrac) diff --git a/src/Show.jl b/src/Show.jl index b37e446..c761dd4 100644 --- a/src/Show.jl +++ b/src/Show.jl @@ -1,6 +1,3 @@ -import Oscar: order, degree, number_of_conjugacy_classes, pretty, Indent, Dedent -import Base: show - # TODO PrintValPhi, PrintToTex? @doc raw""" diff --git a/src/SumProc.jl b/src/SumProc.jl index 27507f5..9b485b2 100644 --- a/src/SumProc.jl +++ b/src/SumProc.jl @@ -1,5 +1,3 @@ -import Oscar.AbstractAlgebra: evaluate - @doc raw""" evaluate(a::Union{GenericCyclo,GenericCycloFrac}, vars::Vector{UPoly}, vals::Vector{<:RingElement})