Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More renaming for latest OSCAR #7

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Oscar = "f1435218-dba5-11e9-1e4d-f1a5fab5fc13"

[compat]
JSON = "^0.20, ^0.21"
Oscar = "0.12, 0.13, 0.14, 0.15, 1.0"
Oscar = "0.15, 1.0"
julia = "1.6"
6 changes: 3 additions & 3 deletions src/Arith.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export e2p

FracPoly{T} = Generic.UnivPoly{Generic.Frac{T}, Generic.MPoly{Generic.Frac{T}}} where T
NfPoly = Union{PolyRingElem{QQFieldElem}, PolyRingElem{nf_elem}}
NfPoly = Union{PolyRingElem{QQFieldElem}, PolyRingElem{AbsSimpleNumFieldElem}}

"""
normalize(a::FracPoly)
Expand All @@ -17,15 +17,15 @@ function normalize(a::QQFieldElem)
return mod(numerator(a), denominator(a))//denominator(a)
end
end
function normalize(a::nf_elem)
function normalize(a::AbsSimpleNumFieldElem)
if isone(denominator(a))
return zero(a)
else
rational_part=coeff(a,0)
return a-rational_part+normalize(rational_part)
end
end
function normalize(a::Union{QQPolyRingElem, Generic.Poly{nf_elem}})
function normalize(a::Union{QQPolyRingElem, Generic.Poly{AbsSimpleNumFieldElem}})
return parent(a)(collect(map(normalize, coefficients(a))))
end
function normalize(a::FracPoly{T}) where T <: NfPoly
Expand Down
2 changes: 1 addition & 1 deletion src/Greenfunctions/2B2/2B2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ K, sqrt2 = number_field(polynomial(QQ,[-2,0,1]), "sqrt(2)")
R, q = polynomial_ring(K, "q")

order = q^4*(q^2-1)*(q^4+1)
table = Generic.Poly{nf_elem}[[
table = Generic.Poly{AbsSimpleNumFieldElem}[[
q^4+1,
R(1),
R(1),
Expand Down
2 changes: 1 addition & 1 deletion src/Greenfunctions/2F4/2F4.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ K, sqrt2 = number_field(polynomial(QQ,[-2,0,1]), "sqrt(2)")
R, q = polynomial_ring(K, "q")

order = q^24*(q^2-1)^2*(q^2+1)^2*(q^4+1)^2*(q^4-q^2+1)*(q^8-q^4+1)
table = Generic.Poly{nf_elem}[[
table = Generic.Poly{AbsSimpleNumFieldElem}[[
(q^2+1)^2*(q^4+1)^2*(q^4-q^2+1)*(q^8-q^4+1),
(q^2+1)^2*(q^4+1)*(q^4-q^2+1),
(q^2+1)*(q^8+q^6+q^4+1),
Expand Down
2 changes: 1 addition & 1 deletion src/Greenfunctions/2G2/2G2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ K, sqrt3 = number_field(polynomial(QQ,[-3,0,1]), "sqrt(3)")
R, q = polynomial_ring(K, "q")

order = q^6*(q^2-1)*(q^2+1)*(q^4-q^2+1)
table = Generic.Poly{nf_elem}[[
table = Generic.Poly{AbsSimpleNumFieldElem}[[
(q^2+1)*(q^4-q^2+1),
R(1),
R(1),
Expand Down
4 changes: 2 additions & 2 deletions src/Parameter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ end

Return the sign of the leading coefficient of the polynomial representation of `a`.
"""
function weak_sign(a::nf_elem)
function weak_sign(a::AbsSimpleNumFieldElem)
for deg in reverse(range(1, degree(parent(a))-1))
signum=sign(coeff(a, deg))
if !iszero(signum)
Expand Down Expand Up @@ -105,7 +105,7 @@ end


isint(a::QQFieldElem) = isone(denominator(a))
function isint(a::nf_elem)
function isint(a::AbsSimpleNumFieldElem)
rational_part=coeff(a,0)
if a == rational_part
return isint(rational_part)
Expand Down
4 changes: 2 additions & 2 deletions src/PrintToTex/Factor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function rootkey(f::QQPolyRingElem)
coeff=collect(coefficients(f))
return RootKey(coeff, zeros(QQFieldElem, length(coeff)), :nothing)
end
function rootkey(f::Generic.Poly{nf_elem})
function rootkey(f::Generic.Poly{AbsSimpleNumFieldElem})
coeffs=collect(coefficients(f))
return RootKey(coeff.(coeffs,0),coeff.(coeffs,1) ,var(parent(coeffs[1])))
end
Expand Down Expand Up @@ -190,7 +190,7 @@ function ordexp(b::Generic.Frac{QQPolyRingElem})
d = lcm(denominator.(collect(coefficients(num))))
return num*d, den*d
end
function ordexp(b::Generic.Frac{Generic.Poly{nf_elem}})
function ordexp(b::Generic.Frac{Generic.Poly{AbsSimpleNumFieldElem}})
num, den = numerator(b), denominator(b)
d = lcm(denominator.(coeff.(collect(coefficients(num)),0)))
return num*d, den*d
Expand Down
2 changes: 1 addition & 1 deletion src/SumProc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export eesubs, nesum
function isunitfraction(a::QQFieldElem)
isone(numerator(a))
end
function isunitfraction(a::nf_elem)
function isunitfraction(a::AbsSimpleNumFieldElem)
rational_part=coeff(a,0)
if a == rational_part
return isunitfraction(rational_part)
Expand Down
46 changes: 23 additions & 23 deletions src/Tables/2B2/2B2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ S = UniversalPolynomialRing(Q, cached=false)
a,b,c,s,k,u, _...=gens(S, ["a", "b", "c", "s", "k", "u", "a1", "b1", "c1", "s1", "k1", "u1", "a2", "b2", "c2", "s2", "k2", "u2", "a3", "b3", "c3", "s3", "k3", "u3", "at1", "bt1", "ct1", "st1", "kt1", "ut1", "at2", "bt2", "ct2", "st2", "kt2", "ut2"])

order = q^4*(q^4+1)*(q^2-1)
table = Cyclotomic{Generic.Poly{nf_elem}}[[
table = Cyclotomic{Generic.Poly{AbsSimpleNumFieldElem}}[[
(1)*e2p(S(0)),
(1)*e2p(S(0)),
(1)*e2p(S(0)),
Expand Down Expand Up @@ -86,16 +86,16 @@ chardegree = R.([1, q*1//sqrt2*(q^2-1), q*1//sqrt2*(q^2-1), q^4, q^4+1, (q^2-1)*

classsums=[
function (tt::Cyclotomic)
(tt, Set{ParameterException{Generic.Poly{nf_elem}}}())
(tt, Set{ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}}())
end,
function (tt::Cyclotomic)
(tt, Set{ParameterException{Generic.Poly{nf_elem}}}())
(tt, Set{ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}}())
end,
function (tt::Cyclotomic)
(tt, Set{ParameterException{Generic.Poly{nf_elem}}}())
(tt, Set{ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}}())
end,
function (tt::Cyclotomic)
(tt, Set{ParameterException{Generic.Poly{nf_elem}}}())
(tt, Set{ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}}())
end,
function (tt::Cyclotomic)
s1,e1=nesum(tt, a, 1, q^2-2, congruence)
Expand All @@ -113,16 +113,16 @@ end

charsums=[
function (tt::Cyclotomic)
(tt, Set{ParameterException{Generic.Poly{nf_elem}}}())
(tt, Set{ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}}())
end,
function (tt::Cyclotomic)
(tt, Set{ParameterException{Generic.Poly{nf_elem}}}())
(tt, Set{ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}}())
end,
function (tt::Cyclotomic)
(tt, Set{ParameterException{Generic.Poly{nf_elem}}}())
(tt, Set{ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}}())
end,
function (tt::Cyclotomic)
(tt, Set{ParameterException{Generic.Poly{nf_elem}}}())
(tt, Set{ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}}())
end,
function (tt::Cyclotomic)
s1,e1=nesum(tt, s, 1, q^2-2, congruence)
Expand All @@ -139,23 +139,23 @@ end
]

classparams=[
Parameters(Parameter{Generic.Poly{nf_elem}}[], ParameterException{Generic.Poly{nf_elem}}[], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters(Parameter{Generic.Poly{nf_elem}}[], ParameterException{Generic.Poly{nf_elem}}[], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters(Parameter{Generic.Poly{nf_elem}}[], ParameterException{Generic.Poly{nf_elem}}[], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters(Parameter{Generic.Poly{nf_elem}}[], ParameterException{Generic.Poly{nf_elem}}[], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters([Parameter(a, q^2-1)], [ParameterException((a)*1//(q^2-1))], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters([Parameter(b, q^2+sqrt2*q+1)], [ParameterException((b)*1//(q^2+sqrt2*q+1))], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters([Parameter(c, q^2-sqrt2*q+1)], [ParameterException((c)*1//(q^2-sqrt2*q+1))], ParameterSubstitution{Generic.Poly{nf_elem}}[])
Parameters(Parameter{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters(Parameter{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters(Parameter{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters(Parameter{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters([Parameter(a, q^2-1)], [ParameterException((a)*1//(q^2-1))], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters([Parameter(b, q^2+sqrt2*q+1)], [ParameterException((b)*1//(q^2+sqrt2*q+1))], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters([Parameter(c, q^2-sqrt2*q+1)], [ParameterException((c)*1//(q^2-sqrt2*q+1))], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[])
]

charparams=[
Parameters(Parameter{Generic.Poly{nf_elem}}[], ParameterException{Generic.Poly{nf_elem}}[], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters(Parameter{Generic.Poly{nf_elem}}[], ParameterException{Generic.Poly{nf_elem}}[], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters(Parameter{Generic.Poly{nf_elem}}[], ParameterException{Generic.Poly{nf_elem}}[], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters(Parameter{Generic.Poly{nf_elem}}[], ParameterException{Generic.Poly{nf_elem}}[], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters([Parameter(s, q^2-1)], [ParameterException((s)*1//(q^2-1))], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters([Parameter(k, q^2+sqrt2*q+1)], [ParameterException((k)*1//(q^2+sqrt2*q+1))], ParameterSubstitution{Generic.Poly{nf_elem}}[]),
Parameters([Parameter(u, q^2-sqrt2*q+1)], [ParameterException((u)*1//(q^2-sqrt2*q+1))], ParameterSubstitution{Generic.Poly{nf_elem}}[])
Parameters(Parameter{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters(Parameter{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters(Parameter{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters(Parameter{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterException{Generic.Poly{AbsSimpleNumFieldElem}}[], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters([Parameter(s, q^2-1)], [ParameterException((s)*1//(q^2-1))], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters([Parameter(k, q^2+sqrt2*q+1)], [ParameterException((k)*1//(q^2+sqrt2*q+1))], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[]),
Parameters([Parameter(u, q^2-sqrt2*q+1)], [ParameterException((u)*1//(q^2-sqrt2*q+1))], ParameterSubstitution{Generic.Poly{AbsSimpleNumFieldElem}}[])
]

classparamindex=var_index.([a,b,c])
Expand Down
Loading
Loading