Skip to content

Commit 967d5ad

Browse files
committed
CommutativeAlgebra: fixed bibtool test and docs
1 parent e6c8cad commit 967d5ad

File tree

3 files changed

+40
-39
lines changed

3 files changed

+40
-39
lines changed

docs/oscar_references.bib

+2-2
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ @Article{Laz92
20192019
pages = {117--131},
20202020
year = {1992},
20212021
month = feb,
2022-
doi = {10.1016/S0747-7171(08)80086-7},
2022+
doi = {10.1016/S0747-7171(08)80086-7}
20232023
}
20242024

20252025
@PhDThesis{Lev05,
@@ -2148,7 +2148,7 @@ @Article{Moe93
21482148
pages = {217--230},
21492149
year = {1993},
21502150
month = dec,
2151-
doi = {10.1007/BF01200146},
2151+
doi = {10.1007/BF01200146}
21522152
}
21532153

21542154
@Article{Nik79,

docs/src/CommutativeAlgebra/ideals.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ equidimensional_hull_radical(I::MPolyIdeal)
259259
### Triangular Decomposition
260260

261261
```@docs
262-
triangular_decomposition(::MPolyIdeal, ::Symbol)
262+
triangular_decomposition(::MPolyIdeal)
263263
```
264264

265265

src/Rings/mpoly-ideals.jl

+37-36
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ end
307307

308308
# saturation #######################################################
309309
@doc raw"""
310-
saturation(I::MPolyIdeal{T},
311-
J::MPolyIdeal{T} = ideal(base_ring(I), gens(base_ring(I)));
310+
saturation(I::MPolyIdeal{T},
311+
J::MPolyIdeal{T} = ideal(base_ring(I), gens(base_ring(I)));
312312
iteration::Bool=false) where T
313313
314314
Return the saturation of `I` with respect to `J`.
@@ -372,7 +372,7 @@ _saturation2(I::MPolyIdeal{T}, J::MPolyIdeal{T} = ideal(base_ring(I), gens(base_
372372

373373
#######################################################
374374
@doc raw"""
375-
saturation_with_index(I::MPolyIdeal{T},
375+
saturation_with_index(I::MPolyIdeal{T},
376376
J::MPolyIdeal{T} = ideal(base_ring(I), gens(base_ring(I)))) where T
377377
378378
Return $I:J^{\infty}$ together with the smallest integer $m$ such that $I:J^m = I:J^{\infty}$ (saturation index).
@@ -509,7 +509,7 @@ function eliminate(I::MPolyIdeal, o::MonomialOrdering, l::Int)
509509
@req is_elimination_ordering(o, R_gens) "Given ordering is not an elimination ordering"
510510
gb = get(I.gb, o, nothing)
511511
isnothing(gb) && return eliminate(I, R_gens)
512-
512+
513513
elimination_ideal_gens_indices = findall(x -> cmp(o, R_gens[end], leading_monomial(x; ordering=o)) > 0, gens(gb))
514514
isempty(elimination_ideal_gens_indices) && return ideal(R, [])
515515
ideal(IdealGens(gens(gb)[elimination_ideal_gens_indices], o; isGB=true))
@@ -530,7 +530,7 @@ Return the radical of `I`.
530530
531531
# Implemented Algorithms
532532
533-
* If the base ring of `I` is a polynomial ring over a the field of rational numbers or a finite field, a combination of the algorithms of Krick and Logar (with modifications by Laplagne) and Kemper is used.
533+
* If the base ring of `I` is a polynomial ring over a the field of rational numbers or a finite field, a combination of the algorithms of Krick and Logar (with modifications by Laplagne) and Kemper is used.
534534
* If the `base_ring` of `I` is a number field, then we first expand the minimal polynomials to reduce to a computation over the rationals.
535535
* For polynomial rings over the integers, the algorithm proceeds as suggested by Pfister, Sadiq, and Steidel. See [KL91](@cite), [Kem02](@cite), and [PSS11](@cite).
536536
@@ -639,27 +639,27 @@ Ideal generated by
639639
```
640640
"""
641641
@attr MPolyIdeal{T} function radical(
642-
I::MPolyIdeal{T};
642+
I::MPolyIdeal{T};
643643
preprocessing::Bool=true,
644644
eliminate_variables::Bool=true,
645645
factor_generators::Bool=true
646646
) where {T <: MPolyRingElem}
647647
is_known(is_radical, I) && is_radical(I) && return I
648-
# We first check for the squarefree flag.
649-
# Elimination of variables will probably affect how the generators factor.
648+
# We first check for the squarefree flag.
649+
# Elimination of variables will probably affect how the generators factor.
650650
if preprocessing && factor_generators
651-
# Replace every generator by its squarefree part to get closer to the actual radical
651+
# Replace every generator by its squarefree part to get closer to the actual radical
652652
# even before passing computations on to Singular.
653653
return radical(_squarefree_generator_ideal(I); preprocessing, eliminate_variables, factor_generators=false)
654654
end
655655
if preprocessing && eliminate_variables
656656
is_known(is_radical, I) && is_radical(I) && return I
657-
# Call `elimpart` (within `simplify`) in order to substitute variables.
657+
# Call `elimpart` (within `simplify`) in order to substitute variables.
658658
# This turns out to significantly speed things up in many cases.
659659
R = base_ring(I)
660660
Q, pr = quo(R, I)
661661
S, iso, iso_inv = simplify(Q)
662-
is_zero(ngens(S)) && return I # This only happens when all variables can be eliminated.
662+
is_zero(ngens(S)) && return I # This only happens when all variables can be eliminated.
663663
# Then the ideal defines a reduced point.
664664
J = modulus(S)
665665
pre_res = radical(J; preprocessing, eliminate_variables=false, factor_generators)
@@ -704,7 +704,7 @@ function _compute_radical(I::T) where {T <: MPolyIdeal}
704704
return Irad
705705
end
706706

707-
# Go through the generators of I and replace each generator by its squarefree part.
707+
# Go through the generators of I and replace each generator by its squarefree part.
708708
# This is a heuristic preprocessing method for radical computations.
709709
function _squarefree_generator_ideal(I::MPolyIdeal)
710710
R = base_ring(I)
@@ -723,18 +723,18 @@ end
723723
@attr MPolyIdeal{T} function radical(
724724
I::MPolyIdeal{T};
725725
preprocessing::Bool=true,
726-
factor_generators::Bool=true,
726+
factor_generators::Bool=true,
727727
eliminate_variables::Bool=true
728728
) where {U<:Hecke.RelSimpleNumFieldElem, T<:MPolyRingElem{U}}
729729
is_known(is_radical, I) && is_radical(I) && return I
730730
R = base_ring(I)
731731
preprocessing && factor_generators && return radical(_squarefree_generator_ideal(I); preprocessing, eliminate_variables, factor_generators=false)
732732
R_flat, iso, iso_inv = _expand_coefficient_field_to_QQ(R)
733733
I_flat = ideal(R_flat, iso_inv.(gens(I)))
734-
I_flat_rad = radical(I_flat;
734+
I_flat_rad = radical(I_flat;
735735
preprocessing,
736-
eliminate_variables,
737-
factor_generators=false) # Taking the squarefree part of generators only pays off on the top level.
736+
eliminate_variables,
737+
factor_generators=false) # Taking the squarefree part of generators only pays off on the top level.
738738
Irad = iso(I_flat_rad)
739739
set_attribute!(Irad, :is_radical => true)
740740
@hassert :IdealSheaves 2 !is_one(Irad)
@@ -875,7 +875,7 @@ end
875875
is_known(::typeof(primary_decomposition), I::MPolyIdeal) = has_attribute(I, :primary_decomposition)
876876

877877
function primary_decomposition(
878-
I::MPolyIdeal{T};
878+
I::MPolyIdeal{T};
879879
algorithm::Symbol=:GTZ, cache::Bool=true
880880
) where {U<:Hecke.RelSimpleNumFieldElem, T<:MPolyRingElem{U}}
881881
if has_attribute(I, :primary_decomposition)
@@ -887,7 +887,7 @@ function primary_decomposition(
887887
dec = primary_decomposition(I_flat; algorithm, cache)
888888
result = Vector{Tuple{typeof(I), typeof(I)}}()
889889
for (P, Q) in dec
890-
push!(result, (ideal(R, unique!([x for x in iso.(gens(P)) if !iszero(x)])),
890+
push!(result, (ideal(R, unique!([x for x in iso.(gens(P)) if !iszero(x)])),
891891
ideal(R, unique!([x for x in iso.(gens(Q)) if !iszero(x)]))))
892892
end
893893

@@ -1010,7 +1010,7 @@ Ideal generated by
10101010
x + _a*y
10111011
10121012
julia> RAP = base_ring(AP)
1013-
Multivariate polynomial ring in 2 variables over number field graded by
1013+
Multivariate polynomial ring in 2 variables over number field graded by
10141014
x -> [1]
10151015
y -> [1]
10161016
```
@@ -1225,12 +1225,12 @@ end
12251225

12261226
is_known(::typeof(minimal_primes), I::MPolyIdeal) = has_attribute(I, :minimal_primes)
12271227

1228-
# rerouting the procedure for minimal primes this way leads to
1228+
# rerouting the procedure for minimal primes this way leads to
12291229
# much longer computations compared to the flattening of the coefficient
12301230
# field implemented above.
12311231
function minimal_primes(
1232-
I::MPolyIdeal{T};
1233-
algorithm::Symbol=:GTZ,
1232+
I::MPolyIdeal{T};
1233+
algorithm::Symbol=:GTZ,
12341234
eliminate_variables::Bool=true,
12351235
cache::Bool=true
12361236
) where {U<:Union{AbsSimpleNumFieldElem, <:Hecke.RelSimpleNumFieldElem}, T<:MPolyRingElem{U}}
@@ -1347,7 +1347,7 @@ end
13471347
13481348
Return a vector of equidimensional radical ideals increasingly ordered by dimension.
13491349
For each dimension, the returned radical ideal is the intersection of the associated primes
1350-
of `I` of that dimension.
1350+
of `I` of that dimension.
13511351
13521352
# Implemented Algorithms
13531353
@@ -1614,7 +1614,8 @@ julia> triangular_decomposition(I; algorithm=:lazard_factorized)
16141614
Ideal (x5 - 1, x4^4 + x4^3 + x4^2 + x4 + 1, -x3 + x4^2, -x2 + x4^3, x1 + x4^3 + x4^2 + x4 + 1)
16151615
Ideal (x5^2 + 3*x5 + 1, x4 - 1, x3 - 1, x2 - 1, x1 + x5 + 3)
16161616
Ideal (x5^2 + 3*x5 + 1, x4 + x5 + 3, x3 - 1, x2 - 1, x1 - 1)
1617-
1617+
Ideal with 5 generators
1618+
Ideal (x5^4 + x5^3 + x5^2 + x5 + 1, x4 - 1, x3 + x5^3 + x5^2 + x5 + 1, -x2 + x5^3, -x1 + x5^2)
16181619
Ideal (x5^4 + x5^3 + x5^2 + x5 + 1, x4 - x5, x3 - x5, x2^2 + 3*x2*x5 + x5^2, x1 + x2 + 3*x5)
16191620
Ideal (x5^4 + x5^3 + x5^2 + x5 + 1, x4 - x5, x3^2 + 3*x3*x5 + x5^2, x2 + x3 + 3*x5, x1 - x5)
16201621
Ideal with 5 generators
@@ -2072,7 +2073,7 @@ end
20722073

20732074
# In general this depends on the ring, ...
20742075
is_known(::typeof(is_zero), I::MPolyIdeal) = true
2075-
# but for specific rings we can do more.
2076+
# but for specific rings we can do more.
20762077
is_known(::typeof(is_zero), I::MPolyIdeal{QQMPolyRingElem}) = true
20772078

20782079
@doc raw"""
@@ -2109,7 +2110,7 @@ end
21092110
function is_known(::typeof(is_one), I::MPolyIdeal)
21102111
has_attribute(I, :is_one) && return true
21112112
!is_empty(I.gb) && return true # a Groebner basis has already been computed
2112-
if any(is_unit, gens(I))
2113+
if any(is_unit, gens(I))
21132114
set_attribute!(I, :is_one=>true)
21142115
return true
21152116
end
@@ -2260,7 +2261,7 @@ function small_generating_set(
22602261
# than the original one!!!
22612262
return_value = filter(!iszero, (R).(gens(sing_min)))
22622263

2263-
# The following is a common phenomenon which we can not fully explain yet. So far nothing but a
2264+
# The following is a common phenomenon which we can not fully explain yet. So far nothing but a
22642265
# restart really seems to help, unfortunately.
22652266
if is_zero(length(return_value))
22662267
!is_zero(I) && error("singular crashed in the background; please restart your session!")
@@ -2290,7 +2291,7 @@ small_generating_set(I::MPolyIdeal{<:MPolyDecRingElem}; algorithm::Symbol=:simpl
22902291
################################################################################
22912292
#returns Pluecker ideal in ring with standard grading
22922293
function grassmann_pluecker_ideal(subspace_dimension::Int, ambient_dimension::Int)
2293-
I = convert(MPolyIdeal{QQMPolyRingElem},
2294+
I = convert(MPolyIdeal{QQMPolyRingElem},
22942295
Polymake.ideal.pluecker_ideal(subspace_dimension, ambient_dimension))
22952296
base = base_ring(I)
22962297
base2, x = graded_polynomial_ring(coefficient_ring(base), :x=> sort(subsets(ambient_dimension, subspace_dimension)))
@@ -2310,8 +2311,8 @@ generated by the Plücker relations. If the input ring is not graded, return the
23102311
If the ring is not specified return the ideal in a multivariate polynomial ring over the rationals with variables indexed by
23112312
elements of ${[n]\choose d}$ with the standard grading.
23122313
2313-
The Grassmann-Plücker ideal is the homogeneous ideal generated by the relations defined by
2314-
the Plücker Embedding of the Grassmannian. That is given Gr$(k, n)$ the Moduli
2314+
The Grassmann-Plücker ideal is the homogeneous ideal generated by the relations defined by
2315+
the Plücker Embedding of the Grassmannian. That is given Gr$(k, n)$ the Moduli
23152316
space of all $k$-dimensional subspaces of an $n$-dimensional vector space, the relations
23162317
are given by all $d \times d$ minors of a $d \times n$ matrix. For the algorithm see
23172318
[Stu93](@cite).
@@ -2332,7 +2333,7 @@ Ideal generated by
23322333
"""
23332334
function grassmann_pluecker_ideal(ring::MPolyRing,
23342335
subspace_dimension::Int,
2335-
ambient_dimension::Int)
2336+
ambient_dimension::Int)
23362337
I = grassmann_pluecker_ideal(subspace_dimension, ambient_dimension)
23372338
coeff_ring = base_ring(ring)
23382339
o = degrevlex(ring)
@@ -2374,7 +2375,7 @@ _pluecker_sgn(a::Vector{Int}, b::Vector{Int}, t::Int)::Int =
23742375
@doc raw"""
23752376
flag_pluecker_ideal(F::Union{Field, MPolyRing}, dimensions::Vector{Int}, n::Int; minimal::Bool=true)
23762377
2377-
Return the generators of the defining ideal for the complete flag variety
2378+
Return the generators of the defining ideal for the complete flag variety
23782379
$\text{Fl}(\mathbb{F}, (d_1,\dots,d_k), n)$, where $(d_1,\dots,d_k)
23792380
=$`dimensions`, with $d_j\leq n-1$, denotes the rank. That is, the vanishing
23802381
set of this ideal corresponds to the space of $k$-step flags of linear
@@ -2391,7 +2392,7 @@ Evaluating this function with the parameter `minimal = true` returns the reduced
23912392
the flag Plücker ideal with respect to the degree reverse lexicographical order. For more details, see Theorem 14.6 [MS05](@cite)
23922393
# Examples
23932394
2394-
Complete flag variety $\text{Fl}(\mathbb{Q}, (1,2,3), 4)$.
2395+
Complete flag variety $\text{Fl}(\mathbb{Q}, (1,2,3), 4)$.
23952396
```jldoctest
23962397
julia> flag_pluecker_ideal(QQ,[1,2,3],4)
23972398
Ideal generated by
@@ -2435,7 +2436,7 @@ flag_pluecker_ideal(dimensions::Vector{Int}, n::Int; minimal::Bool=true) = flag_
24352436

24362437
function flag_pluecker_ideal(ring::MPolyRing{<: FieldElem}, dimensions::Vector{Int}, n::Int; minimal::Bool=true)
24372438
dimensions = unique(dimensions)
2438-
2439+
24392440
@req maximum(dimensions) <= n-1 "The dimensions must be at most n-1"
24402441
@req sum(binomial(n, d) for d in dimensions) == ngens(ring) "The ring doesn't have the right number of variables"
24412442
@req issorted(dimensions) "The dimensions must be increasing"
@@ -2462,7 +2463,7 @@ function flag_pluecker_ideal(ring::MPolyRing{<: FieldElem}, dimensions::Vector{I
24622463
gg = unique(x -> divexact(x, canonical_unit(x)), genz)
24632464
I = ideal(gg)
24642465

2465-
!minimal && return I
2466+
!minimal && return I
24662467

24672468
o = degrevlex(ring)
24682469
converted_generators = collect(groebner_basis(I; ordering = o))
@@ -2473,7 +2474,7 @@ function flag_pluecker_ideal(ring::MPolyRing{<: FieldElem}, dimensions::Vector{I
24732474
end
24742475

24752476
# Since most ideals implement `==`, they have to implement the hash function.
2476-
# See issue #4143 for problems entailed. Interestingly, this does not yet fix
2477+
# See issue #4143 for problems entailed. Interestingly, this does not yet fix
24772478
# the failure of unique! on lists of ideals.
24782479
function hash(I::Ideal, c::UInt)
24792480
return hash(base_ring(I), c)

0 commit comments

Comments
 (0)