diff --git a/docs/src/CommutativeAlgebra/GroebnerBases/groebner_bases_integers.md b/docs/src/CommutativeAlgebra/GroebnerBases/groebner_bases_integers.md index 0c5d3e3d1ece..6572c0491a59 100644 --- a/docs/src/CommutativeAlgebra/GroebnerBases/groebner_bases_integers.md +++ b/docs/src/CommutativeAlgebra/GroebnerBases/groebner_bases_integers.md @@ -56,7 +56,9 @@ julia> R, (x,y) = polynomial_ring(ZZ, ["x","y"]) (Multivariate polynomial ring in 2 variables over ZZ, ZZMPolyRingElem[x, y]) julia> I = ideal(R, [3*x^2*y+7*y, 4*x*y^2-5*x]) -ideal(3*x^2*y + 7*y, 4*x*y^2 - 5*x) +Ideal generated by + 3*x^2*y + 7*y + 4*x*y^2 - 5*x julia> G = groebner_basis(I, ordering = lex(R)) Gröbner basis with elements diff --git a/docs/src/CommutativeAlgebra/Miscellaneous/binomial_ideals.md b/docs/src/CommutativeAlgebra/Miscellaneous/binomial_ideals.md index 91ad07b01bb1..5290168d5c05 100644 --- a/docs/src/CommutativeAlgebra/Miscellaneous/binomial_ideals.md +++ b/docs/src/CommutativeAlgebra/Miscellaneous/binomial_ideals.md @@ -62,7 +62,9 @@ julia> is_binomial(f) true julia> J = ideal(R, [x^2-y^3, z^2]) -ideal(x^2 - y^3, z^2) +Ideal generated by + x^2 - y^3 + z^2 julia> is_binomial(J) true diff --git a/docs/src/CommutativeAlgebra/affine_algebras.md b/docs/src/CommutativeAlgebra/affine_algebras.md index 34911bf86a1a..0d73fbd47833 100644 --- a/docs/src/CommutativeAlgebra/affine_algebras.md +++ b/docs/src/CommutativeAlgebra/affine_algebras.md @@ -77,7 +77,9 @@ Multivariate polynomial ring in 3 variables x, y, z over rational field julia> modulus(A) -ideal(-x^2 + y, -x^3 + z) +Ideal generated by + -x^2 + y + -x^3 + z julia> gens(A) 3-element Vector{MPolyQuoRingElem{QQMPolyRingElem}}: @@ -231,7 +233,7 @@ julia> base_ring(a) Quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(-x^2 + y, -x^3 + z) + by ideal (-x^2 + y, -x^3 + z) julia> gens(a) 2-element Vector{MPolyQuoRingElem{QQMPolyRingElem}}: @@ -369,7 +371,10 @@ defined by z -> t^3 julia> twistedCubic = kernel(para) -ideal(-x*z + y^2, -w*z + x*y, -w*y + x^2) +Ideal generated by + -x*z + y^2 + -w*z + x*y + -w*y + x^2 julia> C2, p2 = quo(D1, twistedCubic); @@ -380,14 +385,15 @@ julia> V2 = [p2(w-y), p2(x), p2(z)]; julia> proj = hom(D2, C2, V2) Ring homomorphism from graded multivariate polynomial ring in 3 variables over QQ - to quotient of multivariate polynomial ring by ideal(-x*z + y^2, -w*z + x*y, -w*y + x^2) + to quotient of multivariate polynomial ring by ideal (-x*z + y^2, -w*z + x*y, -w*y + x^2) defined by a -> w - y b -> x c -> z julia> nodalCubic = kernel(proj) -ideal(-a^2*c + b^3 - 2*b^2*c + b*c^2) +Ideal generated by + -a^2*c + b^3 - 2*b^2*c + b*c^2 ``` @@ -408,10 +414,12 @@ defined by y[3] -> x[2]*x[3] julia> sphere = ideal(C3, [x[1]^3 + x[2]^3 + x[3]^3 - 1]) -ideal(x[1]^3 + x[2]^3 + x[3]^3 - 1) +Ideal generated by + x[1]^3 + x[2]^3 + x[3]^3 - 1 julia> steinerRomanSurface = preimage(F3, sphere) -ideal(y[1]^6*y[2]^6 + 2*y[1]^6*y[2]^3*y[3]^3 + y[1]^6*y[3]^6 + 2*y[1]^3*y[2]^6*y[3]^3 + 2*y[1]^3*y[2]^3*y[3]^6 - y[1]^3*y[2]^3*y[3]^3 + y[2]^6*y[3]^6) +Ideal generated by + y[1]^6*y[2]^6 + 2*y[1]^6*y[2]^3*y[3]^3 + y[1]^6*y[3]^6 + 2*y[1]^3*y[2]^6*y[3]^3 + 2*y[1]^3*y[2]^3*y[3]^6 - y[1]^3*y[2]^3*y[3]^3 + y[2]^6*y[3]^6 ``` @@ -439,7 +447,7 @@ julia> V = [p(2*a + b^6), p(7*b - a^2), p(c^2)]; julia> F = hom(D, C, V) Ring homomorphism from multivariate polynomial ring in 3 variables over QQ - to quotient of multivariate polynomial ring by ideal(-b^3 + c) + to quotient of multivariate polynomial ring by ideal (-b^3 + c) defined by x -> 2*a + c^2 y -> -a^2 + 7*b @@ -528,8 +536,8 @@ julia> L[1] julia> L[2] Ring homomorphism - from quotient of multivariate polynomial ring by ideal(x*y, x*z) - to quotient of multivariate polynomial ring by ideal(2*x^2 + x*y, 10*x^2 + 5*x*y + x*z) + from quotient of multivariate polynomial ring by ideal (x*y, x*z) + to quotient of multivariate polynomial ring by ideal (2*x^2 + x*y, 10*x^2 + 5*x*y + x*z) defined by x -> x y -> 2*x + y @@ -537,8 +545,8 @@ defined by julia> L[3] Ring homomorphism - from quotient of multivariate polynomial ring by ideal(2*x^2 + x*y, 10*x^2 + 5*x*y + x*z) - to quotient of multivariate polynomial ring by ideal(x*y, x*z) + from quotient of multivariate polynomial ring by ideal (2*x^2 + x*y, 10*x^2 + 5*x*y + x*z) + to quotient of multivariate polynomial ring by ideal (x*y, x*z) defined by x -> x y -> -2*x + y diff --git a/docs/src/CommutativeAlgebra/ideals.md b/docs/src/CommutativeAlgebra/ideals.md index 6ef414b5a9ea..b6173e7b7e36 100644 --- a/docs/src/CommutativeAlgebra/ideals.md +++ b/docs/src/CommutativeAlgebra/ideals.md @@ -36,7 +36,10 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x, y])^2 -ideal(x^2, x*y, y^2) +Ideal generated by + x^2 + x*y + y^2 julia> base_ring(I) Multivariate polynomial ring in 2 variables x, y diff --git a/docs/src/CommutativeAlgebra/localizations.md b/docs/src/CommutativeAlgebra/localizations.md index 09b9312ffd6b..672e6d151195 100644 --- a/docs/src/CommutativeAlgebra/localizations.md +++ b/docs/src/CommutativeAlgebra/localizations.md @@ -111,11 +111,12 @@ This reflects the way of creating localizations of quotients of multivariate pol julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]); julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ julia> Rloc, _ = localization(U); @@ -135,14 +136,18 @@ julia> K, a = number_field(2*t^2-1, "a"); julia> R, (x, y) = polynomial_ring(K, ["x", "y"]); julia> I = ideal(R, [2*x^2-y^3, 2*x^2-y^5]) -ideal(2*x^2 - y^3, 2*x^2 - y^5) +Ideal generated by + 2*x^2 - y^3 + 2*x^2 - y^5 julia> P = ideal(R, [y-1, x-a]) -ideal(y - 1, x - a) +Ideal generated by + y - 1 + x - a julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(y - 1, x - a) + of prime ideal (y - 1, x - a) in multivariate polynomial ring in 2 variables over number field julia> RQ, _ = quo(R, I); @@ -181,11 +186,12 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ julia> Rloc, iota = localization(U); @@ -225,14 +231,18 @@ julia> K, a = number_field(2*t^2-1, "a"); julia> R, (x, y) = polynomial_ring(K, ["x", "y"]); julia> I = ideal(R, [2*x^2-y^3, 2*x^2-y^5]) -ideal(2*x^2 - y^3, 2*x^2 - y^5) +Ideal generated by + 2*x^2 - y^3 + 2*x^2 - y^5 julia> P = ideal(R, [y-1, x-a]) -ideal(y - 1, x - a) +Ideal generated by + y - 1 + x - a julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(y - 1, x - a) + of prime ideal (y - 1, x - a) in multivariate polynomial ring in 2 variables over number field julia> RQ, p = quo(R, I); @@ -289,11 +299,12 @@ of representing `f` by pairs of elements of `RQ` and not the internal representa julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]); julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ julia> Rloc, iota = localization(U); @@ -305,7 +316,7 @@ julia> parent(f) Localization of multivariate polynomial ring in 3 variables x, y, z over rational field - at complement of prime ideal(x) + at complement of prime ideal (x) julia> g = iota(y)/iota(z) y/z @@ -328,14 +339,18 @@ julia> K, a = number_field(2*t^2-1, "a"); julia> R, (x, y) = polynomial_ring(K, ["x", "y"]); julia> I = ideal(R, [2*x^2-y^3, 2*x^2-y^5]) -ideal(2*x^2 - y^3, 2*x^2 - y^5) +Ideal generated by + 2*x^2 - y^3 + 2*x^2 - y^5 julia> P = ideal(R, [y-1, x-a]) -ideal(y - 1, x - a) +Ideal generated by + y - 1 + x - a julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(y - 1, x - a) + of prime ideal (y - 1, x - a) in multivariate polynomial ring in 2 variables over number field julia> RQ, p = quo(R, I); @@ -352,8 +367,8 @@ Localization of quotient of multivariate polynomial ring in 2 variables x, y over number field of degree 2 over QQ - by ideal(2*x^2 - y^3, 2*x^2 - y^5) - at complement of prime ideal(y - 1, x - a) + by ideal (2*x^2 - y^3, 2*x^2 - y^5) + at complement of prime ideal (y - 1, x - a) julia> g = f/phi(y) x/y @@ -441,9 +456,7 @@ julia> U = complement_of_point_ideal(R, [0, 0]); julia> Rloc, _ = localization(R, U); julia> MI = ideal(Rloc, V) -Ideal - of localized ring -with 2 generators +Ideal generated by 3*x^2 4*y^3 ``` diff --git a/docs/src/InvariantTheory/finite_groups.md b/docs/src/InvariantTheory/finite_groups.md index 4ee9c99e4417..95b6f634d773 100644 --- a/docs/src/InvariantTheory/finite_groups.md +++ b/docs/src/InvariantTheory/finite_groups.md @@ -93,10 +93,8 @@ Matrix group of degree 3 over cyclotomic field of order 3 julia> IR = invariant_ring(G) -Invariant ring of - Matrix group of degree 3 over cyclotomic field of order 3 -with generators - AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[0 0 1; 1 0 0; 0 1 0], [1 0 0; 0 a 0; 0 0 -a-1]] +Invariant ring + of matrix group of degree 3 over cyclotomic field of order 3 julia> group(IR) Matrix group of degree 3 diff --git a/experimental/FTheoryTools/src/FamilyOfSpaces/attributes.jl b/experimental/FTheoryTools/src/FamilyOfSpaces/attributes.jl index ff995027980c..8899600b7db2 100644 --- a/experimental/FTheoryTools/src/FamilyOfSpaces/attributes.jl +++ b/experimental/FTheoryTools/src/FamilyOfSpaces/attributes.jl @@ -115,7 +115,8 @@ julia> f = family_of_spaces(coord_ring, grading, d) A family of spaces of dimension d = 3 julia> stanley_reisner_ideal(f) -ideal(f*g*Kbar*u) +Ideal generated by + f*g*Kbar*u ``` """ @attr MPolyIdeal{QQMPolyRingElem} function stanley_reisner_ideal(f::FamilyOfSpaces) @@ -149,7 +150,11 @@ julia> f = family_of_spaces(coord_ring, grading, d) A family of spaces of dimension d = 3 julia> irrelevant_ideal(f) -ideal(u, Kbar, g, f) +Ideal generated by + u + Kbar + g + f ``` """ @attr MPolyIdeal{QQMPolyRingElem} function irrelevant_ideal(f::FamilyOfSpaces) @@ -182,7 +187,9 @@ julia> f = family_of_spaces(coord_ring, grading, 3) A family of spaces of dimension d = 3 julia> ideal_of_linear_relations(f) -ideal(-5*f + 3*g + 2*Kbar, -3*f + 2*g) +Ideal generated by + -5*f + 3*g + 2*Kbar + -3*f + 2*g ``` """ @attr MPolyIdeal{QQMPolyRingElem} function ideal_of_linear_relations(f::FamilyOfSpaces) diff --git a/experimental/FTheoryTools/src/TateModels/attributes.jl b/experimental/FTheoryTools/src/TateModels/attributes.jl index 16c6a69a798c..aa56c4712a40 100644 --- a/experimental/FTheoryTools/src/TateModels/attributes.jl +++ b/experimental/FTheoryTools/src/TateModels/attributes.jl @@ -352,7 +352,7 @@ julia> length(singular_loci(t)) 2 julia> singular_loci(t)[2] -(ideal(w), (1, 2, 3), "III") +(Ideal (w), (1, 2, 3), "III") ``` """ @attr Vector{<:Tuple{<:MPolyIdeal{<:MPolyRingElem}, Tuple{Int64, Int64, Int64}, String}} function singular_loci(t::GlobalTateModel) diff --git a/experimental/MatroidRealizationSpaces/src/realization_space.jl b/experimental/MatroidRealizationSpaces/src/realization_space.jl index 0d5e3f25c327..44927866a790 100644 --- a/experimental/MatroidRealizationSpaces/src/realization_space.jl +++ b/experimental/MatroidRealizationSpaces/src/realization_space.jl @@ -506,7 +506,7 @@ One realization is given by [0 0 0 1 x1 + 1 x1 1 x1 x1 + 1] in the multivariate polynomial ring in 1 variable over GF(2) within the vanishing set of the ideal -ideal(x1^2 + x1 + 1) +Ideal (x1^2 + x1 + 1) julia> realization(uniform_matroid(3,6), char=5) One realization is given by diff --git a/experimental/Schemes/BlowupMorphism.jl b/experimental/Schemes/BlowupMorphism.jl index 1c08cb822fa7..e091f6c8d038 100644 --- a/experimental/Schemes/BlowupMorphism.jl +++ b/experimental/Schemes/BlowupMorphism.jl @@ -204,14 +204,17 @@ Spectrum over rational field julia> I = ideal(R, [x,y,z]) -ideal(x, y, z) +Ideal generated by + x + y + z julia> bl = blow_up(A3, I) Blowup of scheme over QQ covered with 1 patch 1b: [x, y, z] affine 3-space in sheaf of ideals with restriction - 1b: ideal(x, y, z) + 1b: Ideal (x, y, z) with domain scheme over QQ covered with 3 patches 1a: [(s1//s0), (s2//s0), x] V(0, 0, 0) @@ -241,7 +244,7 @@ Sheaf of ideals on scheme over QQ covered with 1 patch 1: [x, y, z] affine 3-space with restriction - 1: ideal(x, y, z) + 1: Ideal (x, y, z) ``` """ @attributes mutable struct BlowupMorphism{ diff --git a/experimental/Schemes/CartierDivisor.jl b/experimental/Schemes/CartierDivisor.jl index 5a25389560a2..ae11f25c33ee 100644 --- a/experimental/Schemes/CartierDivisor.jl +++ b/experimental/Schemes/CartierDivisor.jl @@ -161,9 +161,9 @@ Effective cartier divisor 3: [(x//z), (y//z)] affine 2-space defined by sheaf of ideals with restrictions - 1: ideal(-(y//x)^2*(z//x) + 1) - 2: ideal((x//y)^3 - (z//y)) - 3: ideal((x//z)^3 - (y//z)^2) + 1: Ideal (-(y//x)^2*(z//x) + 1) + 2: Ideal ((x//y)^3 - (z//y)) + 3: Ideal ((x//z)^3 - (y//z)^2) julia> cartier_divisor(E) Cartier divisor @@ -227,9 +227,9 @@ Effective cartier divisor 3: [(x//z), (y//z)] affine 2-space defined by sheaf of ideals with restrictions - 1: ideal(-(y//x)^2*(z//x) + 1) - 2: ideal((x//y)^3 - (z//y)) - 3: ideal((x//z)^3 - (y//z)^2) + 1: Ideal (-(y//x)^2*(z//x) + 1) + 2: Ideal ((x//y)^3 - (z//y)) + 3: Ideal ((x//z)^3 - (y//z)^2) ``` """ effective_cartier_divisor(I::IdealSheaf; trivializing_covering::Covering = default_covering(scheme(I)), check::Bool = true) = EffectiveCartierDivisor(I, trivializing_covering=trivializing_covering, check=check) diff --git a/experimental/Schemes/IdealSheaves.jl b/experimental/Schemes/IdealSheaves.jl index 8a133eef1ce5..c0cf01c7c4be 100644 --- a/experimental/Schemes/IdealSheaves.jl +++ b/experimental/Schemes/IdealSheaves.jl @@ -41,9 +41,9 @@ Sheaf of ideals 2: [(x//y), (z//y)] affine 2-space 3: [(x//z), (y//z)] affine 2-space with restrictions - 1: ideal(-(y//x)^2*(z//x) + 1) - 2: ideal((x//y)^3 - (z//y)) - 3: ideal((x//z)^3 - (y//z)^2) + 1: Ideal (-(y//x)^2*(z//x) + 1) + 2: Ideal ((x//y)^3 - (z//y)) + 3: Ideal ((x//z)^3 - (y//z)^2) ``` """ function IdealSheaf(X::AbsProjectiveScheme, I::MPolyIdeal) diff --git a/experimental/Schemes/SpaceGerms.jl b/experimental/Schemes/SpaceGerms.jl index f47268917ff3..cde81bbb4e33 100644 --- a/experimental/Schemes/SpaceGerms.jl +++ b/experimental/Schemes/SpaceGerms.jl @@ -153,7 +153,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(x^3 - x^2 - x*y^2 + x*z^2 + y^2 - z^2) + by ideal (x^3 - x^2 - x*y^2 + x*z^2 + y^2 - z^2) at complement of maximal ideal of point (0, 0, 0) julia> representative(XS) @@ -161,7 +161,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(x^3 - x^2 - x*y^2 + x*z^2 + y^2 - z^2) + by ideal (x^3 - x^2 - x*y^2 + x*z^2 + y^2 - z^2) julia> representative(XS) == X true @@ -177,7 +177,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(x^3 - x^2 - x*y^2 + x*z^2 + y^2 - z^2) + by ideal (x^3 - x^2 - x*y^2 + x*z^2 + y^2 - z^2) ``` """ @@ -293,7 +293,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(x^3 - x^2 - x*y^2 + x*z^2 + y^2 - z^2) + by ideal (x^3 - x^2 - x*y^2 + x*z^2 + y^2 - z^2) at complement of maximal ideal of point (0, 0, 0) julia> defining_ring_element(XS) @@ -322,7 +322,9 @@ julia> R, (x, y) = QQ["x","y"] (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x-1,y-3]) -ideal(x - 1, y - 3) +Ideal generated by + x - 1 + y - 3 julia> rational_point_coordinates(I) 2-element Vector{QQFieldElem}: @@ -381,9 +383,7 @@ Spectrum julia> RL = coordinate_ring(XL); julia> J = ideal(RL,[x^2-y^2+z^2]) -Ideal - of localized ring -with 1 generator +Ideal generated by x1^2 - x2^2 + x3^2 julia> Q,_ = quo(RL,J); @@ -394,7 +394,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1^2 - x2^2 + x3^2) + by ideal (x1^2 - x2^2 + x3^2) at complement of maximal ideal of point (0, 0, 0) ``` @@ -475,7 +475,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1^2 + x2^2 + x3^2) + by ideal (x1^2 + x2^2 + x3^2) at complement of maximal ideal of point (0, 0, 0) ``` @@ -550,7 +550,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1^2 + x2^2 + x3^2, x1*x2) + by ideal (x1^2 + x2^2 + x3^2, x1*x2) at complement of maximal ideal of point (0, 0, 0) ``` @@ -639,7 +639,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1^2 + x2^2 + x3^2) + by ideal (x1^2 + x2^2 + x3^2) at complement of maximal ideal of point (0, 0, 0) julia> phi @@ -717,7 +717,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1^2 + x2^2 + x3^2) + by ideal (x1^2 + x2^2 + x3^2) at complement of maximal ideal of point (0, 0, 0) julia> phi @@ -792,7 +792,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1^2 + x2^2 + x3^2, x1*x2) + by ideal (x1^2 + x2^2 + x3^2, x1*x2) at complement of maximal ideal of point (0, 0, 0) julia> phi @@ -966,7 +966,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1^2*x2 - x1*x2^2) + by ideal (x1^2*x2 - x1*x2^2) at complement of maximal ideal of point (0, 0, 0) ``` @@ -1028,7 +1028,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1^2 + x2^2, x2, x1) + by ideal (x1^2 + x2^2, x2, x1) at complement of maximal ideal of point (0, 0, 0) julia> incSL diff --git a/experimental/Schemes/ToricBlowups/constructors.jl b/experimental/Schemes/ToricBlowups/constructors.jl index 7bc0923a44f7..f4ea5a7d0551 100644 --- a/experimental/Schemes/ToricBlowups/constructors.jl +++ b/experimental/Schemes/ToricBlowups/constructors.jl @@ -93,7 +93,9 @@ julia> (x1,x2,x3,x4) = gens(cox_ring(P3)) x4 julia> I = ideal([x2,x3]) -ideal(x2, x3) +Ideal generated by + x2 + x3 julia> bP3 = domain(blow_up(P3, I)) Normal toric variety @@ -107,7 +109,8 @@ Multivariate polynomial ring in 5 variables over QQ graded by e -> [1 -1] julia> I2 = ideal([x2 * x3]) -ideal(x2*x3) +Ideal generated by + x2*x3 julia> b2P3 = blow_up(P3, I2); diff --git a/experimental/Schemes/ToricIdealSheaves/constructors.jl b/experimental/Schemes/ToricIdealSheaves/constructors.jl index 1de874b4f9c2..c7cb50194f28 100644 --- a/experimental/Schemes/ToricIdealSheaves/constructors.jl +++ b/experimental/Schemes/ToricIdealSheaves/constructors.jl @@ -117,7 +117,9 @@ Normal toric variety julia> (x1,x2,x3,x4) = gens(cox_ring(P3)); julia> I = ideal([x2,x3]) -ideal(x2, x3) +Ideal generated by + x2 + x3 julia> IdealSheaf(P3, I); ``` diff --git a/experimental/Schemes/duValSing.jl b/experimental/Schemes/duValSing.jl index 2baa5f89cf62..7fbfe476db89 100644 --- a/experimental/Schemes/duValSing.jl +++ b/experimental/Schemes/duValSing.jl @@ -9,17 +9,19 @@ julia> R,(x,y,z,w) = QQ["x","y","z","w"] (Multivariate polynomial ring in 4 variables over QQ, QQMPolyRingElem[x, y, z, w]) julia> I = ideal(R,[w,x^2+y^3+z^4]) -ideal(w, x^2 + y^3 + z^4) +Ideal generated by + w + x^2 + y^3 + z^4 julia> Rq,_ = quo(R,I) -(Quotient of multivariate polynomial ring by ideal(w, x^2 + y^3 + z^4), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (w, x^2 + y^3 + z^4), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) julia> X = Spec(Rq) Spectrum of quotient of multivariate polynomial ring in 4 variables x, y, z, w over rational field - by ideal(w, x^2 + y^3 + z^4) + by ideal (w, x^2 + y^3 + z^4) julia> has_du_val_singularities(X) true @@ -71,20 +73,26 @@ julia> R,(x,y,z,w) = QQ["x","y","z","w"] (Multivariate polynomial ring in 4 variables over QQ, QQMPolyRingElem[x, y, z, w]) julia> I = ideal(R,[w,x^2+y^3+z^4]) -ideal(w, x^2 + y^3 + z^4) +Ideal generated by + w + x^2 + y^3 + z^4 julia> Rq,_ = quo(R,I) -(Quotient of multivariate polynomial ring by ideal(w, x^2 + y^3 + z^4), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (w, x^2 + y^3 + z^4), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) julia> J = ideal(R,[x,y,z,w]) -ideal(x, y, z, w) +Ideal generated by + x + y + z + w julia> X = Spec(Rq) Spectrum of quotient of multivariate polynomial ring in 4 variables x, y, z, w over rational field - by ideal(w, x^2 + y^3 + z^4) + by ideal (w, x^2 + y^3 + z^4) julia> is_du_val_singularity(X,J) true @@ -145,24 +153,30 @@ julia> R,(x,y,z,w) = QQ["x","y","z","w"] (Multivariate polynomial ring in 4 variables over QQ, QQMPolyRingElem[x, y, z, w]) julia> I = ideal(R,[w,x^2+y^3+z^4]) -ideal(w, x^2 + y^3 + z^4) +Ideal generated by + w + x^2 + y^3 + z^4 julia> Rq,_ = quo(R,I) -(Quotient of multivariate polynomial ring by ideal(w, x^2 + y^3 + z^4), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (w, x^2 + y^3 + z^4), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) julia> J = ideal(R,[x,y,z,w]) -ideal(x, y, z, w) +Ideal generated by + x + y + z + w julia> X = Spec(Rq) Spectrum of quotient of multivariate polynomial ring in 4 variables x, y, z, w over rational field - by ideal(w, x^2 + y^3 + z^4) + by ideal (w, x^2 + y^3 + z^4) julia> decide_du_val_singularity(X,J) 1-element Vector{Any}: - (true, ideal(w, z, y, x), (:E, 6), 1) + (true, Ideal (w, z, y, x), (:E, 6), 1) ``` """ function decide_du_val_singularity(X::AbsSpec{<:Field,<:Any},I::MPolyIdeal) diff --git a/src/AlgebraicGeometry/Curves/ParametrizationPlaneCurves.jl b/src/AlgebraicGeometry/Curves/ParametrizationPlaneCurves.jl index 37bd08828cff..6995501a5727 100644 --- a/src/AlgebraicGeometry/Curves/ParametrizationPlaneCurves.jl +++ b/src/AlgebraicGeometry/Curves/ParametrizationPlaneCurves.jl @@ -77,7 +77,10 @@ Projective plane curve defined by 0 = 2*x^3*z - 3*x^2*z^2 - y^4 + 2*y^2*z^2 julia> I = adjoint_ideal(C) -ideal(-x*z + y^2, x*y - y*z, x^2 - x*z) +Ideal generated by + -x*z + y^2 + x*y - y*z + x^2 - x*z ``` """ @@ -104,7 +107,10 @@ Projective plane curve defined by 0 = 2*x^3*z - 3*x^2*z^2 - y^4 + 2*y^2*z^2 julia> I = adjoint_ideal(C) -ideal(-x*z + y^2, x*y - y*z, x^2 - x*z) +Ideal generated by + -x*z + y^2 + x*y - y*z + x^2 - x*z julia> R, (x,y,z) = graded_polynomial_ring(QQ, ["x", "y", "z"]); @@ -174,7 +180,7 @@ julia> geometric_genus(C) julia> Oscar.map_to_rational_normal_curve(C) Projective curve in projective 2-space over QQ with coordinates [y(1), y(2), y(3)] -defined by ideal(y(1)^2 + 2*y(1)*y(3) - 2*y(2)^2) +defined by ideal (y(1)^2 + 2*y(1)*y(3) - 2*y(2)^2) ``` """ @@ -219,7 +225,7 @@ julia> I = ideal(R, V); julia> RNC = ProjectiveCurve(I) Projective curve in projective 4-space over QQ with coordinates [v, w, x, y, z] -defined by ideal(v*x - w^2, v*y - w*x, w*y - x^2, v*z - w*y, w*z - x*y, x*z - y^2) +defined by ideal (v*x - w^2, v*y - w*x, w*y - x^2, v*z - w*y, w*z - x*y, x*z - y^2) julia> Oscar.rat_normal_curve_anticanonical_map(RNC) 3-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}: @@ -262,7 +268,7 @@ julia> I = ideal(R, V); julia> TC = ProjectiveCurve(I) Projective curve in projective 3-space over QQ with coordinates [w, x, y, z] -defined by ideal(w*y - x^2, w*z - x*y, x*z - y^2) +defined by ideal (w*y - x^2, w*z - x*y, x*z - y^2) julia> Oscar.rat_normal_curve_It_Proj_Odd(TC) 2-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}: @@ -321,7 +327,7 @@ julia> I = ideal(R, V); julia> RNC = ProjectiveCurve(I) Projective curve in projective 4-space over QQ with coordinates [v, w, x, y, z] -defined by ideal(v*x - w^2, v*y - w*x, w*y - x^2, v*z - w*y, w*z - x*y, x*z - y^2) +defined by ideal (v*x - w^2, v*y - w*x, w*y - x^2, v*z - w*y, w*z - x*y, x*z - y^2) julia> Oscar.rat_normal_curve_It_Proj_Even(RNC) (MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[x, -y, z], V(y(1)*y(3) - y(2)^2)) diff --git a/src/AlgebraicGeometry/Curves/ProjectiveCurve.jl b/src/AlgebraicGeometry/Curves/ProjectiveCurve.jl index 3983cefcd0a7..ad36089fef7d 100644 --- a/src/AlgebraicGeometry/Curves/ProjectiveCurve.jl +++ b/src/AlgebraicGeometry/Curves/ProjectiveCurve.jl @@ -25,7 +25,7 @@ julia> I = ideal(R, V); julia> TC = projective_curve(I) Projective curve in projective 3-space over QQ with coordinates [w, x, y, z] -defined by ideal(w*y - x^2, w*z - x*y, x*z - y^2) +defined by ideal (w*y - x^2, w*z - x*y, x*z - y^2) ``` """ diff --git a/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Attributes.jl b/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Attributes.jl index a1aa53736bae..c1177ae0d395 100644 --- a/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Attributes.jl +++ b/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Attributes.jl @@ -91,7 +91,7 @@ julia> I = ideal([x^2, y]); julia> X = algebraic_set(I) Affine algebraic set in affine 2-space over QQ with coordinates [x, y] -defined by ideal(x^2, y) +defined by ideal (x^2, y) julia> fat_ideal(X) === I true diff --git a/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Constructors.jl b/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Constructors.jl index 2551f2deee0a..fa2470c1f714 100644 --- a/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Constructors.jl @@ -27,7 +27,7 @@ julia> R, (x,y) = GF(2)[:x,:y]; julia> X = algebraic_set(ideal([y^2+y+x^3+1,x])) Affine algebraic set in affine 2-space over GF(2) with coordinates [x, y] -defined by ideal(x^3 + y^2 + y + 1, x) +defined by ideal (x^3 + y^2 + y + 1, x) ``` """ @@ -47,14 +47,14 @@ julia> R, (x,y) = QQ[:x,:y]; julia> X = algebraic_set((y^2+y+x^3+1)*x^2) Affine algebraic set in affine 2-space over QQ with coordinates [x, y] -defined by ideal(x^5 + x^2*y^2 + x^2*y + x^2) +defined by ideal (x^5 + x^2*y^2 + x^2*y + x^2) julia> R, (x,y) = GF(2)[:x,:y]; julia> X = algebraic_set((y^2+y+x^3+1)*x^2) Affine algebraic set in affine 2-space over GF(2) with coordinates [x, y] -defined by ideal(x^5 + x^2*y^2 + x^2*y + x^2) +defined by ideal (x^5 + x^2*y^2 + x^2*y + x^2) ``` """ @@ -86,17 +86,17 @@ julia> (x, y) = coordinates(A) julia> X = algebraic_set(ideal([y - x^2])) Affine algebraic set in affine 2-space over QQ with coordinates [x, y] -defined by ideal(-x^2 + y) +defined by ideal (-x^2 + y) julia> Y = algebraic_set(ideal([y])) Affine algebraic set in affine 2-space over QQ with coordinates [x, y] -defined by ideal(y) +defined by ideal (y) julia> Zred = set_theoretic_intersection(X, Y) Affine algebraic set in affine 2-space over QQ with coordinates [x, y] -defined by ideal(-x^2 + y, y) +defined by ideal (-x^2 + y, y) ``` @@ -109,7 +109,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x^2 - y, y) + by ideal (x^2 - y, y) julia> Zred == Z false diff --git a/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Attributes.jl b/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Attributes.jl index fd03da8c922c..b186f19faa4b 100644 --- a/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Attributes.jl +++ b/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Attributes.jl @@ -39,7 +39,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> f = inclusion_morphism(X, Y) Affine scheme morphism @@ -55,7 +55,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) ``` """ domain(f::AbsSpecMor) = domain(underlying_morphism(f)) @@ -88,7 +88,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> f = inclusion_morphism(X, Y) Affine scheme morphism @@ -136,12 +136,12 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> pullback(inclusion_morphism(X, Y)) Ring homomorphism from multivariate polynomial ring in 3 variables over QQ - to quotient of multivariate polynomial ring by ideal(x1) + to quotient of multivariate polynomial ring by ideal (x1) defined by x1 -> 0 x2 -> x2 @@ -247,7 +247,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> f = inclusion_morphism(X, Y) Affine scheme morphism diff --git a/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Constructors.jl b/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Constructors.jl index 66a5a7636c84..7d2f05fcbd26 100644 --- a/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Constructors.jl @@ -125,7 +125,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> f = inclusion_morphism(Y, X) Affine scheme morphism @@ -137,7 +137,8 @@ given by the pullback function x3 -> x3 julia> I = kernel(pullback(f)) # this is a way to obtain the ideal ``I ⊆ O(X)`` cutting out ``Y`` from ``X``. -ideal(x1) +Ideal generated by + x1 julia> base_ring(I) == OO(X) true @@ -173,7 +174,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> m1 = inclusion_morphism(Y, X) Affine scheme morphism @@ -240,7 +241,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> restrict(identity_map(X), Y, Y) == identity_map(Y) true diff --git a/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Properties.jl b/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Properties.jl index 8e158f888407..449a3e13bef4 100644 --- a/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Properties.jl +++ b/src/AlgebraicGeometry/Schemes/AffineSchemes/Morphisms/Properties.jl @@ -52,7 +52,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> is_identity_map(inclusion_morphism(Y, X)) false diff --git a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Attributes.jl b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Attributes.jl index f2e88dcd00b0..201d847b0f14 100644 --- a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Attributes.jl +++ b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Attributes.jl @@ -79,7 +79,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) julia> X == ambient_space(Y) true @@ -89,7 +89,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x, y) + by ideal (x, y) julia> ambient_space(Z) == X true @@ -100,7 +100,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) at products of (y) julia> ambient_space(V) == X @@ -124,7 +124,8 @@ Spectrum over rational field julia> I = ideal(P, x) -ideal(x) +Ideal generated by + x julia> RmodI, quotient_map = quo(P, I); @@ -133,7 +134,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) julia> ambient_space(Y) == X true @@ -147,7 +148,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x, y) + by ideal (x, y) julia> ambient_space(Z) == X true @@ -165,7 +166,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) at products of (y) julia> ambient_space(V) == X @@ -226,7 +227,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) julia> inc = ambient_embedding(Y) Affine scheme morphism @@ -265,7 +266,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) julia> ambient_coordinate_ring(Y) Multivariate polynomial ring in 2 variables x, y @@ -297,7 +298,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) julia> coordinates(X) == ambient_coordinates(Y) true @@ -334,7 +335,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) julia> (xY, yY) = coordinates(Y) 2-element Vector{MPolyQuoRingElem{QQMPolyRingElem}}: @@ -470,7 +471,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> codim(Y) 1 @@ -534,14 +535,15 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> J = ideal(R,[(x-y)^2]) -ideal(x^2 - 2*x*y + y^2) +Ideal generated by + x^2 - 2*x*y + y^2 julia> X = Spec(R,J) Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x^2 - 2*x*y + y^2) + by ideal (x^2 - 2*x*y + y^2) julia> U = complement_of_point_ideal(R, [0,0]) Complement @@ -554,7 +556,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x^2 - 2*x*y + y^2) + by ideal (x^2 - 2*x*y + y^2) at complement of maximal ideal of point (0, 0) julia> reduced_scheme(X) @@ -626,7 +628,8 @@ julia> R, (x,y,z) = QQ["x", "y", "z"] (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [x^2 - y^2 + z^2]) -ideal(x^2 - y^2 + z^2) +Ideal generated by + x^2 - y^2 + z^2 julia> A3 = Spec(R) Spectrum @@ -638,7 +641,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(x^2 - y^2 + z^2) + by ideal (x^2 - y^2 + z^2) julia> singular_locus(A3) (V(1), Hom: V(1) -> affine 3-space) @@ -657,7 +660,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(x^2 - y^2 + z^2) + by ideal (x^2 - y^2 + z^2) at complement of maximal ideal of point (0, 0, 0) julia> singular_locus(Y) @@ -710,14 +713,15 @@ julia> R, (x,y,z) = QQ["x", "y", "z"] (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [(x^2 - y^2 + z^2)^2]) -ideal(x^4 - 2*x^2*y^2 + 2*x^2*z^2 + y^4 - 2*y^2*z^2 + z^4) +Ideal generated by + x^4 - 2*x^2*y^2 + 2*x^2*z^2 + y^4 - 2*y^2*z^2 + z^4 julia> X = Spec(R,I) Spectrum of quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(x^4 - 2*x^2*y^2 + 2*x^2*z^2 + y^4 - 2*y^2*z^2 + z^4) + by ideal (x^4 - 2*x^2*y^2 + 2*x^2*z^2 + y^4 - 2*y^2*z^2 + z^4) julia> singular_locus_reduced(X) (V(x^4 - 2*x^2*y^2 + 2*x^2*z^2 + y^4 - 2*y^2*z^2 + z^4, z, y, x), Hom: V(x^4 - 2*x^2*y^2 + 2*x^2*z^2 + y^4 - 2*y^2*z^2 + z^4, z, y, x) -> V(x^4 - 2*x^2*y^2 + 2*x^2*z^2 + y^4 - 2*y^2*z^2 + z^4)) @@ -848,10 +852,11 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1*x2) + by ideal (x1*x2) julia> I = defining_ideal(Y) -ideal(x1*x2) +Ideal generated by + x1*x2 julia> base_ring(I) == OO(Y) false diff --git a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Constructors.jl b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Constructors.jl index 7b007348e4d0..8a9ecf0b0651 100644 --- a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Constructors.jl @@ -23,7 +23,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) ``` """ Spec(R::MPolyRing, I::MPolyIdeal) = Spec(quo(R, I)[1]) @@ -49,7 +49,7 @@ Spectrum of localization of multivariate polynomial ring in 2 variables x, y over rational field - at complement of prime ideal(x) + at complement of prime ideal (x) ``` """ Spec(R::MPolyRing, U::AbsMPolyMultSet) = Spec(localization(R, U)[1]) @@ -77,8 +77,8 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) - at complement of prime ideal(y) + by ideal (x) + at complement of prime ideal (y) ``` """ Spec(R::MPolyRing, I::MPolyIdeal, U::AbsMPolyMultSet) = Spec(MPolyQuoLocRing(R, I, U)) @@ -108,14 +108,14 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) julia> Y = Spec(X) Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) ``` """ Spec(X::Spec) = Spec(OO(X)) @@ -207,7 +207,7 @@ Spectrum of quotient of multivariate polynomial ring in 5 variables x1, x2, x3, x4, x5 over rational field - by ideal(0) + by ideal (0) at products of (1) julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]); @@ -219,7 +219,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) julia> Oscar.standard_spec(X) Spectrum @@ -227,7 +227,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x) + by ideal (x) at products of (1) julia> I = ideal(R, [x]); @@ -239,7 +239,7 @@ Spectrum of localization of multivariate polynomial ring in 2 variables x, y over rational field - at complement of prime ideal(x) + at complement of prime ideal (x) julia> Oscar.standard_spec(X) Spectrum @@ -247,8 +247,8 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(0) - at complement of prime ideal(x) + by ideal (0) + at complement of prime ideal (x) ``` """ function standard_spec(X::AbsSpec) @@ -307,14 +307,14 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> subscheme(X,[x1,x2]) Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1, x2) + by ideal (x1, x2) ``` """ subscheme(X::AbsSpec, f::Vector{<:RingElem}) = subscheme(X, ideal(OO(X), f)) @@ -353,7 +353,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1*x2) + by ideal (x1*x2) ``` """ function subscheme(X::AbsSpec, I::Ideal) @@ -582,21 +582,21 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> Y2 = subscheme(X,[x2]) Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x2) + by ideal (x2) julia> intersect(Y1, Y2) Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1, x2) + by ideal (x1, x2) ``` """ function Base.intersect(X::AbsSpec{BRT, <:Ring}, Y::AbsSpec{BRT, <:Ring}) where {BRT<:Ring} @@ -765,14 +765,14 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) julia> closure(H, X) Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1) + by ideal (x1) ``` """ function closure(X::AbsSpec, Y::AbsSpec, check= true) diff --git a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Properties.jl b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Properties.jl index 46e699c87cec..6c3607dd39bb 100644 --- a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Properties.jl +++ b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Properties.jl @@ -65,7 +65,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1*x2) + by ideal (x1*x2) julia> is_subscheme(X, Y) false @@ -320,7 +320,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1*x2) + by ideal (x1*x2) julia> is_open_embedding(Y, X) false @@ -396,7 +396,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1*x2) + by ideal (x1*x2) julia> is_closed_embedding(Y, X) true @@ -541,24 +541,27 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R,[(x-y)]) -ideal(x - y) +Ideal generated by + x - y julia> J = ideal(R,[x-1,y-2]) -ideal(x - 1, y - 2) +Ideal generated by + x - 1 + y - 2 julia> X = Spec(R,I) Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x - y) + by ideal (x - y) julia> Y = Spec(R,I*J) Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x^2 - x*y - x + y, x*y - 2*x - y^2 + 2*y) + by ideal (x^2 - x*y - x + y, x*y - 2*x - y^2 + 2*y) julia> is_equidimensional(X) true @@ -641,17 +644,19 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R,[x-y^2]) -ideal(x - y^2) +Ideal generated by + x - y^2 julia> J = ideal(R,[x^2-y^2]) -ideal(x^2 - y^2) +Ideal generated by + x^2 - y^2 julia> X = Spec(R, I) Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x - y^2) + by ideal (x - y^2) julia> is_smooth(X) true @@ -661,7 +666,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x^2 - y^2) + by ideal (x^2 - y^2) julia> is_smooth(Y) false @@ -677,7 +682,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x^2 - y^2) + by ideal (x^2 - y^2) at complement of maximal ideal of point (1, 1) julia> is_smooth(Z) diff --git a/src/AlgebraicGeometry/Schemes/AffineVariety/Objects/Constructors.jl b/src/AlgebraicGeometry/Schemes/AffineVariety/Objects/Constructors.jl index 97c6d80b8082..3024d64502e4 100644 --- a/src/AlgebraicGeometry/Schemes/AffineVariety/Objects/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/AffineVariety/Objects/Constructors.jl @@ -33,7 +33,7 @@ julia> R, (x,y) = QQ[:x,:y] julia> variety(ideal([x,y])) Affine variety in affine 2-space over QQ with coordinates [x, y] -defined by defined by ideal(x, y) +defined by defined by Ideal (x, y) ``` Over fields different from `QQ`, currently, we cannot check for irreducibility @@ -45,7 +45,7 @@ julia> R, (x,y) = GF(2)[:x,:y]; julia> variety(x^3+y+1, check=false) Affine variety in affine 2-space over GF(2) with coordinates [x, y] -defined by defined by ideal(x^3 + y + 1) +defined by defined by Ideal (x^3 + y + 1) ``` """ @@ -72,7 +72,7 @@ julia> Q,_ = quo(R,ideal([x,y])); julia> variety(Q) Affine variety in affine 2-space over QQ with coordinates [x, y] -defined by defined by ideal(x, y) +defined by defined by Ideal (x, y) ``` """ @@ -96,7 +96,7 @@ julia> (x,y) = coordinates(A2); julia> variety(y^2-x^3-1) Affine variety in affine 2-space over QQ with coordinates [x, y] -defined by defined by ideal(-x^3 + y^2 - 1) +defined by defined by Ideal (-x^3 + y^2 - 1) ``` """ function variety(f::MPolyRingElem{<:FieldElem}; check::Bool=true) diff --git a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Morphisms/Attributes.jl b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Morphisms/Attributes.jl index c3709b9f6d0c..caac25c1633e 100644 --- a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Morphisms/Attributes.jl +++ b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Morphisms/Attributes.jl @@ -24,7 +24,7 @@ julia> P, (x, y, z) = graded_polynomial_ring(QQ, [:x, :y, :z]); julia> Y = variety(ideal([x^3-y^2*z])) Projective variety in projective 2-space over QQ with coordinates [x, y, z] -defined by ideal(x^3 - y^2*z) +defined by ideal (x^3 - y^2*z) julia> Ycov = covered_scheme(Y) Scheme diff --git a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Morphisms/Constructors.jl b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Morphisms/Constructors.jl index 0e1b71e6ee76..24f4e5027c22 100644 --- a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Morphisms/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Morphisms/Constructors.jl @@ -17,7 +17,7 @@ julia> P, x = graded_polynomial_ring(QQ, [:x, :y, :z]); julia> X = variety(ideal(x[1:2])) Projective variety in projective 2-space over QQ with coordinates [x, y, z] -defined by ideal(y, x) +defined by ideal (y, x) julia> Xcov = covered_scheme(X) Scheme diff --git a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Attributes.jl b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Attributes.jl index f32977c04404..e109caeeb4ce 100644 --- a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Attributes.jl +++ b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Attributes.jl @@ -61,7 +61,7 @@ julia> I = ideal(S, [S[1]*S[2]-S[3]^2]); julia> X = subscheme(P, I) Projective scheme over rational field -defined by ideal(s0*s1 - s2^2) +defined by ideal (s0*s1 - s2^2) julia> Xcov = covered_scheme(X) Scheme @@ -116,7 +116,7 @@ julia> I = ideal(S, [S[1]*S[2]-S[3]^2]); julia> X = subscheme(P, I) Projective scheme over rational field -defined by ideal(s0*s1 - s2^2) +defined by ideal (s0*s1 - s2^2) julia> Xcov = covered_scheme(X) Scheme @@ -216,7 +216,7 @@ julia> P, (x, y, z) = graded_polynomial_ring(QQ, [:x, :y, :z]); julia> Y = variety(ideal([x^3-y^2*z])) Projective variety in projective 2-space over QQ with coordinates [x, y, z] -defined by ideal(x^3 - y^2*z) +defined by ideal (x^3 - y^2*z) julia> Ycov = covered_scheme(Y) Scheme diff --git a/src/AlgebraicGeometry/Schemes/ProjectiveAlgebraicSet/Objects/Constructors.jl b/src/AlgebraicGeometry/Schemes/ProjectiveAlgebraicSet/Objects/Constructors.jl index 00d4535ebc7a..d28fb96638ae 100644 --- a/src/AlgebraicGeometry/Schemes/ProjectiveAlgebraicSet/Objects/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/ProjectiveAlgebraicSet/Objects/Constructors.jl @@ -15,12 +15,12 @@ julia> P, (x0, x1, x2) = graded_polynomial_ring(QQ,[:x0,:x1,:x2]); julia> X = projective_scheme(ideal([x0*x1^2, x2])) Projective scheme over rational field -defined by ideal(x0*x1^2, x2) +defined by ideal (x0*x1^2, x2) julia> Y = algebraic_set(X) Projective algebraic set in projective 2-space over QQ with coordinates [x0, x1, x2] -defined by ideal(x2, x0*x1) +defined by ideal (x2, x0*x1) ``` """ @@ -39,7 +39,7 @@ julia> P,(x0,x1) = graded_polynomial_ring(QQ,[:x0,:x1]); julia> algebraic_set(ideal([x0,x1])) Projective algebraic set in projective 1-space over QQ with coordinates [x0, x1] -defined by ideal(x1, x0) +defined by ideal (x1, x0) ``` """ @@ -98,7 +98,7 @@ julia> (s0,s1) = homogeneous_coordinates(P1); julia> X = algebraic_set((s0^2+s1^2)*s1) Projective algebraic set in projective 1-space over QQ with coordinates [s0, s1] -defined by ideal(s0^2*s1 + s1^3) +defined by ideal (s0^2*s1 + s1^3) julia> (X1,X2) = irreducible_components(X) 2-element Vector{ProjectiveAlgebraicSet{QQField, MPolyQuoRing{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}}}: @@ -108,7 +108,7 @@ julia> (X1,X2) = irreducible_components(X) julia> X1 # irreducible but not geometrically irreducible Projective algebraic set in projective 1-space over QQ with coordinates [s0, s1] -defined by ideal(s0^2 + s1^2) +defined by ideal (s0^2 + s1^2) ``` """ diff --git a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Attributes.jl b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Attributes.jl index f9affe0552fa..36ca73808852 100644 --- a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Attributes.jl +++ b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Attributes.jl @@ -35,7 +35,7 @@ julia> I = ideal(S, S[1] + S[2]); julia> X = ProjectiveScheme(S, I) Projective scheme over rational field -defined by ideal(x + y) +defined by ideal (x + y) julia> homogeneous_coordinate_ring(X) Quotient @@ -43,7 +43,7 @@ Quotient x -> [1] y -> [1] z -> [1] - by ideal(x + y) + by ideal (x + y) ``` """ homogeneous_coordinate_ring(P::AbsProjectiveScheme) = homogeneous_coordinate_ring(underlying_scheme(P)) @@ -59,12 +59,13 @@ On ``X ⊂ ℙʳ_A`` this returns ``r``. julia> S, _ = grade(QQ["x", "y", "z"][1]); julia> I = ideal(S, S[1] + S[2]) -ideal(x + y) +Ideal generated by + x + y julia> X = ProjectiveScheme(S, I) Projective scheme over rational field -defined by ideal(x + y) +defined by ideal (x + y) julia> relative_ambient_dimension(X) 2 @@ -96,12 +97,13 @@ julia> S, _ = grade(QQ["x", "y", "z"][1]) (Graded multivariate polynomial ring in 3 variables over QQ, MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[x, y, z]) julia> I = ideal(S, S[1] + S[2]) -ideal(x + y) +Ideal generated by + x + y julia> X = ProjectiveScheme(S, I) Projective scheme over rational field -defined by ideal(x + y) +defined by ideal (x + y) julia> homogeneous_coordinate_ring(X) Quotient @@ -109,7 +111,7 @@ Quotient x -> [1] y -> [1] z -> [1] - by ideal(x + y) + by ideal (x + y) julia> ambient_coordinate_ring(X) === S true @@ -142,7 +144,7 @@ julia> I = ideal(S, S[1] + S[2]); julia> X = ProjectiveScheme(S, I) Projective scheme over rational field -defined by ideal(x + y) +defined by ideal (x + y) julia> P = ambient_space(X) Projective space of dimension 2 @@ -239,11 +241,11 @@ julia> S, _ = grade(Q["x", "y", "z"][1]); julia> P = projective_scheme(S) Projective space of dimension 2 - over quotient of multivariate polynomial ring by ideal(u^2 + v^2) + over quotient of multivariate polynomial ring by ideal (u^2 + v^2) with homogeneous coordinates [x, y, z] julia> defining_ideal(P) -ideal() +Ideal with 0 generators ``` """ defining_ideal(X::AbsProjectiveScheme) @@ -275,7 +277,7 @@ julia> S, _ = grade(Q["x", "y", "z"][1]); julia> P = projective_scheme(S) Projective space of dimension 2 - over quotient of multivariate polynomial ring by ideal(u^2 + v^2) + over quotient of multivariate polynomial ring by ideal (u^2 + v^2) with homogeneous coordinates [x, y, z] julia> affine_cone(P) @@ -398,7 +400,7 @@ julia> S, _ = grade(Q["x", "y", "z"][1]); julia> P = projective_scheme(S) Projective space of dimension 2 - over quotient of multivariate polynomial ring by ideal(u^2 + v^2) + over quotient of multivariate polynomial ring by ideal (u^2 + v^2) with homogeneous coordinates [x, y, z] julia> Oscar.homogeneous_coordinates_on_affine_cone(P) diff --git a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Properties.jl b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Properties.jl index fdcb654a6e41..e1137d51751d 100644 --- a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Properties.jl +++ b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Properties.jl @@ -50,7 +50,7 @@ julia> B, _ = quo(A, ideal(A, [x^2 + y^2])); julia> C = projective_scheme(B) Projective scheme over rational field -defined by ideal(x^2 + y^2) +defined by ideal (x^2 + y^2) julia> is_smooth(C) false diff --git a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Types.jl b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Types.jl index a6d1b2a1858b..2b1f9a0a55ba 100644 --- a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Types.jl +++ b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Types.jl @@ -30,7 +30,7 @@ julia> Q, _ = quo(Sgr, I); julia> C = ProjectiveScheme(Q) Projective scheme over rational field -defined by ideal(x^3 + y^3 + z^3) +defined by ideal (x^3 + y^3 + z^3) ``` """ @attributes mutable struct ProjectiveScheme{CoeffRingType, RingType} <: AbsProjectiveScheme{CoeffRingType, RingType} diff --git a/src/AlgebraicGeometry/Schemes/ProjectiveVariety/Objects/Constructors.jl b/src/AlgebraicGeometry/Schemes/ProjectiveVariety/Objects/Constructors.jl index 33afa2fd8591..d9942df6ebb0 100644 --- a/src/AlgebraicGeometry/Schemes/ProjectiveVariety/Objects/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/ProjectiveVariety/Objects/Constructors.jl @@ -33,7 +33,7 @@ julia> (s0,s1,s2,s3) = homogeneous_coordinates(P3); julia> X = variety(s0^3 + s1^3 + s2^3 + s3^3) Projective variety in projective 3-space over QQ with coordinates [s0, s1, s2, s3] -defined by ideal(s0^3 + s1^3 + s2^3 + s3^3) +defined by ideal (s0^3 + s1^3 + s2^3 + s3^3) julia> dim(X) 2 @@ -41,7 +41,7 @@ julia> dim(X) julia> Y = variety(ideal([s0^3 + s1^3 + s2^3 + s3^3, s0])) Projective variety in projective 3-space over QQ with coordinates [s0, s1, s2, s3] -defined by ideal(s0, s1^3 + s2^3 + s3^3) +defined by ideal (s0, s1^3 + s2^3 + s3^3) julia> dim(Y) 1 diff --git a/src/AlgebraicGeometry/Schemes/SpecOpen/Objects/Constructors.jl b/src/AlgebraicGeometry/Schemes/SpecOpen/Objects/Constructors.jl index b35c88503b38..ddd714b5e5d4 100644 --- a/src/AlgebraicGeometry/Schemes/SpecOpen/Objects/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/SpecOpen/Objects/Constructors.jl @@ -73,7 +73,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(x^3 - y^2*z) + by ideal (x^3 - y^2*z) julia> complement(A, Y) Open subset diff --git a/src/AlgebraicGeometry/Schemes/SpecOpen/Rings/Constructors.jl b/src/AlgebraicGeometry/Schemes/SpecOpen/Rings/Constructors.jl index 2acbcb7d1e05..c35afb58d3ce 100644 --- a/src/AlgebraicGeometry/Schemes/SpecOpen/Rings/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/SpecOpen/Rings/Constructors.jl @@ -25,7 +25,7 @@ Spectrum of quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(x^3 - y^2*z) + by ideal (x^3 - y^2*z) julia> U = complement(A, Y) Open subset diff --git a/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/attributes.jl b/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/attributes.jl index ad317a93b9ab..1ea6e4ff83df 100644 --- a/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/attributes.jl +++ b/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/attributes.jl @@ -87,13 +87,20 @@ julia> (x1, x2, x3, x4, x5) = gens(R) x5 julia> sr_and_linear_relation_ideal = ideal([x1*x3, x1*x5, x2*x4, x2*x5, x3*x4, x1 + x2 - x5, x2 + x3 - x4 - x5]) -ideal(x1*x3, x1*x5, x2*x4, x2*x5, x3*x4, x1 + x2 - x5, x2 + x3 - x4 - x5) +Ideal generated by + x1*x3 + x1*x5 + x2*x4 + x2*x5 + x3*x4 + x1 + x2 - x5 + x2 + x3 - x4 - x5 julia> R_quo = quo(R, sr_and_linear_relation_ideal)[1] Quotient of multivariate polynomial ring in 5 variables x1, x2, x3, x4, x5 over rational field - by ideal(x1*x3, x1*x5, x2*x4, x2*x5, x3*x4, x1 + x2 - x5, x2 + x3 - x4 - x5) + by ideal (x1*x3, x1*x5, x2*x4, x2*x5, x3*x4, x1 + x2 - x5, x2 + x3 - x4 - x5) julia> polynomial(R_quo, ac) 6*x3 + x4 + 7*x5 diff --git a/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/constructors.jl b/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/constructors.jl index 88979b0b2bd2..06de63bd49fe 100644 --- a/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/constructors.jl +++ b/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/constructors.jl @@ -27,7 +27,7 @@ julia> chow_ring(P2) Quotient of multivariate polynomial ring in 3 variables x1, x2, x3 over rational field - by ideal(x1 - x3, x2 - x3, x1*x2*x3) + by ideal (x1 - x3, x2 - x3, x1*x2*x3) julia> (x1, x2, x3) = gens(chow_ring(P2)) 3-element Vector{MPolyQuoRingElem{QQMPolyRingElem}}: diff --git a/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/special_attributes.jl b/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/special_attributes.jl index d22947235b9f..3816a194c6fa 100644 --- a/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/special_attributes.jl +++ b/src/AlgebraicGeometry/ToricVarieties/AlgebraicCycles/special_attributes.jl @@ -39,7 +39,7 @@ julia> chow_ring(v) Quotient of multivariate polynomial ring in 3 variables x_{1}, x_{2}, x_{3} over rational field - by ideal(x_{1} - x_{3}, x_{2} - x_{3}, x_{1}*x_{2}, x_{1}*x_{3}, x_{2}*x_{3}) + by ideal (x_{1} - x_{3}, x_{2} - x_{3}, x_{1}*x_{2}, x_{1}*x_{3}, x_{2}*x_{3}) julia> M = cycle_matroid(complete_graph(3)) Matroid of rank 2 on 3 elements @@ -48,7 +48,7 @@ julia> chow_ring(M) Quotient of multivariate polynomial ring in 3 variables x_{Edge(2, 1)}, x_{Edge(3, 1)}, x_{Edge(3, 2)} over rational field - by ideal(x_{Edge(2, 1)} - x_{Edge(3, 1)}, x_{Edge(2, 1)} - x_{Edge(3, 2)}, x_{Edge(2, 1)}*x_{Edge(3, 1)}, x_{Edge(2, 1)}*x_{Edge(3, 2)}, x_{Edge(3, 1)}*x_{Edge(3, 2)}) + by ideal with 5 generators ``` """ @attr MPolyQuoRing function chow_ring(v::NormalToricVarietyType) diff --git a/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/attributes.jl b/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/attributes.jl index edb4e55a30c6..7d25e0d29a6f 100644 --- a/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/attributes.jl +++ b/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/attributes.jl @@ -135,13 +135,20 @@ julia> (x1, x2, x3, x4, x5) = gens(R) x5 julia> sr_and_linear_relation_ideal = ideal([x1*x3, x1*x5, x2*x4, x2*x5, x3*x4, x1 + x2 - x5, x2 + x3 - x4 - x5]) -ideal(x1*x3, x1*x5, x2*x4, x2*x5, x3*x4, x1 + x2 - x5, x2 + x3 - x4 - x5) +Ideal generated by + x1*x3 + x1*x5 + x2*x4 + x2*x5 + x3*x4 + x1 + x2 - x5 + x2 + x3 - x4 - x5 julia> R_quo = quo(R, sr_and_linear_relation_ideal)[1] Quotient of multivariate polynomial ring in 5 variables x1, x2, x3, x4, x5 over rational field - by ideal(x1*x3, x1*x5, x2*x4, x2*x5, x3*x4, x1 + x2 - x5, x2 + x3 - x4 - x5) + by ideal (x1*x3, x1*x5, x2*x4, x2*x5, x3*x4, x1 + x2 - x5, x2 + x3 - x4 - x5) julia> polynomial(R_quo, cc) 6*x3 + x4 + 7*x5 diff --git a/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/methods.jl b/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/methods.jl index 0c169666f19c..dfa115c6e579 100644 --- a/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/methods.jl +++ b/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/methods.jl @@ -79,7 +79,7 @@ Quotient x3 -> [1] x4 -> [1] x5 -> [1] - by ideal(x1 - x2 - 2*x5, x3 - x5, x4 - x5, x1*x2, x3*x4*x5) + by ideal (x1 - x2 - 2*x5, x3 - x5, x4 - x5, x1*x2, x3*x4*x5) julia> integrate(cohomology_class(anticanonical_divisor(X))^3) 62 diff --git a/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/attributes.jl b/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/attributes.jl index e127459abb5d..99cd3ab60efc 100644 --- a/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/attributes.jl +++ b/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/attributes.jl @@ -443,7 +443,8 @@ Normal toric variety julia> R, _ = polynomial_ring(QQ, 4); julia> toric_ideal(R, antv) -ideal(-x1*x2 + x3*x4) +Ideal generated by + -x1*x2 + x3*x4 ``` """ function toric_ideal(R::MPolyRing, antv::AffineNormalToricVariety) @@ -471,7 +472,8 @@ julia> antv = affine_normal_toric_variety(C) Normal toric variety julia> toric_ideal(antv) -ideal(-x1*x2 + x3*x4) +Ideal generated by + -x1*x2 + x3*x4 ``` """ @attr MPolyIdeal function toric_ideal(antv::AffineNormalToricVariety) @@ -533,7 +535,7 @@ julia> coordinate_ring_of_torus(p2) Quotient of multivariate polynomial ring in 4 variables y1, y2, y1_, y2_ over rational field - by ideal(y1*y1_ - 1, y2*y2_ - 1) + by ideal (y1*y1_ - 1, y2*y2_ - 1) ``` """ @attr MPolyQuoRing function coordinate_ring_of_torus(v::NormalToricVarietyType) diff --git a/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/standard_constructions.jl b/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/standard_constructions.jl index 4cbc17be7bc8..2285fe161fde 100644 --- a/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/standard_constructions.jl +++ b/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/standard_constructions.jl @@ -268,10 +268,12 @@ julia> (v1, v2) = normal_toric_varieties_from_star_triangulations(P) Normal toric variety julia> stanley_reisner_ideal(v1) -ideal(x1*x4) +Ideal generated by + x1*x4 julia> stanley_reisner_ideal(v2) -ideal(x2*x3) +Ideal generated by + x2*x3 ``` """ function normal_toric_varieties_from_star_triangulations(P::Polyhedron) diff --git a/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/toric_ideal.jl b/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/toric_ideal.jl index 6ce9c973af3d..b879ec44ba9d 100644 --- a/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/toric_ideal.jl +++ b/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/toric_ideal.jl @@ -42,7 +42,9 @@ julia> A = [-1 -1 0 2; 2 3 -2 -1] 2 3 -2 -1 julia> binomial_exponents_to_ideal(A) -ideal(-x1*x2 + x4^2, x1^2*x2^3 - x3^2*x4) +Ideal generated by + -x1*x2 + x4^2 + x1^2*x2^3 - x3^2*x4 ``` """ function binomial_exponents_to_ideal(binoms::Union{AbstractMatrix, ZZMatrix}) @@ -65,7 +67,12 @@ julia> C = positive_hull([-2 5; 1 0]); julia> H = hilbert_basis(C); julia> toric_ideal(H) -ideal(x2*x3 - x4^2, -x1*x3 + x2^2*x4, -x1*x4 + x2^3, -x1*x3^2 + x2*x4^3, -x1*x3^3 + x4^5) +Ideal generated by + x2*x3 - x4^2 + -x1*x3 + x2^2*x4 + -x1*x4 + x2^3 + -x1*x3^2 + x2*x4^3 + -x1*x3^3 + x4^5 ``` """ function toric_ideal(pts::ZZMatrix) @@ -90,7 +97,12 @@ julia> H = hilbert_basis(C); julia> R, _ = polynomial_ring(QQ, length(H)); julia> toric_ideal(R, H) -ideal(x2*x3 - x4^2, -x1*x3 + x2^2*x4, -x1*x4 + x2^3, -x1*x3^2 + x2*x4^3, -x1*x3^3 + x4^5) +Ideal generated by + x2*x3 - x4^2 + -x1*x3 + x2^2*x4 + -x1*x4 + x2^3 + -x1*x3^2 + x2*x4^3 + -x1*x3^3 + x4^5 ``` """ function toric_ideal(R::MPolyRing, pts::ZZMatrix) diff --git a/src/AlgebraicGeometry/ToricVarieties/ToricSchemes/attributes.jl b/src/AlgebraicGeometry/ToricVarieties/ToricSchemes/attributes.jl index 42aee28da152..c80073bd1772 100644 --- a/src/AlgebraicGeometry/ToricVarieties/ToricSchemes/attributes.jl +++ b/src/AlgebraicGeometry/ToricVarieties/ToricSchemes/attributes.jl @@ -112,7 +112,7 @@ Spectrum of quotient of multivariate polynomial ring in 2 variables x1, x2 over rational field - by ideal(0) + by ideal (0) ``` """ @attr Spec{QQField, MPolyQuoRing{QQMPolyRingElem}} underlying_scheme(X::AffineNormalToricVariety) = Spec(base_ring(toric_ideal(X)), toric_ideal(X)) diff --git a/src/Combinatorics/SimplicialComplexes.jl b/src/Combinatorics/SimplicialComplexes.jl index 4671794b5cfc..eb6555880f77 100644 --- a/src/Combinatorics/SimplicialComplexes.jl +++ b/src/Combinatorics/SimplicialComplexes.jl @@ -281,7 +281,17 @@ Return the Stanley-Reisner ideal of the abstract simplicial complex `K`. # Examples ```jldoctest julia> stanley_reisner_ideal(real_projective_plane()) -ideal(x1*x2*x3, x1*x2*x4, x1*x5*x6, x2*x5*x6, x1*x3*x6, x1*x4*x5, x3*x4*x5, x3*x4*x6, x2*x3*x5, x2*x4*x6) +Ideal generated by + x1*x2*x3 + x1*x2*x4 + x1*x5*x6 + x2*x5*x6 + x1*x3*x6 + x1*x4*x5 + x3*x4*x5 + x3*x4*x6 + x2*x3*x5 + x2*x4*x6 ``` """ function stanley_reisner_ideal(K::SimplicialComplex) @@ -300,7 +310,17 @@ Return the Stanley-Reisner ideal of the abstract simplicial complex `K`, in the julia> R, _ = QQ["a","b","c","d","e","f"]; julia> stanley_reisner_ideal(R, real_projective_plane()) -ideal(a*b*c, a*b*d, a*e*f, b*e*f, a*c*f, a*d*e, c*d*e, c*d*f, b*c*e, b*d*f) +Ideal generated by + a*b*c + a*b*d + a*e*f + b*e*f + a*c*f + a*d*e + c*d*e + c*d*f + b*c*e + b*d*f ``` """ function stanley_reisner_ideal(R::MPolyRing, K::SimplicialComplex) @@ -318,7 +338,7 @@ Return the Stanley-Reisner ring of the abstract simplicial complex `K`. julia> K = simplicial_complex([[1,2,3],[2,3,4]]); julia> stanley_reisner_ring(K) -(Quotient of multivariate polynomial ring by ideal(x1*x4), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (x1*x4), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) ``` """ function stanley_reisner_ring(K::SimplicialComplex) @@ -337,7 +357,7 @@ Return the Stanley-Reisner ring of the abstract simplicial complex `K`, as a quo julia> R, _ = ZZ["a","b","c","d","e","f"]; julia> stanley_reisner_ring(R, real_projective_plane()) -(Quotient of multivariate polynomial ring by ideal(a*b*c, a*b*d, a*e*f, b*e*f, a*c*f, a*d*e, c*d*e, c*d*f, b*c*e, b*d*f), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (a*b*c, a*b*d, a*e*f, b*e*f, a*c*f, a*d*e, c*d*e, c*d*f, b*c*e, b*d*f), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) ``` """ stanley_reisner_ring(R::MPolyRing, K::SimplicialComplex) = quo(R, stanley_reisner_ideal(R, K)) diff --git a/src/InvariantTheory/affine_algebra.jl b/src/InvariantTheory/affine_algebra.jl index fe718f46b639..f6b634e010c5 100644 --- a/src/InvariantTheory/affine_algebra.jl +++ b/src/InvariantTheory/affine_algebra.jl @@ -61,13 +61,11 @@ Matrix group of degree 3 over cyclotomic field of order 3 julia> IR = invariant_ring(G) -Invariant ring of - Matrix group of degree 3 over cyclotomic field of order 3 -with generators - AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[0 0 1; 1 0 0; 0 1 0], [1 0 0; 0 a 0; 0 0 -a-1]] +Invariant ring + of matrix group of degree 3 over cyclotomic field of order 3 julia> affine_algebra(IR) -(Quotient of multivariate polynomial ring by ideal(y1^6 - 3*y1^4*y3 - 16*y1^3*y2^3 - 4*y1^3*y4 + 3*y1^2*y3^2 + 24*y1*y2^3*y3 + 4*y1*y3*y4 + 72*y2^6 + 24*y2^3*y4 - y3^3 + 8*y4^2), Hom: quotient of multivariate polynomial ring -> graded multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal with 1 generator, Hom: quotient of multivariate polynomial ring -> graded multivariate polynomial ring) ``` """ function affine_algebra(IR::InvRing; algo_gens::Symbol = :default, algo_rels::Symbol = :groebner_basis) diff --git a/src/InvariantTheory/fundamental_invariants.jl b/src/InvariantTheory/fundamental_invariants.jl index b04e2b0556e5..be2196b9fa10 100644 --- a/src/InvariantTheory/fundamental_invariants.jl +++ b/src/InvariantTheory/fundamental_invariants.jl @@ -204,10 +204,8 @@ Matrix group of degree 3 over cyclotomic field of order 3 julia> IR = invariant_ring(G) -Invariant ring of - Matrix group of degree 3 over cyclotomic field of order 3 -with generators - AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[0 0 1; 1 0 0; 0 1 0], [1 0 0; 0 a 0; 0 0 -a-1]] +Invariant ring + of matrix group of degree 3 over cyclotomic field of order 3 julia> fundamental_invariants(IR) 4-element Vector{MPolyDecRingElem{nf_elem, AbstractAlgebra.Generic.MPoly{nf_elem}}}: diff --git a/src/InvariantTheory/invariant_rings.jl b/src/InvariantTheory/invariant_rings.jl index 8245d5c3abbc..b527839e9184 100644 --- a/src/InvariantTheory/invariant_rings.jl +++ b/src/InvariantTheory/invariant_rings.jl @@ -103,16 +103,12 @@ julia> M2 = matrix(K, [1 0 0; 0 a 0; 0 0 -a-1]); julia> G = matrix_group(M1, M2); julia> IRm = invariant_ring(G) -Invariant ring of - Matrix group of degree 3 over cyclotomic field of order 3 -with generators - AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[0 0 1; 1 0 0; 0 1 0], [1 0 0; 0 a 0; 0 0 -a-1]] +Invariant ring + of matrix group of degree 3 over cyclotomic field of order 3 julia> IRp = invariant_ring(symmetric_group(3)) -Invariant ring of - Sym(3) -with generators - PermGroupElem[(1,2,3), (1,2)] +Invariant ring + of Sym(3) julia> coefficient_ring(IRp) Rational field @@ -248,10 +244,8 @@ Matrix group of degree 3 over cyclotomic field of order 3 julia> IR = invariant_ring(G) -Invariant ring of - Matrix group of degree 3 over cyclotomic field of order 3 -with generators - AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[0 0 1; 1 0 0; 0 1 0], [1 0 0; 0 a 0; 0 0 -a-1]] +Invariant ring + of matrix group of degree 3 over cyclotomic field of order 3 julia> R = polynomial_ring(IR) Multivariate polynomial ring in 3 variables over cyclotomic field of order 3 graded by @@ -281,10 +275,8 @@ Matrix group of degree 3 over prime field of characteristic 3 julia> IR = invariant_ring(G) -Invariant ring of - Matrix group of degree 3 over GF(3) -with generators - FqMatrix[[0 1 0; 2 0 0; 0 0 2]] +Invariant ring + of matrix group of degree 3 over GF(3) julia> R = polynomial_ring(IR) Multivariate polynomial ring in 3 variables over GF(3) graded by @@ -451,10 +443,8 @@ Matrix group of degree 3 over cyclotomic field of order 3 julia> IR = invariant_ring(G) -Invariant ring of - Matrix group of degree 3 over cyclotomic field of order 3 -with generators - AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[0 0 1; 1 0 0; 0 1 0], [1 0 0; 0 a 0; 0 0 -a-1]] +Invariant ring + of matrix group of degree 3 over cyclotomic field of order 3 julia> basis(IR, 6) 4-element Vector{MPolyDecRingElem{nf_elem, AbstractAlgebra.Generic.MPoly{nf_elem}}}: @@ -473,10 +463,8 @@ Matrix group of degree 3 over prime field of characteristic 3 julia> IR = invariant_ring(G) -Invariant ring of - Matrix group of degree 3 over GF(3) -with generators - FqMatrix[[0 1 0; 2 0 0; 0 0 2]] +Invariant ring + of matrix group of degree 3 over GF(3) julia> basis(IR, 2) 2-element Vector{MPolyDecRingElem{FqFieldElem, FqMPolyRingElem}}: diff --git a/src/InvariantTheory/iterators.jl b/src/InvariantTheory/iterators.jl index f0fb3eebd45d..40186c5cb6a7 100644 --- a/src/InvariantTheory/iterators.jl +++ b/src/InvariantTheory/iterators.jl @@ -204,17 +204,12 @@ Matrix group of degree 3 over cyclotomic field of order 3 julia> IR = invariant_ring(G) -Invariant ring of - Matrix group of degree 3 over cyclotomic field of order 3 -with generators - AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[0 0 1; 1 0 0; 0 1 0], [1 0 0; 0 a 0; 0 0 -a-1]] +Invariant ring + of matrix group of degree 3 over cyclotomic field of order 3 julia> B = iterate_basis(IR, 6) -Iterator over a basis of the component of degree 6 of -Invariant ring of - Matrix group of degree 3 over cyclotomic field of order 3 -with generators - AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[0 0 1; 1 0 0; 0 1 0], [1 0 0; 0 a 0; 0 0 -a-1]] +Iterator over a basis of the component of degree 6 + of invariant ring of matrix group julia> collect(B) 4-element Vector{MPolyDecRingElem{nf_elem, AbstractAlgebra.Generic.MPoly{nf_elem}}}: @@ -233,17 +228,12 @@ Matrix group of degree 3 over prime field of characteristic 3 julia> IR = invariant_ring(G) -Invariant ring of - Matrix group of degree 3 over GF(3) -with generators - FqMatrix[[0 1 0; 2 0 0; 0 0 2]] +Invariant ring + of matrix group of degree 3 over GF(3) julia> B = iterate_basis(IR, 2) -Iterator over a basis of the component of degree 2 of -Invariant ring of - Matrix group of degree 3 over GF(3) -with generators - FqMatrix[[0 1 0; 2 0 0; 0 0 2]] +Iterator over a basis of the component of degree 2 + of invariant ring of matrix group julia> collect(B) 2-element Vector{MPolyDecRingElem{FqFieldElem, FqMPolyRingElem}}: @@ -315,11 +305,8 @@ julia> G = matrix_group(M1, M2); julia> IR = invariant_ring(G); julia> B = iterate_basis(IR, 6, trivial_character(G)) -Iterator over a basis of the component of degree 6 of -Invariant ring of - Matrix group of degree 3 over cyclotomic field of order 3 -with generators - AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[0 0 1; 1 0 0; 0 1 0], [1 0 0; 0 a 0; 0 0 -a-1]] +Iterator over a basis of the component of degree 6 + of invariant ring of matrix group relative to a character julia> collect(B) @@ -339,11 +326,8 @@ julia> chi = Oscar.class_function(S2, [ F(sign(representative(c))) for c in conj class_function(character table of Sym(2), QQAbElem{nf_elem}[1, -1]) julia> B = iterate_basis(R, 3, chi) -Iterator over a basis of the component of degree 3 of -Invariant ring of - Sym(2) -with generators - PermGroupElem[(1,2)] +Iterator over a basis of the component of degree 3 + of invariant ring of Sym(2) relative to a character julia> collect(B) diff --git a/src/Modules/ModulesGraded.jl b/src/Modules/ModulesGraded.jl index ebb2734ea1ff..f40a173310d1 100644 --- a/src/Modules/ModulesGraded.jl +++ b/src/Modules/ModulesGraded.jl @@ -240,7 +240,7 @@ julia> R, (x, y) = graded_polynomial_ring(QQ, ["x", "y"]) (Graded multivariate polynomial ring in 2 variables over QQ, MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[x, y]) julia> S, _ = quo(R, [x*y]) -(Quotient of multivariate polynomial ring by ideal(x*y), Map: graded multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (x*y), Map: graded multivariate polynomial ring -> quotient of multivariate polynomial ring) julia> F = free_module(S, 2) Free module of rank 2 over S @@ -1547,7 +1547,11 @@ julia> R, x = polynomial_ring(QQ, "x" => 1:4); julia> S, _= grade(R); julia> I = ideal(S, gens(S)) -ideal(x[1], x[2], x[3], x[4]) +Ideal generated by + x[1] + x[2] + x[3] + x[4] julia> FI = free_resolution(I) Free resolution of I @@ -1663,7 +1667,11 @@ julia> R, x = polynomial_ring(QQ, "x" => 1:4); julia> S, _= grade(R); julia> I = ideal(S, gens(S)) -ideal(x[1], x[2], x[3], x[4]) +Ideal generated by + x[1] + x[2] + x[3] + x[4] julia> FI = free_resolution(I) Free resolution of I @@ -1720,7 +1728,11 @@ julia> R, x = polynomial_ring(QQ, "x" => 1:4); julia> S, _= grade(R); julia> I = ideal(S, gens(S)) -ideal(x[1], x[2], x[3], x[4]) +Ideal generated by + x[1] + x[2] + x[3] + x[4] julia> FI = free_resolution(I) Free resolution of I @@ -2680,7 +2692,9 @@ As above, where `A` is the quotient of `base_ring(I)` modulo `I`. julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]); julia> I = ideal(R, [x^2, y^3]) -ideal(x^2, y^3) +Ideal generated by + x^2 + y^3 julia> quotient_ring_as_module(I) Subquotient of Submodule with 1 generator @@ -2693,7 +2707,9 @@ by Submodule with 2 generators julia> S, (x, y) = graded_polynomial_ring(QQ, ["x", "y"]); julia> I = ideal(S, [x^2, y^3]) -ideal(x^2, y^3) +Ideal generated by + x^2 + y^3 julia> quotient_ring_as_module(I) Graded subquotient of submodule of S^1 generated by @@ -2727,7 +2743,9 @@ Return `I` considered as an object of type `SubquoModule`. julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]); julia> I = ideal(R, [x^2, y^3]) -ideal(x^2, y^3) +Ideal generated by + x^2 + y^3 julia> ideal_as_module(I) Submodule with 2 generators @@ -2739,7 +2757,9 @@ represented as subquotient with no relations. julia> S, (x, y) = graded_polynomial_ring(QQ, ["x", "y"]); julia> I = ideal(S, [x^2, y^3]) -ideal(x^2, y^3) +Ideal generated by + x^2 + y^3 julia> ideal_as_module(I) Graded submodule of S^1 @@ -2781,7 +2801,8 @@ convert `d` into an element `g` of the grading group of the ring and proceed as julia> R, (x, y) = graded_polynomial_ring(QQ, ["x", "y"]); julia> I = ideal(R, [zero(R)]) -ideal(0) +Ideal generated by + 0 julia> M = quotient_ring_as_module(I) Graded submodule of R^1 diff --git a/src/Modules/UngradedModules/FreeMod.jl b/src/Modules/UngradedModules/FreeMod.jl index ec4da68d266d..eaf843d31646 100644 --- a/src/Modules/UngradedModules/FreeMod.jl +++ b/src/Modules/UngradedModules/FreeMod.jl @@ -49,7 +49,7 @@ julia> U = complement_of_prime_ideal(P); julia> RL, _ = localization(R, U); julia> FRL = free_module(RL, 2, "f") -Free module of rank 2 over Localization of multivariate polynomial ring in 3 variables over QQ at complement of prime ideal(x, y, z) +Free module of rank 2 over Localization of multivariate polynomial ring in 3 variables over QQ at complement of prime ideal (x, y, z) julia> RL(x)*FRL[1] x*f[1] diff --git a/src/Modules/UngradedModules/SubquoModule.jl b/src/Modules/UngradedModules/SubquoModule.jl index 76f844678946..d0b43401c21b 100644 --- a/src/Modules/UngradedModules/SubquoModule.jl +++ b/src/Modules/UngradedModules/SubquoModule.jl @@ -214,7 +214,7 @@ julia> U = complement_of_prime_ideal(P); julia> RL, _ = localization(R, U); julia> FRL = free_module(RL, 1) -Free module of rank 1 over Localization of multivariate polynomial ring in 3 variables over QQ at complement of prime ideal(x, y, z) +Free module of rank 1 over Localization of multivariate polynomial ring in 3 variables over QQ at complement of prime ideal (x, y, z) julia> ARL = RL[x; y] [x] diff --git a/src/Modules/homological-algebra.jl b/src/Modules/homological-algebra.jl index a34f2ccd649f..9e11e5215e34 100644 --- a/src/Modules/homological-algebra.jl +++ b/src/Modules/homological-algebra.jl @@ -41,16 +41,21 @@ by Submodule with 4 generators 4 -> -y*e[1] + x*e[2] julia> fitting_ideal(M, -1) -ideal(0) +Ideal generated by + 0 julia> fitting_ideal(M, 0) -ideal(x^3 - y^2) +Ideal generated by + x^3 - y^2 julia> fitting_ideal(M, 1) -ideal(y, x) +Ideal generated by + y + x julia> fitting_ideal(M, 2) -ideal(1) +Ideal generated by + 1 ``` """ function fitting_ideal(M::ModuleFP{T}, i::Int) where T <: MPolyRingElem @@ -168,7 +173,8 @@ by Submodule with 4 generators 4 -> -y*e[1] + x*e[2] julia> non_flat_locus(M) -ideal(x^3 - y^2) +Ideal generated by + x^3 - y^2 ``` """ function non_flat_locus(M::ModuleFP{T}) where T <: MPolyRingElem @@ -442,7 +448,11 @@ julia> U = collect(gen(TC, i)*F[1] for i in 1:ngens(TC)); julia> M, _ = quo(F, U); julia> I = ideal(R, gens(R)) -ideal(w, x, y, z) +Ideal generated by + w + x + y + z julia> depth(I, M) 2 @@ -482,7 +492,12 @@ julia> U = collect(gen(VP4, i)*F[1] for i in 1:ngens(VP4)); julia> M, _ = quo(F, U); julia> I = ideal(R, gens(R)) -ideal(y[1], y[2], y[3], y[4], y[5]) +Ideal generated by + y[1] + y[2] + y[3] + y[4] + y[5] julia> depth(I, M) 1 diff --git a/src/NumberTheory/GaloisGrp/GaloisGrp.jl b/src/NumberTheory/GaloisGrp/GaloisGrp.jl index 51ed25e4a52a..572d2959f6f6 100644 --- a/src/NumberTheory/GaloisGrp/GaloisGrp.jl +++ b/src/NumberTheory/GaloisGrp/GaloisGrp.jl @@ -2472,7 +2472,11 @@ coefficients. julia> Qx, x = QQ["x"]; julia> cauchy_ideal(x^4-2) -ideal(x4^4 - 2, x3^3 + x3^2*x4 + x3*x4^2 + x4^3, x2^2 + x2*x3 + x2*x4 + x3^2 + x3*x4 + x4^2, x1 + x2 + x3 + x4) +Ideal generated by + x4^4 - 2 + x3^3 + x3^2*x4 + x3*x4^2 + x4^3 + x2^2 + x2*x3 + x2*x4 + x3^2 + x3*x4 + x4^2 + x1 + x2 + x3 + x4 ``` """ function cauchy_ideal(f::PolyRingElem{<:FieldElem}; parent::MPolyRing = polynomial_ring(base_ring(f), degree(f), cached = false)[1]) @@ -2501,7 +2505,17 @@ functions and the coefficients of the polynomial. julia> Qx, x = QQ["x"]; julia> i = galois_ideal(galois_group(x^4-2)[2]) -ideal(x4^4 - 2, x3^3 + x3^2*x4 + x3*x4^2 + x4^3, x2^2 + x2*x3 + x2*x4 + x3^2 + x3*x4 + x4^2, x1 + x2 + x3 + x4, x1*x3 + x2*x4, x1^2*x3^2 + x2^2*x4^2 - 4, x1^4 - 2, x2^4 - 2, x3^4 - 2, x4^4 - 2) +Ideal generated by + x4^4 - 2 + x3^3 + x3^2*x4 + x3*x4^2 + x4^3 + x2^2 + x2*x3 + x2*x4 + x3^2 + x3*x4 + x4^2 + x1 + x2 + x3 + x4 + x1*x3 + x2*x4 + x1^2*x3^2 + x2^2*x4^2 - 4 + x1^4 - 2 + x2^4 - 2 + x3^4 - 2 + x4^4 - 2 julia> k, _ = number_field(i); diff --git a/src/Rings/MPolyMap/AffineAlgebras.jl b/src/Rings/MPolyMap/AffineAlgebras.jl index 859d07732825..498777363caf 100644 --- a/src/Rings/MPolyMap/AffineAlgebras.jl +++ b/src/Rings/MPolyMap/AffineAlgebras.jl @@ -158,7 +158,7 @@ true julia> G = inverse(F) Ring homomorphism from multivariate polynomial ring in 1 variable over QQ - to quotient of multivariate polynomial ring by ideal(-x^2 + y, -x^3 + z) + to quotient of multivariate polynomial ring by ideal (-x^2 + y, -x^3 + z) defined by t -> x diff --git a/src/Rings/MPolyMap/MPolyQuo.jl b/src/Rings/MPolyMap/MPolyQuo.jl index 30e08a3a021a..8049c09e36f8 100644 --- a/src/Rings/MPolyMap/MPolyQuo.jl +++ b/src/Rings/MPolyMap/MPolyQuo.jl @@ -67,7 +67,7 @@ julia> S, (s, t) = polynomial_ring(QQ, ["s", "t"]); julia> F = hom(A, S, [s, s^2, s^3]) Ring homomorphism - from quotient of multivariate polynomial ring by ideal(-x^2 + y, -x^3 + z) + from quotient of multivariate polynomial ring by ideal (-x^2 + y, -x^3 + z) to multivariate polynomial ring in 2 variables over QQ defined by x -> s diff --git a/src/Rings/MPolyQuo.jl b/src/Rings/MPolyQuo.jl index 4c37ebd442d3..1ed6346344b2 100644 --- a/src/Rings/MPolyQuo.jl +++ b/src/Rings/MPolyQuo.jl @@ -292,7 +292,7 @@ julia> base_ring(a) Quotient of multivariate polynomial ring in 3 variables x, y, z over rational field - by ideal(-x^2 + y, -x^3 + z) + by ideal (-x^2 + y, -x^3 + z) ``` """ function base_ring(a::MPolyQuoIdeal) @@ -332,7 +332,7 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> A, _ = quo(R, ideal(R, [y-x^2, z-x^3])) -(Quotient of multivariate polynomial ring by ideal(-x^2 + y, -x^3 + z), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (-x^2 + y, -x^3 + z), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) julia> a = ideal(A, [x-y]) ideal(x - y) @@ -361,7 +361,7 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> A, _ = quo(R, ideal(R, [y-x^2, z-x^3])) -(Quotient of multivariate polynomial ring by ideal(-x^2 + y, -x^3 + z), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (-x^2 + y, -x^3 + z), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring) julia> a = ideal(A, [x-y]) ideal(x - y) @@ -968,7 +968,7 @@ julia> A Quotient of multivariate polynomial ring in 2 variables x, y over rational field - by ideal(x^2 - y^3, x - y) + by ideal (x^2 - y^3, x - y) julia> typeof(A) MPolyQuoRing{QQMPolyRingElem} @@ -979,7 +979,7 @@ QQMPolyRingElem julia> p Map defined by a julia-function with inverse from multivariate polynomial ring in 2 variables over QQ - to quotient of multivariate polynomial ring by ideal(x^2 - y^3, x - y) + to quotient of multivariate polynomial ring by ideal (x^2 - y^3, x - y) julia> p(x) x @@ -991,7 +991,7 @@ MPolyQuoRingElem{QQMPolyRingElem} julia> S, (x, y, z) = graded_polynomial_ring(QQ, ["x", "y", "z"]); julia> B, _ = quo(S, ideal(S, [x^2*z-y^3, x-y])) -(Quotient of multivariate polynomial ring by ideal(x^2*z - y^3, x - y), Map: graded multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (x^2*z - y^3, x - y), Map: graded multivariate polynomial ring -> quotient of multivariate polynomial ring) julia> typeof(B) MPolyQuoRing{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}} @@ -1315,7 +1315,7 @@ Given a homogeneous element `f` of a $\mathbb Z$-graded affine algebra, return t julia> R, (x, y, z) = graded_polynomial_ring(QQ, ["x", "y", "z"] ); julia> A, p = quo(R, ideal(R, [y-x, z^3-x^3])) -(Quotient of multivariate polynomial ring by ideal(-x + y, -x^3 + z^3), Map: graded multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (-x + y, -x^3 + z^3), Map: graded multivariate polynomial ring -> quotient of multivariate polynomial ring) julia> f = p(y^2-x^2+z^4) -x^2 + y^2 + z^4 @@ -1553,7 +1553,7 @@ julia> EMB = L[2] Map defined by a julia-function with inverse from quotient space over: Rational field with 7 generators and no relations - to quotient of multivariate polynomial ring by ideal(-x*z + y^2, -w*z + x*y, -w*y + x^2) + to quotient of multivariate polynomial ring by ideal (-x*z + y^2, -w*z + x*y, -w*y + x^2) julia> for i in 1:length(HC) println(EMB(HC[i])) end z^2 @@ -1605,7 +1605,7 @@ julia> EMB = L[2] Map defined by a julia-function with inverse from quotient space over: Rational field with 7 generators and no relations - to quotient of multivariate polynomial ring by ideal(x[1]*y[1] - x[2]*y[2]) + to quotient of multivariate polynomial ring by ideal (x[1]*y[1] - x[2]*y[2]) julia> for i in 1:length(HC) println(EMB(HC[i])) end x[2]^2*y[3] diff --git a/src/Rings/binomial_ideals.jl b/src/Rings/binomial_ideals.jl index 7c1038c3cbdc..9cbde8dc9597 100644 --- a/src/Rings/binomial_ideals.jl +++ b/src/Rings/binomial_ideals.jl @@ -40,7 +40,12 @@ julia> R, x = polynomial_ring(QQ, "x" => 1:6) (Multivariate polynomial ring in 6 variables over QQ, QQMPolyRingElem[x[1], x[2], x[3], x[4], x[5], x[6]]) julia> I = ideal(R, [x[5]*(x[1]^3-x[2]^3), x[6]*(x[3]-x[4]), x[5]^2, x[6]^2, x[5]*x[6]]) -ideal(x[1]^3*x[5] - x[2]^3*x[5], x[3]*x[6] - x[4]*x[6], x[5]^2, x[6]^2, x[5]*x[6]) +Ideal generated by + x[1]^3*x[5] - x[2]^3*x[5] + x[3]*x[6] - x[4]*x[6] + x[5]^2 + x[6]^2 + x[5]*x[6] julia> is_cellular(I) (true, [1, 2, 3, 4]) @@ -49,7 +54,10 @@ julia> R, (x,y,z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [x-y,x^3-1,z*y^2-z]) -ideal(x - y, x^3 - 1, y^2*z - z) +Ideal generated by + x - y + x^3 - 1 + y^2*z - z julia> is_cellular(I) (false, [3]) @@ -124,12 +132,15 @@ julia> R, (x,y,z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [x-y,x^3-1,z*y^2-z]) -ideal(x - y, x^3 - 1, y^2*z - z) +Ideal generated by + x - y + x^3 - 1 + y^2*z - z julia> cellular_decomposition(I) 2-element Vector{MPolyIdeal{QQMPolyRingElem}}: - ideal(y - 1, x - 1) - ideal(x - y, x^3 - 1, y^2*z - z, z) + Ideal (y - 1, x - 1) + Ideal (x - y, x^3 - 1, y^2*z - z, z) ``` """ function cellular_decomposition(I::MPolyIdeal) @@ -208,13 +219,16 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [x+y]) -ideal(x + y) +Ideal generated by + x + y julia> is_unital(I) false julia> J = ideal(R, [x^2-y^3, z^2]) -ideal(x^2 - y^3, z^2) +Ideal generated by + x^2 - y^3 + z^2 julia> is_unital(J) true @@ -605,13 +619,20 @@ julia> R, x = polynomial_ring(QQ, "x" => 1:6) (Multivariate polynomial ring in 6 variables over QQ, QQMPolyRingElem[x[1], x[2], x[3], x[4], x[5], x[6]]) julia> I = ideal(R, [x[5]*(x[1]^3-x[2]^3), x[6]*(x[3]-x[4]), x[5]^2, x[6]^2, x[5]*x[6]]) -ideal(x[1]^3*x[5] - x[2]^3*x[5], x[3]*x[6] - x[4]*x[6], x[5]^2, x[6]^2, x[5]*x[6]) +Ideal generated by + x[1]^3*x[5] - x[2]^3*x[5] + x[3]*x[6] - x[4]*x[6] + x[5]^2 + x[6]^2 + x[5]*x[6] julia> is_cellular(I) (true, [1, 2, 3, 4]) julia> cellular_hull(I) -ideal(x[6], x[5]) +Ideal generated by + x[6] + x[5] ``` """ function cellular_hull(I::MPolyIdeal{QQMPolyRingElem}) @@ -656,15 +677,20 @@ julia> R, x = polynomial_ring(QQ, "x" => 1:6) (Multivariate polynomial ring in 6 variables over QQ, QQMPolyRingElem[x[1], x[2], x[3], x[4], x[5], x[6]]) julia> I = ideal(R, [x[5]*(x[1]^3-x[2]^3), x[6]*(x[3]-x[4]), x[5]^2, x[6]^2, x[5]*x[6]]) -ideal(x[1]^3*x[5] - x[2]^3*x[5], x[3]*x[6] - x[4]*x[6], x[5]^2, x[6]^2, x[5]*x[6]) +Ideal generated by + x[1]^3*x[5] - x[2]^3*x[5] + x[3]*x[6] - x[4]*x[6] + x[5]^2 + x[6]^2 + x[5]*x[6] julia> cellular_associated_primes(I) 5-element Vector{MPolyIdeal{AbstractAlgebra.Generic.MPoly{QQAbElem{nf_elem}}}}: - ideal(x[5], x[6]) - ideal(x[1] - x[2], x[5], x[6]) - ideal(x[1] - zeta(3)*x[2], x[5], x[6]) - ideal(x[1] + (zeta(3) + 1)*x[2], x[5], x[6]) - ideal(x[3] - x[4], x[5], x[6]) + Ideal (x[5], x[6]) + Ideal (x[1] - x[2], x[5], x[6]) + Ideal (x[1] - zeta(3)*x[2], x[5], x[6]) + Ideal (x[1] + (zeta(3) + 1)*x[2], x[5], x[6]) + Ideal (x[3] - x[4], x[5], x[6]) ``` """ function cellular_associated_primes(I::MPolyIdeal{QQMPolyRingElem}, RQQAb::MPolyRing = polynomial_ring(abelian_closure(QQ)[1], symbols(base_ring(I)))[1]) @@ -738,11 +764,16 @@ julia> R, x = polynomial_ring(QQ, "x" => 1:6) (Multivariate polynomial ring in 6 variables over QQ, QQMPolyRingElem[x[1], x[2], x[3], x[4], x[5], x[6]]) julia> I = ideal(R, [x[5]*(x[1]^3-x[2]^3), x[6]*(x[3]-x[4]), x[5]^2, x[6]^2, x[5]*x[6]]) -ideal(x[1]^3*x[5] - x[2]^3*x[5], x[3]*x[6] - x[4]*x[6], x[5]^2, x[6]^2, x[5]*x[6]) +Ideal generated by + x[1]^3*x[5] - x[2]^3*x[5] + x[3]*x[6] - x[4]*x[6] + x[5]^2 + x[6]^2 + x[5]*x[6] julia> cellular_minimal_associated_primes(I::MPolyIdeal{QQMPolyRingElem}) 1-element Vector{MPolyIdeal{AbstractAlgebra.Generic.MPoly{QQAbElem{nf_elem}}}}: - ideal(x[5], x[6]) + Ideal (x[5], x[6]) ``` """ function cellular_minimal_associated_primes(I::MPolyIdeal{QQMPolyRingElem}) @@ -816,15 +847,20 @@ julia> R, x = polynomial_ring(QQ, "x" => 1:6) (Multivariate polynomial ring in 6 variables over QQ, QQMPolyRingElem[x[1], x[2], x[3], x[4], x[5], x[6]]) julia> I = ideal(R, [x[5]*(x[1]^3-x[2]^3), x[6]*(x[3]-x[4]), x[5]^2, x[6]^2, x[5]*x[6]]) -ideal(x[1]^3*x[5] - x[2]^3*x[5], x[3]*x[6] - x[4]*x[6], x[5]^2, x[6]^2, x[5]*x[6]) +Ideal generated by + x[1]^3*x[5] - x[2]^3*x[5] + x[3]*x[6] - x[4]*x[6] + x[5]^2 + x[6]^2 + x[5]*x[6] julia> cellular_primary_decomposition(I) 5-element Vector{Tuple{MPolyIdeal{AbstractAlgebra.Generic.MPoly{QQAbElem{nf_elem}}}, MPolyIdeal{AbstractAlgebra.Generic.MPoly{QQAbElem{nf_elem}}}}}: - (ideal(x[6], x[5]), ideal(x[5], x[6])) - (ideal(x[6], x[1] - x[2], x[5]^2), ideal(x[1] - x[2], x[5], x[6])) - (ideal(x[6], x[1] - zeta(3)*x[2], x[5]^2), ideal(x[1] - zeta(3)*x[2], x[5], x[6])) - (ideal(x[6], x[1] + (zeta(3) + 1)*x[2], x[5]^2), ideal(x[1] + (zeta(3) + 1)*x[2], x[5], x[6])) - (ideal(x[5], x[3] - x[4], x[6]^2), ideal(x[3] - x[4], x[5], x[6])) + (Ideal (x[6], x[5]), Ideal (x[5], x[6])) + (Ideal (x[6], x[1] - x[2], x[5]^2), Ideal (x[1] - x[2], x[5], x[6])) + (Ideal (x[6], x[1] - zeta(3)*x[2], x[5]^2), Ideal (x[1] - zeta(3)*x[2], x[5], x[6])) + (Ideal (x[6], x[1] + (zeta(3) + 1)*x[2], x[5]^2), Ideal (x[1] + (zeta(3) + 1)*x[2], x[5], x[6])) + (Ideal (x[5], x[3] - x[4], x[6]^2), Ideal (x[3] - x[4], x[5], x[6])) ``` """ function cellular_primary_decomposition(I::MPolyIdeal{QQMPolyRingElem}, RQQAb::MPolyRing = polynomial_ring(abelian_closure(QQ)[1], symbols(base_ring(I)))[1]) @@ -888,13 +924,16 @@ julia> R, (x,y,z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [x-y,x^3-1,z*y^2-z]) -ideal(x - y, x^3 - 1, y^2*z - z) +Ideal generated by + x - y + x^3 - 1 + y^2*z - z julia> binomial_primary_decomposition(I) 3-element Vector{Tuple{MPolyIdeal{AbstractAlgebra.Generic.MPoly{QQAbElem{nf_elem}}}, MPolyIdeal{AbstractAlgebra.Generic.MPoly{QQAbElem{nf_elem}}}}}: - (ideal(z, y - zeta(3), x - zeta(3)), ideal(y - zeta(3), x - zeta(3), z)) - (ideal(z, y + zeta(3) + 1, x + zeta(3) + 1), ideal(y + zeta(3) + 1, x + zeta(3) + 1, z)) - (ideal(y - 1, x - 1), ideal(y - 1, x - 1, x*y - 1)) + (Ideal (z, y - zeta(3), x - zeta(3)), Ideal (y - zeta(3), x - zeta(3), z)) + (Ideal (z, y + zeta(3) + 1, x + zeta(3) + 1), Ideal (y + zeta(3) + 1, x + zeta(3) + 1, z)) + (Ideal (y - 1, x - 1), Ideal (y - 1, x - 1, x*y - 1)) ``` """ function binomial_primary_decomposition(I::MPolyIdeal{QQMPolyRingElem}) diff --git a/src/Rings/groebner.jl b/src/Rings/groebner.jl index 03b7e20acfa6..15a92d720ce6 100644 --- a/src/Rings/groebner.jl +++ b/src/Rings/groebner.jl @@ -17,7 +17,9 @@ julia> R,(x,y) = polynomial_ring(QQ, ["x","y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal([x*y-3*x,y^3-2*x^2*y]) -ideal(x*y - 3*x, -2*x^2*y + y^3) +Ideal generated by + x*y - 3*x + -2*x^2*y + y^3 julia> Oscar.groebner_assure(I, degrevlex(R)); @@ -316,7 +318,10 @@ julia> R,(x,y,z) = polynomial_ring(GF(101), ["x","y","z"], ordering=:degrevlex) (Multivariate polynomial ring in 3 variables over GF(101), FqMPolyRingElem[x, y, z]) julia> I = ideal(R, [x+2*y+2*z-1, x^2+2*y^2+2*z^2-x, 2*x*y+2*y*z-y]) -ideal(x + 2*y + 2*z + 100, x^2 + 2*y^2 + 2*z^2 + 100*x, 2*x*y + 2*y*z + 100*y) +Ideal generated by + x + 2*y + 2*z + 100 + x^2 + 2*y^2 + 2*z^2 + 100*x + 2*x*y + 2*y*z + 100*y julia> groebner_basis_f4(I) Gröbner basis with elements @@ -500,10 +505,14 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> L = leading_ideal([x*y^2-3*x, x^3-14*y^5], ordering=degrevlex(R)) -ideal(x*y^2, y^5) +Ideal generated by + x*y^2 + y^5 julia> L = leading_ideal([x*y^2-3*x, x^3-14*y^5], ordering=lex(R)) -ideal(x*y^2, x^3) +Ideal generated by + x*y^2 + x^3 ``` """ function leading_ideal(G::Vector{T}; ordering::MonomialOrdering = default_ordering(parent(G[1]))) where { T <: MPolyRingElem } @@ -530,13 +539,21 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R,[x*y^2-3*x, x^3-14*y^5]) -ideal(x*y^2 - 3*x, x^3 - 14*y^5) +Ideal generated by + x*y^2 - 3*x + x^3 - 14*y^5 julia> L = leading_ideal(I, ordering=degrevlex(R)) -ideal(x*y^2, x^4, y^5) +Ideal generated by + x*y^2 + x^4 + y^5 julia> L = leading_ideal(I, ordering=lex(R)) -ideal(y^7, x*y^2, x^3) +Ideal generated by + y^7 + x*y^2 + x^3 ``` """ function leading_ideal(I::MPolyIdeal; ordering::MonomialOrdering = default_ordering(base_ring(I))) @@ -561,7 +578,8 @@ julia> R, (x, y, z) = polynomial_ring(GF(11), ["x", "y", "z"]); julia> I = ideal(R, [x^2, x*y - y^2]); julia> J = ideal(R, [y^3]) -ideal(y^3) +Ideal generated by + y^3 julia> reduce(J.gens, I.gens) 1-element Vector{FqMPolyRingElem}: @@ -928,7 +946,9 @@ julia> R,(a,b,c) = polynomial_ring(QQ,["a","b","c"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[a, b, c]) julia> J = ideal(R,[-1+c+b,-1+b+c*a+2*a*b]) -ideal(b + c - 1, 2*a*b + a*c + b - 1) +Ideal generated by + b + c - 1 + 2*a*b + a*c + b - 1 julia> gens(groebner_basis(J)) 2-element Vector{QQMPolyRingElem}: @@ -948,7 +968,9 @@ julia> A = [-1+c+b+a^3,-1+b+c*a+2*a^3,5+c*b+c^2*a] a*c^2 + b*c + 5 julia> J = ideal(R,[-1+c+b,-1+b+c*a+2*a*b]) -ideal(b + c - 1, 2*a*b + a*c + b - 1) +Ideal generated by + b + c - 1 + 2*a*b + a*c + b - 1 julia> gens(groebner_basis(J)) 2-element Vector{QQMPolyRingElem}: @@ -998,7 +1020,9 @@ julia> R,(a,b,c) = polynomial_ring(GF(65521),["a","b","c"]) (Multivariate polynomial ring in 3 variables over GF(65521), FqMPolyRingElem[a, b, c]) julia> J = ideal(R,[-1+c+b,-1+b+c*a+2*a*b]) -ideal(b + c + 65520, 2*a*b + a*c + b + 65520) +Ideal generated by + b + c + 65520 + 2*a*b + a*c + b + 65520 julia> A = [-1+c+b+a^3, -1+b+c*a+2*a^3, 5+c*b+c^2*a] 3-element Vector{FqMPolyRingElem}: @@ -1042,7 +1066,9 @@ julia> R,(a,b,c) = polynomial_ring(QQ,["a","b","c"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[a, b, c]) julia> J = ideal(R,[-1+c+b,-1+b+c*a+2*a*b]) -ideal(b + c - 1, 2*a*b + a*c + b - 1) +Ideal generated by + b + c - 1 + 2*a*b + a*c + b - 1 julia> gens(groebner_basis(J)) 2-element Vector{QQMPolyRingElem}: @@ -1081,7 +1107,9 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R,[x^2+y,x*y-y]) -ideal(x^2 + y, x*y - y) +Ideal generated by + x^2 + y + x*y - y julia> is_standard_basis(I.gens, ordering=neglex(R)) false @@ -1132,7 +1160,9 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R,[x^2+y,x*y-y]) -ideal(x^2 + y, x*y - y) +Ideal generated by + x^2 + y + x*y - y julia> is_groebner_basis(I.gens, ordering=lex(R)) false @@ -1172,7 +1202,11 @@ julia> J = ideal(R, [x1+2*x2+2*x3+2*x4-1, 2*x1*x2+2*x2*x3+2*x3*x4-x2, x2^2+2*x1*x3+2*x2*x4-x3 ]) -ideal(x1 + 2*x2 + 2*x3 + 2*x4 + 100, x1^2 + 100*x1 + 2*x2^2 + 2*x3^2 + 2*x4^2, 2*x1*x2 + 2*x2*x3 + 100*x2 + 2*x3*x4, 2*x1*x3 + x2^2 + 2*x2*x4 + 100*x3) +Ideal generated by + x1 + 2*x2 + 2*x3 + 2*x4 + 100 + x1^2 + 100*x1 + 2*x2^2 + 2*x3^2 + 2*x4^2 + 2*x1*x2 + 2*x2*x3 + 100*x2 + 2*x3*x4 + 2*x1*x3 + x2^2 + 2*x2*x4 + 100*x3 julia> groebner_basis(J, ordering=degrevlex(R), complete_reduction=true) Gröbner basis with elements @@ -1274,7 +1308,9 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R,[x^2+y,x*y-y]) -ideal(x^2 + y, x*y - y) +Ideal generated by + x^2 + y + x*y - y julia> Oscar._compute_groebner_basis_using_fglm(I, lex(R)) Gröbner basis with elements @@ -1566,7 +1602,9 @@ multi-modular strategy. julia> R, (x, y, z) = polynomial_ring(QQ, ["x","y","z"]); julia> I = ideal(R, [x^2+1209, x*y + 3279*y^2]) -ideal(x^2 + 1209, x*y + 3279*y^2) +Ideal generated by + x^2 + 1209 + x*y + 3279*y^2 julia> groebner_basis_modular(I) Gröbner basis with elements diff --git a/src/Rings/localization_interface.jl b/src/Rings/localization_interface.jl index 94200dd6d0fc..a09a1e511646 100644 --- a/src/Rings/localization_interface.jl +++ b/src/Rings/localization_interface.jl @@ -39,11 +39,12 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ julia> x+1 in U @@ -96,11 +97,12 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ julia> Rloc, _ = localization(U); @@ -125,11 +127,12 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ julia> Rloc, _ = localization(U); @@ -160,11 +163,12 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ julia> Rloc, iota = localization(R, U); @@ -174,12 +178,12 @@ julia> Rloc Localization of multivariate polynomial ring in 3 variables x, y, z over rational field - at complement of prime ideal(x) + at complement of prime ideal (x) julia> iota Ring homomorphism from multivariate polynomial ring in 3 variables over QQ - to localization of multivariate polynomial ring in 3 variables over QQ at complement of prime ideal(x) + to localization of multivariate polynomial ring in 3 variables over QQ at complement of prime ideal (x) defined by x -> x y -> y diff --git a/src/Rings/mpoly-affine-algebras.jl b/src/Rings/mpoly-affine-algebras.jl index 502bc1c5f39c..41d9a55a9bf8 100644 --- a/src/Rings/mpoly-affine-algebras.jl +++ b/src/Rings/mpoly-affine-algebras.jl @@ -42,7 +42,10 @@ julia> vector_space_dimension(A) 6 julia> I = modulus(A) -ideal(x^3 + y^3 + z^3 - 1, x^2 + y^2 + z^2 - 1, x + y + z - 1) +Ideal generated by + x^3 + y^3 + z^3 - 1 + x^2 + y^2 + z^2 - 1 + x + y + z - 1 julia> groebner_basis(I, ordering = lex(base_ring(I))) Gröbner basis with elements @@ -76,10 +79,12 @@ space. julia> R, (x, y) = graded_polynomial_ring(QQ, ["x", "y"]); julia> I = ideal(R, [x^2, y^3]) -ideal(x^2, y^3) +Ideal generated by + x^2 + y^3 julia> A, _ = quo(R, I) -(Quotient of multivariate polynomial ring by ideal(x^2, y^3), Map: graded multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (x^2, y^3), Map: graded multivariate polynomial ring -> quotient of multivariate polynomial ring) julia> L = monomial_basis(A) 6-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}: @@ -129,10 +134,11 @@ group of `A` and proceed as above. julia> R, (x, y) = graded_polynomial_ring(QQ, ["x", "y"]); julia> I = ideal(R, [x^2]) -ideal(x^2) +Ideal generated by + x^2 julia> A, _ = quo(R, I) -(Quotient of multivariate polynomial ring by ideal(x^2), Map: graded multivariate polynomial ring -> quotient of multivariate polynomial ring) +(Quotient of multivariate polynomial ring by ideal (x^2), Map: graded multivariate polynomial ring -> quotient of multivariate polynomial ring) julia> L = monomial_basis(A, 3) 2-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}: @@ -1107,12 +1113,12 @@ julia> V = [x, y, x^2+y^3] x^2 + y^3 julia> is_algebraically_independent_with_relations(V) -(false, ideal(t1^2 + t2^3 - t3)) +(false, Ideal (t1^2 + t2^3 - t3)) julia> A, p = quo(R, [x*y]); julia> is_algebraically_independent_with_relations([p(x), p(y)]) -(false, ideal(t1*t2)) +(false, Ideal (t1*t2)) ``` """ function is_algebraically_independent_with_relations(V::Vector{T}) where T <: Union{MPolyRingElem, MPolyQuoRingElem} @@ -1321,12 +1327,12 @@ julia> LL[1][1] Quotient of multivariate polynomial ring in 3 variables T(1), x, y over rational field - by ideal(-T(1)*y + x, -T(1)*x + y^2, T(1)^2 - y, -x^2 + y^3) + by ideal (-T(1)*y + x, -T(1)*x + y^2, T(1)^2 - y, -x^2 + y^3) julia> LL[1][2] Ring homomorphism - from quotient of multivariate polynomial ring by ideal(x^5 - x^3*y^3 + x^3*y^2 - x*y^5) - to quotient of multivariate polynomial ring by ideal(-T(1)*y + x, -T(1)*x + y^2, T(1)^2 - y, -x^2 + y^3) + from quotient of multivariate polynomial ring by ideal (x^5 - x^3*y^3 + x^3*y^2 - x*y^5) + to quotient of multivariate polynomial ring by ideal (-T(1)*y + x, -T(1)*x + y^2, T(1)^2 - y, -x^2 + y^3) defined by x -> x y -> y diff --git a/src/Rings/mpoly-graded.jl b/src/Rings/mpoly-graded.jl index 79429e63b1c1..7714b825c0bb 100644 --- a/src/Rings/mpoly-graded.jl +++ b/src/Rings/mpoly-graded.jl @@ -2013,10 +2013,15 @@ julia> homogenization(V, "w") -x^3 + z*w^2 julia> I = ideal(R, V) -ideal(-x^2 + y, -x^3 + z) +Ideal generated by + -x^2 + y + -x^3 + z julia> PTC = homogenization(I, "w") -ideal(-x*z + y^2, x*y - z*w, x^2 - y*w) +Ideal generated by + -x*z + y^2 + x*y - z*w + x^2 - y*w julia> parent(PTC[1]) Multivariate polynomial ring in 4 variables over QQ graded by @@ -2026,7 +2031,11 @@ Multivariate polynomial ring in 4 variables over QQ graded by w -> [1] julia> homogenization(I, "w"; ordering = deglex(gens(base_ring(I)))) -ideal(x*z - y^2, x*y - z*w, x^2 - y*w, y^3 - z^2*w) +Ideal generated by + x*z - y^2 + x*y - z*w + x^2 - y*w + y^3 - z^2*w ``` """ function homogenization(f::MPolyRingElem, var::VarName; pos::Union{Int,Nothing} = nothing) @@ -2153,10 +2162,14 @@ julia> dehomogenization(V, 3) -x^3 + x^2 julia> I = ideal(S, V) -ideal(x*y - z^2, -x^3 + x^2*z) +Ideal generated by + x*y - z^2 + -x^3 + x^2*z julia> dehomogenization(I, 3) -ideal(x*y - 1, -x^3 + x^2) +Ideal generated by + x*y - 1 + -x^3 + x^2 julia> W = [1 2 1 0; 3 4 0 1] 2×4 Matrix{Int64}: @@ -2339,23 +2352,43 @@ into an element `g` of the grading group of `base_ring(I)` and proceed as above. julia> R, (x, y, z) = graded_polynomial_ring(QQ, ["x", "y", "z"]); julia> I = ideal(R, [x, y^4, z^6]) -ideal(x, y^4, z^6) +Ideal generated by + x + y^4 + z^6 julia> truncate(I, 3) -ideal(x*z^2, x*y*z, x*y^2, x^2*z, x^2*y, x^3, y^4, z^6) +Ideal generated by + x*z^2 + x*y*z + x*y^2 + x^2*z + x^2*y + x^3 + y^4 + z^6 ``` ```jldoctest julia> R, (x, y, z) = graded_polynomial_ring(QQ, ["x", "y", "z"], [3,2,1]); julia> I = ideal(R, [x, y^4, z^6]) -ideal(x, y^4, z^6) +Ideal generated by + x + y^4 + z^6 julia> truncate(I, 3) -ideal(x, y^4, z^6) +Ideal generated by + x + y^4 + z^6 julia> truncate(I, 4) -ideal(x*z, z^6, y^4) +Ideal generated by + x*z + z^6 + y^4 ``` """ function truncate(I::MPolyIdeal, g::GrpAbFinGenElem) @@ -2414,7 +2447,12 @@ julia> R, (x, y, z) = graded_polynomial_ring(QQ, ["x", "y", "z"]); julia> V = [x, z^2, x^3+y^3, y^4, y*z^5]; julia> I = ideal(R, V) -ideal(x, z^2, x^3 + y^3, y^4, y*z^5) +Ideal generated by + x + z^2 + x^3 + y^3 + y^4 + y*z^5 julia> minimal_generating_set(I) 3-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}: @@ -2423,7 +2461,8 @@ julia> minimal_generating_set(I) y^3 julia> I = ideal(R, zero(R)) -ideal(0) +Ideal generated by + 0 julia> minimal_generating_set(I) MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[] @@ -2505,7 +2544,9 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [y-x^2, x-z^3]) -ideal(-x^2 + y, x - z^3) +Ideal generated by + -x^2 + y + x - z^3 julia> degree(I) 6 diff --git a/src/Rings/mpoly-ideals.jl b/src/Rings/mpoly-ideals.jl index 24be183e54c2..e2bf6d1ba8a9 100644 --- a/src/Rings/mpoly-ideals.jl +++ b/src/Rings/mpoly-ideals.jl @@ -15,7 +15,9 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x*y-3*x,y^3-2*x^2*y]) -ideal(x*y - 3*x, -2*x^2*y + y^3) +Ideal generated by + x*y - 3*x + -2*x^2*y + y^3 julia> typeof(I) MPolyIdeal{QQMPolyRingElem} @@ -24,7 +26,8 @@ julia> S, (x, y) = graded_polynomial_ring(QQ, ["x", "y"], [1, 2]) (Graded multivariate polynomial ring in 2 variables over QQ, MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[x, y]) julia> J = ideal(S, [(x^2+y)^2]) -ideal(x^4 + 2*x^2*y + y^2) +Ideal generated by + x^4 + 2*x^2*y + y^2 julia> typeof(J) MPolyIdeal{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}} @@ -87,10 +90,16 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [x, y]) -ideal(x, y) +Ideal generated by + x + y julia> I^3 -ideal(x^3, x^2*y, x*y^2, y^3) +Ideal generated by + x^3 + x^2*y + x*y^2 + y^3 ``` """ function Base.:^(I::MPolyIdeal, m::Int) @@ -108,13 +117,19 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [x, y]) -ideal(x, y) +Ideal generated by + x + y julia> J = ideal(R, [z^2]) -ideal(z^2) +Ideal generated by + z^2 julia> I+J -ideal(x, y, z^2) +Ideal generated by + x + y + z^2 ``` """ function Base.:+(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T @@ -137,13 +152,18 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [x, y]) -ideal(x, y) +Ideal generated by + x + y julia> J = ideal(R, [z^2]) -ideal(z^2) +Ideal generated by + z^2 julia> I*J -ideal(x*z^2, y*z^2) +Ideal generated by + x*z^2 + y*z^2 ``` """ function Base.:*(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T @@ -181,10 +201,14 @@ julia> I = ideal(R, [x, y])^2; julia> J = ideal(R, [y^2-x^3+x]); julia> intersect(I, J) -ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2) +Ideal generated by + x^3*y - x*y - y^3 + x^4 - x^2 - x*y^2 julia> intersect([I, J]) -ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2) +Ideal generated by + x^3*y - x*y - y^3 + x^4 - x^2 - x*y^2 ``` """ function Base.intersect(I::MPolyIdeal{T}, Js::MPolyIdeal{T}...) where T @@ -218,19 +242,46 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [x^4+x^2*y*z+y^3*z, y^4+x^3*z+x*y^2*z, x^3*y+x*y^3]) -ideal(x^4 + x^2*y*z + y^3*z, x^3*z + x*y^2*z + y^4, x^3*y + x*y^3) +Ideal generated by + x^4 + x^2*y*z + y^3*z + x^3*z + x*y^2*z + y^4 + x^3*y + x*y^3 julia> J = ideal(R, [x, y, z])^2 -ideal(x^2, x*y, x*z, y^2, y*z, z^2) +Ideal generated by + x^2 + x*y + x*z + y^2 + y*z + z^2 julia> L = quotient(I, J) -ideal(x^3*z + x*y^2*z + y^4, x^3*y + x*y^3, x^4 + x^2*y*z + y^3*z, x^3*z^2 - x^2*y*z^2 + x*y^2*z^2 - y^3*z^2, x^2*y^2*z - x^2*y*z^2 - y^3*z^2, x^3*z^2 + x^2*y^3 - x^2*y^2*z + x*y^2*z^2) +Ideal generated by + x^3*z + x*y^2*z + y^4 + x^3*y + x*y^3 + x^4 + x^2*y*z + y^3*z + x^3*z^2 - x^2*y*z^2 + x*y^2*z^2 - y^3*z^2 + x^2*y^2*z - x^2*y*z^2 - y^3*z^2 + x^3*z^2 + x^2*y^3 - x^2*y^2*z + x*y^2*z^2 julia> I:J -ideal(x^3*z + x*y^2*z + y^4, x^3*y + x*y^3, x^4 + x^2*y*z + y^3*z, x^3*z^2 - x^2*y*z^2 + x*y^2*z^2 - y^3*z^2, x^2*y^2*z - x^2*y*z^2 - y^3*z^2, x^3*z^2 + x^2*y^3 - x^2*y^2*z + x*y^2*z^2) +Ideal generated by + x^3*z + x*y^2*z + y^4 + x^3*y + x*y^3 + x^4 + x^2*y*z + y^3*z + x^3*z^2 - x^2*y*z^2 + x*y^2*z^2 - y^3*z^2 + x^2*y^2*z - x^2*y*z^2 - y^3*z^2 + x^3*z^2 + x^2*y^3 - x^2*y^2*z + x*y^2*z^2 julia> I:x -ideal(x^2*y + y^3, x^3*z + x*y^2*z + y^4, x^2*z^2 + x*y^3 - x*y^2*z + y^2*z^2, x^4, x^3*z^2 - x^2*z^3 + 2*x*y^2*z^2 - y^2*z^3, -x^2*z^4 + x*y^2*z^3 - y^2*z^4) +Ideal generated by + x^2*y + y^3 + x^3*z + x*y^2*z + y^4 + x^2*z^2 + x*y^3 - x*y^2*z + y^2*z^2 + x^4 + x^3*z^2 - x^2*z^3 + 2*x*y^2*z^2 - y^2*z^3 + -x^2*z^4 + x*y^2*z^3 - y^2*z^4 ``` """ function quotient(I::MPolyIdeal{T}, J::MPolyIdeal{T}) where T @@ -261,16 +312,31 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [z^3, y*z^2, x*z^2, y^2*z, x*y*z, x^2*z, x*y^2, x^2*y]) -ideal(z^3, y*z^2, x*z^2, y^2*z, x*y*z, x^2*z, x*y^2, x^2*y) +Ideal generated by + z^3 + y*z^2 + x*z^2 + y^2*z + x*y*z + x^2*z + x*y^2 + x^2*y julia> J = ideal(R, [x, y, z]) -ideal(x, y, z) +Ideal generated by + x + y + z julia> K = saturation(I, J) -ideal(z, x*y) +Ideal generated by + z + x*y julia> K = saturation(I) -ideal(z, x*y) +Ideal generated by + z + x*y ``` """ function saturation(I::MPolyIdeal{T}, J::MPolyIdeal{T} = ideal(base_ring(I), gens(base_ring(I)))) where T @@ -298,16 +364,27 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [z^3, y*z^2, x*z^2, y^2*z, x*y*z, x^2*z, x*y^2, x^2*y]) -ideal(z^3, y*z^2, x*z^2, y^2*z, x*y*z, x^2*z, x*y^2, x^2*y) +Ideal generated by + z^3 + y*z^2 + x*z^2 + y^2*z + x*y*z + x^2*z + x*y^2 + x^2*y julia> J = ideal(R, [x, y, z]) -ideal(x, y, z) +Ideal generated by + x + y + z julia> K, m = saturation_with_index(I, J) -(ideal(z, x*y), 2) +(Ideal (z, x*y), 2) julia> K, m = saturation_with_index(I) -(ideal(z, x*y), 2) +(Ideal (z, x*y), 2) ``` """ function saturation_with_index(I::MPolyIdeal{T}, J::MPolyIdeal{T} = ideal(base_ring(I), gens(base_ring(I)))) where T @@ -336,21 +413,30 @@ julia> R, (t, x, y, z) = polynomial_ring(QQ, ["t", "x", "y", "z"]) (Multivariate polynomial ring in 4 variables over QQ, QQMPolyRingElem[t, x, y, z]) julia> I = ideal(R, [t-x, t^2-y, t^3-z]) -ideal(t - x, t^2 - y, t^3 - z) +Ideal generated by + t - x + t^2 - y + t^3 - z julia> A = [t] 1-element Vector{QQMPolyRingElem}: t julia> TC = eliminate(I, A) -ideal(-x*z + y^2, x*y - z, x^2 - y) +Ideal generated by + -x*z + y^2 + x*y - z + x^2 - y julia> A = [1] 1-element Vector{Int64}: 1 julia> TC = eliminate(I, A) -ideal(-x*z + y^2, x*y - z, x^2 - y) +Ideal generated by + -x*z + y^2 + x*y - z + x^2 - y julia> base_ring(TC) Multivariate polynomial ring in 4 variables t, x, y, z @@ -395,35 +481,94 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x])) -ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2) +Ideal generated by + x^3*y - x*y - y^3 + x^4 - x^2 - x*y^2 julia> I = intersect(I, ideal(R, [x-y-1])^2) -ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3) +Ideal generated by + x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3 + x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3 julia> RI = radical(I) -ideal(x^4 - x^3*y - x^3 - x^2 - x*y^2 + x*y + x + y^3 + y^2) +Ideal generated by + x^4 - x^3*y - x^3 - x^2 - x*y^2 + x*y + x + y^3 + y^2 ``` ```jldoctest julia> R, (a, b, c, d) = polynomial_ring(ZZ, ["a", "b", "c", "d"]) (Multivariate polynomial ring in 4 variables over ZZ, ZZMPolyRingElem[a, b, c, d]) julia> I = intersect(ideal(R, [9,a,b]), ideal(R, [3,c])) -ideal(9, 3*b, 3*a, b*c, a*c) +Ideal generated by + 9 + 3*b + 3*a + b*c + a*c julia> I = intersect(I, ideal(R, [11,2a,7b])) -ideal(99, 3*b, 3*a, b*c, a*c) +Ideal generated by + 99 + 3*b + 3*a + b*c + a*c julia> I = intersect(I, ideal(R, [13a^2,17b^4])) -ideal(39*a^2, 13*a^2*c, 51*b^4, 17*b^4*c, 3*a^2*b^4, a^2*b^4*c) +Ideal generated by + 39*a^2 + 13*a^2*c + 51*b^4 + 17*b^4*c + 3*a^2*b^4 + a^2*b^4*c julia> I = intersect(I, ideal(R, [9c^5,6d^5])) -ideal(78*a^2*d^5, 117*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 6*a^2*b^4*d^5, 9*a^2*b^4*c^5, 39*a^2*c^5*d^5, 51*b^4*c^5*d^5, 3*a^2*b^4*c^5*d^5) +Ideal generated by + 78*a^2*d^5 + 117*a^2*c^5 + 102*b^4*d^5 + 153*b^4*c^5 + 6*a^2*b^4*d^5 + 9*a^2*b^4*c^5 + 39*a^2*c^5*d^5 + 51*b^4*c^5*d^5 + 3*a^2*b^4*c^5*d^5 julia> I = intersect(I, ideal(R, [17,a^15,b^15,c^15,d^15])) -ideal(1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15, 78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5) +Ideal generated by + 1326*a^2*d^5 + 1989*a^2*c^5 + 102*b^4*d^5 + 153*b^4*c^5 + 663*a^2*c^5*d^5 + 51*b^4*c^5*d^5 + 78*a^2*d^15 + 117*a^2*c^15 + 78*a^15*d^5 + 117*a^15*c^5 + 6*a^2*b^4*d^15 + 9*a^2*b^4*c^15 + 39*a^2*c^5*d^15 + 39*a^2*c^15*d^5 + 6*a^2*b^15*d^5 + 9*a^2*b^15*c^5 + 6*a^15*b^4*d^5 + 9*a^15*b^4*c^5 + 39*a^15*c^5*d^5 + 3*a^2*b^4*c^5*d^15 + 3*a^2*b^4*c^15*d^5 + 3*a^2*b^15*c^5*d^5 + 3*a^15*b^4*c^5*d^5 julia> RI = radical(I) -ideal(102*b*d, 78*a*d, 51*b*c, 39*a*c, 6*a*b*d, 3*a*b*c) +Ideal generated by + 102*b*d + 78*a*d + 51*b*c + 39*a*c + 6*a*b*d + 3*a*b*c ``` """ @attr T function radical(I::T) where {T <: MPolyIdeal} @@ -494,22 +639,26 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x])) -ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2) +Ideal generated by + x^3*y - x*y - y^3 + x^4 - x^2 - x*y^2 julia> I = intersect(I, ideal(R, [x-y-1])^2) -ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3) +Ideal generated by + x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3 + x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3 julia> L = primary_decomposition(I) 3-element Vector{Tuple{MPolyIdeal{QQMPolyRingElem}, MPolyIdeal{QQMPolyRingElem}}}: - (ideal(x^3 - x - y^2), ideal(x^3 - x - y^2)) - (ideal(x^2 - 2*x*y - 2*x + y^2 + 2*y + 1), ideal(x - y - 1)) - (ideal(y, x^2), ideal(x, y)) + (Ideal (x^3 - x - y^2), Ideal (x^3 - x - y^2)) + (Ideal (x^2 - 2*x*y - 2*x + y^2 + 2*y + 1), Ideal (x - y - 1)) + (Ideal (y, x^2), Ideal (x, y)) julia> L = primary_decomposition(I, algorithm = :SY, cache=false) 3-element Vector{Tuple{MPolyIdeal{QQMPolyRingElem}, MPolyIdeal{QQMPolyRingElem}}}: - (ideal(x^3 - x - y^2), ideal(x^3 - x - y^2)) - (ideal(x^2 - 2*x*y - 2*x + y^2 + 2*y + 1), ideal(x - y - 1)) - (ideal(y, x^2), ideal(y, x)) + (Ideal (x^3 - x - y^2), Ideal (x^3 - x - y^2)) + (Ideal (x^2 - 2*x*y - 2*x + y^2 + 2*y + 1), Ideal (x - y - 1)) + (Ideal (y, x^2), Ideal (y, x)) ``` ```jldoctest julia> R, (a, b, c, d) = polynomial_ring(ZZ, ["a", "b", "c", "d"]) @@ -521,18 +670,41 @@ julia> I = ideal(R, [1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5]) -ideal(1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15, 78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5) +Ideal generated by + 1326*a^2*d^5 + 1989*a^2*c^5 + 102*b^4*d^5 + 153*b^4*c^5 + 663*a^2*c^5*d^5 + 51*b^4*c^5*d^5 + 78*a^2*d^15 + 117*a^2*c^15 + 78*a^15*d^5 + 117*a^15*c^5 + 6*a^2*b^4*d^15 + 9*a^2*b^4*c^15 + 39*a^2*c^5*d^15 + 39*a^2*c^15*d^5 + 6*a^2*b^15*d^5 + 9*a^2*b^15*c^5 + 6*a^15*b^4*d^5 + 9*a^15*b^4*c^5 + 39*a^15*c^5*d^5 + 3*a^2*b^4*c^5*d^15 + 3*a^2*b^4*c^15*d^5 + 3*a^2*b^15*c^5*d^5 + 3*a^15*b^4*c^5*d^5 julia> L = primary_decomposition(I) 8-element Vector{Tuple{MPolyIdeal{ZZMPolyRingElem}, MPolyIdeal{ZZMPolyRingElem}}}: - (ideal(d^5, c^5), ideal(d, c)) - (ideal(a^2, b^4), ideal(b, a)) - (ideal(2, c^5), ideal(2, c)) - (ideal(3), ideal(3)) - (ideal(13, b^4), ideal(13, b)) - (ideal(17, a^2), ideal(17, a)) - (ideal(17, d^15, c^15, b^15, a^15), ideal(17, d, c, b, a)) - (ideal(9, 3*d^5, d^10), ideal(3, d)) + (Ideal (d^5, c^5), Ideal (d, c)) + (Ideal (a^2, b^4), Ideal (b, a)) + (Ideal (2, c^5), Ideal (2, c)) + (Ideal (3), Ideal (3)) + (Ideal (13, b^4), Ideal (13, b)) + (Ideal (17, a^2), Ideal (17, a)) + (Ideal (17, d^15, c^15, b^15, a^15), Ideal (17, d, c, b, a)) + (Ideal (9, 3*d^5, d^10), Ideal (3, d)) ``` """ function primary_decomposition(I::T; algorithm::Symbol=:GTZ, cache::Bool=true) where {T<:MPolyIdeal} @@ -624,20 +796,24 @@ julia> q = z^3+2 z^3 + 2 julia> I = ideal(R, [p*q^2, y-z^2]) -ideal(z^8 + z^6 + 4*z^5 + 4*z^3 + 4*z^2 + 4, y - z^2) +Ideal generated by + z^8 + z^6 + 4*z^5 + 4*z^3 + 4*z^2 + 4 + y - z^2 julia> L = primary_decomposition(I) 2-element Vector{Tuple{MPolyIdeal{QQMPolyRingElem}, MPolyIdeal{QQMPolyRingElem}}}: - (ideal(z^2 + 1, y - z^2), ideal(z^2 + 1, y - z^2)) - (ideal(z^6 + 4*z^3 + 4, y - z^2), ideal(z^3 + 2, y - z^2)) + (Ideal (z^2 + 1, y - z^2), Ideal (z^2 + 1, y - z^2)) + (Ideal (z^6 + 4*z^3 + 4, y - z^2), Ideal (z^3 + 2, y - z^2)) julia> AL = absolute_primary_decomposition(I) 2-element Vector{Tuple{MPolyIdeal{QQMPolyRingElem}, MPolyIdeal{QQMPolyRingElem}, MPolyIdeal{AbstractAlgebra.Generic.MPoly{nf_elem}}, Int64}}: - (ideal(z^2 + 1, y + 1), ideal(z^2 + 1, y + 1), ideal(z - _a, y + 1), 2) - (ideal(z^6 + 4*z^3 + 4, y - z^2), ideal(z^3 + 2, y - z^2), ideal(z - _a, y - _a^2), 3) + (Ideal (z^2 + 1, y + 1), Ideal (z^2 + 1, y + 1), Ideal (z - _a, y + 1), 2) + (Ideal (z^6 + 4*z^3 + 4, y - z^2), Ideal (z^3 + 2, y - z^2), Ideal (z - _a, y - _a^2), 3) julia> AP = AL[1][3] -ideal(z - _a, y + 1) +Ideal generated by + z - _a + y + 1 julia> RAP = base_ring(AP) Multivariate polynomial ring in 2 variables y, z @@ -660,14 +836,16 @@ julia> R, (x, y) = graded_polynomial_ring(QQ, ["x", "y"]) (Graded multivariate polynomial ring in 2 variables over QQ, MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[x, y]) julia> I = ideal(R, [x^2+y^2]) -ideal(x^2 + y^2) +Ideal generated by + x^2 + y^2 julia> AL = absolute_primary_decomposition(I) 1-element Vector{Tuple{MPolyIdeal{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}, MPolyIdeal{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}, MPolyIdeal{MPolyDecRingElem{nf_elem, AbstractAlgebra.Generic.MPoly{nf_elem}}}, Int64}}: - (ideal(x^2 + y^2), ideal(x^2 + y^2), ideal(x + _a*y), 2) + (Ideal (x^2 + y^2), Ideal (x^2 + y^2), Ideal (x + _a*y), 2) julia> AP = AL[1][3] -ideal(x + _a*y) +Ideal generated by + x + _a*y julia> RAP = base_ring(AP) Multivariate polynomial ring in 2 variables over number field graded by @@ -778,20 +956,24 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x])) -ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2) +Ideal generated by + x^3*y - x*y - y^3 + x^4 - x^2 - x*y^2 julia> I = intersect(I, ideal(R, [x-y-1])^2) -ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3) +Ideal generated by + x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3 + x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3 julia> L = minimal_primes(I) 2-element Vector{MPolyIdeal{QQMPolyRingElem}}: - ideal(x - y - 1) - ideal(x^3 - x - y^2) + Ideal (x - y - 1) + Ideal (x^3 - x - y^2) julia> L = minimal_primes(I, algorithm = :charSets) 2-element Vector{MPolyIdeal{QQMPolyRingElem}}: - ideal(x - y - 1) - ideal(x^3 - x - y^2) + Ideal (x - y - 1) + Ideal (x^3 - x - y^2) ``` ```jldoctest julia> R, (a, b, c, d) = polynomial_ring(ZZ, ["a", "b", "c", "d"]) @@ -803,16 +985,39 @@ julia> I = ideal(R, [1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5]) -ideal(1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15, 78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5) +Ideal generated by + 1326*a^2*d^5 + 1989*a^2*c^5 + 102*b^4*d^5 + 153*b^4*c^5 + 663*a^2*c^5*d^5 + 51*b^4*c^5*d^5 + 78*a^2*d^15 + 117*a^2*c^15 + 78*a^15*d^5 + 117*a^15*c^5 + 6*a^2*b^4*d^15 + 9*a^2*b^4*c^15 + 39*a^2*c^5*d^15 + 39*a^2*c^15*d^5 + 6*a^2*b^15*d^5 + 9*a^2*b^15*c^5 + 6*a^15*b^4*d^5 + 9*a^15*b^4*c^5 + 39*a^15*c^5*d^5 + 3*a^2*b^4*c^5*d^15 + 3*a^2*b^4*c^15*d^5 + 3*a^2*b^15*c^5*d^5 + 3*a^15*b^4*c^5*d^5 julia> L = minimal_primes(I) 6-element Vector{MPolyIdeal{ZZMPolyRingElem}}: - ideal(d, c) - ideal(b, a) - ideal(2, c) - ideal(3) - ideal(13, b) - ideal(17, a) + Ideal (d, c) + Ideal (b, a) + Ideal (2, c) + Ideal (3) + Ideal (13, b) + Ideal (17, a) ``` """ function minimal_primes(I::MPolyIdeal; algorithm::Symbol = :GTZ, cache::Bool=true) @@ -890,15 +1095,19 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x])) -ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2) +Ideal generated by + x^3*y - x*y - y^3 + x^4 - x^2 - x*y^2 julia> I = intersect(I, ideal(R, [x-y-1])^2) -ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3) +Ideal generated by + x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3 + x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3 julia> L = equidimensional_decomposition_weak(I) 2-element Vector{MPolyIdeal{QQMPolyRingElem}}: - ideal(y, x) - ideal(x^5 - 2*x^4*y - 2*x^4 + x^3*y^2 + 2*x^3*y - x^2*y^2 + 2*x^2*y + 2*x^2 + 2*x*y^3 + x*y^2 - 2*x*y - x - y^4 - 2*y^3 - y^2) + Ideal (y, x) + Ideal with 1 generator ``` """ @attr function equidimensional_decomposition_weak(I::MPolyIdeal) @@ -947,15 +1156,19 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x])) -ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2) +Ideal generated by + x^3*y - x*y - y^3 + x^4 - x^2 - x*y^2 julia> I = intersect(I, ideal(R, [x-y-1])^2) -ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3) +Ideal generated by + x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3 + x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3 julia> L = equidimensional_decomposition_radical(I) 2-element Vector{MPolyIdeal{QQMPolyRingElem}}: - ideal(y, x) - ideal(x^4 - x^3*y - x^3 - x^2 - x*y^2 + x*y + x + y^3 + y^2) + Ideal (y, x) + Ideal (x^4 - x^3*y - x^3 - x^2 - x*y^2 + x*y + x + y^3 + y^2) ``` """ @attr function equidimensional_decomposition_radical(I::MPolyIdeal) @@ -1006,13 +1219,18 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x])) -ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2) +Ideal generated by + x^3*y - x*y - y^3 + x^4 - x^2 - x*y^2 julia> I = intersect(I, ideal(R, [x-y-1])^2) -ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3) +Ideal generated by + x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3 + x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3 julia> L = equidimensional_hull(I) -ideal(x^5 - 2*x^4*y - 2*x^4 + x^3*y^2 + 2*x^3*y - x^2*y^2 + 2*x^2*y + 2*x^2 + 2*x*y^3 + x*y^2 - 2*x*y - x - y^4 - 2*y^3 - y^2) +Ideal generated by + x^5 - 2*x^4*y - 2*x^4 + x^3*y^2 + 2*x^3*y - x^2*y^2 + 2*x^2*y + 2*x^2 + 2*x*y^3 + x*y^2 - 2*x*y - x - y^4 - 2*y^3 - y^2 ``` ```jldoctest julia> R, (a, b, c, d) = polynomial_ring(ZZ, ["a", "b", "c", "d"]) @@ -1024,10 +1242,34 @@ julia> I = ideal(R, [1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5]) -ideal(1326*a^2*d^5, 1989*a^2*c^5, 102*b^4*d^5, 153*b^4*c^5, 663*a^2*c^5*d^5, 51*b^4*c^5*d^5, 78*a^2*d^15, 117*a^2*c^15, 78*a^15*d^5, 117*a^15*c^5, 6*a^2*b^4*d^15, 9*a^2*b^4*c^15, 39*a^2*c^5*d^15, 39*a^2*c^15*d^5, 6*a^2*b^15*d^5, 9*a^2*b^15*c^5, 6*a^15*b^4*d^5, 9*a^15*b^4*c^5, 39*a^15*c^5*d^5, 3*a^2*b^4*c^5*d^15, 3*a^2*b^4*c^15*d^5, 3*a^2*b^15*c^5*d^5, 3*a^15*b^4*c^5*d^5) +Ideal generated by + 1326*a^2*d^5 + 1989*a^2*c^5 + 102*b^4*d^5 + 153*b^4*c^5 + 663*a^2*c^5*d^5 + 51*b^4*c^5*d^5 + 78*a^2*d^15 + 117*a^2*c^15 + 78*a^15*d^5 + 117*a^15*c^5 + 6*a^2*b^4*d^15 + 9*a^2*b^4*c^15 + 39*a^2*c^5*d^15 + 39*a^2*c^15*d^5 + 6*a^2*b^15*d^5 + 9*a^2*b^15*c^5 + 6*a^15*b^4*d^5 + 9*a^15*b^4*c^5 + 39*a^15*c^5*d^5 + 3*a^2*b^4*c^5*d^15 + 3*a^2*b^4*c^15*d^5 + 3*a^2*b^15*c^5*d^5 + 3*a^15*b^4*c^5*d^5 julia> L = equidimensional_hull(I) -ideal(3) +Ideal generated by + 3 ``` """ function equidimensional_hull(I::MPolyIdeal) @@ -1075,13 +1317,18 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = intersect(ideal(R, [x, y])^2, ideal(R, [y^2-x^3+x])) -ideal(x^3*y - x*y - y^3, x^4 - x^2 - x*y^2) +Ideal generated by + x^3*y - x*y - y^3 + x^4 - x^2 - x*y^2 julia> I = intersect(I, ideal(R, [x-y-1])^2) -ideal(x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3, x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3) +Ideal generated by + x^5*y - 2*x^4*y^2 - 2*x^4*y + x^3*y^3 + 2*x^3*y^2 - x^2*y^3 + 2*x^2*y^2 + 2*x^2*y + 2*x*y^4 + x*y^3 - 2*x*y^2 - x*y - y^5 - 2*y^4 - y^3 + x^6 - 2*x^5 - 3*x^4*y^2 - 2*x^4*y + 2*x^3*y^3 + 3*x^3*y^2 + 2*x^3*y + 2*x^3 + 5*x^2*y^2 + 2*x^2*y - x^2 + 3*x*y^4 - 5*x*y^2 - 2*x*y - 2*y^5 - 4*y^4 - 2*y^3 julia> L = equidimensional_hull_radical(I) -ideal(x^4 - x^3*y - x^3 - x^2 - x*y^2 + x*y + x + y^3 + y^2) +Ideal generated by + x^4 - x^3*y - x^3 - x^2 - x*y^2 + x*y + x + y^3 + y^2 ``` """ function equidimensional_hull_radical(I::MPolyIdeal) @@ -1118,10 +1365,14 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x^2]) -ideal(x^2) +Ideal generated by + x^2 julia> J = ideal(R, [x, y])^2 -ideal(x^2, x*y, y^2) +Ideal generated by + x^2 + x*y + y^2 julia> I == J false @@ -1148,10 +1399,14 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x^2]) -ideal(x^2) +Ideal generated by + x^2 julia> J = ideal(R, [x, y])^2 -ideal(x^2, x*y, y^2) +Ideal generated by + x^2 + x*y + y^2 julia> is_subset(I, J) true @@ -1180,7 +1435,10 @@ julia> f = x^2 x^2 julia> I = ideal(R, [x, y])^2 -ideal(x^2, x*y, y^2) +Ideal generated by + x^2 + x*y + y^2 julia> ideal_membership(f, I) true @@ -1213,7 +1471,8 @@ julia> f = x x julia> I = ideal(R, [x^2]) -ideal(x^2) +Ideal generated by + x^2 julia> radical_membership(f, I) true @@ -1245,7 +1504,10 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x, y])^2 -ideal(x^2, x*y, y^2) +Ideal generated by + x^2 + x*y + y^2 julia> is_prime(I) false @@ -1271,7 +1533,10 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x, y])^2 -ideal(x^2, x*y, y^2) +Ideal generated by + x^2 + x*y + y^2 julia> is_primary(I) true @@ -1294,7 +1559,10 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x, y])^2 -ideal(x^2, x*y, y^2) +Ideal generated by + x^2 + x*y + y^2 julia> base_ring(I) Multivariate polynomial ring in 2 variables x, y @@ -1318,7 +1586,10 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x, y])^2 -ideal(x^2, x*y, y^2) +Ideal generated by + x^2 + x*y + y^2 julia> coefficient_ring(I) Rational field @@ -1339,7 +1610,10 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x, y])^2 -ideal(x^2, x*y, y^2) +Ideal generated by + x^2 + x*y + y^2 julia> ngens(I) 3 @@ -1361,7 +1635,10 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x, y])^2 -ideal(x^2, x*y, y^2) +Ideal generated by + x^2 + x*y + y^2 julia> gens(I) 3-element Vector{QQMPolyRingElem}: @@ -1389,7 +1666,9 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [y-x^2, x-z^3]) -ideal(-x^2 + y, x - z^3) +Ideal generated by + -x^2 + y + x - z^3 julia> dim(I) 1 @@ -1416,7 +1695,9 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> I = ideal(R, [y-x^2, x-z^3]) -ideal(-x^2 + y, x - z^3) +Ideal generated by + -x^2 + y + x - z^3 julia> codim(I) 2 @@ -1446,7 +1727,8 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, y-x^2) -ideal(-x^2 + y) +Ideal generated by + -x^2 + y julia> is_zero(I) false @@ -1467,7 +1749,10 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x, x + y, y - 1]) -ideal(x, x + y, y - 1) +Ideal generated by + x + x + y + y - 1 julia> is_one(I) true @@ -1568,7 +1853,12 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]); julia> V = [x, z^2, x^3+y^3, y^4, y*z^5]; julia> I = ideal(R, V) -ideal(x, z^2, x^3 + y^3, y^4, y*z^5) +Ideal generated by + x + z^2 + x^3 + y^3 + y^4 + y*z^5 julia> small_generating_set(I) 3-element Vector{QQMPolyRingElem}: @@ -1584,7 +1874,11 @@ julia> WW = [x-y^3,z-y^5,x^2-z^3, y^6-y^15] # certainly not homogeneous -y^15 + y^6 julia> J = ideal(R,WW) -ideal(x - y^3, -y^5 + z, x^2 - z^3, -y^15 + y^6) +Ideal generated by + x - y^3 + -y^5 + z + x^2 - z^3 + -y^15 + y^6 julia> small_generating_set(J) 3-element Vector{QQMPolyRingElem}: @@ -1648,13 +1942,15 @@ are given by all $d \times d$ minors of a $d \times n$ matrix. For the algorithm # Examples ```jldoctest julia> grassmann_pluecker_ideal(2, 4) -ideal(x[1]*x[6] - x[2]*x[5] + x[3]*x[4]) +Ideal generated by + x[1]*x[6] - x[2]*x[5] + x[3]*x[4] julia> R, x = polynomial_ring(residue_ring(ZZ, 7)[1], "x" => (1:2, 1:3), ordering=:degrevlex) (Multivariate polynomial ring in 6 variables over ZZ/(7), zzModMPolyRingElem[x[1, 1] x[1, 2] x[1, 3]; x[2, 1] x[2, 2] x[2, 3]]) julia> grassmann_pluecker_ideal(R, 2, 4) -ideal(x[1, 2]*x[2, 2] + 6*x[2, 1]*x[1, 3] + x[1, 1]*x[2, 3]) +Ideal generated by + x[1, 2]*x[2, 2] + 6*x[2, 1]*x[1, 3] + x[1, 1]*x[2, 3] ``` """ diff --git a/src/Rings/mpoly-localizations.jl b/src/Rings/mpoly-localizations.jl index 07f39c909d1f..49f64d4d4878 100644 --- a/src/Rings/mpoly-localizations.jl +++ b/src/Rings/mpoly-localizations.jl @@ -192,11 +192,11 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]); julia> S = complement_of_prime_ideal(ideal([x])) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 2 variables over QQ julia> (S,) -(Complement of prime ideal(x),) +(Complement of prime ideal (x),) ``` """ @@ -398,11 +398,12 @@ return the multiplicatively closed subset ``R\setminus P.`` julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]); julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ ``` """ @@ -1153,11 +1154,12 @@ Return the localization of `R` at `U`, together with the localization map. julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]); julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ julia> Rloc, iota = localization(R, U); @@ -1166,12 +1168,12 @@ julia> Rloc Localization of multivariate polynomial ring in 3 variables x, y, z over rational field - at complement of prime ideal(x) + at complement of prime ideal (x) julia> iota Ring homomorphism from multivariate polynomial ring in 3 variables over QQ - to localization of multivariate polynomial ring in 3 variables over QQ at complement of prime ideal(x) + to localization of multivariate polynomial ring in 3 variables over QQ at complement of prime ideal (x) defined by x -> x y -> y @@ -1502,11 +1504,12 @@ Return `true`, if `f` is a unit of `parent(f)`, `false` otherwise. julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]); julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ julia> Rloc, iota = localization(U); @@ -1697,9 +1700,7 @@ julia> T = powers_of_element(f); julia> RL,phiL = localization(R,T); julia> I=ideal(RL,RL.([x+y+z,w-1])) -Ideal - of localized ring -with 2 generators +Ideal generated by x + y + z w - 1 @@ -1707,38 +1708,28 @@ julia> is_one(I) true julia> J=ideal(RL,RL.([x^2,y])) -Ideal - of localized ring -with 2 generators +Ideal generated by x^2 y julia> K=ideal(RL,RL.([x])) -Ideal - of localized ring -with 1 generator +Ideal generated by x julia> intersect(J,K) -Ideal - of localized ring -with 2 generators +Ideal generated by x*y x^2 julia> intersect(I,J,K) -Ideal - of localized ring -with 4 generators +Ideal generated by x*y*w - x*y x^2*w - x^2 x^2*y + x*y^2 + x*y*z x^3 + x^2*z - x*y^2 - x*y*z julia> intersect([I,J,K]) -Ideal - of localized ring -with 4 generators +Ideal generated by x*y*w - x*y x^2*w - x^2 + x*y*w - x*y x^2*y + x*y^2 + x*y*z @@ -1848,13 +1839,12 @@ Multiplicative subset julia> Rloc, iota = localization(R, U); julia> I = ideal(Rloc, [x+x^2]) -Ideal - of localized ring -with 1 generator +Ideal generated by x^2 + x julia> SI = saturated_ideal(I) -ideal(x + 1) +Ideal generated by + x + 1 julia> base_ring(SI) Multivariate polynomial ring in 1 variable x @@ -1868,13 +1858,12 @@ Complement julia> Rloc, iota = localization(R, U); julia> I = ideal(Rloc, [x+x^2]) -Ideal - of localized ring -with 1 generator +Ideal generated by x^2 + x julia> saturated_ideal(I) -ideal(x) +Ideal generated by + x ``` """ function saturated_ideal(I::MPolyLocalizedIdeal) @@ -2166,30 +2155,33 @@ julia> R, (x, y) = QQ["x", "y"] (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R, [x, y^2+1]) -ideal(x, y^2 + 1) +Ideal generated by + x + y^2 + 1 julia> U = complement_of_prime_ideal(I) Complement - of prime ideal(x, y^2 + 1) + of prime ideal (x, y^2 + 1) in multivariate polynomial ring in 2 variables over QQ julia> L, _ = localization(R, U) -(Localization of multivariate polynomial ring in 2 variables over QQ at complement of prime ideal(x, y^2 + 1), Hom: multivariate polynomial ring -> localized ring) +(Localization of multivariate polynomial ring in 2 variables over QQ at complement of prime ideal (x, y^2 + 1), Hom: multivariate polynomial ring -> localized ring) julia> J = ideal(L,[y*(x^2+(y^2+1)^2)]) -Ideal - of localized ring -with 1 generator +Ideal generated by x^2*y + y^5 + 2*y^3 + y julia> saturated_ideal(J) -ideal(x^2 + y^4 + 2*y^2 + 1) +Ideal generated by + x^2 + y^4 + 2*y^2 + 1 julia> JJ = ideal(R,[y*(x^2+(y^2+1)^2)]) -ideal(x^2*y + y^5 + 2*y^3 + y) +Ideal generated by + x^2*y + y^5 + 2*y^3 + y julia> saturated_ideal(JJ) -ideal(x^2*y + y^5 + 2*y^3 + y) +Ideal generated by + x^2*y + y^5 + 2*y^3 + y ``` """ @@ -2329,14 +2321,12 @@ Localization at complement of maximal ideal of point (1, 2) julia> I = ideal(SinvR, gens(SinvR)) -Ideal - of localized ring -with 2 generators +Ideal generated by x y julia> (I,) -(ideal(x, y),) +(Ideal (x, y),) ``` """ @@ -3055,11 +3045,12 @@ julia> y in S false julia> P = ideal(R, [x]) -ideal(x) +Ideal generated by + x julia> T = complement_of_prime_ideal(P) Complement - of prime ideal(x) + of prime ideal (x) in multivariate polynomial ring in 3 variables over QQ julia> y in T @@ -3109,9 +3100,7 @@ julia> R, (x, y) = QQ["x", "y"]; julia> L, phi = localization(R, complement_of_point_ideal(R, [1, 2])); julia> I = ideal(L, [x-1, y-2])^2 -Ideal - of localized ring -with 4 generators +Ideal generated by x^2 - 2*x + 1 x*y - 2*x - y + 2 x*y - 2*x - y + 2 @@ -3185,9 +3174,7 @@ julia> R, (x, y) = QQ["x", "y"]; julia> L, phi = localization(R, powers_of_element(x)); julia> I = ideal(L, [x*(x-1), y])^2 -Ideal - of localized ring -with 4 generators +Ideal generated by x^4 - 2*x^3 + x^2 x^2*y - x*y x^2*y - x*y diff --git a/src/Rings/mpolyquo-localizations.jl b/src/Rings/mpolyquo-localizations.jl index 9847a64a9182..e52757002057 100644 --- a/src/Rings/mpolyquo-localizations.jl +++ b/src/Rings/mpolyquo-localizations.jl @@ -284,14 +284,18 @@ julia> K, a = number_field(2*t^2-1, "a"); julia> R, (x, y) = polynomial_ring(K, ["x", "y"]); julia> I = ideal(R, [2*x^2-y^3, 2*x^2-y^5]) -ideal(2*x^2 - y^3, 2*x^2 - y^5) +Ideal generated by + 2*x^2 - y^3 + 2*x^2 - y^5 julia> P = ideal(R, [y-1, x-a]) -ideal(y - 1, x - a) +Ideal generated by + y - 1 + x - a julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(y - 1, x - a) + of prime ideal (y - 1, x - a) in multivariate polynomial ring in 2 variables over number field julia> RQ, _ = quo(R, I); @@ -303,12 +307,12 @@ Localization of quotient of multivariate polynomial ring in 2 variables x, y over number field of degree 2 over QQ - by ideal(2*x^2 - y^3, 2*x^2 - y^5) - at complement of prime ideal(y - 1, x - a) + by ideal (2*x^2 - y^3, 2*x^2 - y^5) + at complement of prime ideal (y - 1, x - a) julia> iota Map defined by a julia-function - from quotient of multivariate polynomial ring by ideal(2*x^2 - y^3, 2*x^2 - y^5) + from quotient of multivariate polynomial ring by ideal (2*x^2 - y^3, 2*x^2 - y^5) to localization of quotient of multivariate polynomial ring at complement of prime ideal ``` """ localization(A::MPolyQuoRing, U::AbsMPolyMultSet) @@ -563,14 +567,18 @@ julia> K, a = number_field(2*t^2-1, "a"); julia> R, (x, y) = polynomial_ring(K, ["x", "y"]); julia> I = ideal(R, [2*x^2-y^3, 2*x^2-y^5]) -ideal(2*x^2 - y^3, 2*x^2 - y^5) +Ideal generated by + 2*x^2 - y^3 + 2*x^2 - y^5 julia> P = ideal(R, [y-1, x-a]) -ideal(y - 1, x - a) +Ideal generated by + y - 1 + x - a julia> U = complement_of_prime_ideal(P) Complement - of prime ideal(y - 1, x - a) + of prime ideal (y - 1, x - a) in multivariate polynomial ring in 2 variables over number field julia> RQ, p = quo(R, I); diff --git a/src/Rings/solving.jl b/src/Rings/solving.jl index 047193f60d38..2474a48d08e6 100644 --- a/src/Rings/solving.jl +++ b/src/Rings/solving.jl @@ -22,7 +22,9 @@ julia> R,(x,y) = polynomial_ring(QQ, ["x","y"]) (Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y]) julia> I = ideal(R,[x^2-y^2, x+1]) -ideal(x^2 - y^2, x + 1) +Ideal generated by + x^2 - y^2 + x + 1 julia> real_solutions(I) (Vector{QQFieldElem}[[-1, -1], [-1, 1]], AlgebraicSolving.RationalParametrization([:x, :y], ZZRingElem[], x^2 - 1, 2*x, PolyRingElem[-2*x])) @@ -81,7 +83,10 @@ julia> R,(x1,x2,x3) = polynomial_ring(QQ, ["x1","x2","x3"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x1, x2, x3]) julia> I = ideal(R, [x1+2*x2+2*x3-1, x1^2+2*x2^2+2*x3^2-x1, 2*x1*x2+2*x2*x3-x2]) -ideal(x1 + 2*x2 + 2*x3 - 1, x1^2 - x1 + 2*x2^2 + 2*x3^2, 2*x1*x2 + 2*x2*x3 - x2) +Ideal generated by + x1 + 2*x2 + 2*x3 - 1 + x1^2 - x1 + 2*x2^2 + 2*x3^2 + 2*x1*x2 + 2*x2*x3 - x2 julia> rat_sols = Oscar._rational_solutions(I) 2-element Vector{Vector{QQFieldElem}}: diff --git a/src/Rings/special_ideals.jl b/src/Rings/special_ideals.jl index f40c6999ec1b..611d24e75f7d 100644 --- a/src/Rings/special_ideals.jl +++ b/src/Rings/special_ideals.jl @@ -22,7 +22,10 @@ Note that indices have been shifted to start from 1. # Examples ```jldoctest julia> I = katsura(2) -ideal(x1 + 2*x2 + 2*x3 - 1, x1^2 - x1 + 2*x2^2 + 2*x3^2, 2*x1*x2 + 2*x2*x3 - x2) +Ideal generated by + x1 + 2*x2 + 2*x3 - 1 + x1^2 - x1 + 2*x2^2 + 2*x3^2 + 2*x1*x2 + 2*x2*x3 - x2 julia> base_ring(I) Multivariate polynomial ring in 3 variables x1, x2, x3 over rational field @@ -44,7 +47,10 @@ julia> R, _ = QQ["x", "y", "z"] (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z]) julia> katsura(R) -ideal(x + 2*y + 2*z - 1, x^2 - x + 2*y^2 + 2*z^2, 2*x*y + 2*y*z - y) +Ideal generated by + x + 2*y + 2*z - 1 + x^2 - x + 2*y^2 + 2*z^2 + 2*x*y + 2*y*z - y ``` """ function katsura(R::MPolyRing) diff --git a/src/TropicalGeometry/groebner_basis.jl b/src/TropicalGeometry/groebner_basis.jl index 3f5a60be6786..dc3727eefd34 100644 --- a/src/TropicalGeometry/groebner_basis.jl +++ b/src/TropicalGeometry/groebner_basis.jl @@ -31,7 +31,10 @@ julia> Kx,(x1,x2,x3) = polynomial_ring(QQ,3); julia> I = ideal([x1+2*x2,x2+2*x3]); julia> simulate_valuation(I,nu_2) -ideal(-tsim + 2, tsim*x2 + x1, tsim*x3 + x2) +Ideal generated by + -tsim + 2 + tsim*x2 + x1 + tsim*x3 + x2 ``` @@ -48,7 +51,10 @@ julia> Kx,(x1,x2,x3) = polynomial_ring(K,3); julia> I = ideal([x1+s*x2,x2+s*x3]); julia> simulate_valuation(I,nu_s) -ideal(tsim + s, tsim*x2 + x1, tsim*x3 + x2) +Ideal generated by + tsim + s + tsim*x2 + x1 + tsim*x3 + x2 ``` """ @@ -224,7 +230,9 @@ julia> nu_2 = tropical_semiring_map(QQ,2); julia> Kx,(x1,x2,x3) = polynomial_ring(QQ,3); julia> I = ideal(Kx,[x1+2*x2,x2+2*x3]) -ideal(x1 + 2*x2, x2 + 2*x3) +Ideal generated by + x1 + 2*x2 + x2 + 2*x3 julia> sG = gens(simulate_valuation(I,nu_2)) 3-element Vector{ZZMPolyRingElem}: diff --git a/src/TropicalGeometry/groebner_fan.jl b/src/TropicalGeometry/groebner_fan.jl index b69f5df09a12..7b960cc551f6 100644 --- a/src/TropicalGeometry/groebner_fan.jl +++ b/src/TropicalGeometry/groebner_fan.jl @@ -166,7 +166,9 @@ julia> Qx,(x1,x2,x3) = polynomial_ring(QQ,["x1","x2","x3"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x1, x2, x3]) julia> I = ideal([x1,x2+x3]) -ideal(x1, x2 + x3) +Ideal generated by + x1 + x2 + x3 julia> G = groebner_basis(I,ordering=lex(Qx)) Gröbner basis with elements @@ -388,7 +390,9 @@ julia> Qx,(x1,x2,x3) = polynomial_ring(QQ,["x1","x2","x3"]) (Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x1, x2, x3]) julia> I = ideal([x1,x2+x3]) -ideal(x1, x2 + x3) +Ideal generated by + x1 + x2 + x3 julia> SigmaI = groebner_fan(I) Polyhedral fan in ambient dimension 3 diff --git a/src/TropicalGeometry/initial.jl b/src/TropicalGeometry/initial.jl index f02a02d1bb3c..d81c62b6110d 100644 --- a/src/TropicalGeometry/initial.jl +++ b/src/TropicalGeometry/initial.jl @@ -100,10 +100,16 @@ julia> nu_0 = tropical_semiring_map(QQ); julia> w = [0,0]; julia> initial(I,nu_2,w) -ideal(x^3 + x^2*y, y^3) +Ideal generated by + x^3 + x^2*y + y^3 julia> initial(I,nu_0,w) -ideal(2*x^2*y - 3*y^3, x^3 - 5*x^2*y, x*y^3 - 5*y^4, y^5) +Ideal generated by + 2*x^2*y - 3*y^3 + x^3 - 5*x^2*y + x*y^3 - 5*y^4 + y^5 ``` """ function initial(I::MPolyIdeal, nu::TropicalSemiringMap, w::Vector{<:Union{QQFieldElem,ZZRingElem,Rational,Integer}}; skip_groebner_basis_computation::Bool=false) diff --git a/src/TropicalGeometry/linear_space.jl b/src/TropicalGeometry/linear_space.jl index 1f57825ae694..dd8c4413df5b 100644 --- a/src/TropicalGeometry/linear_space.jl +++ b/src/TropicalGeometry/linear_space.jl @@ -289,7 +289,9 @@ Return the tropicalization of the vanishing set of `I` with respect to the tropi julia> R,(x1,x2,x3,x4) = polynomial_ring(QQ,4); julia> I = ideal(R,[-x1+x3,-x2+x4]) -ideal(-x1 + x3, -x2 + x4) +Ideal generated by + -x1 + x3 + -x2 + x4 julia> nu = tropical_semiring_map(QQ) Map into Min tropical semiring encoding the trivial valuation on Rational field