Skip to content

Commit

Permalink
Version 0.5.0-DEV
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Oct 18, 2024
1 parent b58bb35 commit d640e95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 36 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
oscar-version:
- 'stable'
- 'devel'
- '1.0'
- '1.1'
os:
- ubuntu-latest
#include:
Expand All @@ -60,12 +60,12 @@ jobs:
using Pkg
Pkg.develop("Oscar")
Pkg.pin("Oscar")'
- name: "Install OSCAR 1.0"
if: ${{ matrix.oscar-version == '1.0' }}
- name: "Install OSCAR 1.1"
if: ${{ matrix.oscar-version == '1.1' }}
run: |
julia --project=@. --color=yes --code-coverage -e '
using Pkg
Pkg.add(name="Oscar", version="1.0")
Pkg.add(name="Oscar", version="1.1")
Pkg.pin("Oscar")'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GenericCharacterTables"
uuid = "fdcc7804-6c20-4e83-8118-baad6b7d05b7"
authors = ["Andreas Leim <[email protected]>", "Martin Wagner <[email protected]>", "Max Horn <[email protected]>"]
version = "0.4.2"
version = "0.5.0-DEV"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expand All @@ -11,5 +11,5 @@ Oscar = "f1435218-dba5-11e9-1e4d-f1a5fab5fc13"
[compat]
Compat = "4.11"
JSON = "^0.20, ^0.21"
Oscar = "0.14, 1.0"
Oscar = "1.1"
julia = "1.6"
32 changes: 2 additions & 30 deletions src/GenericCyclotomics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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 Oscar: pretty, Indent, Dedent, is_terse
import Base: show, +, -, *, ^, ==, inv, isone, iszero, one, zero, rand, deepcopy_internal, hash, conj, promote_rule

import Compat
Expand All @@ -13,42 +13,14 @@ if Compat.pkgversion(Oscar.AbstractAlgebra) >= v"0.42.0"
const ZZUPoly = Generic.UnivPoly{ZZRingElem}
const UPoly = Generic.UnivPoly{QQFieldElem}
const UPolyRing = Generic.UniversalPolyRing{QQFieldElem}
const univ_poly_change_base_ring = change_base_ring
else
const ZZUPoly = Generic.UnivPoly{ZZRingElem, Generic.MPoly{ZZRingElem}}
const UPoly = Generic.UnivPoly{QQFieldElem, Generic.MPoly{QQFieldElem}}
const UPolyRing = Generic.UniversalPolyRing{QQFieldElem, Generic.MPoly{QQFieldElem}}

function Oscar.AbstractAlgebra.evaluate(f::FracElem{T}, vars::Vector{Int}, vals::Vector{U}) where {T <: RingElement, U <: RingElement}
return evaluate(numerator(f), vars, vals)//evaluate(denominator(f), vars, vals)
end

function Oscar.AbstractAlgebra.check_parent(a, b, throw::Bool = true)
flag = parent(a) === parent(b)
flag || !throw || error("parents do not match")
return flag
end

# for compat with Oscar 1.0: workaround for broken change_base_ring (this
# was fixed in a subsequent AA release)
function univ_poly_change_base_ring(R, f; cached::Bool=true)
Rx = parent(f)
P = Generic.MPolyRing{elem_type(R)}(R, symbols(Rx), internal_ordering(Rx), cached)
S = universal_polynomial_ring(R; internal_ordering=internal_ordering(Rx), cached)
S.S = deepcopy(symbols(Rx))
S.mpoly_ring = P
return change_base_ring(R, f, parent=S)
end
end
const UPolyFrac = Generic.FracFieldElem{UPoly}
const UPolyFracRing = Generic.FracField{UPoly}

if isdefined(Oscar,:is_terse) # for compat with Oscar 1.0
import Oscar: is_terse
else
is_terse(io::IO) = get(io, :supercompact, false)::Bool
end

@doc raw"""
kempner_with_data(m::Int64)
Expand Down Expand Up @@ -496,7 +468,7 @@ function (R::GenericCycloRing)(f::Dict{UPolyFrac, UPoly}; simplify::Bool=true)
fp=Dict{UPolyFrac, UPoly}()
for (c,g_2,r,a) in L
# normalize the polynomial part of the exponent
ap=normal_form(univ_poly_change_base_ring(ZZ,d*a), d)
ap=normal_form(change_base_ring(ZZ,d*a), d)

# normalize the constant part
t=constant_coefficient(ap)
Expand Down

0 comments on commit d640e95

Please sign in to comment.