Skip to content

Commit f862ce3

Browse files
adds docu and export
1 parent 72e78a1 commit f862ce3

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/algorithms/other-algorithms.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
@doc Markdown.doc"""
2+
dimension(I::Ideal{T}) where T <: MPolyRingElem
3+
4+
Compute the Krull dimension of a given polynomial ideal `I`.
5+
6+
**Note**: This requires a Gröbner basis of `I`.
7+
8+
# Examples
9+
```jldoctest
10+
julia> using AlgebraicSolving
11+
12+
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]);
13+
14+
julia> I = Ideal([x*y,x*z,y*z]);
15+
16+
julia> dimension(I)
17+
1
18+
```
19+
"""
120
function dimension(I::Ideal{T}) where T <: MPolyRingElem
221

322
gb = isempty(values(I.gb)) ? groebner_basis(I) : first(values(I.gb))

src/exports.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export polynomial_ring, MPolyRing, GFElem, MPolyRingElem, finite_field, GF, fpMPolyRingElem,
22
characteristic, degree, ZZ, QQ, vars, nvars, ngens, ZZRingElem, QQFieldElem, QQMPolyRingElem,
33
base_ring, coefficient_ring, evaluate, prime_field, sig_groebner_basis, cyclic, leading_coefficient,
4-
FqMPolyRingElem
4+
FqMPolyRingElem, dimension

0 commit comments

Comments
 (0)