Skip to content

Commit

Permalink
Get rid of trivial anonymous functions (part 1) (#4126)
Browse files Browse the repository at this point in the history
Co-authored-by: Johannes Schmitt <jschmitt@posteo.eu>
Co-authored-by: Benjamin Lorenz <benlorenz@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 20, 2024
1 parent 45f0b28 commit 98f11e5
Show file tree
Hide file tree
Showing 49 changed files with 96 additions and 98 deletions.
2 changes: 1 addition & 1 deletion examples/Reynolds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ function action_on_monomials(R::MPolyRing, d::Int, A::Vector{QQMatrix})
b = zeros(QQ, length(m))
y = evaluate(x, h)
for (c,v) = zip(AbstractAlgebra.coefficients(y), AbstractAlgebra.monomials(y))
b[findfirst(l -> l==v, m)] = c
b[findfirst(==(v), m)] = c
end
push!(bb, b)
end
Expand Down
4 changes: 2 additions & 2 deletions experimental/AlgebraicStatistics/src/PhylogeneticAuxiliary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ end
function interior_nodes(graph::Graph)
big_graph = Polymake.graph.Graph(ADJACENCY = pm_object(graph))
degrees = big_graph.NODE_DEGREES
return findall(x -> x > 1, degrees)
return findall(>(1), degrees)
end

function leaves(graph::Graph)
big_graph = Polymake.graph.Graph(ADJACENCY = pm_object(graph))
degrees = big_graph.NODE_DEGREES
return findall(x -> x == 1, degrees)
return findall(==(1), degrees)
end

function vertex_descendants(v::Int, gr::Graph, desc::Vector{Any})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Dict{Tuple{Vararg{Int64}}, QQMPolyRingElem} with 5 entries:
"""
function compute_equivalent_classes(parametrization::Dict{Tuple{Vararg{Int64}}, QQMPolyRingElem})
polys = unique(collect(values(parametrization)))
polys = polys[findall(x -> x!=0, polys)]
polys = polys[findall(!is_zero, polys)]

equivalent_keys = []
for value in polys
Expand Down
2 changes: 1 addition & 1 deletion experimental/DoubleAndHyperComplexes/src/Morphisms/ext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function (fac::InterpretationMorphismFactory)(self::AbsHyperComplexMorphism, I::
pr = projections_dom[k]
for (l, L) in enumerate(indices_cod)
KL = Tuple(vcat(-collect(K), collect(L)))
kl = findfirst(x->x==KL, indices_tot)
kl = findfirst(==(KL), indices_tot)
kl === nothing && error("index not found")
v_loc = (projections_tot[kl])(fac.v)
phi_loc = element_to_homomorphism(v_loc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function (fac::LinearStrandComplementChainFactory)(self::AbsHyperComplex, i::Tup
min_ind = [k for k in 1:rank(F_full) if degree(F_full[k]) == offset]
comp = [k for k in 1:rank(F_full) if !(k in min_ind)]
F = graded_free_module(S, elem_type(G)[degree(F_full[k]) for k in comp])
map = hom(F_full, F, elem_type(F)[(k in comp ? F[findfirst(i->i==k, comp)] : zero(F)) for k in 1:rank(F_full)])
map = hom(F_full, F, elem_type(F)[(k in comp ? F[findfirst(==(k), comp)] : zero(F)) for k in 1:rank(F_full)])
fac.maps_from_original[i] = map
return F
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function (fac::SimplifiedChainFactory)(d::AbsHyperComplex, Ind::Tuple)
w = Tinv[i]
new_entries = Vector{Tuple{Int, elem_type(base_ring(w))}}()
for (real_j, b) in w
j = findfirst(k->k==real_j, J)
j = findfirst(==(real_j), J)
j === nothing && continue
push!(new_entries, (j, b))
end
Expand Down
2 changes: 1 addition & 1 deletion experimental/DoubleAndHyperComplexes/src/Objects/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ end
ranges = [(k, u) for (k, u) in v if u isa UnitRange]
d = length(ranges)
all_ind = [k for (k, u) in v if u isa UnitRange]
@assert all(k->k in all_ind, 1:d) "matching of ranges is not unique"
@assert all(in(all_ind), 1:d) "matching of ranges is not unique"

mapping_matrix = [0 for i in 1:dim(c), j in 1:d]
new_ranges = Dict(v)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function (fac::TotalComplexMapFactory)(c::AbsHyperComplex, p::Int, I::Tuple)
for k in 1:dim(orig)
target = collect(J) + (direction(orig, k) == :chain ? -1 : 1)*[(l == k ? 1 : 0) for l in 1:dim(orig)]
T = Tuple(target)
index_in_cod = findfirst(t->t == T, index_cache(chain_fac)[next])
index_in_cod = findfirst(==(T), index_cache(chain_fac)[next])
index_in_cod === nothing && continue
phi = map(orig, k, J)
@assert codomain(phi) === orig[T]
Expand Down Expand Up @@ -228,15 +228,15 @@ end
function injection(tot::TotalComplex, i::Tuple)
d = sum(i)
v = indices_in_summand(tot, d)
k = findfirst(k->k==i, v)
k = findfirst(==(i), v)
k === nothing && return nothing
return injections_for_summand(tot, d)[k]
end

function projection(tot::TotalComplex, i::Tuple)
d = sum(i)
v = indices_in_summand(tot, d)
k = findfirst(k->k==i, v)
k = findfirst(==(i), v)
k === nothing && return nothing
return projections_for_summand(tot, d)[k]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ function put_over_concrete_base(m::AbstractFTheoryModel, concrete_data::Dict{Str
all_appearing_monomials = vcat([collect(monomials(p)) for p in polys]...)
all_appearing_exponents = hcat([collect(exponents(m))[1] for m in all_appearing_monomials]...)
for k in 1:nrows(all_appearing_exponents)
if any(x -> x != 0, all_appearing_exponents[k,:])
if any(!is_zero, all_appearing_exponents[k,:])
gen_name = string(gens(parent(polys[1]))[k])
@req haskey(concrete_data, gen_name) "Required base section $gen_name not specified"
@req parent(concrete_data[gen_name]) == cox_ring(concrete_data["base"]) "Specified sections must reside in Cox ring of given base"
Expand Down Expand Up @@ -646,7 +646,7 @@ function set_zero_section_class(m::AbstractFTheoryModel, desired_value::String)
cohomology_ring(ambient_space(m); check=false)
cox_gens = string.(gens(cox_ring(ambient_space(m))))
@req desired_value in cox_gens "Specified zero section is invalid"
index = findfirst(x -> x==desired_value, cox_gens)
index = findfirst(==(desired_value), cox_gens)
set_attribute!(m, :zero_section_class => cohomology_class(divs[index]))
end

Expand Down Expand Up @@ -840,7 +840,7 @@ function resolve(m::AbstractFTheoryModel, resolution_index::Int)

# Compute strict transform of ideal sheaves appearing in blowup center
exceptional_center = [c for c in blow_up_center if (c in exceptionals)]
positions = [findfirst(x -> x == l, exceptionals) for l in exceptional_center]
positions = [findfirst(==(l), exceptionals) for l in exceptional_center]
exceptional_divisors = [exceptional_divisor(get_attribute(blow_up_chain[l], :blow_down_morphism)) for l in positions]
exceptional_ideal_sheafs = [ideal_sheaf(d) for d in exceptional_divisors]
for l in 1:length(positions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function tune(h::HypersurfaceModel, input_sections::Dict{String, <:Any}; complet
isempty(input_sections) && return h
secs_names = collect(keys(explicit_model_sections(h)))
tuned_secs_names = collect(keys(input_sections))
@req all(x -> x in secs_names, tuned_secs_names) "Provided section name not recognized"
@req all(in(secs_names), tuned_secs_names) "Provided section name not recognized"

# 1. Tune model sections
explicit_secs = deepcopy(explicit_model_sections(h))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ end
#######################################################

function _find_model(doi::String, arxiv_id::String, version::String, equation::String, type::String)
@req any(s -> s != "", [doi, arxiv_id, version, equation]) "No information provided; cannot perform look-up"
@req any(!isempty, [doi, arxiv_id, version, equation]) "No information provided; cannot perform look-up"
file_index = JSON.parsefile(joinpath(@__DIR__, "index.json"))
candidate_files = Vector{String}()
for k in 1:length(file_index)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
function _create_literature_model_index()
model_directory = joinpath(@__DIR__, "Models/")
models = readdir(model_directory)
filter!(s -> startswith(s, "model"), models)
filter!(startswith("model"), models)

index = Vector{Dict{String,Union{String,Vector{Any}}}}()
model_indices = JSON.parsefile(joinpath(@__DIR__, "model_indices.json"))
Expand Down
2 changes: 1 addition & 1 deletion experimental/FTheoryTools/src/TateModels/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function global_tate_model(base::NormalToricVariety,
@req haskey(explicit_model_sections, "a4") "Tate section a4 must be specified"
@req haskey(explicit_model_sections, "a6") "Tate section a6 must be specified"
vs2 = collect(keys(defining_section_parametrization))
@req all(x -> x in ["a1", "a2", "a3", "a4", "a6"], vs2) "Only the Tate sections a1, a2, a3, a4, a6 must be parametrized"
@req all(in(["a1", "a2", "a3", "a4", "a6"]), vs2) "Only the Tate sections a1, a2, a3, a4, a6 must be parametrized"

gens_base_names = [string(g) for g in gens(cox_ring(base))]
if ("x" in gens_base_names) || ("y" in gens_base_names) || ("z" in gens_base_names)
Expand Down
10 changes: 5 additions & 5 deletions experimental/FTheoryTools/src/TateModels/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function analyze_fibers(model::GlobalTateModel, centers::Vector{<:Vector{<:Integ

# Pick out the singular loci that are more singular than an I_1
# Then keep only the locus and not the extra info about it
interesting_singular_loci = map(tup -> tup[1], filter(locus -> locus[2][3] > 1, sing_loc))
interesting_singular_loci = map(first, filter(locus -> locus[2][3] > 1, sing_loc))

# This is a kludge to map polynomials on the base into the ambient space, and should be fixed once the ambient space constructors supply such a map
base_coords = parent(gens(interesting_singular_loci[1])[1])
Expand All @@ -50,7 +50,7 @@ function analyze_fibers(model::GlobalTateModel, centers::Vector{<:Vector{<:Integ
# Potential components of the fiber over this locus
# For now, we only consider the associated prime ideal,
# but we may later want to actually consider the primary ideals
potential_components = map(pair -> pair[2], primary_decomposition(strict_transform + res_ring_map(ungraded_locus)))
potential_components = map(last, primary_decomposition(strict_transform + res_ring_map(ungraded_locus)))

# Filter out the trivial loci among the potential components
components = filter(component -> _is_nontrivial(component, res_irr), potential_components)
Expand All @@ -59,7 +59,7 @@ function analyze_fibers(model::GlobalTateModel, centers::Vector{<:Vector{<:Integ
intersections = Tuple{Tuple{Int64, Int64}, Vector{MPolyIdeal{QQMPolyRingElem}}}[]
for i in 1:length(components) - 1
for j in i + 1:length(components)
intersection = filter(candidate_locus -> _is_nontrivial(candidate_locus, res_irr), map(pair -> pair[2], primary_decomposition(components[i] + components[j])))
intersection = filter(candidate_locus -> _is_nontrivial(candidate_locus, res_irr), map(last, primary_decomposition(components[i] + components[j])))
push!(intersections, ((i, j), intersection))
end
end
Expand Down Expand Up @@ -163,7 +163,7 @@ function tune(t::GlobalTateModel, input_sections::Dict{String, <:Any}; completen
isempty(input_sections) && return t
secs_names = collect(keys(explicit_model_sections(t)))
tuned_secs_names = collect(keys(input_sections))
@req all(x -> x in secs_names, tuned_secs_names) "Provided section name not recognized"
@req all(in(secs_names), tuned_secs_names) "Provided section name not recognized"

# 0. Prepare for computation by setting up some information
explicit_secs = deepcopy(explicit_model_sections(t))
Expand Down Expand Up @@ -220,7 +220,7 @@ function tune(t::GlobalTateModel, input_sections::Dict{String, <:Any}; completen
# 5. After removing some sections, we must go over the parametrization again and adjust the ring in which the parametrization is given.
if !isempty(def_secs_param)
naive_vars = string.(gens(parent(first(values(def_secs_param)))))
filtered_vars = filter(x -> x in keys(explicit_secs), naive_vars)
filtered_vars = filter(x -> haskey(explicit_secs, x), naive_vars)
desired_ring, _ = polynomial_ring(QQ, filtered_vars, cached = false)
for (key, value) in def_secs_param
def_secs_param[key] = eval_poly(string(value), desired_ring)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function weierstrass_model(base::NormalToricVariety,
@req haskey(explicit_model_sections, "f") "Weierstrass section f must be specified"
@req haskey(explicit_model_sections, "g") "Weierstrass section g must be specified"
vs2 = collect(keys(defining_section_parametrization))
@req all(x -> x in ["f", "g"], vs2) "Only the Weierstrass sections f, g must be parametrized"
@req all(in(("f", "g")), vs2) "Only the Weierstrass sections f, g must be parametrized"

gens_base_names = [string(g) for g in gens(cox_ring(base))]
if ("x" in gens_base_names) || ("y" in gens_base_names) || ("z" in gens_base_names)
Expand Down
4 changes: 2 additions & 2 deletions experimental/FTheoryTools/src/WeierstrassModels/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function tune(w::WeierstrassModel, input_sections::Dict{String, <:Any}; complete
isempty(input_sections) && return w
secs_names = collect(keys(explicit_model_sections(w)))
tuned_secs_names = collect(keys(input_sections))
@req all(x -> x in secs_names, tuned_secs_names) "Provided section name not recognized"
@req all(in(secs_names), tuned_secs_names) "Provided section name not recognized"

# 0. Prepare for computation by setting up some information
explicit_secs = deepcopy(explicit_model_sections(w))
Expand Down Expand Up @@ -143,7 +143,7 @@ function tune(w::WeierstrassModel, input_sections::Dict{String, <:Any}; complete
# 5. After removing some sections, we must go over the parametrization again and adjust the ring in which the parametrization is given.
if !isempty(def_secs_param)
naive_vars = string.(gens(parent(first(values(def_secs_param)))))
filtered_vars = filter(x -> x in keys(explicit_secs), naive_vars)
filtered_vars = filter(x -> haskey(explicit_secs, x), naive_vars)
desired_ring, _ = polynomial_ring(QQ, filtered_vars, cached = false)
for (key, value) in def_secs_param
def_secs_param[key] = eval_poly(string(value), desired_ring)
Expand Down
10 changes: 5 additions & 5 deletions experimental/FTheoryTools/src/auxiliary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,14 @@ function _kodaira_type(id::MPolyIdeal{<:MPolyRingElem}, ords::Tuple{Int64, Int64
push!(quotients, quotient(ideal([9 * g2s[i], gauge2s[i]]), ideal([2 * f2s[i], gauge2s[i]])))
end

kod_type = if all(q -> is_radical(q), quotients) "Non-split I_$d_ord" else "Split I_$d_ord" end
kod_type = if all(is_radical, quotients) "Non-split I_$d_ord" else "Split I_$d_ord" end
elseif d_ord == 4 && g_ord == 2 && f_ord >= 2
quotients = []
for i in eachindex(gauge2s)
push!(quotients, quotient(ideal([g2s[i]]), ideal([gauge2s[i]^2])) + ideal([gauge2s[i]]))
end

kod_type = if all(q -> is_radical(q), quotients) "Non-split IV" else "Split IV" end
kod_type = if all(is_radical, quotients) "Non-split IV" else "Split IV" end
elseif f_ord == 2 && g_ord == 3 && d_ord >= 7
quotients = []
if d_ord % 2 == 0
Expand All @@ -276,14 +276,14 @@ function _kodaira_type(id::MPolyIdeal{<:MPolyRingElem}, ords::Tuple{Int64, Int64
end
end

kod_type = if all(q -> is_radical(q), quotients) "Non-split I^*_$(d_ord - 6)" else "Split I^*_$(d_ord - 6)" end
kod_type = if all(is_radical, quotients) "Non-split I^*_$(d_ord - 6)" else "Split I^*_$(d_ord - 6)" end
elseif d_ord == 8 && g_ord == 4 && f_ord >= 3
quotients = []
for i in eachindex(gauge2s)
push!(quotients, quotient(ideal([g2s[i]]), ideal([gauge2s[i]^4])) + ideal([gauge2s[i]]))
end

kod_type = if all(q -> is_radical(q), quotients) "Non-split IV^*" else "Split IV^*" end
kod_type = if all(is_radical, quotients) "Non-split IV^*" else "Split IV^*" end
else
kod_type = "Unrecognized"
end
Expand Down Expand Up @@ -464,7 +464,7 @@ _strict_transform(bd::AbsCoveredSchemeMorphism, II::AbsIdealSheaf) = strict_tran

function _strict_transform(bd::ToricBlowdownMorphism, II::ToricIdealSheafFromCoxRingIdeal)
center_ideal = ideal_in_cox_ring(center_unnormalized(bd))
if (ngens(ideal_in_cox_ring(II)) != 1) || (all(x -> x in gens(base_ring(center_ideal)), gens(center_ideal)) == false)
if (ngens(ideal_in_cox_ring(II)) != 1) || (all(in(gens(base_ring(center_ideal))), gens(center_ideal)) == false)
return strict_transform(bd, II)
end
S = cox_ring(domain(bd))
Expand Down
11 changes: 5 additions & 6 deletions experimental/GITFans/src/GITFans.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ function orbit_cones(I::MPolyIdeal, Q::Matrix{Int}, G::PermGroup = symmetric_gro
# computing rays and facets.
facets(cone)
rays(cone)
if ! any(j -> j == cone,
collector_cones)
if !any(==(cone), collector_cones)
push!(collector_cones, cone)
end
end
Expand Down Expand Up @@ -333,7 +332,7 @@ function orbit_cone_orbits(cones::Vector{Cone{T}}, ghom::GAPGroupHomomorphism) w
# the heavy lifting of computing rays and facets.
rays(c)
facets(c)
if all(o -> all(x -> c != x, o), result)
if all(o -> all(!=(c), o), result)
push!(result, orbit(c, matgens, act, Base.:(==)))
end
end
Expand Down Expand Up @@ -472,7 +471,7 @@ function fan_traversal(orbit_list::Vector{Vector{Cone{T}}}, q_cone::Cone{T}, per
for i in neighbor_hashes
if i in hash_list
# perhaps we have found a new incidence
push!(edges, sort!([findfirst(x->x == i, hash_list), current_pos]))
push!(edges, sort!([findfirst(==(i), hash_list), current_pos]))
else
# new representative found
push!(hash_list, i)
Expand Down Expand Up @@ -511,12 +510,12 @@ function hashes_to_polyhedral_fan(orbit_list::Vector{Vector{Cone{T}}}, hash_list
allrays = sort!(unique(vcat(rays_maxcones...)))

# the indices of rays that belong to each maximal cone (0-based)
index_maxcones = [sort([findfirst(x -> x == v, allrays)-1
index_maxcones = [sort([findfirst(==(v), allrays)-1
for v in rays])
for rays in rays_maxcones]

# the indices of rays that belong to each repres. cone
index_result_cones = [sort([findfirst(x -> x == v, allrays)
index_result_cones = [sort([findfirst(==(v), allrays)
for v in rays])
for rays in rays_result_cones]

Expand Down
2 changes: 1 addition & 1 deletion experimental/GModule/src/Brueckner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function reps(K, G::Oscar.PcGroup)
X = l[1]
Xp = X^p
#Brueckner: C*Xp == Y for some scalar C
ii = findfirst(x->!iszero(x), Xp)
ii = findfirst(!is_zero, Xp)
@assert !iszero(Y[ii])
C = divexact(Y[ii], Xp[ii])
@assert C*Xp == Y
Expand Down
4 changes: 2 additions & 2 deletions experimental/GModule/src/Cohomology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ function induce(C::GModule{<:Oscar.GAPGroup}, h::Map, D = nothing, mDC = nothing
for s = gens(G)
sigma = ra(s)
u = [ g[i]*s*g[i^sigma]^-1 for i=1:length(g)]
@assert all(x->x in iU, u)
@assert all(in(iU), u)
im_q = []
for q = gens(indC)
push!(im_q, sum(inj[i^sigma](action(C, preimage(h, u[i]), pro[i](q))) for i=1:length(g)))
Expand All @@ -358,7 +358,7 @@ function induce(C::GModule{<:Oscar.GAPGroup}, h::Map, D = nothing, mDC = nothing
s = inv(s)
sigma = ra(s)
u = [ g[i]*s*g[i^sigma]^-1 for i=1:length(g)]
@assert all(x->x in iU, u)
@assert all(in(iU), u)
im_q = []
for q = gens(indC)
push!(im_q, sum(inj[i^sigma](action(C, preimage(h, u[i]), pro[i](q))) for i=1:length(g)))
Expand Down
2 changes: 1 addition & 1 deletion experimental/GModule/src/GModule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ function _two_cocycle(mA::Map, C::GModule{<:Any, <:AbstractAlgebra.FPModule{AbsS
elseif isone(h)
sigma[(g, h)] = (one(K))
else
lf = findfirst(x->!iszero(x), X[g*h])
lf = findfirst(!is_zero, X[g*h])
sigma[(g, h)] = (X[g*h][lf]//(map_entries(mA(h), X[g])*X[h])[lf])
# sigma[(g, h)] = MK(X[g*h][lf]//(X[h]*map_entries(mA(h), X[g]))[lf])
end
Expand Down
10 changes: 5 additions & 5 deletions experimental/GModule/src/GaloisCohomology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ function idele_class_gmodule(k::AbsSimpleNumField, s::Vector{Int} = Int[]; redo:
@vprint :GaloisCohomology 2 " .. S-units (for all) ..\n"
U, mU = sunit_group_fac_elem(S)
I.mU = mU
z = MapFromFunc(codomain(mU), k, x->evaluate(x), y->FacElem(y))
z = MapFromFunc(codomain(mU), k, evaluate, FacElem)
E = gmodule(G, mU, mG)
Hecke.assure_has_hnf(E.M)
@hassert :GaloisCohomology -1 is_consistent(E)
Expand Down Expand Up @@ -1641,7 +1641,7 @@ function relative_brauer_group(K::AbsSimpleNumField, k::Union{QQField, AbsSimple
G = s
mG = ms*mG
else
mp = MapFromFunc(QQ, K, x -> K(x), y-> QQ(y))
mp = MapFromFunc(QQ, K, K, QQ)
end
B = RelativeBrauerGroup(mp)
B.mG = mG
Expand Down Expand Up @@ -1673,7 +1673,7 @@ function relative_brauer_group(K::AbsSimpleNumField, k::Union{QQField, AbsSimple
S, mS = sunit_group(lP)

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

mG = B.mG
G = domain(mG)
Expand Down Expand Up @@ -1724,8 +1724,8 @@ function relative_brauer_group(K::AbsSimpleNumField, k::Union{QQField, AbsSimple
end

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

Expand Down
Loading

0 comments on commit 98f11e5

Please sign in to comment.