Skip to content

Commit 909e43a

Browse files
committed
CommutativeAlgebra: new triangular decomposition wrapper
1 parent ae6f43f commit 909e43a

File tree

4 files changed

+130
-1
lines changed

4 files changed

+130
-1
lines changed

docs/oscar_references.bib

+39
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,15 @@ @Article{Haz12
15501550
doi = {10.3390/axioms1020149}
15511551
}
15521552

1553+
@MastersThesis{Hil99,
1554+
author = {Hillebrand, D.},
1555+
title = {Triangulierung nulldimensionaler Ideale - Implementierung und Vergleich zweier Algorithmen},
1556+
note = {Refereed by Prof. Dr. H.M. Moeller},
1557+
address = {Fachbereich Mathematik},
1558+
year = {1999},
1559+
school = {Universitaet Dortmund}
1560+
}
1561+
15531562
@Article{Hul22,
15541563
author = {Hulpke, Alexander},
15551564
title = {The perfect groups of order up to two million},
@@ -2001,6 +2010,21 @@ @Book{Lan70
20012010
year = {1970}
20022011
}
20032012

2013+
@Article{Laz92,
2014+
author = {Lazard, D.},
2015+
title = {Solving Zero-Dimensional Algebraic Systems},
2016+
journal = {Journal of Symbolic Computation},
2017+
volume = {13},
2018+
number = {2},
2019+
pages = {117--131},
2020+
year = {1992},
2021+
month = feb,
2022+
doi = {10.1016/S0747-7171(08)80086-7},
2023+
urldate = {2025-03-28},
2024+
copyright = {https://www.elsevier.com/tdm/userlicense/1.0/},
2025+
langid = {english}
2026+
}
2027+
20042028
@PhDThesis{Lev05,
20052029
author = {Viktor Levandovskyy},
20062030
title = {Non-commutative Computer Algebra for polynomial algebras: Gröbner bases, applications and
@@ -2118,6 +2142,21 @@ @Book{Mar18
21182142
doi = {10.1007/978-3-319-90233-3}
21192143
}
21202144

2145+
@Article{Moe93,
2146+
author = {Moeller, H. Michael},
2147+
title = {On Decomposing Systems of Polynomial Equations with Finitely Many Solutions},
2148+
journal = {Applicable Algebra in Engineering, Communication and Computing},
2149+
volume = {4},
2150+
number = {4},
2151+
pages = {217--230},
2152+
year = {1993},
2153+
month = dec,
2154+
doi = {10.1007/BF01200146},
2155+
urldate = {2025-03-28},
2156+
copyright = {http://www.springer.com/tdm},
2157+
langid = {english}
2158+
}
2159+
21212160
@Article{Nik79,
21222161
author = {Nikulin, V. V.},
21232162
title = {Integer symmetric bilinear forms and some of their geometric applications},

docs/src/CommutativeAlgebra/ideals.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,16 @@ equidimensional_hull(I::MPolyIdeal)
256256
equidimensional_hull_radical(I::MPolyIdeal)
257257
```
258258

259+
### Triangular Decomposition
260+
261+
```@docs
262+
triangular_decomposition(::MPolyIdeal, ::Symbol)
263+
```
264+
265+
259266
## Homogenization and Dehomogenization
260267

261-
Referring to [KR05](@cite) for definitions and technical details, we discuss homogenization and dehomogenization in the context of $\mathbb Z^m$-gradings.
268+
Referring to [KR05](@cite) for definitions and technical details, we discuss homogenization and dehomogenization in the context of $\mathbb Z^m$-gradings.
262269

263270
```@docs
264271
homogenizer(P::MPolyRing{T}, h::VarName; pos::Int=1+ngens(P)) where T

src/Rings/mpoly-ideals.jl

+82
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,88 @@ function equidimensional_hull_radical(
15721572
return ideal(R, unique!(iso.(gens(res))))
15731573
end
15741574

1575+
################################################################################
1576+
#
1577+
# triangular decomposition
1578+
#
1579+
################################################################################
1580+
1581+
@doc raw"""
1582+
triangular_decomposition(I::MPolyIdeal; algorithm::Symbol=:Lazard)
1583+
1584+
Return a triangular decomposition of a zero-dimensional `I`.
1585+
1586+
The default algorithm is `:Lazard` based on [Laz92](@cite). Algorithm `:LazardFactorized` further
1587+
factorizes each polynomial in the output of `:Lazard`. Algorithm `:Moeller` is based on [Moe93](@cite)
1588+
and Algorithm `:MoellerHillebrand` is based on [Hill99](@cite).
1589+
1590+
# Examples
1591+
```jldoctest
1592+
julia> R, (x1,x2,x3,x4,x5) = polynomial_ring(QQ, [:x1,:x2,:x3,:x4,:x5]);
1593+
1594+
julia> I = ideal([x1+x2+x3+x4+x5,
1595+
x1*x2+x2*x3+x3*x4+x1*x5+x4*x5,
1596+
x1*x2*x3+x2*x3*x4+x1*x2*x5+x1*x4*x5+x3*x4*x5,
1597+
x1*x2*x3*x4+x1*x2*x3*x5+x1*x2*x4*x5+x1*x3*x4*x5+x2*x3*x4*x5,
1598+
x1*x2*x3*x4*x5-1]);
1599+
1600+
julia> triangular_decomposition(I)
1601+
4-element Vector{MPolyIdeal{QQMPolyRingElem}}:
1602+
Ideal (x5^5 - 1, x4 - x5, x3^2 + 3*x3*x5 + x5^2, x2 + x3 + 3*x5, x1 - x5)
1603+
Ideal (x5^5 - 1, x4 - x5, x3 - x5, x2^2 + 3*x2*x5 + x5^2, x1 + x2 + 3*x5)
1604+
Ideal with 5 generators
1605+
Ideal with 5 generators
1606+
1607+
julia> triangular_decomposition(I, :LazardFactorized)
1608+
13-element Vector{MPolyIdeal{QQMPolyRingElem}}:
1609+
Ideal (x5 - 1, x4 - 1, x3 - 1, x2^2 + 3*x2 + 1, x1 + x2 + 3)
1610+
Ideal (x5 - 1, x4 - 1, x3^2 + 3*x3 + 1, x2 + x3 + 3, x1 - 1)
1611+
Ideal (x5 - 1, x4^2 + 3*x4 + 1, x3 + x4 + 3, x2 - 1, x1 - 1)
1612+
Ideal (x5 - 1, x4^4 + x4^3 + x4^2 + x4 + 1, -x3 + x4^2, -x2 + x4^3, x1 + x4^3 + x4^2 + x4 + 1)
1613+
Ideal (x5^2 + 3*x5 + 1, x4 - 1, x3 - 1, x2 - 1, x1 + x5 + 3)
1614+
Ideal (x5^2 + 3*x5 + 1, x4 + x5 + 3, x3 - 1, x2 - 1, x1 - 1)
1615+
1616+
Ideal (x5^4 + x5^3 + x5^2 + x5 + 1, x4 - x5, x3 - x5, x2^2 + 3*x2*x5 + x5^2, x1 + x2 + 3*x5)
1617+
Ideal (x5^4 + x5^3 + x5^2 + x5 + 1, x4 - x5, x3^2 + 3*x3*x5 + x5^2, x2 + x3 + 3*x5, x1 - x5)
1618+
Ideal with 5 generators
1619+
Ideal (x5^4 + x5^3 + x5^2 + x5 + 1, x4^2 + 3*x4*x5 + x5^2, x3 + x4 + 3*x5, x2 - x5, x1 - x5)
1620+
Ideal with 5 generators
1621+
1622+
julia> triangular_decomposition(I, :Moeller)
1623+
4-element Vector{MPolyIdeal{QQMPolyRingElem}}:
1624+
Ideal (x5^5 - 1, x4 - x5, x3 - x5, x2^2 + 3*x2*x5 + x5^2, x1 + x2 + 3*x5)
1625+
Ideal with 5 generators
1626+
Ideal with 5 generators
1627+
Ideal (x5^5 - 1, x4 - x5, x3^2 + 3*x3*x5 + x5^2, x2 + x3 + 3*x5, x1 - x5)
1628+
1629+
julia> triangular_decomposition(I, :MoellerHillebrand)
1630+
4-element Vector{MPolyIdeal{QQMPolyRingElem}}:
1631+
Ideal (x5^5 - 1, x4 - x5, x3 - x5, x2^2 + 3*x2*x5 + x5^2, x1 + x2 + 3*x5)
1632+
Ideal with 5 generators
1633+
Ideal with 5 generators
1634+
Ideal (x5^5 - 1, x4 - x5, x3^2 + 3*x3*x5 + x5^2, x2 + x3 + 3*x5, x1 - x5)
1635+
1636+
```
1637+
"""
1638+
function triangular_decomposition(I::MPolyIdeal, algorithm::Symbol=:Lazard)
1639+
@req dim(I)==0 "The ideal must be zero-dimensional."
1640+
R = base_ring(I)
1641+
G = ideal(groebner_basis(I; ordering=lex(R), complete_reduction=true))
1642+
Gsing = singular_generators(G,lex(R))
1643+
if algorithm==:Lazard
1644+
Ts = Singular.LibTriang.triangL(Gsing)
1645+
elseif algorithm==:LazardFactorized
1646+
Ts = Singular.LibTriang.triangLfak(Gsing)
1647+
elseif algorithm==:Moeller
1648+
Ts = Singular.LibTriang.triangM(Gsing)
1649+
elseif algorithm==:MoellerHillebrand
1650+
Ts = Singular.LibTriang.triangMH(Gsing)
1651+
else
1652+
error("algorithm allowed are :Lazard, :LazardFactorized, :Moeller, or :MoellerHillebrand")
1653+
end
1654+
return [ideal(R, T) for T in Ts]
1655+
end
1656+
15751657
#######################################################
15761658
@doc raw"""
15771659
==(I::MPolyIdeal, J::MPolyIdeal)

src/exports.jl

+1
Original file line numberDiff line numberDiff line change
@@ -1657,6 +1657,7 @@ export transitive_group_identification, has_transitive_group_identification
16571657
export transitivity
16581658
export transport
16591659
export transportation_polytope
1660+
export triangular_decomposition
16601661
export trivial_character
16611662
export trivial_divisor
16621663
export trivial_divisor_class

0 commit comments

Comments
 (0)