Skip to content

Commit

Permalink
Revert "Make algebraic sets and varieties internal (#2424)" (#2430)
Browse files Browse the repository at this point in the history
This reverts commit e2e2c31.
  • Loading branch information
thofma authored May 29, 2023
1 parent c3002a9 commit 27b8926
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 39 deletions.
8 changes: 8 additions & 0 deletions docs/doc.main
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@
"AlgebraicGeometry/Schemes/ProjectiveSchemes.md",
"AlgebraicGeometry/Schemes/MorphismsOfProjectiveSchemes.md",
],
"Algebraic Sets" => [
"AlgebraicGeometry/AlgebraicSets/AffineAlgebraicSet.md",
"AlgebraicGeometry/AlgebraicSets/ProjectiveAlgebraicSet.md",
],
"Algebraic Varieties" => [
"AlgebraicGeometry/AlgebraicVarieties/AffineVariety.md",
"AlgebraicGeometry/AlgebraicVarieties/ProjectiveVariety.md",
],
"Toric Varieties" => [
"AlgebraicGeometry/ToricVarieties/intro.md",
"AlgebraicGeometry/ToricVarieties/NormalToricVarieties.md",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Return the vanishing locus of ``I`` as an algebraic set.
This computes the radical of ``I`` if `check=true`.
Otherwise, Oscar takes on faith that ``I`` is radical.
```
```jldoctest
julia> R, (x,y) = GF(2)[:x,:y];
julia> X = Oscar.vanishing_locus(ideal([y^2+y+x^3+1,x]))
julia> X = vanishing_locus(ideal([y^2+y+x^3+1,x]))
Vanishing locus
in Affine 2-space over GF(2)
of ideal(x, y^2 + y + 1)
Expand All @@ -56,17 +56,17 @@ Return the vanishing locus of the multivariate polynomial `p`.
This computes the radical of ``I`` if `check=true`.
Otherwise Oscar takes on faith that ``I`` is radical.
```
```jldoctest
julia> R, (x,y) = QQ[:x,:y];
julia> X = Oscar.vanishing_locus((y^2+y+x^3+1)*x^2)
julia> X = vanishing_locus((y^2+y+x^3+1)*x^2)
Vanishing locus
in Affine 2-space over QQ
of ideal(x^4 + x*y^2 + x*y + x)
julia> R, (x,y) = GF(2)[:x,:y];
julia> X = Oscar.vanishing_locus((y^2+y+x^3+1)*x^2)
julia> X = vanishing_locus((y^2+y+x^3+1)*x^2)
Vanishing locus
in Affine 2-space over GF(2)
of ideal(x^4 + x*y^2 + x*y + x)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Return the affine variety defined by the prime ideal ``I``.
Since our varieties are irreducible, we check that ``I`` stays prime when
viewed over the algebraic closure. This is an expensive check that can be disabled.
```
```jldoctest
julia> R, (x,y) = QQ[:x,:y]
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> Oscar.affine_variety(ideal([x,y]))
julia> affine_variety(ideal([x,y]))
Affine variety
in Affine 2-space over QQ
defined by ideal(x, y)
Expand All @@ -36,10 +36,10 @@ defined by ideal(x, y)
Over fields different from `QQ`, currently, we cannot check for irreducibility
over the algebraic closure. But if you know that the ideal in question defines
a variety, you can construct it by disabling the check.
```
```jldoctest
julia> R, (x,y) = GF(2)[:x,:y];
julia> Oscar.affine_variety(x^3+y+1,check=false)
julia> affine_variety(x^3+y+1,check=false)
Affine variety
in Affine 2-space over GF(2)
defined by ideal(x^3 + y + 1)
Expand All @@ -57,12 +57,12 @@ We require that ``R`` is a finitely generated algebra over a field ``k`` and
moreover that the base change of ``R`` to the algebraic closure ``\bar k``
is an integral domain.
```
```jldoctest
julia> R, (x,y) = QQ[:x,:y];
julia> Q,_ = quo(R,ideal([x,y]));
julia> Oscar.affine_variety(Q)
julia> affine_variety(Q)
Affine variety
in Affine 2-space over QQ
defined by ideal(x, y)
Expand All @@ -78,12 +78,12 @@ Return the affine variety defined as the vanishing locus of the multivariate pol
This checks that `f` is irreducible over the algebraic closure.
```
```jldoctest
julia> A2 = affine_space(QQ,[:x,:y]);
julia> (x,y) = coordinates(A2);
julia> Oscar.affine_variety(y^2-x^3-1)
julia> affine_variety(y^2-x^3-1)
Affine variety
in Affine 2-space over QQ
defined by ideal(-x^3 + y^2 - 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Convert `X` to an `ProjectiveAlgebraicSet` by taking the underlying reduced sche
If `check=false`, assumes that `X` is already reduced.
```
```jldoctest
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)
julia> Y = Oscar.projective_algebraic_set(X)
julia> Y = projective_algebraic_set(X)
Vanishing locus
in Projective 2-space over QQ
of ideal(x2, x0*x1)
Expand All @@ -43,10 +43,10 @@ in projective space.
This computes the radical of ``I`` if `check=true`.
Otherwise Oscar takes on faith that ``I`` is radical.
```
```jldoctest
julia> P,(x0,x1) = graded_polynomial_ring(QQ,[:x0,:x1]);
julia> Oscar.vanishing_locus(ideal([x0,x1]))
julia> vanishing_locus(ideal([x0,x1]))
Vanishing locus
in Projective 1-space over QQ
of ideal(x1, x0)
Expand Down Expand Up @@ -112,20 +112,20 @@ Return the irreducible components of ``X`` defined over the base field of ``X``.
Note that even if ``X`` is irreducible, there may be several geometrically irreducible components.
```
```jldoctest
julia> P1 = projective_space(QQ,1)
Projective space of dimension 1
with homogeneous coordinates s0 s1
over Rational field
julia> (s0,s1) = homogeneous_coordinates(P1);
julia> X = Oscar.vanishing_locus((s0^2+s1^2)*s1)
julia> X = vanishing_locus((s0^2+s1^2)*s1)
Vanishing locus
in Projective 1-space over QQ
of ideal(s0^2*s1 + s1^3)
julia> (X1,X2) = Oscar.irreducible_components(X)
julia> (X1,X2) = irreducible_components(X)
2-element Vector{ProjectiveAlgebraicSet{QQField, MPolyQuoRing{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}}}:
Vanishing locus in IP^1 of ideal(s0^2 + s1^2)
Vanishing locus in IP^1 of ideal(s1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ we check that ``I`` stays prime when viewed over the algebraic closure.
This is an expensive check that can be disabled.
Note that the ideal ``I`` must live in a standard graded ring.
```
```jldoctest
julia> P3 = projective_space(QQ,3)
Projective space of dimension 3
with homogeneous coordinates s0 s1 s2 s3
over Rational field
julia> (s0,s1,s2,s3) = homogeneous_coordinates(P3);
julia> X = Oscar.projective_variety(s0^3 + s1^3 + s2^3 + s3^3)
julia> X = projective_variety(s0^3 + s1^3 + s2^3 + s3^3)
Projective variety
in Projective 3-space over QQ
defined by ideal(s0^3 + s1^3 + s2^3 + s3^3)
julia> dim(X)
2
julia> Y = Oscar.projective_variety(ideal([s0^3 + s1^3 + s2^3 + s3^3, s0]))
julia> Y = projective_variety(ideal([s0^3 + s1^3 + s2^3 + s3^3, s0]))
Projective variety
in Projective 3-space over QQ
defined by ideal(s0^3 + s1^3 + s2^3 + s3^3, s0)
Expand Down
24 changes: 12 additions & 12 deletions src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export AbsProjectiveVariety
export AbsSpec
export AbsSpecMor
export AbstractAlgebra
#export AffineAlgebraicSet
export AffineAlgebraicSet
export AffineHalfspace
export AffineHyperplane
export AffineNormalToricVariety
#export AffineVariety
export AffineVariety
export affine_normal_toric_variety
#export affine_variety
#export affine_algebraic_set
export affine_variety
export affine_algebraic_set
export AutomorphismGroup
export AutomorphismGroupElem
export BorcherdsCtx
Expand Down Expand Up @@ -138,8 +138,8 @@ export Polymake
export PrincipalOpenSubset
export ProjectiveScheme
export ProjectiveSchemeMor
#export ProjectiveVariety
#export ProjectiveAlgebraicSet
export ProjectiveVariety
export ProjectiveAlgebraicSet
export QQ
export RationalEquivalenceClass
export RayVector
Expand Down Expand Up @@ -540,7 +540,7 @@ export generic_fraction
export generic_fractions
export gens, has_gens
export gens_of_rational_equivalence_classes
#export geometric_irreducible_components
export geometric_irreducible_components
export girth
export gkz_vector
export glueing_domains
Expand Down Expand Up @@ -664,7 +664,7 @@ export invariant_symmetric_forms
export inverse
export invert
export inverted_set
#export irreducible_components
export irreducible_components
export irreducible_secondary_invariants
export irreducibles
export irrelevant_ideal
Expand Down Expand Up @@ -1108,8 +1108,8 @@ export projective_special_orthogonal_group
export projective_special_unitary_group
export projective_symplectic_group
export projective_unitary_group
#export projective_variety
#export projective_algebraic_set
export projective_variety
export projective_algebraic_set
export pullback
export pullback_type
export pyramid
Expand Down Expand Up @@ -1214,7 +1214,7 @@ export set_name!
export set_power!
export set_relative_order!
export set_relative_orders!
#export set_theoretic_intersection
export set_theoretic_intersection
export sets
export short_right_transversal
export shortest_path_dijkstra
Expand Down Expand Up @@ -1342,7 +1342,7 @@ export valuation_of_roots
export valued_weighted_degree
export vamos_matroid
export vanishing_sets
#export vanishing_locus
export vanishing_locus
export vanishing_ideal
export vdim
export vector_matrix
Expand Down
8 changes: 4 additions & 4 deletions test/AlgebraicGeometry/Schemes/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Test

include("AffineSchemes.jl")
#include("AffineVariety.jl")
#include("AffineAlgebraicSet.jl")
include("AffineVariety.jl")
include("AffineAlgebraicSet.jl")
include("CartierDivisor.jl")
include("CoveredProjectiveSchemes.jl")
include("CoveredScheme.jl")
Expand All @@ -11,9 +11,9 @@ include("FunctionFields.jl")
include("Glueing.jl")
include("IdealSheaves.jl")
include("K3.jl")
#include("ProjectiveAlgebraicSet.jl")
include("ProjectiveAlgebraicSet.jl")
include("ProjectiveSchemes.jl")
#include("ProjectiveVarieties.jl")
include("ProjectiveVarieties.jl")
include("Sheaves.jl")
include("SpaceGerms.jl")
include("SpecOpen.jl")
Expand Down

0 comments on commit 27b8926

Please sign in to comment.