Skip to content

Commit

Permalink
Merge branch 'master' into gf/BasisLieHighestWeight
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens authored Nov 5, 2023
2 parents 123c942 + 6fd21c5 commit bd11db1
Show file tree
Hide file tree
Showing 62 changed files with 809 additions and 378 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ AlgebraicSolving = "0.3.6"
Distributed = "1.6"
DocStringExtensions = "0.8, 0.9"
GAP = "0.10.0"
Hecke = "0.22.5"
Hecke = "0.22.6"
JSON = "^0.20, ^0.21"
LazyArtifacts = "1.6"
Nemo = "0.37.1"
Expand Down
3 changes: 3 additions & 0 deletions docs/src/Groups/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,13 @@ is_finitelygenerated

```@docs
order(::Type{T}, x::Union{GAPGroupElem, GAPGroup}) where T <: IntegerUnion
abelian_invariants(G::GAPGroup)
abelian_invariants_schur_multiplier(G::GAPGroup)
cyclic_generator(G::GAPGroup)
exponent(G::GAPGroup)
describe(G::GAPGroup)
nilpotency_class(G::GAPGroup)
prime_of_pgroup
derived_length
schur_multiplier(G::Union{GAPGroup, GrpAbFinGen})
```
2 changes: 1 addition & 1 deletion docs/src/NumberTheory/galois.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ julia> r = roots(C, 5)
4-element Vector{qadic}:
5*11^0 + 2*11^1 + 6*11^2 + 8*11^3 + 11^4 + O(11^5)
6*11^0 + 8*11^1 + 4*11^2 + 2*11^3 + 9*11^4 + O(11^5)
(11^0 + 6*11^1 + 6*11^2 + 2*11^4 + O(11^5))*a + 9*11^0 + 4*11^1 + 6*11^2 + 7*11^3 + 11^4 + O(11^5)
(10*11^0 + 4*11^1 + 4*11^2 + 10*11^3 + 8*11^4 + O(11^5))*a + 2*11^0 + 6*11^1 + 4*11^2 + 3*11^3 + 9*11^4 + O(11^5)
(11^0 + 6*11^1 + 6*11^2 + 2*11^4 + O(11^5))*a + 9*11^0 + 4*11^1 + 6*11^2 + 7*11^3 + 11^4 + O(11^5)
julia> r[1]^2
3*11^0 + O(11^5)
Expand Down
2 changes: 1 addition & 1 deletion experimental/GModule/GaloisCohomology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ function Oscar.gmodule(K::Hecke.LocalField, k::Union{Hecke.LocalField, FlintPadi
mQ = mQ*inv(mS)

if Sylow > 0
@assert isprime(Sylow)
@assert is_prime(Sylow)
G, mS = sylow_subgroup(G, Sylow)
mG = mS*mG
end
Expand Down
7 changes: 7 additions & 0 deletions experimental/GaloisGrp/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
K, r = solve(x^3+3*x+5)
@test absolute_degree(K) == 12
@test length(r) == 3

Qt, t = rational_function_field(QQ, "t")
Qtx, x = Qt["x"]
F, a = function_field(x^6 + 108*t^2 + 108*t + 27)
subfields(F)
G, = galois_group(F)
@test is_isomorphic(G, symmetric_group(3))
end

2 changes: 1 addition & 1 deletion experimental/OrthogonalDiscriminants/test/data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@test length(all_od_infos(orthogonal_discriminant => "O+")) +
length(all_od_infos(orthogonal_discriminant => "O-")) ==
length(Oplusminus)
@test length(Oplusminus) <= length(all_od_infos(characteristic => ispositive))
@test length(Oplusminus) <= length(all_od_infos(characteristic => is_positive))
deg_1 = all_od_infos(degree => 1);
deg_other = all_od_infos(degree => (x -> x > 1));
@test length(all_entries) == length(deg_1) + length(deg_other)
Expand Down
2 changes: 1 addition & 1 deletion experimental/QuadFormAndIsom/src/embeddings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ function _find_admissible_gluing(SAinqA::TorQuadModuleMor,
phiHA, _ = sub(SB, elem_type(SB)[phi(SA(lift(a))) for a in gens(HA)])
OSB = orthogonal_group(SB)
G = GSetByElements(OSB, _on_subgroups, TorQuadModule[HB])
ok, g = representative_action(G, phiHA, HB)
ok, g = is_conjugate_with_data(G, phiHA, HB)
@hassert :ZZLatWithIsom 1 ok
phi_1 = compose(phi, hom(g))
@hassert :ZZLatWithIsom 1 sub(SB, elem_type(SB)[phi_1(SA(lift(a))) for a in gens(HA)])[1] == HB
Expand Down
4 changes: 2 additions & 2 deletions experimental/Schemes/AlgebraicCycles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ function ==(D::AbsAlgebraicCycle, E::AbsAlgebraicCycle)
end
else
# Make sure all generators are actually prime so that they can be compared.
all(I->isprime(I), keys(coefficient_dict(D))) || return irreducible_decomposition(D) == E
all(I->isprime(I), keys(coefficient_dict(E))) || return D == irreducible_decomposition(E)
all(is_prime, keys(coefficient_dict(D))) || return irreducible_decomposition(D) == E
all(is_prime, keys(coefficient_dict(E))) || return D == irreducible_decomposition(E)

keys_D = collect(keys(coefficient_dict(D)))
keys_E = collect(keys(coefficient_dict(E)))
Expand Down
4 changes: 2 additions & 2 deletions experimental/Schemes/BlowupMorphism.jl
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ function strict_transform(p::AbsSimpleBlowdownMorphism, C::EffectiveCartierDivis
# sanity check -- we are on a trivializing covering after all!
h_orig = C(V)[1]
h_total = pullback(pr_refined[U]).(h_orig)
if isunit(h_total)
if is_unit(h_total)
ID[U] = one(OO(U))
continue
end
Expand All @@ -552,7 +552,7 @@ function strict_transform(p::AbsSimpleBlowdownMorphism, C::EffectiveCartierDivis
length(E(U)) == 1 || error("exceptional divisor is not principal")
# sanity check -- default covering of Y is already trivializing for E!
e = E(U)[1]
if isunit(e)
if is_unit(e)
ID[U] = h_total
continue
end
Expand Down
2 changes: 1 addition & 1 deletion experimental/Schemes/CartierDivisor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ function intersect(W::WeilDivisor, C::EffectiveCartierDivisor; check::Bool=true)
X = scheme(W)
result = zero(W)
for I in components(W)
@check isprime(I) "all components of the first argument must be sheaves of prime ideals"
@check is_prime(I) "all components of the first argument must be sheaves of prime ideals"
inc_Y = CoveredClosedEmbedding(X, I, check=false)
#inc_Y = CoveredClosedEmbedding(X, I, covering=trivializing_covering(C), check=false)
Y = domain(inc_Y)
Expand Down
6 changes: 3 additions & 3 deletions experimental/Schemes/CoveredProjectiveSchemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ function is_regular_sequence(g::Vector{T}) where {T<:RingElem}
length(g) == 0 && return true
R = parent(g[1])
all(x->parent(x)===R, g) || error("elements do not belong to the correct ring")
isunit(g[1]) && return false # See Bruns-Herzog: Cohen-Macaulay rings, section 1.1.
is_unit(g[1]) && return false # See Bruns-Herzog: Cohen-Macaulay rings, section 1.1.
is_zero_divisor(g[1]) && return false
A, p = quo(R, ideal(R, g))
return is_regular_sequence(p.(g[2:end]))
Expand Down Expand Up @@ -1469,7 +1469,7 @@ end
# X = hypersurface_complement(subscheme(C, div_list[i]), prod(loc_list[i]))
# D = A[row_list[i], column_list[i]]
# g = det(D)
# isunit(OO(X)(g)) || error("selected minor is not a unit")
# is_unit(OO(X)(g)) || error("selected minor is not a unit")
# end
# end
# else
Expand Down Expand Up @@ -1678,7 +1678,7 @@ end
# A = Df[rl[i], cl[i]]
# g = det(A)
# U = hypersurface_complement(subscheme(C, ql[i]), h)
# @show isunit(OO(U)(g))
# @show is_unit(OO(U)(g))
# end
#
#
Expand Down
2 changes: 1 addition & 1 deletion experimental/Schemes/FunctionFields.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ end
# try to avoid a groebner basis computation
iszero(a::VarietyFunctionFieldElem) = iszero(representative(a)) || iszero(OO(representative_patch(parent(a)))(numerator(a)))
isone(a::VarietyFunctionFieldElem) = isone(representative(a)) || iszero(OO(representative_patch(parent(a)))(numerator(a) - denominator(a)))
isunit(a::VarietyFunctionFieldElem) = !iszero(representative(a))
is_unit(a::VarietyFunctionFieldElem) = !iszero(representative(a))

########################################################################
# Conversion of rational functions on arbitrary patches #
Expand Down
2 changes: 1 addition & 1 deletion experimental/Schemes/MorphismFromRationalFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ end
function pushforward(Phi::MorphismFromRationalFunctions, D::AbsAlgebraicCycle)
is_isomorphism(Phi) || error("method not implemented unless for the case of an isomorphism")
#is_proper(Phi) || error("morphism must be proper")
all(x->isprime(x), components(D)) || error("divisor must be given in terms of irreducible components")
all(is_prime, components(D)) || error("divisor must be given in terms of irreducible components")
X = domain(Phi)
Y = codomain(Phi)
pushed_comps = IdDict{IdealSheaf, elem_type(coefficient_ring(D))}()
Expand Down
2 changes: 1 addition & 1 deletion experimental/Schemes/ToricIdealSheaves/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function IdealSheaf(X::NormalToricVariety, I::MPolyIdeal)
# 1. All maximal cones are smooth, i.e. the fan is smooth/X is smooth.
# 2. The dimension of all maximal cones matches the dimension of the fan.
@req is_smooth(X) "Currently, ideal sheaves are only supported for smooth toric varieties"
@req ispure(X) "Currently, ideal sheaves require that all maximal cones have the dimension of the variety"
@req is_pure(X) "Currently, ideal sheaves require that all maximal cones have the dimension of the variety"

ideal_dict = IdDict{AbsSpec, Ideal}()

Expand Down
4 changes: 2 additions & 2 deletions experimental/Schemes/WeilDivisor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ function in_linear_system(f::VarietyFunctionFieldElem, D::WeilDivisor; regular_o
X === variety(parent(f)) || error("schemes not compatible")
C = simplified_covering(X)
for I in components(D)
@check isprime(I) "components of the divisor must be prime"
@check is_prime(I) "components of the divisor must be prime"
order_on_divisor(f, I, check=false) >= -D[I] || return false
end
regular_on_complement && return true
Expand Down Expand Up @@ -461,7 +461,7 @@ generated by rational functions ``f₁,…,fᵣ ∈ K(X)``.
X === variety(KK) || error("input not compatible")

@check begin
all(I->isprime(I), components(D)) || error("components of the divisor must be prime")
all(is_prime, components(D)) || error("components of the divisor must be prime")
all(g->in_linear_system(g, D), f) || error("element not in linear system")
end
f = Vector{VarietyFunctionFieldElem}(f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ Finite field of degree 24 over GF(3)
```
"""
function standard_finite_field(p::IntegerUnion, n::IntegerUnion)
@req isprime(p) "first argument must be a prime"
@req is_prime(p) "first argument must be a prime"
F = GF(p)
set_standard_prime_field!(F)

Expand Down
2 changes: 1 addition & 1 deletion experimental/SymmetricIntersections/src/representations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ function _has_pfr(G::Oscar.GAPGroup, dim::Int)
f_gap = GG.EpimorphismSchurCover(G_gap)
H_gap = GG.Source(f_gap)
n, p = ispower(GG.Size(H_gap))
if isprime(p)
if is_prime(p)
fff_gap = GG.EpimorphismPGroup(H_gap, p)
E_gap = fff_gap(H_gap)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function issubset(
) where {BRT}
R = ambient_coordinate_ring(X)
R === ambient_coordinate_ring(Y) || return false
all(x->isunit(OO(X)(x)), denominators(inverted_set(OO(Y)))) || return false
all(x->is_unit(OO(X)(x)), denominators(inverted_set(OO(Y)))) || return false
return iszero(localized_ring(OO(Y))(modulus(OO(X))))
end

Expand All @@ -164,7 +164,7 @@ function issubset(
) where {BRT}
R = ambient_coordinate_ring(X)
R === ambient_coordinate_ring(Y) || return false
all(x->isunit(OO(X)(x)), denominators(inverted_set(OO(Y)))) || return false
all(x->is_unit(OO(X)(x)), denominators(inverted_set(OO(Y)))) || return false
return issubset(modulus(OO(Y)), localized_ring(OO(Y))(modulus(OO(X))))
end

Expand Down Expand Up @@ -464,7 +464,7 @@ function is_closed_embedding(
R = ambient_coordinate_ring(X)
R === ambient_coordinate_ring(Y) || return false
for f in inverted_set(OO(X))
isunit(OO(Y)(f)) || return false
is_unit(OO(Y)(f)) || return false
end
return true
end
Expand All @@ -479,7 +479,7 @@ function is_closed_embedding(
R = ambient_coordinate_ring(X)
R === ambient_coordinate_ring(Y) || return false
for x in inverted_set(OO(X))
isunit(OO(Y)(x)) || return false
is_unit(OO(Y)(x)) || return false
end
for g in gens(modulus(OO(Y)))
iszero(OO(X)(g)) || return false
Expand Down Expand Up @@ -517,7 +517,7 @@ function is_closed_embedding(
<:MPolyPowersOfElement}}
R = ambient_coordinate_ring(X)
R === ambient_coordinate_ring(Y) || return false
all(x->(isunit(OO(X)(x))), denominators(inverted_set(OO(Y)))) || return false
all(x->(is_unit(OO(X)(x))), denominators(inverted_set(OO(Y)))) || return false
return issubset(modulus(OO(Y)), localized_ring(OO(Y))(modulus(OO(X))))
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ given by the pullback function
(y//z) -> 0
```
"""
function covering_morphism(f::AbsCoveredSchemeMorphism)::CoveringMorphism
return covering_morphism(underlying_morphism(f))
function covering_morphism(f::AbsCoveredSchemeMorphism)
return covering_morphism(underlying_morphism(f))::CoveringMorphism
end

### generically derived getters
Expand Down
2 changes: 1 addition & 1 deletion src/AlgebraicGeometry/Surfaces/K3Auto.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ function is_S_nondegenerate(L::ZZLat, S::ZZLat, w::QQMatrix)
D = reduce(vcat, prSDelta_w, init=i)
P = positive_hull(D) # the dual cone of C
# If P has a linear subspace, then its dual C is not of full dimension.
return ispointed(P)
return is_pointed(P)
end

function inner_point(L::ZZLat, S::ZZLat, w::QQMatrix)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ julia> integrate(cohomology_class(anticanonical_divisor_class(X))^3)
62
```
"""
function integrate(c::CohomologyClass)::QQFieldElem
function integrate(c::CohomologyClass)
# can only integrate if the variety is simplicial, complete
@req is_simplicial(toric_variety(c)) && is_complete(toric_variety(c)) "Integration only supported over complete and simplicial toric varieties"

Expand All @@ -97,30 +97,30 @@ function integrate(c::CohomologyClass)::QQFieldElem
intersection_dict = _intersection_form_via_exponents(toric_variety(c))
coeffs = coefficients(c)
expos = exponents(c)
integral = 0
integral = zero(QQ)
for i in 1:nrows(expos)
if expos[i, :] in keys(intersection_dict)
integral += coeffs[i] * intersection_dict[expos[i, :]]
end
end
return integral
return integral::QQFieldElem
end

# otherwise, proceed "by hand"
if is_trivial(c)
return 0
return zero(QQ)
end
poly = polynomial(c)
dict = homogeneous_components(poly)
elem = base_ring(parent(poly)).D([dim(toric_variety(c))])
if !(elem in keys(dict))
return 0
return zero(QQ)
end
top_form = dict[elem]
if iszero(top_form)
return 0
return zero(QQ)
end
n = AbstractAlgebra.leading_coefficient(top_form.f)
m = AbstractAlgebra.leading_coefficient(polynomial(volume_form(toric_variety(c))).f)
return QQFieldElem(n//m)
return n//m
end
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ julia> hilbert_basis(antv)
"""
@attr ZZMatrix function hilbert_basis(v::AffineNormalToricVariety)
@req is_pointed(weight_cone(v)) "Weight cone is not pointed"
@req isfulldimensional(weight_cone(v)) "Weight cone is not full dimensional"
@req is_fulldimensional(weight_cone(v)) "Weight cone is not full dimensional"
return matrix(ZZ, hilbert_basis(weight_cone(v)))
end

Expand Down
Loading

0 comments on commit bd11db1

Please sign in to comment.