From 4a45fe3a3caf82af2542b2dcc1287a6ebf4aafd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Mon, 29 Apr 2024 17:44:17 +0200 Subject: [PATCH 1/3] Adapt some show functions --- Project.toml | 4 ++-- src/Singular.jl | 2 +- src/ideal/ideal.jl | 6 +++--- src/map/alghom.jl | 8 +++----- src/map/idalghom.jl | 8 +++----- src/matrix/matrix.jl | 4 ++-- src/module/module.jl | 11 ++++++----- src/module/vector.jl | 4 ++-- src/number/n_GF.jl | 2 +- src/number/n_Q.jl | 2 +- src/number/n_Z.jl | 2 +- src/number/n_Zn.jl | 2 +- src/number/n_Zp.jl | 2 +- src/number/n_algExt.jl | 2 +- src/number/n_transExt.jl | 2 +- src/number/n_unknown.jl | 5 +++-- src/poly/lp.jl | 5 +++-- src/poly/plural.jl | 5 +++-- src/resolution/resolution.jl | 7 ++++--- 19 files changed, 42 insertions(+), 41 deletions(-) diff --git a/Project.toml b/Project.toml index fed5f8d66..6f7600b91 100644 --- a/Project.toml +++ b/Project.toml @@ -19,12 +19,12 @@ lib4ti2_jll = "1493ae25-0f90-5c0e-a06c-8c5077d6d66f" libsingular_julia_jll = "ae4fbd8f-ecdb-54f8-bbce-35570499b30e" [compat] -AbstractAlgebra = "0.40" +AbstractAlgebra = "0.41" BinaryWrappers = "~0.1.1" CxxWrap = "0.14" Libdl = "1.6" LinearAlgebra = "1.6" -Nemo = "0.43" +Nemo = "0.44" Pidfile = "1.3" Pkg = "1.6" Random = "1.6" diff --git a/src/Singular.jl b/src/Singular.jl index 9f528a308..07cba47d0 100644 --- a/src/Singular.jl +++ b/src/Singular.jl @@ -46,7 +46,7 @@ import AbstractAlgebra: AbstractAlgebra, diagonal_matrix, factor, identity_matrix, kernel, number_of_columns, ncols, number_of_generators, ngens, number_of_rows, nrows, order, preimage, zero_matrix, expressify -import AbstractAlgebra: pretty, Lowercase, LowercaseOff, Indent, Dedent +import AbstractAlgebra: pretty, Lowercase, LowercaseOff, Indent, Dedent, terse, is_terse import Nemo: add!, addeq!, base_ring, canonical_unit, change_base_ring, characteristic, check_parent, codomain, diff --git a/src/ideal/ideal.jl b/src/ideal/ideal.jl index 5dc4eb7ad..07fb2c151 100644 --- a/src/ideal/ideal.jl +++ b/src/ideal/ideal.jl @@ -280,8 +280,8 @@ end function show(io::IO, S::IdealSet) io = pretty(io) - print(io, "set of Singular ideals over ") - show(io, base_ring(S)) + print(io, "Set of Singular ideals over ") + show(terse(io), base_ring(S)) end function show(io::IO, I::sideal{T}) where T <: SPolyUnion @@ -292,7 +292,7 @@ function show(io::IO, I::sideal{T}) where T <: SPolyUnion else print(io, LowercaseOff(), "Singular ideal over ") end - show(io, base_ring(I)) + show(terse(io), base_ring(I)) print(io, " with generators (") for i = 1:n show(io, I[i]) diff --git a/src/map/alghom.jl b/src/map/alghom.jl index 2c6a7439c..5dbaf26c4 100644 --- a/src/map/alghom.jl +++ b/src/map/alghom.jl @@ -13,14 +13,12 @@ end function Base.show(io::IO, f::Map(SAlgHom)) io = pretty(io) - if get(io, :supercompact, false) - # no nested printing + if is_terse(io) print(io, "Algebra homomorphism") else - # nested printing allowed, preferably supercompact print(io, "Hom: ") - print(IOContext(io, :supercompact => true), Lowercase(), domain(f), " -> ") - print(IOContext(io, :supercompact => true), Lowercase(), codomain(f)) + print(terse(io), Lowercase(), domain(f), " -> ") + print(terse(io), Lowercase(), codomain(f)) end end diff --git a/src/map/idalghom.jl b/src/map/idalghom.jl index 50144c40c..1844fa57e 100644 --- a/src/map/idalghom.jl +++ b/src/map/idalghom.jl @@ -47,14 +47,12 @@ end function Base.show(io::IO, f::Map(SIdAlgHom)) io = pretty(io) - if get(io, :supercompact, false) - # no nested printing + if is_terse(io) print(io, "Identity algebra homomorphism") else - # nested printing allowed, preferably supercompact print(io, "Hom: ") - print(IOContext(io, :supercompact => true), Lowercase(), domain(f), " -> ") - print(IOContext(io, :supercompact => true), Lowercase(), codomain(f)) + print(terse(io), Lowercase(), domain(f), " -> ") + print(terse(io), Lowercase(), codomain(f)) end end diff --git a/src/matrix/matrix.jl b/src/matrix/matrix.jl index 5587dfb82..ea6829b03 100644 --- a/src/matrix/matrix.jl +++ b/src/matrix/matrix.jl @@ -78,8 +78,8 @@ end ############################################################################### function show(io::IO, S::matrix_space) - print(io, "Space of ", S.nrows, "x", S.ncols, " Singular Matrices over ") - show(io, base_ring(S)) + print(io, "Space of ", S.nrows, "x", S.ncols, " Singular matrices over ") + show(terse(io), base_ring(S)) end function show(io::IO, M::smatrix) diff --git a/src/module/module.jl b/src/module/module.jl index c8cd0eb1a..21ecdcc47 100644 --- a/src/module/module.jl +++ b/src/module/module.jl @@ -79,14 +79,15 @@ end ############################################################################### function show(io::IO, S::ModuleClass) - print(io, "Class of Singular Modules over ") - show(io, base_ring(S)) + print(io, "Class of Singular modules over ") + show(terse(io), base_ring(S)) end function show(io::IO, I::smodule) - print(io, "Singular Module over ") - show(io, base_ring(I)) - println(io,", with Generators:") + io = pretty(io) + print(io, LowercaseOff(), "Singular module over ") + show(terse(io), base_ring(I)) + println(io,", with generators:") n = ngens(I) for i = 1:n show(io, I[i]) diff --git a/src/module/vector.jl b/src/module/vector.jl index c66c67fc0..6fe05d9fe 100644 --- a/src/module/vector.jl +++ b/src/module/vector.jl @@ -69,8 +69,8 @@ end ############################################################################### function show(io::IO, R::FreeMod) - print(io, "Free Module of rank ", R.rank, " over ") - show(io, R.base_ring) + print(io, "Free module of rank ", R.rank, " over ") + show(terse(io), R.base_ring) end function show(io::IO, a::svector) diff --git a/src/number/n_GF.jl b/src/number/n_GF.jl index f33dde80a..0bd67cf06 100644 --- a/src/number/n_GF.jl +++ b/src/number/n_GF.jl @@ -94,7 +94,7 @@ canonical_unit(x::n_GF) = x ############################################################################### function show(io::IO, c::N_GField) - print(io, "Finite Field of Characteristic ", characteristic(c), " and degree ", degree(c)) + print(io, "Finite field of characteristic ", characteristic(c), " and degree ", degree(c)) end function expressify(a::n_GF; context = nothing)::Any diff --git a/src/number/n_Q.jl b/src/number/n_Q.jl index bc17191c9..cfc17a60f 100644 --- a/src/number/n_Q.jl +++ b/src/number/n_Q.jl @@ -114,7 +114,7 @@ canonical_unit(x::n_Q) = x ############################################################################### function show(io::IO, c::Rationals) - print(io, "Rational Field") + print(io, "Rational field") end function expressify(n::n_Q; context = nothing)::Any diff --git a/src/number/n_Z.jl b/src/number/n_Z.jl index 4fa7e44d2..6c54d5b6a 100644 --- a/src/number/n_Z.jl +++ b/src/number/n_Z.jl @@ -95,7 +95,7 @@ canonical_unit(x::n_Z) = is_negative(x) ? -one(parent(x)) : one(parent(x)) ############################################################################### function show(io::IO, c::Integers) - print(io, "Integer Ring") + print(io, "Integer ring") end function expressify(n::n_Z; context = nothing)::Any diff --git a/src/number/n_Zn.jl b/src/number/n_Zn.jl index 5ab666a30..bd4d6f069 100644 --- a/src/number/n_Zn.jl +++ b/src/number/n_Zn.jl @@ -76,7 +76,7 @@ canonical_unit(x::n_Zn) = x ############################################################################### function show(io::IO, c::N_ZnRing) - print(io, "Residue Ring of Integer Ring modulo ", characteristic(c)) + print(io, "Residue ring of integer ring modulo ", characteristic(c)) end function BigInt(n::n_Zn) diff --git a/src/number/n_Zp.jl b/src/number/n_Zp.jl index 101d61866..197c799b1 100644 --- a/src/number/n_Zp.jl +++ b/src/number/n_Zp.jl @@ -68,7 +68,7 @@ canonical_unit(x::n_Zp) = x ############################################################################### function show(io::IO, c::N_ZpField) - print(io, "Finite Field of Characteristic ", characteristic(c)) + print(io, "Finite field of characteristic ", characteristic(c)) end function expressify(n::n_Zp; context = nothing)::Any diff --git a/src/number/n_algExt.jl b/src/number/n_algExt.jl index 5fc749a7f..29f16ba9f 100644 --- a/src/number/n_algExt.jl +++ b/src/number/n_algExt.jl @@ -88,7 +88,7 @@ canonical_unit(x::n_algExt) = x ############################################################################### function show(io::IO, F::N_AlgExtField) - print(IOContext(io, :compact => true), "Algebraic Extension of ", + print(terse(io), "Algebraic extension of ", base_ring(F), " with defining equation ", modulus(F)) end diff --git a/src/number/n_transExt.jl b/src/number/n_transExt.jl index 489b9e2b5..c15871352 100644 --- a/src/number/n_transExt.jl +++ b/src/number/n_transExt.jl @@ -154,7 +154,7 @@ canonical_unit(x::n_transExt) = x ############################################################################### function show(io::IO, F::N_FField) - print(io, "Function Field over ", base_ring(F), " with transcendence basis ", transcendence_basis(F)) + print(terse(io), "Function field over ", base_ring(F), " with transcendence basis ", transcendence_basis(F)) end function expressify(a::n_transExt; context = nothing)::Any diff --git a/src/number/n_unknown.jl b/src/number/n_unknown.jl index 271ec2be0..11a5454d3 100644 --- a/src/number/n_unknown.jl +++ b/src/number/n_unknown.jl @@ -51,8 +51,9 @@ end ############################################################################### function show(io::IO, R::N_unknown) - print(io, "Singular coefficient ring over ") - show(io, R.base_ring) + io = pretty(io) + print(io, LowercaseOff(), "Singular coefficient ring over ") + show(terse(io), R.base_ring) end function expressify(a::n_unknown; context = nothing) diff --git a/src/poly/lp.jl b/src/poly/lp.jl index 5d406dd78..003fbcd6c 100644 --- a/src/poly/lp.jl +++ b/src/poly/lp.jl @@ -7,11 +7,12 @@ export slpalg, LPRing, FreeAlgebra ############################################################################### function show(io::IO, R::LPRing) + io = pretty(io) GC.@preserve R s = libSingular.rString(R.ptr) if libSingular.rIsQuotientRing(R.ptr) - print(io, "Singular letterplace Quotient Ring ", s) + print(io, LowercaseOff(), "Singular letterplace quotient ring ", s) else - print(io, "Singular letterplace Ring ", s) + print(io, LowercaseOff(), "Singular letterplace ring ", s) end end diff --git a/src/poly/plural.jl b/src/poly/plural.jl index e1cb355de..8c3560a52 100644 --- a/src/poly/plural.jl +++ b/src/poly/plural.jl @@ -31,11 +31,12 @@ end ############################################################################### function show(io::IO, R::PluralRing) + io = pretty(io) s = libSingular.rString(R.ptr) if libSingular.rIsQuotientRing(R.ptr) - print(io, "Singular G-Algebra Quotient Ring ", s) + print(io, LowercaseOff(), "Singular G-algebra quotient ring ", s) else - print(io, "Singular G-Algebra ", s) + print(io, LowercaseOff(), "Singular G-algebra ", s) end end diff --git a/src/resolution/resolution.jl b/src/resolution/resolution.jl index 8ed17ca40..a9d5310ca 100644 --- a/src/resolution/resolution.jl +++ b/src/resolution/resolution.jl @@ -118,13 +118,14 @@ end ############################################################################### function show(io::IO, R::ResolutionSet) - print(io, "Set of Singular Resolutions over ") - show(io, R.base_ring) + print(io, "Set of Singular resolutions over ") + show(terse(io), R.base_ring) end function show(io::IO, r::sresolution) + io = pretty(io) GC.@preserve r begin - println(io, "Singular Resolution:") + println(io, LowercaseOff(), "Singular resolution:") len = length(r) if len > 0 ptr = libSingular.getindex_internal(r.ptr, 0, r.minimal) From 3490ec957aca6e6532c0800c1601190d7e366539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Mon, 29 Apr 2024 18:08:49 +0200 Subject: [PATCH 2/3] Make `sresolution` show oneline --- src/resolution/resolution.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resolution/resolution.jl b/src/resolution/resolution.jl index a9d5310ca..1a6295b30 100644 --- a/src/resolution/resolution.jl +++ b/src/resolution/resolution.jl @@ -125,7 +125,7 @@ end function show(io::IO, r::sresolution) io = pretty(io) GC.@preserve r begin - println(io, LowercaseOff(), "Singular resolution:") + print(io, LowercaseOff(), "Singular resolution: ") len = length(r) if len > 0 ptr = libSingular.getindex_internal(r.ptr, 0, r.minimal) From c05aab3edb8917e136b3a485c8d7d5f9ed26feac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Mon, 29 Apr 2024 18:07:40 +0200 Subject: [PATCH 3/3] Fix doctests --- docs/src/GF.md | 2 +- docs/src/alghom.md | 2 +- docs/src/caller.md | 2 +- docs/src/ideal.md | 6 ++---- docs/src/index.md | 5 ++--- docs/src/modp.md | 4 ++-- docs/src/module.md | 31 +++++++++++++++---------------- docs/src/noncommutative.md | 20 ++++++++++---------- docs/src/resolution.md | 15 +++++---------- docs/src/transExt.md | 8 ++++---- docs/src/vector.md | 4 ++-- src/ideal/ideal.jl | 2 +- src/module/module.jl | 2 +- 13 files changed, 47 insertions(+), 56 deletions(-) diff --git a/docs/src/GF.md b/docs/src/GF.md index 31b711872..441ccc36f 100644 --- a/docs/src/GF.md +++ b/docs/src/GF.md @@ -59,7 +59,7 @@ Singular.degree(::N_GField) ```jldoctest julia> R,w = FiniteField(7, 2, "w") -(Finite Field of Characteristic 7 and degree 2, w) +(Finite field of characteristic 7 and degree 2, w) julia> w^48 == 1 true diff --git a/docs/src/alghom.md b/docs/src/alghom.md index cede8e55b..15d1a957e 100644 --- a/docs/src/alghom.md +++ b/docs/src/alghom.md @@ -35,7 +35,7 @@ IdentityAlgebraHomomorphism(D::PolyRing) ```jldoctest julia> L = FiniteField(3, 2, "a") -(Finite Field of Characteristic 3 and degree 2, a) +(Finite field of characteristic 3 and degree 2, a) julia> R, (x, y, z, w) = polynomial_ring(L[1], ["x", "y", "z", "w"]; ordering=:negdegrevlex) diff --git a/docs/src/caller.md b/docs/src/caller.md index 1b241d722..f8392822f 100644 --- a/docs/src/caller.md +++ b/docs/src/caller.md @@ -70,7 +70,7 @@ julia> Singular.LibNctools.isCentral(x) # base ring A is inferred from x 0 julia> Singular.LibCentral.center(A, 3) # base ring cannot be inferred from the plain Int 3 -Singular ideal over Singular G-Algebra (QQ),(x,y,z,t),(dp(4),C) with generators (t, 4*x*y + z^2 - 2*z) +Singular ideal over Singular G-algebra (QQ),(x,y,z,t),(dp(4),C) with generators (t, 4*x*y + z^2 - 2*z) ``` ## Global Interpreter Variables diff --git a/docs/src/ideal.md b/docs/src/ideal.md index 2175a8390..07f640ede 100644 --- a/docs/src/ideal.md +++ b/docs/src/ideal.md @@ -363,12 +363,10 @@ julia> I = Ideal(R, x^2*y + 2y + 1, y^2 + 1) Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x^2*y + 2*y + 1, y^2 + 1) julia> F1 = fres(std(I), 0) -Singular Resolution: -R^1 <- R^2 <- R^1 +Singular resolution: R^1 <- R^2 <- R^1 julia> F2 = sres(std(I), 2) -Singular Resolution: -R^1 <- R^2 <- R^1 +Singular resolution: R^1 <- R^2 <- R^1 ``` ### Differential operations diff --git a/docs/src/index.md b/docs/src/index.md index 95485309b..e36aaa233 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -53,12 +53,11 @@ julia> G = std(I) Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x - y, y^2 + 1) julia> Z = syz(G) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: y^2*gen(1)-x*gen(2)+y*gen(2)+gen(1) julia> F = fres(G, 0) -Singular Resolution: -R^1 <- R^2 <- R^1 +Singular resolution: R^1 <- R^2 <- R^1 julia> F[1] Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x - y, y^2 + 1) diff --git a/docs/src/modp.md b/docs/src/modp.md index 55790b753..610ea3ba6 100644 --- a/docs/src/modp.md +++ b/docs/src/modp.md @@ -65,7 +65,7 @@ Coerce a Singular or Flint integer value into the field. ```jldoctest julia> R = Fp(23) -Finite Field of Characteristic 23 +Finite field of characteristic 23 julia> a = R(5) 5 @@ -90,7 +90,7 @@ $[0, p)$. ```jldoctest julia> R = Fp(23) -Finite Field of Characteristic 23 +Finite field of characteristic 23 julia> a = R(5) 5 diff --git a/docs/src/module.md b/docs/src/module.md index 193cd95ea..f83c7b806 100644 --- a/docs/src/module.md +++ b/docs/src/module.md @@ -77,7 +77,7 @@ julia> v2 = vector(R, x^2 + 1, 2x + 3y, x) x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1) julia> M = Singular.Module(R, v1, v2) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1) x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1) ``` @@ -116,7 +116,7 @@ julia> v2 = vector(R, x^2 + 1, 2x + 3y, x) x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1) julia> M = Singular.Module(R, v1, v2) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1) x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1) @@ -162,13 +162,13 @@ julia> v3 = x*v1 + y*v2 + vector(R, x, y + 1, y^2) x^2*y*gen(2)+x^2*y*gen(1)+x^2*gen(1)+2*x*y*gen(3)+2*x*y*gen(2)+y^2*gen(3)+3*y^2*gen(2)+x*gen(2)+2*x*gen(1)+y*gen(2)+y*gen(1)+gen(2) julia> M = Singular.Module(R, v1, v2, v3) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1) x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1) x^2*y*gen(2)+x^2*y*gen(1)+x^2*gen(1)+2*x*y*gen(3)+2*x*y*gen(2)+y^2*gen(3)+3*y^2*gen(2)+x*gen(2)+2*x*gen(1)+y*gen(2)+y*gen(1)+gen(2) julia> G = std(M; complete_reduction=true) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: y^2*gen(3)+x*gen(1)+y*gen(2)+gen(2) x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1) x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1) @@ -199,24 +199,24 @@ julia> v = y*v1+x*v2+z*v3 x^2*gen(3)-y^2*gen(3)+x*z*gen(2)-x*z*gen(1)+y*z*gen(2)+y*z*gen(1) julia> M = Singular.Module(R, v1, v2, v3) -Singular Module over Singular polynomial ring (QQ),(x,y,z),(dp(3),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y,z),(dp(3),C), with generators: -y*gen(3)+z*gen(2) x*gen(3)-z*gen(1) x*gen(2)+y*gen(1) julia> B = std(M; complete_reduction=true) -Singular Module over Singular polynomial ring (QQ),(x,y,z),(dp(3),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y,z),(dp(3),C), with generators: y*gen(3)-z*gen(2) x*gen(2)+y*gen(1) x*gen(3)-z*gen(1) y*z*gen(1) julia> V = Singular.Module(R, v) -Singular Module over Singular polynomial ring (QQ),(x,y,z),(dp(3),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y,z),(dp(3),C), with generators: x^2*gen(3)-y^2*gen(3)+x*z*gen(2)-x*z*gen(1)+y*z*gen(2)+y*z*gen(1) julia> reduce(V,B) -Singular Module over Singular polynomial ring (QQ),(x,y,z),(dp(3),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y,z),(dp(3),C), with generators: 0 ``` @@ -240,12 +240,12 @@ julia> v2 = vector(R, (x + 1)*x, (x*y + 1)*x, x) x^2*y*gen(2)+x^2*gen(1)+x*gen(3)+x*gen(2)+x*gen(1) julia> M = Singular.Module(R, v1, v2) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x*y^2*gen(2)+x*y*gen(1)+y*gen(3)+y*gen(2)+y*gen(1) x^2*y*gen(2)+x^2*gen(1)+x*gen(3)+x*gen(2)+x*gen(1) julia> Z = syz(M) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x*gen(1)-y*gen(2) ``` @@ -268,13 +268,12 @@ julia> v2 = vector(R, x^2 + 1, 2x + 3y, x) x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1) julia> M = std(Singular.Module(R, v1, v2)) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1) x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1) julia> F = sres(M, 0) -Singular Resolution: -R^3 <- R^2 +Singular resolution: R^3 <- R^2 julia> M1 = Singular.Matrix(M) [x + 1, x^2 + 1 @@ -308,12 +307,12 @@ julia> v2 = vector(R, x^5 + 1, 2x^3 + 3y^2, x^2) x^5*gen(1)+2*x^3*gen(2)+x^2*gen(3)+3*y^2*gen(2)+gen(1) julia> M = Singular.Module(R, v1, v2) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1) x^5*gen(1)+2*x^3*gen(2)+x^2*gen(3)+3*y^2*gen(2)+gen(1) julia> N = jet(M,3) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1) 2*x^3*gen(2)+x^2*gen(3)+3*y^2*gen(2)+gen(1) ``` @@ -346,7 +345,7 @@ julia> v3 = v1 + v2 y*gen(2)+y*gen(1) julia> M = Singular.Module(R, v1, v2, v3) -Singular Module over Singular polynomial ring (QQ),(x,y),(ds(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(ds(2),C), with generators: x*gen(1)+y^2*gen(2) -x*gen(1)+y*gen(2)+y*gen(1)-y^2*gen(2) y*gen(2)+y*gen(1) diff --git a/docs/src/noncommutative.md b/docs/src/noncommutative.md index 5cc4db3b2..1a17a1589 100644 --- a/docs/src/noncommutative.md +++ b/docs/src/noncommutative.md @@ -72,7 +72,7 @@ matrix with all relevant entries set to `a`. julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]); julia> G, (x, y) = GAlgebra(R, 2, Singular.Matrix(R, [0 x; 0 0])) -(Singular G-Algebra (QQ),(x,y),(dp(2),C), spluralg{n_Q}[x, y]) +(Singular G-algebra (QQ),(x,y),(dp(2),C), spluralg{n_Q}[x, y]) julia> y*x 2*x*y + x @@ -90,10 +90,10 @@ by a two-sided ideal. Continuing with the above example: ```jldoctest GAlgebra julia> I = Ideal(G, [x^2 + y^2], twosided = true) -Singular two-sided ideal over Singular G-Algebra (QQ),(x,y),(dp(2),C) with generators (x^2 + y^2) +Singular two-sided ideal over Singular G-algebra (QQ),(x,y),(dp(2),C) with generators (x^2 + y^2) julia> Q, (x, y) = QuotientRing(G, std(I)) -(Singular G-Algebra Quotient Ring (QQ),(x,y),(dp(2),C), spluralg{n_Q}[x, y]) +(Singular G-algebra quotient ring (QQ),(x,y),(dp(2),C), spluralg{n_Q}[x, y]) ``` ### WeylAlgebra @@ -122,7 +122,7 @@ that due to the ordering constraint on G-algebras, the orderings `:neglex`, ```jldoctest julia> R, (x, y, dx, dy) = WeylAlgebra(ZZ, ["x", "y"]) -(Singular G-Algebra (ZZ),(x,y,dx,dy),(dp(4),C), spluralg{n_Z}[x, y, dx, dy]) +(Singular G-algebra (ZZ),(x,y,dx,dy),(dp(4),C), spluralg{n_Z}[x, y, dx, dy]) julia> (dx*x, dx*y, dy*x, dy*y) (x*dx + 1, y*dx, x*dy, y*dy + 1) @@ -132,7 +132,7 @@ The ideals of G-algebras are left ideals by default. ```jldoctest julia> R, (x1, x2, x3, d1, d2, d3) = WeylAlgebra(QQ, ["x1" "x2" "x3"; "d1" "d2" "d3"]) -(Singular G-Algebra (QQ),(x1,x2,x3,d1,d2,d3),(dp(6),C), spluralg{n_Q}[x1, x2, x3, d1, d2, d3]) +(Singular G-algebra (QQ),(x1,x2,x3,d1,d2,d3),(dp(6),C), spluralg{n_Q}[x1, x2, x3, d1, d2, d3]) julia> gens(std(Ideal(R, [x1^2*d2^2 + x2^2*d3^2, x1*d2 + x3]))) 7-element Vector{spluralg{n_Q}}: @@ -166,7 +166,7 @@ ordering must be global. ```jldoctest julia> R, (x, y) = FreeAlgebra(QQ, ["x", "y"], 5) -(Singular letterplace Ring (QQ),(x,y,x,y,x,y,x,y,x,y),(dp(10),C,L(3)), slpalg{n_Q}[x, y]) +(Singular letterplace ring (QQ),(x,y,x,y,x,y,x,y,x,y),(dp(10),C,L(3)), slpalg{n_Q}[x, y]) julia> (x*y)^2 x*y*x*y @@ -180,7 +180,7 @@ possibility of constructing one-sided ideals. ```jldoctest julia> R, (x, y, z) = FreeAlgebra(QQ, ["x", "y", "z"], 4) -(Singular letterplace Ring (QQ),(x,y,z,x,y,z,x,y,z,x,y,z),(dp(12),C,L(3)), slpalg{n_Q}[x, y, z]) +(Singular letterplace ring (QQ),(x,y,z,x,y,z,x,y,z,x,y,z),(dp(12),C,L(3)), slpalg{n_Q}[x, y, z]) julia> gens(std(Ideal(R, [x*y + y*z, x*x + x*y - y*x - y*y]))) 8-element Vector{slpalg{n_Q}}: @@ -204,7 +204,7 @@ represented using commutative data structures, and the function ```jldoctest julia> R, (x, y, dx, dy) = WeylAlgebra(QQ, ["x", "y"]) -(Singular G-Algebra (QQ),(x,y,dx,dy),(dp(4),C), spluralg{n_Q}[x, y, dx, dy]) +(Singular G-algebra (QQ),(x,y,dx,dy),(dp(4),C), spluralg{n_Q}[x, y, dx, dy]) julia> p = (dx + dy)*(x + y) x*dx + y*dx + x*dy + y*dy + 2 @@ -223,7 +223,7 @@ iterators have the same behavior as in the commutative case. ```jldoctest julia> R, (x, y, z) = FreeAlgebra(QQ, ["x", "y", "z"], 6) -(Singular letterplace Ring (QQ),(x,y,z,x,y,z,x,y,z,x,y,z,x,y,z,x,y,z),(dp(18),C,L(3)), slpalg{n_Q}[x, y, z]) +(Singular letterplace ring (QQ),(x,y,z,x,y,z,x,y,z,x,y,z,x,y,z,x,y,z),(dp(18),C,L(3)), slpalg{n_Q}[x, y, z]) julia> p = (1 + x*z + y)^2 x*z*x*z + x*z*y + y*x*z + y^2 + 2*x*z + 2*y + 1 @@ -241,7 +241,7 @@ julia> show(collect(exponent_words(p))) [[1, 3, 1, 3], [1, 3, 2], [2, 1, 3], [2, 2], [1, 3], [2], Int64[]] julia> B = MPolyBuildCtx(R) -Builder for an element of Singular letterplace Ring (QQ),(x,y,z,x,y,z,x,y,z,x,y,z,x,y,z,x,y,z),(dp(18),C,L(3)) +Builder for an element of Singular letterplace ring (QQ),(x,y,z,x,y,z,x,y,z,x,y,z,x,y,z,x,y,z),(dp(18),C,L(3)) julia> push_term!(B, QQ(2), [3,2,1,3]); diff --git a/docs/src/resolution.md b/docs/src/resolution.md index d0c4a900f..626c197a2 100644 --- a/docs/src/resolution.md +++ b/docs/src/resolution.md @@ -108,8 +108,7 @@ julia> I = Ideal(R, w^2 - x*z, w*x - y*z, x^2 - w*y, x*y - z^2, y^2 - w*z) Singular ideal over Singular polynomial ring (QQ),(w,x,y,z),(dp(4),C) with generators (w^2 - x*z, w*x - y*z, x^2 - w*y, x*y - z^2, y^2 - w*z) julia> F = fres(std(I), 0) -Singular Resolution: -R^1 <- R^5 <- R^6 <- R^2 +Singular resolution: R^1 <- R^5 <- R^6 <- R^2 julia> n = length(F) 3 @@ -134,12 +133,10 @@ julia> I = Ideal(R, w^2 - x*z, w*x - y*z, x^2 - w*y, x*y - z^2, y^2 - w*z) Singular ideal over Singular polynomial ring (QQ),(w,x,y,z),(dp(4),C) with generators (w^2 - x*z, w*x - y*z, x^2 - w*y, x*y - z^2, y^2 - w*z) julia> F = fres(std(I), 3) -Singular Resolution: -R^1 <- R^5 <- R^6 <- R^2 +Singular resolution: R^1 <- R^5 <- R^6 <- R^2 julia> M = minres(F) -Singular Resolution: -R^1 <- R^5 <- R^5 <- R^1 +Singular resolution: R^1 <- R^5 <- R^5 <- R^1 julia> B = betti(M) 3×4 Matrix{Int32}: @@ -164,11 +161,9 @@ julia> I = Ideal(R, w^2 - x*z, w*x - y*z, x^2 - w*y, x*y - z^2, y^2 - w*z) Singular ideal over Singular polynomial ring (QQ),(w,x,y,z),(dp(4),C) with generators (w^2 - x*z, w*x - y*z, x^2 - w*y, x*y - z^2, y^2 - w*z) julia> F = fres(std(I), 3) -Singular Resolution: -R^1 <- R^5 <- R^6 <- R^2 +Singular resolution: R^1 <- R^5 <- R^6 <- R^2 julia> M = minres(F) -Singular Resolution: -R^1 <- R^5 <- R^5 <- R^1 +Singular resolution: R^1 <- R^5 <- R^5 <- R^1 ``` diff --git a/docs/src/transExt.md b/docs/src/transExt.md index cd5458a33..eb001d67c 100644 --- a/docs/src/transExt.md +++ b/docs/src/transExt.md @@ -60,13 +60,13 @@ Coerce a Flint integer value into the field. ```jldoctest julia> F1, (a, b, c) = FunctionField(QQ, ["a", "b", "c"]) -(Function Field over Rational Field with transcendence basis n_transExt[a, b, c], n_transExt[a, b, c]) +(Function field over Rational field with transcendence basis n_transExt[a, b, c], n_transExt[a, b, c]) julia> x1 = a*b + c a*b + c julia> F2, (a1, a2, a3) = FunctionField(Fp(5), 3) -(Function Field over Finite Field of Characteristic 5 with transcendence basis n_transExt[a1, a2, a3], n_transExt[a1, a2, a3]) +(Function field over Finite field of characteristic 5 with transcendence basis n_transExt[a1, a2, a3], n_transExt[a1, a2, a3]) julia> x2 = a1^5 + a2*a3^4 a1^5 + a2*a3^4 @@ -98,7 +98,7 @@ n_transExt_to_spoly(x::n_transExt; parent::PolyRing) ```jldoctest julia> F1, (a, b, c) = FunctionField(QQ, ["a", "b", "c"]) -(Function Field over Rational Field with transcendence basis n_transExt[a, b, c], n_transExt[a, b, c]) +(Function field over Rational field with transcendence basis n_transExt[a, b, c], n_transExt[a, b, c]) julia> x = F1(5)*a 5*a @@ -122,7 +122,7 @@ julia> p = n_transExt_to_spoly(y, parent_ring = S) a^2*b + a*b + b^2 julia> F2, = FunctionField(Fp(7), 4) -(Function Field over Finite Field of Characteristic 7 with transcendence basis n_transExt[a1, a2, a3, a4], n_transExt[a1, a2, a3, a4]) +(Function field over Finite field of characteristic 7 with transcendence basis n_transExt[a1, a2, a3, a4], n_transExt[a1, a2, a3, a4]) julia> B = transcendence_basis(F2) 4-element Vector{n_transExt}: diff --git a/docs/src/vector.md b/docs/src/vector.md index 9b7ff9eb6..792f8b75e 100644 --- a/docs/src/vector.md +++ b/docs/src/vector.md @@ -71,7 +71,7 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y]) julia> M = FreeModule(R, 3) -Free Module of rank 3 over Singular polynomial ring (QQ),(x,y),(dp(2),C) +Free module of rank 3 over Singular polynomial ring (QQ),(x,y),(dp(2),C) julia> v2 = M([x + 1, x*y + 1, y]) x*y*gen(2)+x*gen(1)+y*gen(3)+gen(2)+gen(1) @@ -98,7 +98,7 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"]) (Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y]) julia> M = FreeModule(R, 5) -Free Module of rank 5 over Singular polynomial ring (QQ),(x,y),(dp(2),C) +Free module of rank 5 over Singular polynomial ring (QQ),(x,y),(dp(2),C) julia> v = gens(M) 5-element Vector{svector{spoly{n_Q}}}: diff --git a/src/ideal/ideal.jl b/src/ideal/ideal.jl index 07fb2c151..168ef760a 100644 --- a/src/ideal/ideal.jl +++ b/src/ideal/ideal.jl @@ -948,7 +948,7 @@ julia> I = Ideal(R, x^2*y + 2y + 1, y^2 + 1) Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x^2*y + 2*y + 1, y^2 + 1) julia> F = syz(I) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x^2*y*gen(2)-y^2*gen(1)+2*y*gen(2)+gen(2)-gen(1) julia> M = Singular.Matrix(I) diff --git a/src/module/module.jl b/src/module/module.jl index 21ecdcc47..a2de68882 100644 --- a/src/module/module.jl +++ b/src/module/module.jl @@ -145,7 +145,7 @@ julia> M1 = Singular.Module(R, v1, v2); julia> M2 = Singular.Module(R, v2, v3); julia> M3 = intersection(M1, M2) -Singular Module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with Generators: +Singular module over Singular polynomial ring (QQ),(x,y),(dp(2),C), with generators: x^2*gen(1)+x*gen(3)+2*x*gen(2)+3*y*gen(2)+gen(1) julia> ngens(M3)