From 59b30e56851b0d79048a7da6c53760a5c63bb31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 27 Sep 2024 15:44:17 +0200 Subject: [PATCH] more trivial cases --- .../Schemes/AffineSchemes/Objects/Methods.jl | 2 +- .../CoveredSchemes/Objects/Constructors.jl | 2 +- .../Schemes/CoveredSchemes/Objects/Methods.jl | 4 ++-- src/Rings/FreeAssociativeAlgebraIdeal.jl | 4 ++-- src/Rings/PBWAlgebra.jl | 24 +++++++++---------- .../Schemes/BlowupMorphism.jl | 4 ++-- .../Schemes/CartierDivisor.jl | 2 +- .../Schemes/CoherentSheaves.jl | 6 ++--- .../Schemes/CoveredScheme.jl | 2 +- .../Schemes/FunctionFields.jl | 4 ++-- .../ToricVarieties/toric_schemes.jl | 4 ++-- test/Rings/FreeAssociativeAlgebraIdeal.jl | 12 +++++----- test/Rings/PBWAlgebra.jl | 10 ++++---- 13 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Methods.jl b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Methods.jl index 51d51eeb2371..4dd9d7a816e5 100644 --- a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Methods.jl +++ b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Methods.jl @@ -187,7 +187,7 @@ Returns whether the scheme ``X`` is normal. # Examples ```jldoctest -julia> R, (x, y, z) = rational_field()["x", "y", "z"]; +julia> R, (x, y, z) = QQ[:x, :y, :z]; julia> X = spec(R); diff --git a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Constructors.jl b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Constructors.jl index 6a766f546fe4..113ccd7eb5bb 100644 --- a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Constructors.jl @@ -85,7 +85,7 @@ X_i \to X``, where ``X`` is the disjoint union of the covered schemes # Examples ```jldoctest -julia> R_1, (x, y, z) = grade(rational_field()["x", "y", "z"][1]); +julia> R_1, (x, y, z) = graded_polynomial_ring(QQ, [:x, :y, :z]); julia> I_1 = ideal(R_1, z*x^2 + y^3); diff --git a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Methods.jl b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Methods.jl index 49c8ed6d18c3..ccf4b01222d3 100644 --- a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Methods.jl +++ b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Methods.jl @@ -168,7 +168,7 @@ Returns whether the scheme ``X`` is normal. # Examples ```jldoctest -julia> R, (x, y, z) = rational_field()["x", "y", "z"]; +julia> R, (x, y, z) = QQ[:x, :y, :z]; julia> X = covered_scheme(spec(R)); @@ -204,7 +204,7 @@ of non-integral schemes. # Examples ```jldoctest -julia> R, (x, y, z) = grade(rational_field()["x", "y", "z"][1]); +julia> R, (x, y, z) = graded_polynomial_ring(QQ, [:x, :y, :z]); julia> I = ideal(R, z*x^2 + y^3); diff --git a/src/Rings/FreeAssociativeAlgebraIdeal.jl b/src/Rings/FreeAssociativeAlgebraIdeal.jl index 3235790d065b..3547db25a148 100644 --- a/src/Rings/FreeAssociativeAlgebraIdeal.jl +++ b/src/Rings/FreeAssociativeAlgebraIdeal.jl @@ -99,7 +99,7 @@ Otherwise, returning `false` indicates an inconclusive answer, but larger `deg_b If `deg_bound` is not specified, the default value is `-1`, which means that no degree bound is imposed, resulting in a calculation using a much slower algorithm that may not terminate, but will return a full Groebner basis if it does. ```jldoctest -julia> free, (x,y,z) = free_associative_algebra(QQ, ["x", "y", "z"]); +julia> free, (x,y,z) = free_associative_algebra(QQ, [:x, :y, :z]); julia> f1 = x*y + y*z; @@ -163,7 +163,7 @@ The default value of `deg_bound` is `-1`, which means that no degree bound is imposed, resulting in a computation that is usually slower, but will return a full Groebner basis if there exists a finite one. ```jldoctest -julia> free, (x,y,z) = free_associative_algebra(QQ, ["x", "y", "z"]); +julia> free, (x,y,z) = free_associative_algebra(QQ, [:x, :y, :z]); julia> f1 = x*y + y*z; diff --git a/src/Rings/PBWAlgebra.jl b/src/Rings/PBWAlgebra.jl index 3269deaab922..abae856a2148 100644 --- a/src/Rings/PBWAlgebra.jl +++ b/src/Rings/PBWAlgebra.jl @@ -499,7 +499,7 @@ The generators of the returned algebra print according to the entries of `xs`. S # Examples ```jldoctest -julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]) +julia> D, (x, y, dx, dy) = weyl_algebra(QQ, [:x, :y]) (Weyl-algebra over Rational field in variables (x, y), PBWAlgElem{QQFieldElem, Singular.n_Q}[x, y, dx, dy]) julia> dx*x @@ -548,7 +548,7 @@ Return the opposite algebra of `A`. # Examples ```jldoctest -julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]) +julia> D, (x, y, dx, dy) = weyl_algebra(QQ, [:x, :y]) (Weyl-algebra over Rational field in variables (x, y), PBWAlgElem{QQFieldElem, Singular.n_Q}[x, y, dx, dy]) julia> Dop, opp = opposite_algebra(D); @@ -743,7 +743,7 @@ Return `true` if `I` is the zero ideal, `false` otherwise. # Examples ```jldoctest -julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]) +julia> D, (x, y, dx, dy) = weyl_algebra(QQ, [:x, :y]) (Weyl-algebra over Rational field in variables (x, y), PBWAlgElem{QQFieldElem, Singular.n_Q}[x, y, dx, dy]) julia> I = left_ideal(D, [x, dx]) @@ -773,7 +773,7 @@ Return `true` if `I` is generated by `1`, `false` otherwise. # Examples ```jldoctest -julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]) +julia> D, (x, y, dx, dy) = weyl_algebra(QQ, [:x, :y]) (Weyl-algebra over Rational field in variables (x, y), PBWAlgElem{QQFieldElem, Singular.n_Q}[x, y, dx, dy]) julia> I = left_ideal(D, [x, dx]) @@ -796,7 +796,7 @@ true ``` ```jldoctest -julia> D, (x, y, dx, dy) = weyl_algebra(GF(3), ["x", "y"]); +julia> D, (x, y, dx, dy) = weyl_algebra(GF(3), [:x, :y]); julia> I = two_sided_ideal(D, [x^3]) two_sided_ideal(x^3) @@ -860,7 +860,7 @@ or `I` and `J` are a left and a right ideal, respectively, return the product of # Examples ```jldoctest -julia> D, (x, y, dx, dy) = weyl_algebra(GF(3), ["x", "y"]); +julia> D, (x, y, dx, dy) = weyl_algebra(GF(3), [:x, :y]); julia> I = left_ideal(D, [x^3+y^3, x*y^2]) left_ideal(x^3 + y^3, x*y^2) @@ -886,7 +886,7 @@ Given a two_sided ideal `I`, return the `k`-th power of `I`. # Examples ```jldoctest -julia> D, (x, dx) = weyl_algebra(GF(3), ["x"]); +julia> D, (x, dx) = weyl_algebra(GF(3), [:x]); julia> I = two_sided_ideal(D, [x^3]) two_sided_ideal(x^3) @@ -925,7 +925,7 @@ Return the intersection of two or more ideals. # Examples ```jldoctest -julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]); +julia> D, (x, y, dx, dy) = weyl_algebra(QQ, [:x, :y]); julia> I = intersect(left_ideal(D, [x^2, x*dy, dy^2])+left_ideal(D, [dx]), left_ideal(D, [dy^2-x^3+x])) left_ideal(-x^3 + dy^2 + x) @@ -972,7 +972,7 @@ Return `true` if `f` is contained in `I`, `false` otherwise. Alternatively, use # Examples ```jldoctest -julia> D, (x, dx) = weyl_algebra(QQ, ["x"]); +julia> D, (x, dx) = weyl_algebra(QQ, [:x]); julia> I = left_ideal(D, [x*dx^4, x^3*dx^2]) left_ideal(x*dx^4, x^3*dx^2) @@ -982,7 +982,7 @@ true ``` ```jldoctest -julia> D, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]); +julia> D, (x, y, dx, dy) = weyl_algebra(QQ, [:x, :y]); julia> I = two_sided_ideal(D, [x, dx]) two_sided_ideal(x, dx) @@ -1017,7 +1017,7 @@ end Return `true` if `I` is contained in `J`, `false` otherwise. # Examples ```jldoctest -julia> D, (x, dx) = weyl_algebra(QQ, ["x"]); +julia> D, (x, dx) = weyl_algebra(QQ, [:x]); julia> I = left_ideal(D, [dx^2]) left_ideal(dx^2) @@ -1052,7 +1052,7 @@ Return `true` if `I` is equal to `J`, `false` otherwise. # Examples ```jldoctest -julia> D, (x, dx) = weyl_algebra(QQ, ["x"]); +julia> D, (x, dx) = weyl_algebra(QQ, [:x]); julia> I = left_ideal(D, [dx^2]) left_ideal(dx^2) diff --git a/test/AlgebraicGeometry/Schemes/BlowupMorphism.jl b/test/AlgebraicGeometry/Schemes/BlowupMorphism.jl index 3a8a74cb596f..bde0e9a9e913 100644 --- a/test/AlgebraicGeometry/Schemes/BlowupMorphism.jl +++ b/test/AlgebraicGeometry/Schemes/BlowupMorphism.jl @@ -18,7 +18,7 @@ end @testset "strict transforms of cartier divisors" begin - IP2 = projective_space(QQ, ["x", "y", "z"]) + IP2 = projective_space(QQ, [:x, :y, :z]) S = ambient_coordinate_ring(IP2) (x,y,z) = gens(S) I = ideal(S, [x, y]) @@ -37,7 +37,7 @@ end end @testset "isomorphism on complement of center" begin - P = projective_space(QQ, ["x", "y", "z"]) + P = projective_space(QQ, [:x, :y, :z]) S = homogeneous_coordinate_ring(P) (x, y, z) = gens(S) II = IdealSheaf(P, [x, y]) diff --git a/test/AlgebraicGeometry/Schemes/CartierDivisor.jl b/test/AlgebraicGeometry/Schemes/CartierDivisor.jl index ce3ea584db59..d4045cfe986e 100644 --- a/test/AlgebraicGeometry/Schemes/CartierDivisor.jl +++ b/test/AlgebraicGeometry/Schemes/CartierDivisor.jl @@ -63,7 +63,7 @@ end end @testset "conversion of Cartier to Weil divisors" begin - IP2 = projective_space(QQ, ["x", "y", "z"]) + IP2 = projective_space(QQ, [:x, :y, :z]) S = homogeneous_coordinate_ring(IP2) (x,y,z) = gens(S) I = ideal(S, x^2*y^3*(x+y+z)) diff --git a/test/AlgebraicGeometry/Schemes/CoherentSheaves.jl b/test/AlgebraicGeometry/Schemes/CoherentSheaves.jl index e86251af05a5..f3a32e279bc3 100644 --- a/test/AlgebraicGeometry/Schemes/CoherentSheaves.jl +++ b/test/AlgebraicGeometry/Schemes/CoherentSheaves.jl @@ -44,7 +44,7 @@ end @testset "Pushforward of modules" begin - IP = projective_space(QQ, ["x", "y", "z"]) + IP = projective_space(QQ, [:x, :y, :z]) S = homogeneous_coordinate_ring(IP) (x,y,z) = gens(S) f = z^2 - x*y @@ -119,7 +119,7 @@ end end @testset "projectivization of vector bundles" begin - IP = projective_space(QQ, ["x", "y", "z", "w"]) + IP = projective_space(QQ, [:x, :y, :z, :w]) S = homogeneous_coordinate_ring(IP) (x,y,z,w) = gens(S) f = x^4 + y^4 + z^4 + w^4 @@ -155,7 +155,7 @@ end end @testset "direct sums of sheaves" begin - IP = projective_space(QQ, ["x", "y", "z", "w"]) + IP = projective_space(QQ, [:x, :y, :z, :w]) S = homogeneous_coordinate_ring(IP) (x, y, z, w) = gens(S) f = x^4 + y^4 + z^4 + w^4 diff --git a/test/AlgebraicGeometry/Schemes/CoveredScheme.jl b/test/AlgebraicGeometry/Schemes/CoveredScheme.jl index 988dae3b3d27..9f8c935f88fd 100644 --- a/test/AlgebraicGeometry/Schemes/CoveredScheme.jl +++ b/test/AlgebraicGeometry/Schemes/CoveredScheme.jl @@ -118,7 +118,7 @@ end @testset "closed embeddings and singular loci" begin - IP2 = projective_space(QQ, ["x", "y", "z"]) + IP2 = projective_space(QQ, [:x, :y, :z]) S = homogeneous_coordinate_ring(IP2) (x, y, z) = gens(S) f = x^2*z + y^3 - y^2*z diff --git a/test/AlgebraicGeometry/Schemes/FunctionFields.jl b/test/AlgebraicGeometry/Schemes/FunctionFields.jl index 582d4bca63fc..b99b08c09c8e 100644 --- a/test/AlgebraicGeometry/Schemes/FunctionFields.jl +++ b/test/AlgebraicGeometry/Schemes/FunctionFields.jl @@ -119,7 +119,7 @@ end end @testset "pullbacks for function fields" begin - P = projective_space(QQ, ["x", "y", "z"]) + P = projective_space(QQ, [:x, :y, :z]) (x, y, z) = gens(homogeneous_coordinate_ring(P)) Y = covered_scheme(P) II = ideal_sheaf(P, [x,y]) @@ -143,7 +143,7 @@ end end @testset "refinements" begin - P = projective_space(QQ, ["x", "y", "z"]) + P = projective_space(QQ, [:x, :y, :z]) S = homogeneous_coordinate_ring(P) (x, y, z) = gens(S) Y = covered_scheme(P) diff --git a/test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl b/test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl index 79f208686452..b723ea89f198 100644 --- a/test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl +++ b/test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl @@ -18,7 +18,7 @@ end IP1 = projective_space(NormalToricVariety, 1) - set_coordinate_names(IP1, ["x", "y"]) + set_coordinate_names(IP1, [:x, :y]) Y = IP1*IP1 @testset "Product of projective spaces" begin @@ -27,7 +27,7 @@ end IP2 = projective_space(NormalToricVariety, 2) - set_coordinate_names(IP2, ["x", "y", "z"]) + set_coordinate_names(IP2, [:x, :y, :z]) X, iso = Oscar.forget_toric_structure(IP2) @testset "Forget toric structure" begin diff --git a/test/Rings/FreeAssociativeAlgebraIdeal.jl b/test/Rings/FreeAssociativeAlgebraIdeal.jl index 62bf331d1903..1647fff4604e 100644 --- a/test/Rings/FreeAssociativeAlgebraIdeal.jl +++ b/test/Rings/FreeAssociativeAlgebraIdeal.jl @@ -1,6 +1,6 @@ @testset "FreeAssociativeAlgebraIdeal.basic" begin Zt = polynomial_ring(ZZ, :t)[1] - R, (x, y, z) = free_associative_algebra(Zt, ["x", "y", "z", "w"]) + R, (x, y, z) = free_associative_algebra(Zt, [:x, :y, :z, :w]) I = ideal(R, [x*y*x, y*z^2]) @test base_ring(I) == R for p in gens(R) @@ -9,13 +9,13 @@ end @testset "FreeAssociativeAlgebraIdeal.printing" begin - R, (x, y, z) = free_associative_algebra(GF(5), ["x", "y", "z", "w"]) + R, (x, y, z) = free_associative_algebra(GF(5), [:x, :y, :z, :w]) I = ideal(R, [x*y*x, y*z^2]) @test length(string(I)) > 3 end @testset "FreeAssociativeAlgebraIdeal.membership" begin - R, (x, y, z) = free_associative_algebra(QQ, ["x", "y", "z"]) + R, (x, y, z) = free_associative_algebra(QQ, [:x, :y, :z]) I = ideal(R, [x*y - y*x, x*z - z*x]) @test !ideal_membership(x, I, 5) @test !ideal_membership(x, I, 10) @@ -34,7 +34,7 @@ end end @testset "FreeAssociativeAlgebraIdeal.utils" begin - R, (x, y, z) = free_associative_algebra(QQ, ["x", "y", "z"]) + R, (x, y, z) = free_associative_algebra(QQ, [:x, :y, :z]) I = ideal(R, [x*y - y*x, x*z - z*x]) @test base_ring(I) == R @test isa(ngens(I),Int) @@ -46,7 +46,7 @@ end @test isa(lpring,NCRing) _, (x, y, z) = Singular.FreeAlgebra(QQ, ["x", "y","z"],6) - free, _ = free_associative_algebra(QQ, ["x", "y", "z"]) + free, _ = free_associative_algebra(QQ, [:x, :y, :z]) f1 = x*y + y*z F1 = free(f1) @@ -54,7 +54,7 @@ end end @testset "FreeAssociativeAlgebraIdeal.groebner_basis" begin - free, (x,y,z) = free_associative_algebra(QQ, ["x", "y", "z"]) + free, (x,y,z) = free_associative_algebra(QQ, [:x, :y, :z]) f1 = x*y + y*z f2 = x^2 + y^2 I = ideal([f1, f2]) diff --git a/test/Rings/PBWAlgebra.jl b/test/Rings/PBWAlgebra.jl index 4723c00a9128..7b499bbe0eb8 100644 --- a/test/Rings/PBWAlgebra.jl +++ b/test/Rings/PBWAlgebra.jl @@ -65,10 +65,10 @@ end end @testset "PBWAlgebra.weyl_algebra" begin - R, (x, dx) = weyl_algebra(QQ, ["x"]) + R, (x, dx) = weyl_algebra(QQ, [:x]) @test dx*x == 1 + x*dx - R, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]) + R, (x, y, dx, dy) = weyl_algebra(QQ, [:x, :y]) @test dx*x == 1 + x*dx @test dy*y == 1 + y*dy @test dx*y == y*dx @@ -77,7 +77,7 @@ end end @testset "PBWAlgebra.opposite_algebra" begin - R, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]) + R, (x, y, dx, dy) = weyl_algebra(QQ, [:x, :y]) opR, M = opposite_algebra(R) @test M(dy*dx*x*y) == M(y)*M(x)*M(dx)*M(dy) @test inv(M)(M(x)) == x @@ -91,7 +91,7 @@ end end @testset "PBWAlgebra.ideals" begin - R, (x, y, dx, dy) = weyl_algebra(QQ, ["x", "y"]) + R, (x, y, dx, dy) = weyl_algebra(QQ, [:x, :y]) I = left_ideal([x^2, y^2]) @test length(string(I)) > 2 @@ -206,7 +206,7 @@ end @test eliminate(M.(I), M.([x, d])) == M.(left_ideal([a])) end - R, (x, dx) = weyl_algebra(QQ, ["x"]) + R, (x, dx) = weyl_algebra(QQ, [:x]) @test is_zero(eliminate(left_ideal([x*dx]), [x, dx])) @test is_one(eliminate(left_ideal([x, 1-x]), [x, dx]))