# Affine Varieties

An affine variety is an algebraic set such that $X(K)$ is irreducible for $k \subseteq K$ an algebraic closure. See Affine Algebraic Sets.

In Oscar varieties are implemented as special instances of Affine schemes and more formally defined as follows.

AbsAffineVarietyType
AbsAffineVariety <: AbsAffineAlgebraicSet

An affine, geometrically integral subscheme of an affine space over a field.

source

Functionality which is not (yet) provided by a variety-specific implementation, falls back to the appropriate functionality of schemes.

## Constructors

varietyMethod
variety(I::MPolyIdeal; check=true) -> AffineVariety

Return the affine variety defined by the ideal $I$.

By our convention, varieties are absolutely irreducible. Hence we check that the radical of $I$ is prime and stays prime when viewed over the algebraic closure. This is an expensive check that can be disabled.

julia> R, (x,y) = QQ[:x,:y]
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])

julia> variety(ideal([x,y]))
Affine variety
in affine 2-space over QQ with coordinates [x, y]
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.

julia> R, (x,y) = GF(2)[:x,:y];

julia> variety(x^3+y+1, check=false)
Affine variety
in affine 2-space over GF(2) with coordinates [x, y]
defined by ideal (x^3 + y + 1)

source
varietyMethod
variety(X::AbsAffineScheme; is_reduced::false, check::Bool=true) -> AffineVariety

Convert $X$ to an affine variety.

If is_reduced is set, assume that X is already reduced.

source
varietyMethod
variety(R::Ring; check=true)

Return the affine variety with coordinate ring R.

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.

julia> R, (x,y) = QQ[:x,:y];

julia> Q,_ = quo(R,ideal([x,y]));

julia> variety(Q)
Affine variety
in affine 2-space over QQ with coordinates [x, y]
defined by ideal (x, y)

source

## Attributes

So far all are inherited from Affine Algebraic Sets and Affine schemes.

## Properties

So far all are inherited from Affine Algebraic Sets and Affine schemes.

## Methods

So far all are inherited from Affine Algebraic Sets and Affine schemes.