Skip to content

Commit

Permalink
Bump dependencies (#2530)
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma authored Jul 10, 2023
1 parent 386a66e commit 9e6c289
Show file tree
Hide file tree
Showing 55 changed files with 396 additions and 406 deletions.
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
cohomCalg_jll = "5558cf25-a90e-53b0-b813-cadaa3ae7ade"

[compat]
AbstractAlgebra = "0.30.9"
AlgebraicSolving = "0.3.0"
AbstractAlgebra = "0.31.0"
AlgebraicSolving = "0.3.3"
DocStringExtensions = "0.8, 0.9"
GAP = "0.9.4"
Hecke = "0.18.13"
Hecke = "0.19.2"
JSON = "^0.20, ^0.21"
Nemo = "0.34.3"
Nemo = "0.35.1"
Polymake = "0.10.0"
Preferences = "1"
RandomExtensions = "0.4.3"
RecipesBase = "1.2.1"
Singular = "0.18.2"
Singular = "0.18.8"
TOPCOM_jll = "0.17.8"
cohomCalg_jll = "0.32.0"
julia = "1.6"
4 changes: 2 additions & 2 deletions experimental/GModule/AlgClosureFp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function Oscar.roots(a::AlgClosureElem, b::Int)
d = mapreduce(degree, lcm, keys(lf.fac), init = 1)
d = lcm(d, degree(parent(ad)))
K = ext_of_degree(parent(a), d)
r = roots(f, K)
r = roots(K, f)
return [AlgClosureElem(x, parent(a)) for x = r]
end

Expand All @@ -126,7 +126,7 @@ function Oscar.roots(a::Generic.Poly{AlgClosureElem{T}}) where T
d = mapreduce(degree, lcm, keys(lf.fac), init = 1)
d = lcm(d, degree(parent(b[1])))
K = ext_of_degree(A, d)
r = roots(f, K)
r = roots(K, f)
return [AlgClosureElem(x, A) for x = r]
end

Expand Down
19 changes: 10 additions & 9 deletions experimental/GModule/Cohomology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ function H_zero(C::GModule)
@assert fl

#this is fix, now it "should" be mod by norm? Only for Tate, see below
z = MapFromFunc(x->CoChain{0,elem_type(G),elem_type(M)}(C, Dict(() => inj(x))), y->preimage(inj, y()), k, AllCoChains{0,elem_type(G),elem_type(M)}())
z = MapFromFunc(k, AllCoChains{0,elem_type(G),elem_type(M)}(), x->CoChain{0,elem_type(G),elem_type(M)}(C, Dict(() => inj(x))), y->preimage(inj, y()))
set_attribute!(C, :H_zero => z)
return k, z
end
Expand All @@ -594,7 +594,7 @@ function H_zero_tate(C::GModule)
q, mq = quo(k, image(inj)[1])
fl, Inj = is_subgroup(k, M)

z = MapFromFunc(x->CoChain{0,elem_type(G),elem_type(M)}(C, Dict(() => Inj(preimage(mq, x)))), y->mq(preimage(Inj, y())), q, AllCoChains{0,elem_type(G),elem_type(M)}())
z = MapFromFunc(q, AllCoChains{0,elem_type(G),elem_type(M)}(), x->CoChain{0,elem_type(G),elem_type(M)}(C, Dict(() => Inj(preimage(mq, x)))), y->mq(preimage(Inj, y())))
set_attribute!(C, :H_zero_tate => z)

if isfinite(G) && isa(q, GrpAbFinGen)
Expand Down Expand Up @@ -732,8 +732,9 @@ function H_one(C::GModule)
G = group(C)

z = MapFromFunc(
Q, AllCoChains{1, elem_type(G), elem_type(M)}(),
x->CoChain{1,elem_type(G),elem_type(M)}(C, Dict([(gen(G, i),) => pro[i](lft(preimage(mQ, x))) for i=1:ngens(G)])),
y->mQ(preimage(lft, sum(inj[i](y(gen(G, i))) for i=1:n))), Q, AllCoChains{1, elem_type(G), elem_type(M)}())
y->mQ(preimage(lft, sum(inj[i](y(gen(G, i))) for i=1:n))))

set_attribute!(C, :H_one => z)
return Q, z
Expand Down Expand Up @@ -1333,8 +1334,8 @@ function H_two(C::GModule; force_rws::Bool = false, redo::Bool = false)
return mH2(preimage(mE, T))
end

z = (MapFromFunc(x->TailToCoChain(mE(preimage(mH2, x))),
z2, H2, AllCoChains{2,elem_type(G),elem_type(M)}()),
z = (MapFromFunc(H2, AllCoChains{2,elem_type(G),elem_type(M)}(),
x->TailToCoChain(mE(preimage(mH2, x))), z2),
# y->TailFromCoChain(y), D, AllCoChains{2,elem_type(G),elem_type(M)}()),
is_coboundary)
set_attribute!(C, :H_two => z)
Expand Down Expand Up @@ -1571,9 +1572,9 @@ function pc_group(M::GrpAbFinGen; refine::Bool = true)
@assert is_isomorphic(B, fp_group(M)[1])

return B, MapFromFunc(
B, codomain(mM),
x->image(mM, gap_to_julia(x.X)),
y->PcGroupElem(B, Julia_to_gap(preimage(mM, y))),
B, codomain(mM))
y->PcGroupElem(B, Julia_to_gap(preimage(mM, y))))
end

function fp_group(::Type{PcGroup}, M::GrpAbFinGen; refine::Bool = true)
Expand Down Expand Up @@ -1661,9 +1662,9 @@ function pc_group(M::Generic.FreeModule{<:FinFieldElem}; refine::Bool = true)
@assert order(B) == order(M)

return B, MapFromFunc(
B, M,
x->gap_to_julia(x.X),
y->PcGroupElem(B, Julia_to_gap(y)),
B, M)
y->PcGroupElem(B, Julia_to_gap(y)))
end


Expand Down
8 changes: 4 additions & 4 deletions experimental/GModule/GModule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ function gmodule(k::Nemo.fpField, C::GModule{<:Any, <:Generic.FreeModule{<:FinFi
end

function Hecke.frobenius(K::FinField, i::Int=1)
MapFromFunc(x->Hecke.frobenius(x, i), y -> Hecke.frobenius(x, degree(K)-i), K, K)
MapFromFunc(K, K, x->Hecke.frobenius(x, i), y -> Hecke.frobenius(x, degree(K)-i))
end

function gmodule_minimal_field(C::GModule{<:Any, <:Generic.FreeModule{fpFieldElem}})
Expand Down Expand Up @@ -500,7 +500,7 @@ function gmodule_over(::QQField, C::GModule{<:Any, <:Generic.FreeModule{nf_elem}
end

function Oscar.hom(M::MultGrp, N::MultGrp, h::Map)
return MapFromFunc(x->N(h(x.data)), y->M(preimage(h, y.data)), M, N)
return MapFromFunc(M, N, x->N(h(x.data)), y->M(preimage(h, y.data)))
end

function Oscar.content_ideal(M::MatElem{nf_elem})
Expand Down Expand Up @@ -869,7 +869,7 @@ function Oscar.hom(F::Generic.FreeModule{T}, G::Generic.FreeModule{T}) where T
k = base_ring(F)
@assert base_ring(G) == k
H = free_module(k, dim(F)*dim(G))
return H, MapFromFunc(x->hom(F, G, matrix(k, dim(F), dim(G), vec(collect(x.v)))), y->H(vec(collect(transpose(mat(y))))), H, Hecke.MapParent(F, G, "homomorphisms"))
return H, MapFromFunc(H, Hecke.MapParent(F, G, "homomorphisms"), x->hom(F, G, matrix(k, dim(F), dim(G), vec(collect(x.v)))), y->H(vec(collect(transpose(mat(y))))))
end

function hom_base(C::T, D::T) where T <: GModule{<:Any, <:Generic.FreeModule{<:FinFieldElem}}
Expand Down Expand Up @@ -1158,7 +1158,7 @@ function Oscar.abelian_group(M::Generic.FreeModule{fqPolyRepFieldElem})
end
return M(m)
end
return A, MapFromFunc(to_M, to_A, A, M)
return A, MapFromFunc(A, M, to_M, to_A)
end

function Oscar.group(chi::Oscar.GAPGroupClassFunction)
Expand Down
24 changes: 12 additions & 12 deletions experimental/GModule/GaloisCohomology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function Oscar.gmodule(K::Hecke.LocalField, k::Union{Hecke.LocalField, FlintPadi
pi = uniformizer(K)
return gmodule(G, [hom(A, A, [A[1]]) for g = gens(G)]),
mG,
MapFromFunc(x->pi^x[1], y->Int(e*valuation(y))*A[1], A, K)
MapFromFunc(A, K, x->pi^x[1], y->Int(e*valuation(y))*A[1])
end

if e % prime(K) != 0 && !full #tame!
Expand All @@ -355,12 +355,12 @@ function Oscar.gmodule(K::Hecke.LocalField, k::Union{Hecke.LocalField, FlintPadi
end
return gmodule(G, h),
mG,
MapFromFunc(x->pi^x[1] * gk^x[2],
MapFromFunc(A, K, x->pi^x[1] * gk^x[2],
function(y)
v = Int(e*valuation(y))
y *= pi^-v
return v*A[1] + preimage(mu, mk(y))[1]*A[2]
end, A, K)
end)
end

# @show :wild
Expand Down Expand Up @@ -614,7 +614,7 @@ function Hecke.extend_easy(m::Hecke.CompletionMap, L::FacElemMon{AnticNumberFiel
function from(a::Hecke.LocalFieldElem)
return FacElem(preimage(m, a))
end
return MapFromFunc(to, from, L, codomain(m))
return MapFromFunc(L, codomain(m), to, from)
end

function Hecke.extend_easy(m::Hecke.CompletionMap, mu::Map, L::FacElemMon{AnticNumberField})
Expand All @@ -640,7 +640,7 @@ function Hecke.extend_easy(m::Hecke.CompletionMap, mu::Map, L::FacElemMon{AnticN
function from(a::Hecke.LocalFieldElem)
return FacElem(preimage(m, mu(a)))
end
return MapFromFunc(to, from, L, domain(mu))
return MapFromFunc(L, domain(mu), to, from)
end


Expand Down Expand Up @@ -746,7 +746,7 @@ function idel_class_gmodule(k::AnticNumberField, s::Vector{Int} = Int[]; redo::B
@vprint :GaloisCohomology 2 " .. S-units (for all) ..\n"
U, mU = sunit_group_fac_elem(S)
I.mU = mU
z = MapFromFunc(x->evaluate(x), y->FacElem(y), codomain(mU), k)
z = MapFromFunc(codomain(mU), k, x->evaluate(x), y->FacElem(y))
E = gmodule(G, mU, mG)
Hecke.assure_has_hnf(E.M)
@hassert :GaloisCohomology -1 is_consistent(E)
Expand Down Expand Up @@ -1061,7 +1061,7 @@ function Oscar.completion(I::IdelParent, P::NfAbsOrdIdl)
z = findall(pr -> mG(pr)(mKp.P) == P, prm)
pr = inv(prm[z[1]])

nKp = MapFromFunc(x->mKp(mG(pr)(x)), y->mG(inv(pr))(preimage(mKp, y)), I.k, Kp)
nKp = MapFromFunc(I.k, Kp, x->mKp(mG(pr)(x)), y->mG(inv(pr))(preimage(mKp, y)))

return Kp, nKp, mGp, mUp, pro * Hecke.canonical_projection(J, z[1]), Hecke.canonical_injection(J, z[1])*inj
end
Expand Down Expand Up @@ -1466,7 +1466,7 @@ function relative_brauer_group(K::AnticNumberField, k::Union{QQField, AnticNumbe
G = s
mG = ms*mG
else
mp = MapFromFunc(x -> K(x), y-> QQ(y), QQ, K)
mp = MapFromFunc(QQ, K, x -> K(x), y-> QQ(y))
end
B = RelativeBrauerGroup(mp)
B.mG = mG
Expand Down Expand Up @@ -1498,7 +1498,7 @@ function relative_brauer_group(K::AnticNumberField, k::Union{QQField, AnticNumbe
S, mS = sunit_group(lP)

MC = Oscar.GrpCoh.MultGrp(K)
mMC = MapFromFunc(x->MC(x), y->y.data, K, MC)
mMC = MapFromFunc(K, MC, x->MC(x), y->y.data)

mG = B.mG
G = domain(mG)
Expand Down Expand Up @@ -1548,9 +1548,9 @@ function relative_brauer_group(K::AnticNumberField, k::Union{QQField, AnticNumbe
return b
end

B.map = MapFromFunc(x->elem_to_cocycle(x),
y->cocycle_to_elem(y),
B, Oscar.GrpCoh.AllCoChains{2, PermGroupElem, Oscar.GrpCoh.MultGrpElem{nf_elem}}())
B.map = MapFromFunc(B, Oscar.GrpCoh.AllCoChains{2, PermGroupElem, Oscar.GrpCoh.MultGrpElem{nf_elem}}(),
x->elem_to_cocycle(x),
y->cocycle_to_elem(y))
return B, B.map
end

Expand Down
4 changes: 2 additions & 2 deletions experimental/GModule/Misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Hecke.number_field(::QQField, a::qqbar; cached::Bool = false)
return b
end
f = minpoly(x)
r = roots(f, k)
r = roots(k, f)
pr = 10
while true
C = AcbField(pr)
Expand All @@ -40,7 +40,7 @@ function Hecke.number_field(::QQField, a::qqbar; cached::Bool = false)
end
#TODO: make map canonical?
# ... and return gen(k) instead?
return k, MapFromFunc(to_qqbar, to_k, k, parent(a))
return k, MapFromFunc(k, parent(a), to_qqbar, to_k)
end

Base.getindex(::QQField, a::qqbar) = number_field(QQ, a)
Expand Down
2 changes: 1 addition & 1 deletion experimental/GaloisGrp/src/Solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ function Oscar.solve(f::ZZPolyRingElem; max_prec::Int=typemax(Int), show_radical
K = number_field(fld_arr[length(pp)+1])[1]
i = length(pp)+2
if K == QQ
h = MapFromFunc(x->x, y->y, K, K)
h = MapFromFunc(K, K, x->x, y->y)
else
h = hom(K, K, gen(K))
end
Expand Down
2 changes: 1 addition & 1 deletion experimental/GaloisGrp/src/Subfields.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Oscar.GaloisGrp: POSet, POSetElem, GaloisCtx, find_prime,


function embedding_hom(k, K)
return MapFromFunc(x->K(x), k, K)
return MapFromFunc(k, K, x->K(x))
end

const BlockSystem_t = Vector{Vector{Int}}
Expand Down
4 changes: 2 additions & 2 deletions experimental/LieAlgebras/src/iso_gap_oscar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function _iso_gap_oscar_abstract_lie_algebra(
LO = _abstract_lie_algebra_from_GAP(LG, coeffs_iso, s; cached)
finv, f = _iso_oscar_gap_lie_algebra_functions(LO, LG, inv(coeffs_iso))

iso = MapFromFunc(f, finv, LG, LO)
iso = MapFromFunc(LG, LO, f, finv)
set_attribute!(LO, :iso_oscar_gap => inv(iso))
return iso
end
Expand All @@ -41,7 +41,7 @@ function _iso_gap_oscar_linear_lie_algebra(
LO = _linear_lie_algebra_from_GAP(LG, coeffs_iso, s; cached)
finv, f = _iso_oscar_gap_lie_algebra_functions(LO, LG, inv(coeffs_iso))

iso = MapFromFunc(f, finv, LG, LO)
iso = MapFromFunc(LG, LO, f, finv)
set_attribute!(LO, :iso_oscar_gap => inv(iso))
return iso
end
Expand Down
4 changes: 2 additions & 2 deletions experimental/LieAlgebras/src/iso_oscar_gap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function _iso_oscar_gap(LO::LinearLieAlgebra{C}) where {C<:RingElement}

f, finv = _iso_oscar_gap_lie_algebra_functions(LO, LG, coeffs_iso)

return MapFromFunc(f, finv, LO, LG)
return MapFromFunc(LO, LG, f, finv)
end

function _iso_oscar_gap(LO::AbstractLieAlgebra{C}) where {C<:RingElement}
Expand All @@ -58,5 +58,5 @@ function _iso_oscar_gap(LO::AbstractLieAlgebra{C}) where {C<:RingElement}

f, finv = _iso_oscar_gap_lie_algebra_functions(LO, LG, coeffs_iso)

return MapFromFunc(f, finv, LO, LG)
return MapFromFunc(LO, LG, f, finv)
end
2 changes: 1 addition & 1 deletion experimental/LinearQuotients/src/linear_quotients.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function monomial_valuation(R::MPolyRing{T}, g::MatrixGroupElem{T}, zeta::Tuple{
return minimum(mons)
end

return MapFromFunc(val, R, ZZ)
return MapFromFunc(R, ZZ, val)
end

################################################################################
Expand Down
Loading

0 comments on commit 9e6c289

Please sign in to comment.