Skip to content

Commit

Permalink
Plane curves (oscar-system#2988)
Browse files Browse the repository at this point in the history
* plane curves as algebraic sets, remove exports for the old plane curves 

* Support radical membership for flattenings.

* Rework generation of charts.

* Add tests for projective schemes with empty charts.

* Remove deprecated call from ideal sheaves.

* Rework the homogenization and dehomogenization maps.


---------

Co-authored-by: Max Horn <max@quendi.de>
Co-authored-by: Matthias Zach <zach@math.uni-hannover.de>
  • Loading branch information
3 people committed Nov 15, 2023
1 parent dbe16ab commit acc729d
Show file tree
Hide file tree
Showing 48 changed files with 2,023 additions and 527 deletions.
4 changes: 3 additions & 1 deletion docs/doc.main
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@
"AlgebraicGeometry/TropicalGeometry/curve.md",
],
"Curves" => [
"AlgebraicGeometry/Curves/para_rational_curves.md",
"AlgebraicGeometry/Curves/AffinePlaneCurves.md",
"AlgebraicGeometry/Curves/ProjectiveCurves.md",
"AlgebraicGeometry/Curves/ProjectivePlaneCurves.md",
],
"Surfaces" => [
"AlgebraicGeometry/Surfaces/K3Surfaces.md",
Expand Down
16 changes: 16 additions & 0 deletions docs/src/AlgebraicGeometry/Curves/AffinePlaneCurves.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```@meta
CurrentModule = Oscar
```

# Affine plane curves

```@docs
AffinePlaneCurve
defining_equation(C::AffinePlaneCurve{S, MPolyQuoRing{E}}) where {S, E}
common_components(C::S, D::S) where {S<:AffinePlaneCurve}
multiplicity(C::AffinePlaneCurve, P::AbsAffineRationalPoint)
tangent_lines(C::AffinePlaneCurve, P::AbsAffineRationalPoint)
intersection_multiplicity(C::AffinePlaneCurve, D::AffinePlaneCurve, P::AbsAffineRationalPoint)
is_transverse_intersection(C::AffinePlaneCurve, D::AffinePlaneCurve, P::AbsAffineRationalPoint)
projective_closure(C::AffinePlaneCurve)
```
10 changes: 10 additions & 0 deletions docs/src/AlgebraicGeometry/Curves/ProjectiveCurves.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
```@meta
CurrentModule = Oscar
```

# Projective Curves

```@docs
ProjectiveCurve
invert_birational_map
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
```@meta
CurrentModule = Oscar
```
# Projective Plane Curves
```@docs
ProjectivePlaneCurve
```

Projective plane curves are modeled in Oscar as projective
algebraic sets. See `AbsProjectiveAlgebraicSet`(@ref).
In addition to the methods for algebraic sets
the following methods special to plane curves are available.

```@docs
defining_equation(C::ProjectivePlaneCurve{S,MPolyQuoRing{T}}) where {S,T}
degree(C::ProjectivePlaneCurve)
common_components(C::S, D::S) where {S<:ProjectivePlaneCurve}
multiplicity(C::ProjectivePlaneCurve, P::AbsProjectiveRationalPoint)
tangent_lines(C::ProjectivePlaneCurve, P::AbsProjectiveRationalPoint)
intersection_multiplicity(C::S, D::S, P::AbsProjectiveRationalPoint) where S <: ProjectivePlaneCurve
is_transverse_intersection(C::S, D::S, P::AbsProjectiveRationalPoint) where S <: ProjectivePlaneCurve
arithmetic_genus(C::ProjectivePlaneCurve)
geometric_genus(C::AbsProjectiveCurve)
```

# Rational Parametrizations of Rational Plane Curves

Expand Down Expand Up @@ -48,36 +69,24 @@ curves only once. Its individual steps are interesting in their own right:

See [Bhm99](@cite) and [BDLP17](@cite) for details and further references.

## Creating Projective Plane Curves

The data structures for algebraic curves in OSCAR are still under development
and subject to change. Here is the current constructor for projective plane curves:

```@docs
ProjPlaneCurve(f::MPolyRingElem{T}) where {T <: FieldElem}
```

## The Genus of a Plane Curve

```@docs
geometric_genus(C::ProjectivePlaneCurve{T}) where T <: FieldElem
```

## Adjoint Ideals of Plane Curves

```@docs
adjoint_ideal(C::ProjPlaneCurve{QQFieldElem})
adjoint_ideal(C::ProjectivePlaneCurve{QQField})
```

## Rational Points on Conics

```@docs
rational_point_conic(D::ProjPlaneCurve{QQFieldElem})
rational_point_conic(D::ProjectivePlaneCurve{QQField})
```
## Parametrizing Rational Plane Curves

```@docs
parametrization_plane_curve(C::ProjPlaneCurve{QQFieldElem})
parametrization(C::ProjectivePlaneCurve{QQField})
```


Expand Down
1 change: 0 additions & 1 deletion docs/src/AlgebraicGeometry/Schemes/ProjectiveSchemes.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ To facilitate the interplay between an `AbsProjectiveScheme` and the affine char
`covered_scheme` we provide the following methods:
```@docs
dehomogenization_map(X::AbsProjectiveScheme, U::AbsSpec)
dehomogenization_map(X::AbsProjectiveScheme, i::Int)
homogenization_map(P::AbsProjectiveScheme, U::AbsSpec)
```

Expand Down
1 change: 1 addition & 0 deletions experimental/Experimental.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ include("Schemes/ToricBlowups/attributes.jl")
include("Schemes/ToricBlowups/methods.jl")

include("ExteriorAlgebra/ExteriorAlgebra.jl")

2 changes: 1 addition & 1 deletion experimental/PlaneCurve/docs/src/divisors.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```@meta
CurrentModule = Oscar
CurrentModule = Oscar.PlaneCurveModule
```

# Divisors
Expand Down
6 changes: 3 additions & 3 deletions experimental/PlaneCurve/docs/src/elliptic_curves.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```@meta
CurrentModule = Oscar
CurrentModule = Oscar.PlaneCurveModule
DocTestSetup = quote
using Oscar
end
Expand Down Expand Up @@ -43,7 +43,7 @@ Addition and multiplication by an integer of a point on an elliptic curve can be

#### Example

```jldoctest
```julia
julia> T, (x, y, z) = graded_polynomial_ring(QQ, ["x", "y", "z"])
(Graded multivariate polynomial ring in 3 variables over QQ, MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[x, y, z])

Expand Down Expand Up @@ -107,7 +107,7 @@ rand_pair_EllCurve_Point(R::Oscar.MPolyDecRing{S}, PP::Oscar.Geometry.ProjSpc{S}

Projective elliptic curves over a ring are for example used in the Elliptic Curve Method. We give here an example (see Example 7.1 of [Was08](@cite)) on how to use the previous functions to apply it.

```jldoctest
```julia
julia> n = 4453
4453

Expand Down
2 changes: 1 addition & 1 deletion experimental/PlaneCurve/docs/src/non_plane_curves.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```@meta
CurrentModule = Oscar
CurrentModule = Oscar.PlaneCurveModule
```


Expand Down
6 changes: 3 additions & 3 deletions experimental/PlaneCurve/docs/src/plane_curves.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```@meta
CurrentModule = Oscar
CurrentModule = Oscar.PlaneCurveModule
DocTestSetup = quote
using Oscar
end
Expand Down Expand Up @@ -72,7 +72,7 @@ in(P::Point{S}, C::AffinePlaneCurve{S}) where S <: FieldElem
In order to define a point in the projective plane, one needs first to define
the projective plane as follows, where `K` is the base ring:

```jldoctest plane_curves
```julia plane_curves
julia> K = QQ
Rational field

Expand All @@ -83,7 +83,7 @@ julia> PP = proj_space(K, 2)

Then, one can define a projective point as follows:

```jldoctest plane_curves
```julia plane_curves
julia> P = Oscar.Geometry.ProjSpcElem(PP[1], [QQ(1), QQ(2), QQ(-5)])
(1 : 2 : -5)

Expand Down
66 changes: 33 additions & 33 deletions experimental/PlaneCurve/src/AffinePlaneCurve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export tangent_lines
Throw an error if `P` is not a point of `C`, return `false` if `P` is a singular point of `C`, and `true` if `P` is a smooth point of `C`.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
Expand Down Expand Up @@ -63,7 +63,7 @@ end
Return the tangent of `C` at `P` when `P` is a smooth point of `C`, and throw an error otherwise.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
Expand Down Expand Up @@ -102,7 +102,7 @@ end
Return the affine plane curve consisting of the common component of `C` and `D`, or an empty vector if they do not have a common component.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
Expand Down Expand Up @@ -138,7 +138,7 @@ end
Return a list whose first element is the affine plane curve defined by the gcd of `C.eq` and `D.eq`, the second element is the list of the remaining intersection points when the common components are removed from `C` and `D`.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
Expand Down Expand Up @@ -231,14 +231,14 @@ end
Return the reduced singular locus of `C` as a list whose first element is the affine plane curve consisting of the singular components of `C` (if any), and the second element is the list of the isolated singular points (which may be contained in the singular component). The singular component might not contain any point over the considered field.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> C = AffinePlaneCurve(x^2*(x+y)*(y^3-x^2))
julia> C = PlaneCurveModule.AffinePlaneCurve(x^2*(x+y)*(y^3-x^2))
Affine plane curve defined by -x^5 - x^4*y + x^3*y^3 + x^2*y^4
julia> curve_singular_locus(C)
julia> PlaneCurveModule.curve_singular_locus(C)
2-element Vector{Vector}:
AffinePlaneCurve[Affine plane curve defined by x]
Point[Point with coordinates QQFieldElem[-1, 1], Point with coordinates QQFieldElem[0, 0]]
Expand Down Expand Up @@ -317,17 +317,17 @@ end
Return the multiplicity of `C` at `P`.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> C = AffinePlaneCurve(x^2*(x+y)*(y^3-x^2))
julia> C = PlaneCurveModule.AffinePlaneCurve(x^2*(x+y)*(y^3-x^2))
Affine plane curve defined by -x^5 - x^4*y + x^3*y^3 + x^2*y^4
julia> P = Point([QQ(2), QQ(-2)])
julia> P = PlaneCurveModule.Point([QQ(2), QQ(-2)])
Point with coordinates QQFieldElem[2, -2]
julia> multiplicity(C, P)
julia> PlaneCurveModule.multiplicity(C, P)
1
```
"""
Expand All @@ -353,17 +353,17 @@ end
Return the tangent lines at `P` to `C` with their multiplicity.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> C = AffinePlaneCurve(x^2*(x+y)*(y^3-x^2))
julia> C = PlaneCurveModule.AffinePlaneCurve(x^2*(x+y)*(y^3-x^2))
Affine plane curve defined by -x^5 - x^4*y + x^3*y^3 + x^2*y^4
julia> P = Point([QQ(0), QQ(0)])
julia> P = PlaneCurveModule.Point([QQ(0), QQ(0)])
Point with coordinates QQFieldElem[0, 0]
julia> tangent_lines(C, P)
julia> PlaneCurveModule.tangent_lines(C, P)
Dict{AffinePlaneCurve{QQFieldElem}, Int64} with 2 entries:
x => 4
x + y => 1
Expand Down Expand Up @@ -418,20 +418,20 @@ end
Return the intersection multiplicity of `C` and `D` at `P`.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> C = AffinePlaneCurve((x^2+y^2)*(x^2 + y^2 + 2*y))
julia> C = PlaneCurveModule.AffinePlaneCurve((x^2+y^2)*(x^2 + y^2 + 2*y))
Affine plane curve defined by x^4 + 2*x^2*y^2 + 2*x^2*y + y^4 + 2*y^3
julia> D = AffinePlaneCurve((x^2+y^2)*(y^3*x^6 - y^6*x^2))
julia> D = PlaneCurveModule.AffinePlaneCurve((x^2+y^2)*(y^3*x^6 - y^6*x^2))
Affine plane curve defined by x^8*y^3 + x^6*y^5 - x^4*y^6 - x^2*y^8
julia> Q = Point([QQ(0), QQ(-2)])
julia> Q = PlaneCurveModule.Point([QQ(0), QQ(-2)])
Point with coordinates QQFieldElem[0, -2]
julia> intersection_multiplicity(C, D, Q)
julia> PlaneCurveModule.intersection_multiplicity(C, D, Q)
2
```
"""
Expand All @@ -454,26 +454,26 @@ end
Return `true` if `C` and `D` intersect transversally at `P` and `false` otherwise.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> C = AffinePlaneCurve(x*(x+y))
julia> C = PlaneCurveModule.AffinePlaneCurve(x*(x+y))
Affine plane curve defined by x^2 + x*y
julia> D = AffinePlaneCurve((x-y)*(x-2))
julia> D = PlaneCurveModule.AffinePlaneCurve((x-y)*(x-2))
Affine plane curve defined by x^2 - x*y - 2*x + 2*y
julia> P = Point([QQ(0), QQ(0)])
julia> P = PlaneCurveModule.Point([QQ(0), QQ(0)])
Point with coordinates QQFieldElem[0, 0]
julia> Q = Point([QQ(2), QQ(-2)])
julia> Q = PlaneCurveModule.Point([QQ(2), QQ(-2)])
Point with coordinates QQFieldElem[2, -2]
julia> aretransverse(C, D, P)
julia> PlaneCurveModule.aretransverse(C, D, P)
false
julia> aretransverse(C, D, Q)
julia> PlaneCurveModule.aretransverse(C, D, Q)
true
```
"""
Expand All @@ -490,14 +490,14 @@ end
Return `true` if `C` has no singular point, and `false` otherwise.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> C = AffinePlaneCurve(x*(x+y))
julia> C = PlaneCurveModule.AffinePlaneCurve(x*(x+y))
Affine plane curve defined by x^2 + x*y
julia> is_smooth_curve(C)
julia> PlaneCurveModule.is_smooth_curve(C)
false
```
"""
Expand Down Expand Up @@ -534,14 +534,14 @@ end
Return the geometric genus of the projective closure of `C`.
# Examples
```jldoctest
```julia
julia> R, (x, y) = polynomial_ring(GF(7), ["x", "y"])
(Multivariate polynomial ring in 2 variables over GF(7), fpMPolyRingElem[x, y])
julia> C = AffinePlaneCurve(y^9 - x^2*(x-1)^9)
julia> C = PlaneCurveModule.AffinePlaneCurve(y^9 - x^2*(x-1)^9)
Affine plane curve defined by 6*x^11 + 2*x^10 + 6*x^9 + x^4 + 5*x^3 + x^2 + y^9
julia> geometric_genus(C)
julia> PlaneCurveModule.geometric_genus(C)
0
```
"""
Expand Down
Loading

0 comments on commit acc729d

Please sign in to comment.