From 833e4bec15e1b3942c25c20bf9657deea9dae3d3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 16 Sep 2024 11:25:06 +0200 Subject: [PATCH] Disable caching in projective_space and affine_space methods --- .../Schemes/AffineSchemes/Objects/Constructors.jl | 8 ++++---- .../Schemes/ProjectiveSchemes/Objects/Constructors.jl | 4 ++-- .../Schemes/ProjectiveVariety/Objects/Constructors.jl | 4 ++-- test/AlgebraicGeometry/Schemes/AffineRationalPoint.jl | 4 +--- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Constructors.jl b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Constructors.jl index be21f3b1e6c7..2d2c7556d65c 100644 --- a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Constructors.jl @@ -176,7 +176,7 @@ with coordinates [y1, y2, y3, y4, y5] ``` """ function affine_space(kk::BRT, n::Int; variable_name="x") where {BRT<:Ring} - R, _ = polynomial_ring(kk, [variable_name * "$i" for i in 1:n]) + R, _ = polynomial_ring(kk, [variable_name * "$i" for i in 1:n]; cached=false) return spec(R) end @@ -207,17 +207,17 @@ with coordinates [x, y, z] ``` """ function affine_space(kk::BRT, var_names::AbstractVector{<:VarName}) where {BRT<:Ring} - R, _ = polynomial_ring(kk, var_names) + R, _ = polynomial_ring(kk, var_names; cached=false) return spec(R) end function affine_space(kk::BRT, n::Int; variable_name="x") where {BRT<:Field} - R, _ = polynomial_ring(kk, [variable_name * "$i" for i in 1:n]) + R, _ = polynomial_ring(kk, [variable_name * "$i" for i in 1:n]; cached=false) return variety(spec(R), check=false) end function affine_space(kk::BRT, var_names::AbstractVector{<:VarName}) where {BRT<:Field} - R, _ = polynomial_ring(kk, var_names) + R, _ = polynomial_ring(kk, var_names; cached=false) return variety(spec(R), check=false) end diff --git a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Constructors.jl b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Constructors.jl index 4ce4534c1b29..66dc4ea17ec1 100644 --- a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Constructors.jl @@ -89,7 +89,7 @@ Multivariate polynomial ring in 3 variables over QQ graded by """ function projective_space(A::Ring, var_symb::Vector{<:VarName}) n = length(var_symb) - S, _ = graded_polynomial_ring(A, Symbol.(var_symb)) + S, _ = graded_polynomial_ring(A, Symbol.(var_symb); cached=false) return proj(S) end @@ -100,7 +100,7 @@ Create the (relative) projective space `Proj(A[s₀,…,sᵣ])` over `A` where `s` is a string for the variable names. """ function projective_space(A::Ring, r::Int; var_name::VarName=:s) - S, _ = graded_polynomial_ring(A, [Symbol(var_name, i) for i in 0:r]) + S, _ = graded_polynomial_ring(A, [Symbol(var_name, i) for i in 0:r]; cached=false) return proj(S) end diff --git a/src/AlgebraicGeometry/Schemes/ProjectiveVariety/Objects/Constructors.jl b/src/AlgebraicGeometry/Schemes/ProjectiveVariety/Objects/Constructors.jl index 7db8c20fca6a..5c9e8eb59b84 100644 --- a/src/AlgebraicGeometry/Schemes/ProjectiveVariety/Objects/Constructors.jl +++ b/src/AlgebraicGeometry/Schemes/ProjectiveVariety/Objects/Constructors.jl @@ -94,7 +94,7 @@ end function projective_space(A::Field, var_symb::Vector{VarName}) n = length(var_symb) - S, _ = graded_polynomial_ring(A, var_symb) + S, _ = graded_polynomial_ring(A, var_symb; cached=false) return variety(proj(S), check=false) end @@ -104,6 +104,6 @@ function projective_space( r::Int; var_name::VarName=:s ) where {CoeffRingType<:Field} - S, _ = graded_polynomial_ring(A, [Symbol(var_name,i) for i in 0:r]) + S, _ = graded_polynomial_ring(A, [Symbol(var_name,i) for i in 0:r]; cached=false) return variety(proj(S), check=false) end diff --git a/test/AlgebraicGeometry/Schemes/AffineRationalPoint.jl b/test/AlgebraicGeometry/Schemes/AffineRationalPoint.jl index d9678169affc..ed26f021e431 100644 --- a/test/AlgebraicGeometry/Schemes/AffineRationalPoint.jl +++ b/test/AlgebraicGeometry/Schemes/AffineRationalPoint.jl @@ -6,6 +6,7 @@ pX = X([1,0]) pA = A2(pX) @test pX == pA + @test A2([1,0]) == pA # ring around the rosie once @test pX == X(rational_point_coordinates(defining_ideal(scheme(pX)))) Oscar.closed_embedding(pA) @@ -13,9 +14,6 @@ @test dim(tangent_space(pX))==1 @test dim(tangent_space(pA))==2 - A2a = affine_space(GF(2), [:x, :y]); - @test A2a([1,0]) == pA - @test pX in X @test pA in X @test codomain(pX)===X