This is Varieties.info, produced by Macaulay2, version 1.26.06

Varieties -- affine and projective algebraic geometry
*****************************************************

Description
===========

This package provides routines for working with affine and projective varieties
and coherent sheaves on them.

Acknowledgement
===============

Large portions of this package were originally in m2/varieties.m2. Work on the
type SheafMap, and related algorithms began at a Macaulay2
workshop (see https://aimath.org/pastworkshops/macaulay2efie.html ) at the
American Institute of Mathematics (see https://aimath.org ) in September 2023.

Contributors
============

Claudiu Raicu (see https://www3.nd.edu/~craicu/ ) contributed to the
development of this package.

See also
========

  * Schubert2 -- characteristic classes for varieties
    without equations
  * GKMVarieties -- computations with GKM manifolds
    and moment graphs
  * NormalToricVarieties -- routines for
    working with normal toric varieties and related objects
  * AbstractToricVarieties -- links
    abstract simplicial (normal) toric varieties to Schubert2
  * MultiprojectiveVarieties, --
    multi-projective varieties and multi-rational maps

Authors
=======

  * Devlin Mallory (see https://www.math.utah.edu/~malloryd/ )
    <malloryd@math.utah.edu>
  * Ritvik Ramkumar (see https://sites.google.com/view/ritvikramkumar/ )
    <ritvikr@cornell.edu>
  * Mahrud Sayrafi (see https://math.umn.edu/~mahrud/ ) <mahrud@umn.edu>
  * Gregory G. Smith (see https://www.mast.queensu.ca/~ggsmith )
    <ggsmith@mast.queensu.ca>
  * Keller VandeBogert (see https://sites.google.com/view/kellervandebogert/
    home ) <kvandebo@nd.edu>
  * John Cobb (see https://johndcobb.github.io ) <jdcobb3@gmail.com>

Version
=======

This documentation describes version 0.3 of Varieties, released 28 Feb 2025.

Citation
========

If you have used this package in your research, please cite it as follows:

+-----------------------------------------------------------------------------+
|@misc{VarietiesSource,                                                       |
|  title = {{Varieties: A \emph{Macaulay2} package. Version~0.3}},            |
|  author = {Devlin Mallory and Ritvik Ramkumar and Mahrud Sayrafi and Gregory|
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}} |
|}                                                                            |
|-----------------------------------------------------------------------------|
|G. Smith and Keller VandeBogert and John Cobb},                              |
+-----------------------------------------------------------------------------+

Exports
=======

  * Types
      * AffineVariety -- the class of all affine
        varieties
      * CoherentSheaf -- the class of all coherent
        sheaves
      * LowerBound -- the class of lower bound objects
      * ProjectiveVariety -- the class of all
        projective varieties
      * SheafMap -- the class of morphisms of coherent sheaves
      * SheafOfRings -- the class of sheaves of rings
      * SumOfTwists -- the class of all sums of twists
      * Variety -- the class of all algebraic varieties
  * Functions and commands
      * canonicalBundle -- the canonical bundle of a
        projective variety
      * cotangentSheaf -- cotangent sheaf of a
        projective variety
      * idealSheaf -- ideal sheaf of a projective variety
      * isLocallyFree -- whether a coherent sheaf is
        locally free
      * isProjective -- whether a variety is projective
      * Proj -- make a projective variety
      * sheaf -- make a coherent sheaf
      * sheafHom -- sheaf Hom
      * Spec -- make an affine variety
      * tangentSheaf -- tangent sheaf of a projective
        variety
      * "variety" -- see variety(CoherentSheaf),
        -- the underlying variety over which a
        coherent sheaf or morphism is defined.
  * Methods
      * "> InfiniteNumber" -- see > ZZ, -- greater than
      * > ZZ -- greater than
      * ">= InfiniteNumber" -- see >= ZZ, -- greater than or equal
      * ">= List" -- see >= ZZ, -- greater than or equal
      * >= ZZ -- greater than or equal
      * AffineVariety ** AffineVariety
        -- Cartesian product of two affine varieties
      * "AffineVariety ** Ring" -- see AffineVariety ** AffineVariety,
        -- Cartesian product of two affine
        varieties
      * ambient(AffineVariety) -- the
        ambient affine or projective space of an embedded variety
      * "ambient(ProjectiveVariety)" -- see ambient(AffineVariety),
        -- the ambient affine or projective space
        of an embedded variety
      * ambient(CoherentSheaf) (missing documentation)
      * ambient(SheafMap) (missing documentation)
      * annihilator(CoherentSheaf), --
        the annihilator ideal
      * betti(CoherentSheaf) (missing documentation)
      * "canonicalBundle(ProjectiveVariety)" -- see canonicalBundle,
        -- the canonical bundle of a projective variety
      * char(AffineVariety) -- the
        characteristic of the coordinate ring of a variety
      * "char(ProjectiveVariety)" -- see char(AffineVariety),
        -- the characteristic of the coordinate ring
        of a variety
      * chi(CoherentSheaf) (missing documentation)
      * codim(CoherentSheaf) -- codimension of
        the support of a coherent sheaf on a projective variety
      * codim(Variety) -- codimension of a variety
      * CoherentSheaf (*) -- sum of twists
      * "SheafOfRings (*)" -- see CoherentSheaf (*),
        -- sum of twists
      * CoherentSheaf ** CoherentSheaf
        -- tensor produce of coherent sheaves
      * CoherentSheaf ++ CoherentSheaf,
        -- direct sum of coherent sheaves
      * CoherentSheaf / CoherentSheaf, --
        quotient of coherent sheaves
      * "CoherentSheaf / Ideal" -- see CoherentSheaf / CoherentSheaf,
        -- quotient of coherent sheaves
      * CoherentSheaf == Module (missing documentation)
      * "CoherentSheaf ^ List" -- see CoherentSheaf ^ ZZ,
        -- direct sum
      * CoherentSheaf ^ ZZ -- direct sum
      * CoherentSheaf ^** ZZ -- tensor power
      * CoherentSheaf Sequence (missing documentation)
      * CoherentSheaf ZZ -- canonical twist of a
        coherent sheaf
      * "SheafOfRings ZZ" -- see CoherentSheaf ZZ, --
        canonical twist of a coherent sheaf
      * coimage(SheafMap) (missing documentation)
      * cokernel(SheafMap) (missing documentation)
      * components(CoherentSheaf) (missing documentation)
      * components(SheafMap) (missing documentation)
      * "cotangentSheaf(ProjectiveVariety)" -- see cotangentSheaf,
        -- cotangent sheaf of a projective variety
      * cotangentSheaf(ZZ,ProjectiveVariety)
        -- exterior powers of the
        cotangent sheaf of a projective variety
      * cover(CoherentSheaf) (missing documentation)
      * cover(SheafMap) (missing documentation)
      * degree(ProjectiveVariety)
      * degree(SheafMap) (missing documentation)
      * degrees(CoherentSheaf) -- degrees of
        a coherent sheaf
      * determinant(CoherentSheaf) (missing documentation)
      * dim(AffineVariety) -- dimension of the
        affine variety
      * dim(ProjectiveVariety) -- dimension
        of the projective variety
      * directSum(CoherentSheaf) (missing documentation)
      * directSum(SheafMap) (missing documentation)
      * dual(CoherentSheaf) -- dual coherent
        sheaf
      * dual(SheafMap) (missing documentation)
      * euler(CoherentSheaf) -- Euler
        characteristic of coherent sheaf
      * euler(Ideal)
      * euler(Module)
      * euler(ProjectiveVariety), --
        topological Euler characteristic of a (smooth) projective variety
      * euler(Ring)
      * eulers(CoherentSheaf)
      * "eulers(Module)" -- see eulers(CoherentSheaf),
      * eulers(Ideal)
      * eulers(Ring)
      * expression(CoherentSheaf) (missing documentation)
      * expression(SheafMap) (missing documentation)
      * expression(SheafOfRings) (missing documentation)
      * expression(SumOfTwists) (missing documentation)
      * expression(Variety) (missing documentation)
      * Ext^ZZ(CoherentSheaf,CoherentSheaf)
        -- global Ext
      * "Ext^ZZ(CoherentSheaf,SheafOfRings)" -- see
        Ext^ZZ(CoherentSheaf,CoherentSheaf),
        -- global Ext
      * "Ext^ZZ(SheafOfRings,CoherentSheaf)" -- see
        Ext^ZZ(CoherentSheaf,CoherentSheaf),
        -- global Ext
      * "Ext^ZZ(SheafOfRings,SheafOfRings)" -- see
        Ext^ZZ(CoherentSheaf,CoherentSheaf),
        -- global Ext
      * Ext^ZZ(CoherentSheaf,SheafMap)
        -- maps on global Ext induced by
        a sheaf map
      * Ext^ZZ(CoherentSheaf,SumOfTwists)
        -- global Ext
      * "Ext^ZZ(SheafOfRings,SumOfTwists)" -- see
        Ext^ZZ(CoherentSheaf,SumOfTwists),
        -- global Ext
      * exteriorPower(ZZ,CoherentSheaf)
        -- exterior power
      * exteriorPower(ZZ,SheafMap) (missing documentation)
      * genera(CoherentSheaf)
      * "genera(Module)" -- see genera(CoherentSheaf),
      * genera(Ideal)
      * genera(ProjectiveVariety)
      * genera(Ring)
      * genus(CoherentSheaf) -- genus of an
        object
      * "genus(Ideal)" -- see genus(CoherentSheaf),
        -- genus of an object
      * "genus(Module)" -- see genus(CoherentSheaf),
        -- genus of an object
      * genus(ProjectiveVariety) -- genus
        of an object
      * genus(Ring) -- genus of an object
      * "hh(Sequence,ProjectiveVariety)" -- see hh, -- Hodge numbers
        of a smooth projective variety
      * HH^ZZ SheafOfRings -- cohomology of a sheaf
        of rings on a projective variety
      * HH^ZZ SumOfTwists -- coherent sheaf
        cohomology module
      * "HH^ZZ(ProjectiveVariety,SumOfTwists)" -- see HH^ZZ SumOfTwists,
        -- coherent sheaf cohomology module
      * HH^ZZ(AffineVariety,CoherentSheaf)
        -- general cohomology functor
      * "HH^ZZ CoherentSheaf" -- see
        HH^ZZ(ProjectiveVariety,CoherentSheaf),
        -- cohomology of a
        coherent sheaf on a projective variety
      * HH^ZZ(ProjectiveVariety,CoherentSheaf)
        -- cohomology of a
        coherent sheaf on a projective variety
      * "HH^ZZ SheafMap" -- see HH^ZZ(ProjectiveVariety,SheafMap),
        -- general cohomology functor
      * HH^ZZ(ProjectiveVariety,SheafMap)
        -- general cohomology functor
      * HH^ZZ(Variety,SheafOfRings) (missing documentation)
      * hilbertPolynomial(CoherentSheaf)
        -- compute the Hilbert polynomial
        of the coherent sheaf
      * hilbertPolynomial(ProjectiveVariety)
        -- compute the Hilbert
        polynomial of the projective variety
      * Hom(CoherentSheaf,CoherentSheaf)
        -- global Hom
      * "Hom(CoherentSheaf,SheafOfRings)" -- see
        Hom(CoherentSheaf,CoherentSheaf),
        -- global Hom
      * "Hom(SheafOfRings,CoherentSheaf)" -- see
        Hom(CoherentSheaf,CoherentSheaf),
        -- global Hom
      * "Hom(SheafOfRings,SheafOfRings)" -- see
        Hom(CoherentSheaf,CoherentSheaf),
        -- global Hom
      * homology(SheafMap,SheafMap) (missing documentation)
      * homomorphism'(SheafMap) (missing documentation)
      * Ideal * CoherentSheaf (missing documentation)
      * ideal(Variety) -- returns the defining ideal
      * "idealSheaf(ProjectiveVariety)" -- see idealSheaf, --
        ideal sheaf of a projective variety
      * image(SheafMap) (missing documentation)
      * inducedMap(CoherentSheaf,CoherentSheaf)
        -- induced maps on
        coherent sheaves
      * "inducedMap(CoherentSheaf,CoherentSheaf,SheafMap)" -- see
        inducedMap(CoherentSheaf,CoherentSheaf),
        -- induced maps on
        coherent sheaves
      * inverse(SheafMap) (missing documentation)
      * isCommutative(SheafOfRings) (missing documentation)
      * isIsomorphic(CoherentSheaf,CoherentSheaf) (missing documentation)
      * isIsomorphic(SheafMap,SheafMap) (missing documentation)
      * isIsomorphism(SheafMap) (missing documentation)
      * "isLocallyFree(CoherentSheaf)" -- see isLocallyFree,
        -- whether a coherent sheaf is locally free
      * "isLocallyFree(SheafOfRings)" -- see isLocallyFree,
        -- whether a coherent sheaf is locally free
      * "isLocallyFree(SumOfTwists)" -- see isLocallyFree,
        -- whether a coherent sheaf is locally free
      * isomorphism(CoherentSheaf,CoherentSheaf) (missing documentation)
      * "isProjective(ProjectiveVariety)" -- see isProjective,
        -- whether a variety is projective
      * "isProjective(Variety)" -- see isProjective, --
        whether a variety is projective
      * isSmooth(Variety) -- whether a variety is
        smooth
      * isSurjective(SheafMap) (missing documentation)
      * isWellDefined(CoherentSheaf),
        -- whether a coherent sheaf is well-defined
      * isWellDefined(SheafMap) -- whether
        a morphism of coherent sheaves is well-defined
      * isWellDefined(SheafOfRings) (missing documentation)
      * isWellDefined(Variety) -- whether a
        variety is well-defined
      * kernel(SheafMap) (missing documentation)
      * lift(SheafMap) (missing documentation)
      * "CoherentSheaf LowerBound" -- see LowerBound, -- the
        class of lower bound objects
      * "SheafOfRings LowerBound" -- see LowerBound, -- the
        class of lower bound objects
      * map(CoherentSheaf,CoherentSheaf,Matrix)
        -- the constructor of
        morphisms of coherent sheaves
      * "map(CoherentSheaf,CoherentSheaf,Matrix,InfiniteNumber)" -- see
        map(CoherentSheaf,CoherentSheaf,Matrix),
        -- the constructor of
        morphisms of coherent sheaves
      * "map(CoherentSheaf,CoherentSheaf,Matrix,ZZ)" -- see
        map(CoherentSheaf,CoherentSheaf,Matrix),
        -- the constructor of
        morphisms of coherent sheaves
      * "map(CoherentSheaf,Nothing,Matrix)" -- see
        map(CoherentSheaf,CoherentSheaf,Matrix),
        -- the constructor of
        morphisms of coherent sheaves
      * "map(Nothing,CoherentSheaf,Matrix)" -- see
        map(CoherentSheaf,CoherentSheaf,Matrix),
        -- the constructor of
        morphisms of coherent sheaves
      * map(CoherentSheaf,CoherentSheaf,SheafMap) (missing documentation)
      * map(CoherentSheaf,CoherentSheaf,ZZ) (missing documentation)
      * map(CoherentSheaf,Module,ZZ) (missing documentation)
      * map(Module,CoherentSheaf,ZZ) (missing documentation)
      * mathML(CoherentSheaf) (missing documentation)
      * mathML(SheafOfRings) (missing documentation)
      * mathML(Variety) (missing documentation)
      * matrix(SheafMap) -- the morphism of
        modules representing a morphisms of coherent sheaves
      * minimalPresentation(CoherentSheaf)
        -- minimal presentation of a
        coherent sheaf or sheaf map
      * "minimalPresentation(SheafMap)" -- see
        minimalPresentation(CoherentSheaf),
        -- minimal presentation of a
        coherent sheaf or sheaf map
      * "prune(CoherentSheaf)" -- see minimalPresentation(CoherentSheaf),
        -- minimal presentation of a
        coherent sheaf or sheaf map
      * "prune(SheafMap)" -- see minimalPresentation(CoherentSheaf),
        -- minimal presentation of a
        coherent sheaf or sheaf map
      * minimalPresentation(SheafOfRings) (missing documentation)
      * Module == CoherentSheaf (missing documentation)
      * module(CoherentSheaf) -- get the
        module defining a coherent sheaf
      * module(SheafOfRings) -- make or get a
        module
      * net(CoherentSheaf) (missing documentation)
      * net(SheafExpression) (missing documentation)
      * net(SheafMap) (missing documentation)
      * net(SheafOfRings) (missing documentation)
      * net(SumOfTwists) (missing documentation)
      * net(Variety) (missing documentation)
      * numgens(CoherentSheaf) -- the number
        of generators of the underlying module
      * pdim(CoherentSheaf) -- calculate the
        projective dimension
      * "Proj(Ring)" -- see Proj, -- make a projective variety
      * promote(SheafMap,type of Nothing) (missing documentation)
      * promote(SheafMap,type of RingElement) (missing documentation)
      * prune(SheafOfRings) (missing documentation)
      * pullback(SheafMap,SheafMap) (missing documentation)
      * pushout(SheafMap,SheafMap) (missing documentation)
      * "quotient'(SheafMap,SheafMap)" -- see
        quotient(SheafMap,SheafMap), --
        factoring a morphism of coherent sheaves through another
      * quotient(SheafMap,SheafMap),
        -- factoring a morphism of coherent sheaves through another
      * "SheafMap // SheafMap" -- see quotient(SheafMap,SheafMap),
        -- factoring a morphism of coherent
        sheaves through another
      * /// SheafMap \\ SheafMap /// -- see quotient(SheafMap,SheafMap),
        -- factoring a morphism of coherent
        sheaves through another
      * random(CoherentSheaf,CoherentSheaf)
        -- generate a random map of
        coherent sheaves
      * rank(CoherentSheaf) -- rank of a
        coherent sheaf
      * ring(CoherentSheaf) -- the coordinate
        ring of the underlying variety
      * "ring(SheafMap)" -- see ring(CoherentSheaf),
        -- the coordinate ring of the underlying
        variety
      * "ring(SheafOfRings)" -- see ring(CoherentSheaf),
        -- the coordinate ring of the underlying
        variety
      * "ring(SumOfTwists)" -- see ring(CoherentSheaf),
        -- the coordinate ring of the underlying
        variety
      * ring(Variety) -- coordinate ring of the
        variety
      * sheaf(Matrix) -- the sheafification functor
        for morphisms
      * "sheaf(Matrix,ZZ)" -- see sheaf(Matrix), --
        the sheafification functor for morphisms
      * "sheaf(Variety,Matrix)" -- see sheaf(Matrix),
        -- the sheafification functor for morphisms
      * "sheaf(Variety,Matrix,ZZ)" -- see sheaf(Matrix),
        -- the sheafification functor for morphisms
      * "Ideal ^~" -- see sheaf(Module), -- make a
        coherent sheaf
      * "Module ^~" -- see sheaf(Module), -- make a
        coherent sheaf
      * "sheaf(Ideal)" -- see sheaf(Module), -- make a
        coherent sheaf
      * sheaf(Module) -- make a coherent sheaf
      * "Ring ^~" -- see sheaf(Ring), -- make a coherent
        sheaf of rings
      * sheaf(Ring) -- make a coherent sheaf of rings
      * sheaf(SheafMap) (missing documentation)
      * sheaf(Variety) -- make a coherent sheaf
      * "sheaf(Variety,Ideal)" -- see sheaf(Variety,Module),
        -- make a coherent sheaf
      * sheaf(Variety,Module) -- make a
        coherent sheaf
      * sheaf(Variety,Ring) -- make a
        coherent sheaf of rings
      * "sheafExt^ZZ(CoherentSheaf,CoherentSheaf)" -- see sheafExt,
        -- sheaf extension of coherent sheaves
      * "sheafExt^ZZ(CoherentSheaf,SheafOfRings)" -- see sheafExt,
        -- sheaf extension of coherent sheaves
      * "sheafExt^ZZ(SheafOfRings,CoherentSheaf)" -- see sheafExt,
        -- sheaf extension of coherent sheaves
      * "sheafExt^ZZ(SheafOfRings,SheafOfRings)" -- see sheafExt,
        -- sheaf extension of coherent sheaves
      * "sheafHom(CoherentSheaf,CoherentSheaf)" -- see sheafHom,
        -- sheaf Hom
      * "sheafHom(CoherentSheaf,SheafOfRings)" -- see sheafHom,
        -- sheaf Hom
      * "sheafHom(SheafOfRings,CoherentSheaf)" -- see sheafHom,
        -- sheaf Hom
      * "sheafHom(SheafOfRings,SheafOfRings)" -- see sheafHom,
        -- sheaf Hom
      * "sheafHom(CoherentSheaf,SheafMap)" -- see
        sheafHom(SheafMap,SheafMap), --
        functor of sheaf Hom
      * "sheafHom(SheafMap,CoherentSheaf)" -- see
        sheafHom(SheafMap,SheafMap), --
        functor of sheaf Hom
      * sheafHom(SheafMap,SheafMap),
        -- functor of sheaf Hom
      * "sheafHom(SheafMap,SheafOfRings)" -- see
        sheafHom(SheafMap,SheafMap), --
        functor of sheaf Hom
      * "sheafHom(SheafOfRings,SheafMap)" -- see
        sheafHom(SheafMap,SheafMap), --
        functor of sheaf Hom
      * SheafMap * RingElement (missing documentation)
      * SheafMap * ZZ (missing documentation)
      * SheafMap ++ SheafMap -- takes the direct
        sum of two sheaf maps
      * SheafMap ^ ZZ -- raises a SheafMap to a power
      * SheafMap ^** ZZ -- repeatedly tensors a map
      * SheafOfRings ^ List -- make a graded free
        coherent sheaf
      * "SheafOfRings ^ ZZ" -- see SheafOfRings ^ List,
        -- make a graded free coherent sheaf
      * SheafOfRings Sequence (missing documentation)
      * singularLocus(AffineVariety),
        -- the locus of singular points in a variety
      * "singularLocus(ProjectiveVariety)" -- see
        singularLocus(AffineVariety), -- the
        locus of singular points in a variety
      * source(SheafMap) (missing documentation)
      * "Spec(Ring)" -- see Spec, -- make an affine variety
      * super(CoherentSheaf) (missing documentation)
      * super(SheafMap) (missing documentation)
      * symmetricPower(ZZ,CoherentSheaf) (missing documentation)
      * symmetricPower(ZZ,SheafMap) (missing documentation)
      * "tangentSheaf(ProjectiveVariety)" -- see tangentSheaf,
        -- tangent sheaf of a projective variety
      * target(SheafMap) (missing documentation)
      * tensor(CoherentSheaf,CoherentSheaf) (missing documentation)
      * tensor(SheafMap,SheafMap) (missing documentation)
      * texMath(CoherentSheaf) (missing documentation)
      * texMath(SheafExpression) (missing documentation)
      * texMath(SheafMap) (missing documentation)
      * texMath(SheafOfRings) (missing documentation)
      * texMath(SumOfTwists) (missing documentation)
      * texMath(Variety) (missing documentation)
      * toExternalString(SheafMap) (missing documentation)
      * toExternalString(Variety) (missing documentation)
      * toString(CoherentSheaf) (missing documentation)
      * toString(SheafMap) (missing documentation)
      * toString(SheafOfRings) (missing documentation)
      * toString(SumOfTwists) (missing documentation)
      * toString(Variety) (missing documentation)
      * variety(CoherentSheaf) -- the
        underlying variety over which a coherent sheaf or morphism is defined.
      * "variety(SheafMap)" -- see variety(CoherentSheaf),
        -- the underlying variety over which a
        coherent sheaf or morphism is defined.
      * "variety(SheafOfRings)" -- see variety(CoherentSheaf),
        -- the underlying variety over which a
        coherent sheaf or morphism is defined.
      * "variety(SumOfTwists)" -- see variety(CoherentSheaf),
        -- the underlying variety over which a
        coherent sheaf or morphism is defined.
      * variety(Ideal) -- the closed projective
        subvariety defined by an ideal
      * variety(Ring) -- the variety previously
        associated to a given ring
  * Symbols
      * "GlobalSectionLimit" -- see HH^ZZ SumOfTwists,
        -- coherent sheaf cohomology module
      * "SaturationMap" -- see HH^ZZ SumOfTwists, --
        coherent sheaf cohomology module
      * "TorsionFree" -- see HH^ZZ SumOfTwists, --
        coherent sheaf cohomology module
  * Other things
      * hh -- Hodge numbers of a smooth projective variety
      * OO -- the structure sheaf
      * sheafExt -- sheaf extension of coherent sheaves

For the programmer
==================

The object Varieties, is a package (Macaulay2Doc),
defined in Varieties.m2, with auxiliary files in Varieties/.

-------------------------------------------------------------------------------

The source of this document is in Varieties.m2:862:0.

Variety -- the class of all algebraic varieties
***********************************************

See also
========

  * varieties

Types of variety:
=================

  * AffineVariety -- the class of all affine varieties
  * ProjectiveVariety -- the class of all projective
    varieties

Functions and methods returning a variety:
==========================================

  * "variety" -- see variety(CoherentSheaf),
    -- the underlying variety over which a coherent sheaf or morphism is
    defined.
  * "variety(SheafMap)" -- see variety(CoherentSheaf),
    -- the underlying variety over which a coherent
    sheaf or morphism is defined.

Methods that use a variety:
===========================

  * codim(Variety) -- codimension of a variety
  * expression(Variety) (missing documentation)
  * HH^ZZ(Variety,SheafOfRings) (missing documentation)
  * ideal(Variety) -- returns the defining ideal
  * "isProjective(Variety)" -- see isProjective, -- whether
    a variety is projective
  * isSmooth(Variety) -- whether a variety is
    smooth
  * isWellDefined(Variety) -- whether a
    variety is well-defined
  * mathML(Variety) (missing documentation)
  * net(Variety) (missing documentation)
  * ring(Variety) -- coordinate ring of the variety
  * "sheaf(Variety,Matrix)" -- see sheaf(Matrix), --
    the sheafification functor for morphisms
  * "sheaf(Variety,Matrix,ZZ)" -- see sheaf(Matrix),
    -- the sheafification functor for morphisms
  * sheaf(Variety) -- make a coherent sheaf
  * "sheaf(Variety,Ideal)" -- see sheaf(Variety,Module),
    -- make a coherent sheaf
  * sheaf(Variety,Module) -- make a
    coherent sheaf
  * sheaf(Variety,Ring) -- make a coherent
    sheaf of rings
  * texMath(Variety) (missing documentation)
  * toExternalString(Variety) (missing documentation)
  * toString(Variety) (missing documentation)

For the programmer
==================

The object Variety, is a type (Macaulay2Doc), with
ancestor classes MutableHashTable (Macaulay2Doc), <
HashTable (Macaulay2Doc) < Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:15:0.

AffineVariety -- the class of all affine varieties
**************************************************

Functions and methods returning an affine variety:
==================================================

  * AffineVariety ** AffineVariety,
    -- Cartesian product of two affine varieties
  * "AffineVariety ** Ring" -- see AffineVariety ** AffineVariety,
    -- Cartesian product of two affine
    varieties
  * ambient(AffineVariety) -- the ambient
    affine or projective space of an embedded variety
  * singularLocus(AffineVariety), --
    the locus of singular points in a variety
  * Spec -- make an affine variety

Methods that use an affine variety:
===================================

  * char(AffineVariety) -- the characteristic
    of the coordinate ring of a variety
  * dim(AffineVariety) -- dimension of the
    affine variety
  * HH^ZZ(AffineVariety,CoherentSheaf)
    -- general cohomology functor

For the programmer
==================

The object AffineVariety, is a type (Macaulay2Doc),
with ancestor classes Variety, <
MutableHashTable (Macaulay2Doc) < HashTable (Macaulay2Doc)
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:16:0.

ProjectiveVariety -- the class of all projective varieties
**********************************************************

Functions and methods returning a projective variety:
=====================================================

  * "ambient(ProjectiveVariety)" -- see ambient(AffineVariety),
    -- the ambient affine or projective space of an
    embedded variety
  * Proj -- make a projective variety
  * "singularLocus(ProjectiveVariety)" -- see
    singularLocus(AffineVariety), -- the
    locus of singular points in a variety

Methods that use a projective variety:
======================================

  * "canonicalBundle(ProjectiveVariety)" -- see canonicalBundle,
    -- the canonical bundle of a projective variety
  * "char(ProjectiveVariety)" -- see char(AffineVariety),
    -- the characteristic of the coordinate ring of a
    variety
  * "cotangentSheaf(ProjectiveVariety)" -- see cotangentSheaf,
    -- cotangent sheaf of a projective variety
  * cotangentSheaf(ZZ,ProjectiveVariety)
    -- exterior powers of the
    cotangent sheaf of a projective variety
  * degree(ProjectiveVariety)
  * dim(ProjectiveVariety) -- dimension of
    the projective variety
  * euler(ProjectiveVariety), --
    topological Euler characteristic of a (smooth) projective variety
  * genera(ProjectiveVariety)
  * genus(ProjectiveVariety) -- genus of
    an object
  * "hh(Sequence,ProjectiveVariety)" -- see hh, -- Hodge numbers of a
    smooth projective variety
  * "HH^ZZ(ProjectiveVariety,SumOfTwists)" -- see HH^ZZ SumOfTwists,
    -- coherent sheaf cohomology module
  * HH^ZZ(ProjectiveVariety,CoherentSheaf)
    -- cohomology of a coherent
    sheaf on a projective variety
  * HH^ZZ(ProjectiveVariety,SheafMap)
    -- general cohomology functor
  * hilbertPolynomial(ProjectiveVariety)
    -- compute the Hilbert polynomial
    of the projective variety
  * "idealSheaf(ProjectiveVariety)" -- see idealSheaf, --
    ideal sheaf of a projective variety
  * "isProjective(ProjectiveVariety)" -- see isProjective,
    -- whether a variety is projective
  * "tangentSheaf(ProjectiveVariety)" -- see tangentSheaf,
    -- tangent sheaf of a projective variety

For the programmer
==================

The object ProjectiveVariety, is a type (Macaulay2Doc),
with ancestor classes Variety, <
MutableHashTable (Macaulay2Doc) < HashTable (Macaulay2Doc)
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:17:0.

CoherentSheaf -- the class of all coherent sheaves
**************************************************

Functions and methods returning a coherent sheaf:
=================================================

  * ambient(CoherentSheaf) (missing documentation)
  * canonicalBundle -- the canonical bundle of a
    projective variety
  * CoherentSheaf ** CoherentSheaf,
    -- tensor produce of coherent sheaves
  * CoherentSheaf ++ CoherentSheaf, --
    direct sum of coherent sheaves
  * CoherentSheaf / CoherentSheaf, --
    quotient of coherent sheaves
  * "CoherentSheaf / Ideal" -- see CoherentSheaf / CoherentSheaf,
    -- quotient of coherent sheaves
  * "CoherentSheaf ^ List" -- see CoherentSheaf ^ ZZ,
    -- direct sum
  * CoherentSheaf ^ ZZ -- direct sum
  * CoherentSheaf ^** ZZ -- tensor power
  * CoherentSheaf Sequence (missing documentation)
  * CoherentSheaf ZZ -- canonical twist of a coherent
    sheaf
  * "SheafOfRings ZZ" -- see CoherentSheaf ZZ, --
    canonical twist of a coherent sheaf
  * coimage(SheafMap) (missing documentation)
  * cokernel(SheafMap) (missing documentation)
  * cotangentSheaf -- cotangent sheaf of a projective
    variety
  * cover(CoherentSheaf) (missing documentation)
  * determinant(CoherentSheaf) (missing documentation)
  * directSum(CoherentSheaf) (missing documentation)
  * dual(CoherentSheaf) -- dual coherent sheaf
  * exteriorPower(ZZ,CoherentSheaf)
    -- exterior power
  * homology(SheafMap,SheafMap) (missing documentation)
  * Ideal * CoherentSheaf (missing documentation)
  * idealSheaf -- ideal sheaf of a projective variety
  * image(SheafMap) (missing documentation)
  * kernel(SheafMap) (missing documentation)
  * minimalPresentation(CoherentSheaf)
    -- minimal presentation of a
    coherent sheaf or sheaf map
  * "prune(CoherentSheaf)" -- see minimalPresentation(CoherentSheaf),
    -- minimal presentation of a
    coherent sheaf or sheaf map
  * pullback(SheafMap,SheafMap) (missing documentation)
  * pushout(SheafMap,SheafMap) (missing documentation)
  * "Ideal ^~" -- see sheaf(Module), -- make a
    coherent sheaf
  * "Module ^~" -- see sheaf(Module), -- make a
    coherent sheaf
  * "sheaf(Ideal)" -- see sheaf(Module), -- make a
    coherent sheaf
  * sheaf(Module) -- make a coherent sheaf
  * "sheaf(Variety,Ideal)" -- see sheaf(Variety,Module),
    -- make a coherent sheaf
  * sheaf(Variety,Module) -- make a
    coherent sheaf
  * "sheafExt^ZZ(CoherentSheaf,CoherentSheaf)" -- see sheafExt,
    -- sheaf extension of coherent sheaves
  * "sheafExt^ZZ(CoherentSheaf,SheafOfRings)" -- see sheafExt,
    -- sheaf extension of coherent sheaves
  * "sheafExt^ZZ(SheafOfRings,CoherentSheaf)" -- see sheafExt,
    -- sheaf extension of coherent sheaves
  * "sheafExt^ZZ(SheafOfRings,SheafOfRings)" -- see sheafExt,
    -- sheaf extension of coherent sheaves
  * sheafHom -- sheaf Hom
  * "sheafHom(CoherentSheaf,CoherentSheaf)" -- see sheafHom, --
    sheaf Hom
  * "sheafHom(CoherentSheaf,SheafOfRings)" -- see sheafHom, --
    sheaf Hom
  * "sheafHom(SheafOfRings,CoherentSheaf)" -- see sheafHom, --
    sheaf Hom
  * "sheafHom(SheafOfRings,SheafOfRings)" -- see sheafHom, --
    sheaf Hom
  * SheafOfRings ^ List -- make a graded free
    coherent sheaf
  * "SheafOfRings ^ ZZ" -- see SheafOfRings ^ List,
    -- make a graded free coherent sheaf
  * SheafOfRings Sequence (missing documentation)
  * source(SheafMap) (missing documentation)
  * super(CoherentSheaf) (missing documentation)
  * symmetricPower(ZZ,CoherentSheaf) (missing documentation)
  * tangentSheaf -- tangent sheaf of a projective variety
  * target(SheafMap) (missing documentation)
  * tensor(CoherentSheaf,CoherentSheaf) (missing documentation)

Methods that use a coherent sheaf:
==================================

  * annihilator(CoherentSheaf) -- the
    annihilator ideal
  * betti(CoherentSheaf) (missing documentation)
  * chi(CoherentSheaf) (missing documentation)
  * codim(CoherentSheaf) -- codimension of the
    support of a coherent sheaf on a projective variety
  * CoherentSheaf (*) -- sum of twists
  * CoherentSheaf == Module (missing documentation)
  * components(CoherentSheaf) (missing documentation)
  * degrees(CoherentSheaf) -- degrees of a
    coherent sheaf
  * euler(CoherentSheaf) -- Euler
    characteristic of coherent sheaf
  * eulers(CoherentSheaf)
  * expression(CoherentSheaf) (missing documentation)
  * Ext^ZZ(CoherentSheaf,CoherentSheaf)
    -- global Ext
  * "Ext^ZZ(CoherentSheaf,SheafOfRings)" -- see
    Ext^ZZ(CoherentSheaf,CoherentSheaf),
    -- global Ext
  * "Ext^ZZ(SheafOfRings,CoherentSheaf)" -- see
    Ext^ZZ(CoherentSheaf,CoherentSheaf),
    -- global Ext
  * Ext^ZZ(CoherentSheaf,SheafMap),
    -- maps on global Ext induced by a sheaf map
  * Ext^ZZ(CoherentSheaf,SumOfTwists)
    -- global Ext
  * genera(CoherentSheaf)
  * genus(CoherentSheaf) -- genus of an object
  * HH^ZZ(AffineVariety,CoherentSheaf)
    -- general cohomology functor
  * "HH^ZZ CoherentSheaf" -- see HH^ZZ(ProjectiveVariety,CoherentSheaf),
    -- cohomology of a coherent
    sheaf on a projective variety
  * HH^ZZ(ProjectiveVariety,CoherentSheaf)
    -- cohomology of a coherent
    sheaf on a projective variety
  * hilbertPolynomial(CoherentSheaf)
    -- compute the Hilbert polynomial of
    the coherent sheaf
  * Hom(CoherentSheaf,CoherentSheaf)
    -- global Hom
  * "Hom(CoherentSheaf,SheafOfRings)" -- see
    Hom(CoherentSheaf,CoherentSheaf),
    -- global Hom
  * "Hom(SheafOfRings,CoherentSheaf)" -- see
    Hom(CoherentSheaf,CoherentSheaf),
    -- global Hom
  * inducedMap(CoherentSheaf,CoherentSheaf)
    -- induced maps on coherent
    sheaves
  * "inducedMap(CoherentSheaf,CoherentSheaf,SheafMap)" -- see
    inducedMap(CoherentSheaf,CoherentSheaf),
    -- induced maps on coherent
    sheaves
  * isIsomorphic(CoherentSheaf,CoherentSheaf) (missing documentation)
  * "isLocallyFree(CoherentSheaf)" -- see isLocallyFree,
    -- whether a coherent sheaf is locally free
  * isomorphism(CoherentSheaf,CoherentSheaf) (missing documentation)
  * isWellDefined(CoherentSheaf), --
    whether a coherent sheaf is well-defined
  * "CoherentSheaf LowerBound" -- see LowerBound, -- the
    class of lower bound objects
  * map(CoherentSheaf,CoherentSheaf,Matrix)
    -- the constructor of
    morphisms of coherent sheaves
  * "map(CoherentSheaf,CoherentSheaf,Matrix,InfiniteNumber)" -- see
    map(CoherentSheaf,CoherentSheaf,Matrix),
    -- the constructor of
    morphisms of coherent sheaves
  * "map(CoherentSheaf,CoherentSheaf,Matrix,ZZ)" -- see
    map(CoherentSheaf,CoherentSheaf,Matrix),
    -- the constructor of
    morphisms of coherent sheaves
  * "map(CoherentSheaf,Nothing,Matrix)" -- see
    map(CoherentSheaf,CoherentSheaf,Matrix),
    -- the constructor of
    morphisms of coherent sheaves
  * "map(Nothing,CoherentSheaf,Matrix)" -- see
    map(CoherentSheaf,CoherentSheaf,Matrix),
    -- the constructor of
    morphisms of coherent sheaves
  * map(CoherentSheaf,CoherentSheaf,SheafMap) (missing documentation)
  * map(CoherentSheaf,CoherentSheaf,ZZ) (missing documentation)
  * map(CoherentSheaf,Module,ZZ) (missing documentation)
  * map(Module,CoherentSheaf,ZZ) (missing documentation)
  * mathML(CoherentSheaf) (missing documentation)
  * Module == CoherentSheaf (missing documentation)
  * module(CoherentSheaf) -- get the module
    defining a coherent sheaf
  * net(CoherentSheaf) (missing documentation)
  * numgens(CoherentSheaf) -- the number of
    generators of the underlying module
  * pdim(CoherentSheaf) -- calculate the
    projective dimension
  * random(CoherentSheaf,CoherentSheaf)
    -- generate a random map of
    coherent sheaves
  * rank(CoherentSheaf) -- rank of a coherent
    sheaf
  * ring(CoherentSheaf) -- the coordinate ring
    of the underlying variety
  * "sheafHom(CoherentSheaf,SheafMap)" -- see
    sheafHom(SheafMap,SheafMap), -- functor
    of sheaf Hom
  * "sheafHom(SheafMap,CoherentSheaf)" -- see
    sheafHom(SheafMap,SheafMap), -- functor
    of sheaf Hom
  * texMath(CoherentSheaf) (missing documentation)
  * toString(CoherentSheaf) (missing documentation)
  * variety(CoherentSheaf) -- the underlying
    variety over which a coherent sheaf or morphism is defined.

For the programmer
==================

The object CoherentSheaf, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:64:0.

SheafOfRings -- the class of sheaves of rings
*********************************************

Description
===========

+----------------------------------------+
|i1 : X = Proj(QQ[x..z])                 |
|                                        |
|o1 = X                                  |
|                                        |
|o1 : ProjectiveVariety                  |
+----------------------------------------+
|i2 : OO_X                               |
|                                        |
|o2 = OO                                 |
|       X                                |
|                                        |
|o2 : SheafOfRings                       |
+----------------------------------------+
|i3 : OO_X^6                             |
|                                        |
|        6                               |
|o3 = OO                                 |
|       X                                |
|                                        |
|o3 : coherent sheaf on X, free of rank 6|
+----------------------------------------+

See also
========

  * Variety -- the class of all algebraic varieties
  * OO -- the structure sheaf

Functions and methods returning a sheaf of rings:
=================================================

  * minimalPresentation(SheafOfRings) (missing documentation)
  * "OO _ Variety" -- see OO, -- the structure sheaf
  * prune(SheafOfRings) (missing documentation)
  * ring(CoherentSheaf) -- the coordinate ring
    of the underlying variety
  * "ring(SheafMap)" -- see ring(CoherentSheaf),
    -- the coordinate ring of the underlying variety
  * "ring(SheafOfRings)" -- see ring(CoherentSheaf),
    -- the coordinate ring of the underlying variety
  * "Ring ^~" -- see sheaf(Ring), -- make a coherent
    sheaf of rings
  * sheaf(Ring) -- make a coherent sheaf of rings
  * sheaf(Variety) -- make a coherent sheaf
  * sheaf(Variety,Ring) -- make a coherent
    sheaf of rings

Methods that use a sheaf of rings:
==================================

  * "SheafOfRings (*)" -- see CoherentSheaf (*),
    -- sum of twists
  * "SheafOfRings ZZ" -- see CoherentSheaf ZZ, --
    canonical twist of a coherent sheaf
  * expression(SheafOfRings) (missing documentation)
  * "Ext^ZZ(CoherentSheaf,SheafOfRings)" -- see
    Ext^ZZ(CoherentSheaf,CoherentSheaf),
    -- global Ext
  * "Ext^ZZ(SheafOfRings,CoherentSheaf)" -- see
    Ext^ZZ(CoherentSheaf,CoherentSheaf),
    -- global Ext
  * "Ext^ZZ(SheafOfRings,SheafOfRings)" -- see
    Ext^ZZ(CoherentSheaf,CoherentSheaf),
    -- global Ext
  * "Ext^ZZ(SheafOfRings,SumOfTwists)" -- see
    Ext^ZZ(CoherentSheaf,SumOfTwists),
    -- global Ext
  * HH^ZZ SheafOfRings -- cohomology of a sheaf of
    rings on a projective variety
  * HH^ZZ(Variety,SheafOfRings) (missing documentation)
  * "Hom(CoherentSheaf,SheafOfRings)" -- see
    Hom(CoherentSheaf,CoherentSheaf),
    -- global Hom
  * "Hom(SheafOfRings,CoherentSheaf)" -- see
    Hom(CoherentSheaf,CoherentSheaf),
    -- global Hom
  * "Hom(SheafOfRings,SheafOfRings)" -- see
    Hom(CoherentSheaf,CoherentSheaf),
    -- global Hom
  * isCommutative(SheafOfRings) (missing documentation)
  * "isLocallyFree(SheafOfRings)" -- see isLocallyFree, --
    whether a coherent sheaf is locally free
  * isWellDefined(SheafOfRings) (missing documentation)
  * "SheafOfRings LowerBound" -- see LowerBound, -- the class
    of lower bound objects
  * mathML(SheafOfRings) (missing documentation)
  * module(SheafOfRings) -- make or get a
    module
  * net(SheafOfRings) (missing documentation)
  * "sheafExt^ZZ(CoherentSheaf,SheafOfRings)" -- see sheafExt,
    -- sheaf extension of coherent sheaves
  * "sheafExt^ZZ(SheafOfRings,CoherentSheaf)" -- see sheafExt,
    -- sheaf extension of coherent sheaves
  * "sheafExt^ZZ(SheafOfRings,SheafOfRings)" -- see sheafExt,
    -- sheaf extension of coherent sheaves
  * "sheafHom(CoherentSheaf,SheafOfRings)" -- see sheafHom, --
    sheaf Hom
  * "sheafHom(SheafOfRings,CoherentSheaf)" -- see sheafHom, --
    sheaf Hom
  * "sheafHom(SheafOfRings,SheafOfRings)" -- see sheafHom, --
    sheaf Hom
  * "sheafHom(SheafMap,SheafOfRings)" -- see sheafHom(SheafMap,SheafMap),
    -- functor of sheaf Hom
  * "sheafHom(SheafOfRings,SheafMap)" -- see sheafHom(SheafMap,SheafMap),
    -- functor of sheaf Hom
  * SheafOfRings ^ List -- make a graded free
    coherent sheaf
  * "SheafOfRings ^ ZZ" -- see SheafOfRings ^ List,
    -- make a graded free coherent sheaf
  * SheafOfRings Sequence (missing documentation)
  * texMath(SheafOfRings) (missing documentation)
  * toString(SheafOfRings) (missing documentation)
  * "variety(SheafOfRings)" -- see variety(CoherentSheaf),
    -- the underlying variety over which a coherent
    sheaf or morphism is defined.

For the programmer
==================

The object SheafOfRings, is a type (Macaulay2Doc),
with ancestor classes Ring (Macaulay2Doc), <
Type (Macaulay2Doc) < MutableHashTable (Macaulay2Doc)
< HashTable (Macaulay2Doc) <
Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:62:0.

SumOfTwists -- the class of all sums of twists
**********************************************

Description
===========

This class is used internally as an abstract representation of a graded module
as an infinite direct sum of twists of a coherent sheaf.
+---------------------------------------------+
|i1 : R = QQ[x,y,z]                           |
|                                             |
|o1 = R                                       |
|                                             |
|o1 : PolynomialRing                          |
+---------------------------------------------+
|i2 : X = Proj R                              |
|                                             |
|o2 = X                                       |
|                                             |
|o2 : ProjectiveVariety                       |
+---------------------------------------------+
|i3 : OO_X(*)                                 |
|                                             |
|        1                                    |
|o3 = OO   (*)                                |
|       X                                     |
|                                             |
|o3 : SumOfTwists                             |
+---------------------------------------------+
|i4 : peek oo                                 |
|                                             |
|                    1                        |
|o4 = SumOfTwists{OO  , LowerBound{-infinity}}|
|                   X                         |
+---------------------------------------------+
|i5 : OO_X(>=2)                               |
|                                             |
|        1                                    |
|o5 = OO  (>= 2)                              |
|       X                                     |
|                                             |
|o5 : SumOfTwists                             |
+---------------------------------------------+
|i6 : peek oo                                 |
|                                             |
|                    1                        |
|o6 = SumOfTwists{OO  , LowerBound{2}}        |
|                   X                         |
+---------------------------------------------+
|i7 : Ext^0(OO_X^1, OO_X^1)                   |
|                                             |
|       1                                     |
|o7 = QQ                                      |
|                                             |
|o7 : QQ-module, free                         |
+---------------------------------------------+
|i8 : Ext^0(OO_X^1, OO_X^1(*))                |
|                                             |
|      1                                      |
|o8 = R                                       |
|                                             |
|o8 : R-module, free                          |
+---------------------------------------------+

Functions and methods returning a sum of twists:
================================================

  * CoherentSheaf (*) -- sum of twists
  * "SheafOfRings (*)" -- see CoherentSheaf (*),
    -- sum of twists
  * "CoherentSheaf LowerBound" -- see LowerBound, -- the
    class of lower bound objects
  * "SheafOfRings LowerBound" -- see LowerBound, -- the class
    of lower bound objects

Methods that use a sum of twists:
=================================

  * expression(SumOfTwists) (missing documentation)
  * Ext^ZZ(CoherentSheaf,SumOfTwists)
    -- global Ext
  * "Ext^ZZ(SheafOfRings,SumOfTwists)" -- see
    Ext^ZZ(CoherentSheaf,SumOfTwists),
    -- global Ext
  * HH^ZZ SumOfTwists -- coherent sheaf cohomology
    module
  * "HH^ZZ(ProjectiveVariety,SumOfTwists)" -- see HH^ZZ SumOfTwists,
    -- coherent sheaf cohomology module
  * "isLocallyFree(SumOfTwists)" -- see isLocallyFree, --
    whether a coherent sheaf is locally free
  * net(SumOfTwists) (missing documentation)
  * "ring(SumOfTwists)" -- see ring(CoherentSheaf),
    -- the coordinate ring of the underlying variety
  * texMath(SumOfTwists) (missing documentation)
  * toString(SumOfTwists) (missing documentation)
  * "variety(SumOfTwists)" -- see variety(CoherentSheaf),
    -- the underlying variety over which a coherent
    sheaf or morphism is defined.

For the programmer
==================

The object SumOfTwists, is a type (Macaulay2Doc),
with ancestor classes BasicList (Macaulay2Doc),
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:80:0.

SheafMap -- the class of morphisms of coherent sheaves
******************************************************

Description
===========

The most essential data of the type CoherentSheaf, in
Macaulay2 is the representative module. For morphisms of sheaves, the data type
requires a little more care, because even if $\mathcal{F}$ and $\mathcal{G}$
are sheaves represented by modules $M$ and $N$, respectively, a morphism of
sheaves $\phi : \mathcal F \to \mathcal G$ is not necessarily the sheaf
associated to a module map $\psi : M \to N$. Indeed, the best one can say is
that $\phi$ is represented by some map $$\psi : M_{\geq d} \to N,$$ where $d$
is some truncation degree. This means that in Macaulay2, a morphism of sheaves
is represented as a morphism from some truncation of the source representative
to the target representative.

+------------------------------------------------------------------+
|i1 : Q = QQ[x..z]; --Do example of accessing the truncation degree|
+------------------------------------------------------------------+

As illustrated in the above example, the source and target are still
represented by the sheaves $\mathcal F$ and $\mathcal G$. The key degree
accesses the truncation degree needed to represent the map as a morphism of
modules. To access the actual matrix representing the map, use matrix.

Functions and methods returning a morphism of sheaves:
======================================================

  * ambient(SheafMap) (missing documentation)
  * cover(SheafMap) (missing documentation)
  * directSum(SheafMap) (missing documentation)
  * dual(SheafMap) (missing documentation)
  * exteriorPower(ZZ,SheafMap) (missing documentation)
  * inducedMap(CoherentSheaf,CoherentSheaf)
    -- induced maps on coherent
    sheaves
  * "inducedMap(CoherentSheaf,CoherentSheaf,SheafMap)" -- see
    inducedMap(CoherentSheaf,CoherentSheaf),
    -- induced maps on coherent
    sheaves
  * inverse(SheafMap) (missing documentation)
  * isomorphism(CoherentSheaf,CoherentSheaf) (missing documentation)
  * lift(SheafMap) (missing documentation)
  * map(CoherentSheaf,CoherentSheaf,Matrix)
    -- the constructor of
    morphisms of coherent sheaves
  * "map(CoherentSheaf,CoherentSheaf,Matrix,InfiniteNumber)" -- see
    map(CoherentSheaf,CoherentSheaf,Matrix),
    -- the constructor of
    morphisms of coherent sheaves
  * "map(CoherentSheaf,CoherentSheaf,Matrix,ZZ)" -- see
    map(CoherentSheaf,CoherentSheaf,Matrix),
    -- the constructor of
    morphisms of coherent sheaves
  * "map(CoherentSheaf,Nothing,Matrix)" -- see
    map(CoherentSheaf,CoherentSheaf,Matrix),
    -- the constructor of
    morphisms of coherent sheaves
  * "map(Nothing,CoherentSheaf,Matrix)" -- see
    map(CoherentSheaf,CoherentSheaf,Matrix),
    -- the constructor of
    morphisms of coherent sheaves
  * map(CoherentSheaf,CoherentSheaf,SheafMap) (missing documentation)
  * map(CoherentSheaf,CoherentSheaf,ZZ) (missing documentation)
  * map(CoherentSheaf,Module,ZZ) (missing documentation)
  * map(Module,CoherentSheaf,ZZ) (missing documentation)
  * Matrix ^~ (missing documentation)
  * "minimalPresentation(SheafMap)" -- see
    minimalPresentation(CoherentSheaf),
    -- minimal presentation of a coherent sheaf or sheaf map
  * "prune(SheafMap)" -- see minimalPresentation(CoherentSheaf),
    -- minimal presentation of a
    coherent sheaf or sheaf map
  * promote(SheafMap,type of Nothing) (missing documentation)
  * promote(SheafMap,type of RingElement) (missing documentation)
  * "quotient'(SheafMap,SheafMap)" -- see quotient(SheafMap,SheafMap),
    -- factoring a morphism of coherent
    sheaves through another
  * quotient(SheafMap,SheafMap), --
    factoring a morphism of coherent sheaves through another
  * "SheafMap // SheafMap" -- see quotient(SheafMap,SheafMap),
    -- factoring a morphism of coherent
    sheaves through another
  * /// SheafMap \\ SheafMap /// -- see quotient(SheafMap,SheafMap),
    -- factoring a morphism of coherent
    sheaves through another
  * random(CoherentSheaf,CoherentSheaf)
    -- generate a random map of
    coherent sheaves
  * sheaf(Matrix) -- the sheafification functor for
    morphisms
  * "sheaf(Matrix,ZZ)" -- see sheaf(Matrix), -- the
    sheafification functor for morphisms
  * "sheaf(Variety,Matrix)" -- see sheaf(Matrix), --
    the sheafification functor for morphisms
  * "sheaf(Variety,Matrix,ZZ)" -- see sheaf(Matrix),
    -- the sheafification functor for morphisms
  * sheaf(SheafMap) (missing documentation)
  * "sheafHom(CoherentSheaf,SheafMap)" -- see
    sheafHom(SheafMap,SheafMap), -- functor
    of sheaf Hom
  * "sheafHom(SheafMap,CoherentSheaf)" -- see
    sheafHom(SheafMap,SheafMap), -- functor
    of sheaf Hom
  * sheafHom(SheafMap,SheafMap), --
    functor of sheaf Hom
  * "sheafHom(SheafMap,SheafOfRings)" -- see sheafHom(SheafMap,SheafMap),
    -- functor of sheaf Hom
  * "sheafHom(SheafOfRings,SheafMap)" -- see sheafHom(SheafMap,SheafMap),
    -- functor of sheaf Hom
  * SheafMap ++ SheafMap -- takes the direct sum
    of two sheaf maps
  * SheafMap ^ ZZ -- raises a SheafMap to a power
  * SheafMap ^** ZZ -- repeatedly tensors a map
  * super(SheafMap) (missing documentation)
  * symmetricPower(ZZ,SheafMap) (missing documentation)
  * tensor(SheafMap,SheafMap) (missing documentation)

Methods that use a morphism of sheaves:
=======================================

  * coimage(SheafMap) (missing documentation)
  * cokernel(SheafMap) (missing documentation)
  * components(SheafMap) (missing documentation)
  * degree(SheafMap) (missing documentation)
  * expression(SheafMap) (missing documentation)
  * Ext^ZZ(CoherentSheaf,SheafMap),
    -- maps on global Ext induced by a sheaf map
  * "HH^ZZ SheafMap" -- see HH^ZZ(ProjectiveVariety,SheafMap),
    -- general cohomology functor
  * HH^ZZ(ProjectiveVariety,SheafMap)
    -- general cohomology functor
  * homology(SheafMap,SheafMap) (missing documentation)
  * homomorphism'(SheafMap) (missing documentation)
  * image(SheafMap) (missing documentation)
  * isIsomorphic(SheafMap,SheafMap) (missing documentation)
  * isIsomorphism(SheafMap) (missing documentation)
  * isSurjective(SheafMap) (missing documentation)
  * isWellDefined(SheafMap) -- whether a
    morphism of coherent sheaves is well-defined
  * kernel(SheafMap) (missing documentation)
  * matrix(SheafMap) -- the morphism of modules
    representing a morphisms of coherent sheaves
  * net(SheafMap) (missing documentation)
  * pullback(SheafMap,SheafMap) (missing documentation)
  * pushout(SheafMap,SheafMap) (missing documentation)
  * "ring(SheafMap)" -- see ring(CoherentSheaf),
    -- the coordinate ring of the underlying variety
  * SheafMap * RingElement (missing documentation)
  * SheafMap * ZZ (missing documentation)
  * source(SheafMap) (missing documentation)
  * target(SheafMap) (missing documentation)
  * texMath(SheafMap) (missing documentation)
  * toExternalString(SheafMap) (missing documentation)
  * toString(SheafMap) (missing documentation)
  * "variety(SheafMap)" -- see variety(CoherentSheaf),
    -- the underlying variety over which a coherent
    sheaf or morphism is defined.

For the programmer
==================

The object SheafMap, is a type (Macaulay2Doc), with
ancestor classes HashTable (Macaulay2Doc), < Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:146:0.

map(CoherentSheaf,CoherentSheaf,Matrix) -- the constructor of morphisms of coherent sheaves
*******************************************************************************************

  * Function: map (Macaulay2Doc),

Ways to use this method:
========================

  * map(CoherentSheaf,CoherentSheaf,Matrix)
    -- the constructor of
    morphisms of coherent sheaves
  * "map(CoherentSheaf,CoherentSheaf,Matrix,InfiniteNumber)"
  * "map(CoherentSheaf,CoherentSheaf,Matrix,ZZ)"
  * "map(CoherentSheaf,Nothing,Matrix)"
  * "map(Nothing,CoherentSheaf,Matrix)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:146:0.

random(CoherentSheaf,CoherentSheaf) -- generate a random map of coherent sheaves
********************************************************************************

  * Function: random (Macaulay2Doc),
  * Usage:
        random(F, G)
  * Inputs:
      * F, a coherent sheaf,
      * G, a coherent sheaf,
  * Optional inputs (Macaulay2Doc),:
      * CoefficientRing (missing documentation) => ..., default value null,
      * Density (Macaulay2Doc), => ...,
        default value 1,
      * Height (Macaulay2Doc), => ..., default
        value 10,
      * MaximalRank (Macaulay2Doc), => ...,
        default value false,
      * UpperTriangular (Macaulay2Doc), =>
        ..., default value false,
  * Outputs:
      * a morphism of sheaves,

See also
========

  * setRandomSeed (Macaulay2Doc) -- set starting point for
    random number generator
  * random(Module,Module) (Macaulay2Doc), --
    get a random map of module
  * map(CoherentSheaf,CoherentSheaf,Matrix)
    -- the constructor of
    morphisms of coherent sheaves

Ways to use this method:
========================

  * random(CoherentSheaf,CoherentSheaf)
    -- generate a random map of
    coherent sheaves
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:146:0.

inducedMap(CoherentSheaf,CoherentSheaf) -- induced maps on coherent sheaves
***************************************************************************

  * Function: inducedMap (Macaulay2Doc),

Ways to use this method:
========================

  * inducedMap(CoherentSheaf,CoherentSheaf)
    -- induced maps on coherent
    sheaves
  * "inducedMap(CoherentSheaf,CoherentSheaf,SheafMap)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:146:0.

> ZZ -- greater than
********************

  * Operator: > (Macaulay2Doc),
  * Usage:
        (> d)
  * Inputs:
      * d, an integer (Macaulay2Doc),
  * Outputs:
      * an instance of the type LowerBound, a special object
        of class LowerBound used to represent the set of natural numbers larger
        than d

Ways to use this method:
========================

  * "> InfiniteNumber"
  * > ZZ -- greater than
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:298:0.

>= ZZ -- greater than or equal
******************************

  * Operator: >= (Macaulay2Doc),
  * Usage:
        (>= d)
  * Inputs:
      * d, an integer (Macaulay2Doc),
  * Outputs:
      * an instance of the type LowerBound, a special object
        of class LowerBound used to represent the set of natural numbers at
        least as large as d

Ways to use this method:
========================

  * ">= InfiniteNumber"
  * ">= List"
  * >= ZZ -- greater than or equal
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:292:0.

AffineVariety ** AffineVariety -- Cartesian product of two affine varieties
***************************************************************************

  * Operator: ** (Macaulay2Doc),

Description
===========

Synopsis
========

  * Usage:
        X ** Y
  * Inputs:
      * X, an affine variety,
      * Y, an affine variety,
  * Outputs:
      * an affine variety, the Cartesian product $X
        \times Y$
+-----------------------------+
|i1 : X = Spec QQ[x,y]        |
|                             |
|o1 = X                       |
|                             |
|o1 : AffineVariety           |
+-----------------------------+
|i2 : Y = X ** X              |
|                             |
|o2 = Y                       |
|                             |
|o2 : AffineVariety           |
+-----------------------------+
|i3 : describe Y              |
|                             |
|o3 = Spec(QQ[x , y , x , y ])|
|              0   0   1   1  |
+-----------------------------+

Synopsis
========

  * Usage:
        X ** R
  * Inputs:
      * X, an affine variety,
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * an affine variety, the Cartesian product $X
        \times \mathrm{Spec} R$
+----------------------+
|i4 : Z = X ** QQ[t]   |
|                      |
|o4 = Z                |
|                      |
|o4 : AffineVariety    |
+----------------------+
|i5 : describe Z       |
|                      |
|o5 = Spec(QQ[x..y, t])|
+----------------------+

Caveat
======

Cartesian products of non-affine varieties are not yet implemented in this
package, but see cartesianProduct(NormalToricVariety) (NormalToricVarieties),
for another
implementation.

Ways to use this method:
========================

  * AffineVariety ** AffineVariety,
    -- Cartesian product of two affine varieties
  * "AffineVariety ** Ring"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:454:0.

ambient(AffineVariety) -- the ambient affine or projective space of an embedded variety
***************************************************************************************

  * Function: ambient (Macaulay2Doc),
  * Usage:
        ambient X
  * Inputs:
      * X, an affine variety, or a projective variety,
  * Outputs:
      * an affine variety, or a projective variety,
        which is either an affine space or projective space
        where $X$ lies

See also
========

  * ambient(Ring) (Macaulay2Doc) -- ambient polynomial
    ring

Ways to use this method:
========================

  * ambient(AffineVariety) -- the ambient
    affine or projective space of an embedded variety
  * "ambient(ProjectiveVariety)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:300:0.

annihilator(CoherentSheaf) -- the annihilator ideal
***************************************************

  * Function: annihilator (Saturation),
  * Usage:
        ann F
        annihilator F
  * Inputs:
      * F, a coherent sheaf,
  * Optional inputs (Macaulay2Doc),:
      * Strategy (Saturation), => a symbol (Macaulay2Doc),
        default value null, either Quotient or
        Intersection; see annihilator(...,Strategy=>...) (Saturation),
  * Outputs:
      * an ideal (Macaulay2Doc), the annihilator ideal

Description
===========

The annihilator of a sheaf of modules (see
https://stacks.math.columbia.edu/tag/0H2G ) $\mathcal F$ is the ideal
corresponding to the kernel of the map of sheaves $$ \mathcal O_X \to \mathcal
Hom_{\mathcal O_X}(\mathcal F, \mathcal F).b $$

You may use ann as a synonym for annihilator.

See also
========

  * annihilator(Module) (Saturation) -- the annihilator
    ideal
  * isSupportedInZeroLocus(Ideal,Module) (Saturation)
    -- whether support of a module is
    contained in the zero locus of the (irrelevant) ideal

Ways to use this method:
========================

  * annihilator(CoherentSheaf) -- the
    annihilator ideal
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:983:0.

canonicalBundle -- the canonical bundle of a projective variety
***************************************************************

  * Usage:
        canonicalBundle X
  * Inputs:
      * X, a projective variety,
  * Optional inputs (Macaulay2Doc),:
      * MinimalGenerators => a Boolean value (Macaulay2Doc),
        default value true, whether to prune (Macaulay2Doc), the
        result before returning it. The default value is true.
      * Strategy => ..., default value null
  * Outputs:
      * a coherent sheaf,

Description
===========

This method computes the canonical bundle of a projective variety $X$. Recall
that the canonical bundle of a normal variety is the reflexive hull (aka the
double dual) of the top exterior power of the cotangent sheaf $\Omega_X$ on a
variety.

An example --the example should be Serre duality and arithmetic genus
computation

+-----------------------------------------------------------------------------+
|i1 : Q = QQ[x_1..x_4];                                                       |
+-----------------------------------------------------------------------------+
|i2 : X = Proj Q                                                              |
|                                                                             |
|o2 = X                                                                       |
|                                                                             |
|o2 : ProjectiveVariety                                                       |
+-----------------------------------------------------------------------------+
|i3 : omega = canonicalBundle X                                               |
|                                                                             |
|        1                                                                    |
|o3 = OO  (-4)                                                                |
|       X                                                                     |
|                                                                             |
|o3 : coherent sheaf on X, free of rank 1                                     |
+-----------------------------------------------------------------------------+
|i4 : for i to 3 list HH^i (tangentSheaf X)(-1)                               |
|                                                                             |
|        4                                                                    |
|o4 = {QQ , 0, 0, 0}                                                          |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : for i to 3 list HH^i (dual( (tangentSheaf X)(-1)) ** omega)             |
|                                                                             |
|                 4                                                           |
|o5 = {0, 0, 0, QQ }                                                          |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : Y = Proj(Q/(x_1^5+x_2^5+x_3^5+x_4^5))                                   |
|                                                                             |
|o6 = Y                                                                       |
|                                                                             |
|o6 : ProjectiveVariety                                                       |
+-----------------------------------------------------------------------------+
|i7 : isSmooth Y                                                              |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+
|i8 : omega' = canonicalBundle Y                                              |
|                                                                             |
|        1                                                                    |
|o8 = OO  (1)                                                                 |
|       Y                                                                     |
|                                                                             |
|o8 : coherent sheaf on Y, free of rank 1                                     |
+-----------------------------------------------------------------------------+
|i9 : C = cotangentSheaf(2,Y)                                                 |
|                                                                             |
|o9 = cokernel {4} | -x_1 x_3 0   0    0    0    -x_4 0    0    0   0   0     |
|              {4} | x_2  0   x_3 0    0    0    0    0    0    0   0   0     |
|              {4} | 0    x_2 x_1 0    0    0    0    0    x_4  0   0   0     |
|              {4} | 0    0   0   x_3  0    0    -x_2 0    0    0   0   0     |
|              {4} | 0    0   0   x_1  0    0    0    -x_2 0    x_4 0   0     |
|              {4} | 0    0   0   -x_2 0    0    0    0    -x_2 0   0   0     |
|              {4} | 0    0   0   0    x_3  0    x_3  0    0    0   0   0     |
|              {4} | 0    0   0   0    x_1  0    0    x_3  0    0   x_4 0     |
|              {4} | 0    0   0   0    -x_2 0    0    0    x_3  0   0   0     |
|              {4} | 0    0   0   0    0    0    0    0    0    x_3 x_2 0     |
|              {4} | 0    0   0   0    0    x_3  0    0    0    0   0   0     |
|              {4} | 0    0   0   0    0    x_1  0    0    0    0   0   x_4   |
|              {4} | 0    0   0   0    0    -x_2 0    0    0    0   0   0     |
|              {4} | 0    0   0   0    0    0    0    0    0    0   0   x_2   |
|              {4} | 0    0   0   0    0    0    0    0    0    0   0   -x_3  |
|                                                                             |
|                                         15                                  |
|o9 : coherent sheaf on Y, quotient of OO   (-4)                              |
|                                        Y                                    |
|-----------------------------------------------------------------------------|
|0    0    0    0   0   0   0    x_4  0    0    0   0   -x_2^4 0      0       |
|-x_4 0    0    0   0   0   0    0    x_4  0    0   0   -x_1^4 0      0       |
|0    -x_4 0    0   0   0   0    0    0    0    0   0   0      -x_1^4 x_2^4   |
|-x_1 0    0    0   0   0   0    0    0    x_4  0   0   x_4^4  0      0       |
|0    -x_1 0    0   0   0   0    0    0    0    0   0   0      x_4^4  0       |
|0    0    -x_1 x_4 0   0   0    0    0    0    0   0   0      0      x_4^4   |
|0    0    0    0   0   0   -x_1 0    0    0    x_4 0   0      0      0       |
|0    0    0    0   0   0   0    -x_1 0    0    0   0   0      0      0       |
|0    0    0    0   x_4 0   0    0    -x_1 0    0   0   0      0      0       |
|0    0    0    0   x_1 0   0    0    0    -x_1 0   0   0      0      0       |
|x_3  0    0    0   0   0   x_2  0    0    0    0   x_4 0      0      0       |
|0    x_3  0    0   0   0   0    x_2  0    0    0   0   0      0      0       |
|0    0    x_3  0   0   x_4 0    0    x_2  0    0   0   0      0      0       |
|0    0    0    x_3 0   x_1 0    0    0    x_2  0   0   0      0      0       |
|0    0    0    0   x_3 0   0    0    0    0    x_2 x_1 0      0      0       |
|-----------------------------------------------------------------------------|
|0     0      0      x_3^4 x_1^4 0      0      0      0      0      x_2^4     |
|0     0      0      0     0     x_1^4  0      0      0      -x_3^4 0         |
|0     0      0      0     0     -x_3^4 0      0      0      0      -x_3^4    |
|0     0      0      0     0     0      x_1^4  0      0      0      0         |
|x_2^4 0      0      0     0     0      -x_3^4 0      0      0      0         |
|x_1^4 0      0      0     0     0      0      0      0      0      0         |
|0     0      0      x_4^4 0     0      0      x_1^4  0      0      0         |
|0     x_2^4  0      0     x_4^4 0      0      -x_3^4 0      0      0         |
|0     x_1^4  0      0     0     x_4^4  0      0      0      0      0         |
|0     -x_4^4 0      0     0     0      x_4^4  0      0      0      0         |
|0     0      0      0     0     0      0      0      x_1^4  -x_4^4 0         |
|0     0      x_2^4  0     0     0      0      0      -x_3^4 0      -x_4^4    |
|0     0      x_1^4  0     0     0      0      0      0      0      0         |
|0     0      -x_4^4 0     0     0      0      0      0      0      0         |
|0     0      0      0     0     0      0      0      -x_4^4 0      0         |
|-----------------------------------------------------------------------------|
|0      0      0      0     0      0      0      0      0      0     |        |
|x_2^4  0      0      0     0      0      0      0      0      0     |        |
|0      0      0      0     0      0      0      0      0      0     |        |
|0      x_2^4  0      0     -x_3^4 0      0      0      0      0     |        |
|0      0      0      0     0      -x_3^4 0      0      0      0     |        |
|0      x_3^4  0      0     0      0      -x_3^4 0      0      0     |        |
|0      0      x_2^4  0     -x_2^4 0      0      0      0      0     |        |
|0      0      0      0     0      -x_2^4 0      0      0      0     |        |
|0      0      x_3^4  0     0      0      -x_2^4 0      0      0     |        |
|0      0      0      0     0      0      0      -x_2^4 x_3^4  0     |        |
|0      0      0      x_2^4 -x_1^4 0      0      0      0      0     |        |
|0      0      0      0     0      -x_1^4 0      0      0      0     |        |
|-x_4^4 0      0      x_3^4 0      0      -x_1^4 0      0      0     |        |
|0      -x_4^4 0      0     0      0      0      -x_1^4 0      x_3^4 |        |
|0      0      -x_4^4 0     0      0      0      0      -x_1^4 x_2^4 |        |
+-----------------------------------------------------------------------------+
|i10 : for i to 2 list HH^i (C)                                               |
|                                                                             |
|         4       1                                                           |
|o10 = {QQ , 0, QQ }                                                          |
|                                                                             |
|o10 : List                                                                   |
+-----------------------------------------------------------------------------+
|i11 : for i to 2 list HH^i ((dual C) ** omega') --dual                       |
|                                                                             |
|         1       4                                                           |
|o11 = {QQ , 0, QQ }                                                          |
|                                                                             |
|o11 : List                                                                   |
+-----------------------------------------------------------------------------+

We can use this to see the difference between the top exterior power of the
cotangent bundle of Z and its reflexive hull.

+-----------------------------------------------+
|i12 : Z = Proj(Q/(x_1^2*x_2 - x_3^2*x_4))      |
|                                               |
|o12 = Z                                        |
|                                               |
|o12 : ProjectiveVariety                        |
+-----------------------------------------------+
|i13 : isSmooth Z                               |
|                                               |
|o13 = false                                    |
+-----------------------------------------------+
|i14 : for i to 2 list HH^i canonicalBundle Z   |
|                                               |
|               1                               |
|o14 = {0, 0, QQ }                              |
|                                               |
|o14 : List                                     |
+-----------------------------------------------+
|i15 : for i to 2 list HH^i det cotangentSheaf Z|
|                                               |
|         2    8    1                           |
|o15 = {QQ , QQ , QQ }                          |
|                                               |
|o15 : List                                     |
+-----------------------------------------------+

Recall that the arithmetic genus is given by the number of global sections of
the canonical bundle. Projective space has genus 0 in general, and smooth
elliptic curves have genus 1. We verify the elliptic curve case in an example:

+--------------------------------------------+
|i16 : R = QQ[x..z]/(y^3 - y*z^2 - x^3)      |
|                                            |
|o16 = R                                     |
|                                            |
|o16 : QuotientRing                          |
+--------------------------------------------+
|i17 : E = Proj R                            |
|                                            |
|o17 = E                                     |
|                                            |
|o17 : ProjectiveVariety                     |
+--------------------------------------------+
|i18 : for i to 1 list HH^i canonicalBundle E|
|                                            |
|         1    1                             |
|o18 = {QQ , QQ }                            |
|                                            |
|o18 : List                                  |
+--------------------------------------------+

Caveat
======

This method does not check that the input variety $X$ is normal, but rather
always returns the reflexive hull of the top exterior power of the cotangent
sheaf.

See also
========

  * cotangentSheaf -- cotangent sheaf of a projective
    variety

Ways to use canonicalBundle:
============================

  * "canonicalBundle(ProjectiveVariety)"

For the programmer
==================

The object canonicalBundle, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:501:0.

char(AffineVariety) -- the characteristic of the coordinate ring of a variety
*****************************************************************************

  * Function: char (Macaulay2Doc),

Description
===========

Returns the characteristic of the corresponding ring.

Ways to use this method:
========================

  * char(AffineVariety) -- the characteristic
    of the coordinate ring of a variety
  * "char(ProjectiveVariety)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:237:0.

codim(CoherentSheaf) -- codimension of the support of a coherent sheaf on a projective variety
**********************************************************************************************

  * Function: codim (Macaulay2Doc),
  * Usage:
        codim F
  * Inputs:
      * F, a coherent sheaf, a coherent sheaf over a
        ProjectiveVariety, X
  * Optional inputs (Macaulay2Doc),:
      * Generic => ..., default value false
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

Computes the codimension of the support of F as given by dim(R) - dim(M) where
M is the module representing F over the homogeneous coordinate ring R of X.
+----------------------------------------------------------+
|i1 : R = ZZ/31991[a,b,c,d];                               |
+----------------------------------------------------------+
|i2 : I = monomialCurveIdeal(R,{1,3,5})                    |
|                                                          |
|             2         2     2    3    2                  |
|o2 = ideal (c  - b*d, b c - a d, b  - a c)                |
|                                                          |
|o2 : Ideal of R                                           |
+----------------------------------------------------------+
|i3 : projplane = Proj(R)                                  |
|                                                          |
|o3 = projplane                                            |
|                                                          |
|o3 : ProjectiveVariety                                    |
+----------------------------------------------------------+
|i4 : II = sheaf module I                                  |
|                                                          |
|o4 = image | c2-bd b2c-a2d b3-a2c |                       |
|                                                          |
|                                                         1|
|o4 : coherent sheaf on projplane, subsheaf of OO          |
|                                                projplane |
+----------------------------------------------------------+
|i5 : can = sheafExt^1(II,OO_projplane^1(-4))              |
|                                                          |
|o5 = cokernel | a2 -b c |                                 |
|              | b2 -c d |                                 |
|                                                          |
|                                                         2|
|o5 : coherent sheaf on projplane, quotient of OO          |
|                                                projplane |
+----------------------------------------------------------+
|i6 : codim can                                            |
|                                                          |
|o6 = 2                                                    |
+----------------------------------------------------------+

Caveat
======

The returned value is the usual codimension if R is an integral domain or, more
generally, equidimensional.

See also
========

  * dim(Module) (Macaulay2Doc) -- compute the Krull
    dimension

Ways to use this method:
========================

  * codim(CoherentSheaf) -- codimension of the
    support of a coherent sheaf on a projective variety
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:646:0.

codim(Variety) -- codimension of a variety
******************************************

  * Function: codim (Macaulay2Doc),
  * Usage:
        codim V
  * Inputs:
      * V, a variety,
  * Optional inputs (Macaulay2Doc),:
      * Generic (missing documentation) => ..., default value false,
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

Computes the codimension of a variety V.
+--------------------------------------------+
|i1 : R = ZZ/101[x_0..x_3];                  |
+--------------------------------------------+
|i2 : M = matrix{{x_0,x_1,x_2},{x_1,x_2,x_3}}|
|                                            |
|o2 = | x_0 x_1 x_2 |                        |
|     | x_1 x_2 x_3 |                        |
|                                            |
|             2      3                       |
|o2 : Matrix R  <-- R                        |
+--------------------------------------------+
|i3 : V = Proj(R/minors(2,M));               |
+--------------------------------------------+
|i4 : codim V                                |
|                                            |
|o4 = 2                                      |
+--------------------------------------------+

Caveat
======

The returned value is the usual codimension if the base ring is an integral
domain or, more generally, equidimensional.

See also
========

  * codim(QuotientRing) (Macaulay2Doc), --
    compute the codimension

Ways to use this method:
========================

  * codim(Variety) -- codimension of a variety
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:189:0.

coherent sheaves
****************

The main reason to implement algebraic varieties is support the computation of
sheaf cohomology of coherent sheaves, which doesn't have an immediate
description in terms of graded modules.

In this example, we use cotangentSheaf, to produce the
cotangent sheaf on a K3 surface and compute its sheaf cohomology.
+-----------------------------------------------+
|i1 : R = QQ[a,b,c,d]/(a^4+b^4+c^4+d^4);        |
+-----------------------------------------------+
|i2 : X = Proj R                                |
|                                               |
|o2 = X                                         |
|                                               |
|o2 : ProjectiveVariety                         |
+-----------------------------------------------+
|i3 : Omega = cotangentSheaf X                  |
|                                               |
|o3 = cokernel {2} | c  0  0  d  0   a3  b3 0  ||
|              {2} | a  d  0  0  b3  -c3 0  0  ||
|              {2} | -b 0  d  0  a3  0   c3 0  ||
|              {2} | 0  b  a  0  -d3 0   0  c3 ||
|              {2} | 0  -c 0  a  0   -d3 0  b3 ||
|              {2} | 0  0  -c -b 0   0   d3 a3 ||
|                                               |
|                                         6     |
|o3 : coherent sheaf on X, quotient of OO  (-2) |
|                                        X      |
+-----------------------------------------------+
|i4 : HH^1(Omega)                               |
|                                               |
|       20                                      |
|o4 = QQ                                        |
|                                               |
|o4 : QQ-module, free                           |
+-----------------------------------------------+
Use the function sheaf, to convert a graded module to a coherent
sheaf, and module (Macaulay2Doc), to get the graded module back
again.
+------------------------------------------+
|i5 : F = sheaf coker matrix {{a,b}}       |
|                                          |
|o5 = cokernel | a b |                     |
|                                          |
|                                         1|
|o5 : coherent sheaf on X, quotient of OO  |
|                                        X |
+------------------------------------------+
|i6 : module F                             |
|                                          |
|o6 = cokernel | a b |                     |
|                                          |
|                            1             |
|o6 : R-module, quotient of R              |
+------------------------------------------+

See also
========

  * HH^ZZ CoherentSheaf, --
    cohomology of a coherent sheaf on a projective variety
  * HH^ZZ SumOfTwists -- coherent sheaf cohomology
    module
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:43:0.

CoherentSheaf (*) -- sum of twists
**********************************

  * Operator: (*) (Macaulay2Doc),
  * Usage:
        F(*)
  * Inputs:
      * F, a coherent sheaf,  or a a sheaf of rings,
  * Outputs:
      * a sum of twists, a symbolic representation of the
        graded object consisting of the twists F(n), for all integers n

Description
===========

+-----------------------------+
|i1 : R = QQ[x,y,z];          |
+-----------------------------+
|i2 : X = Proj R              |
|                             |
|o2 = X                       |
|                             |
|o2 : ProjectiveVariety       |
+-----------------------------+
|i3 : Ext^0(OO_X^1, OO_X^1)   |
|                             |
|       1                     |
|o3 = QQ                      |
|                             |
|o3 : QQ-module, free         |
+-----------------------------+
|i4 : Ext^0(OO_X^1, OO_X^1(*))|
|                             |
|      1                      |
|o4 = R                       |
|                             |
|o4 : R-module, free          |
+-----------------------------+
|i5 : Ext^0(OO_X^1, OO_X(*))  |
|                             |
|      1                      |
|o5 = R                       |
|                             |
|o5 : R-module, free          |
+-----------------------------+

Ways to use this method:
========================

  * CoherentSheaf (*) -- sum of twists
  * "SheafOfRings (*)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:99:0.

CoherentSheaf ** CoherentSheaf -- tensor produce of coherent sheaves
********************************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        F ** G
  * Inputs:
      * F, a coherent sheaf,
      * G, a coherent sheaf,
  * Outputs:
      * a coherent sheaf, the tensor product of F and G

Description
===========

+----------------------------------------+
|i1 : X = Proj(QQ[x,y,z])                |
|                                        |
|o1 = X                                  |
|                                        |
|o1 : ProjectiveVariety                  |
+----------------------------------------+
|i2 : OO_X(-3) ++ OO_X(4)                |
|                                        |
|        1           1                   |
|o2 = OO  (-3) ++ OO  (4)                |
|       X           X                    |
|                                        |
|o2 : coherent sheaf on X, free of rank 2|
+----------------------------------------+
|i3 : oo ** oo                           |
|                                        |
|        1           2          1        |
|o3 = OO  (-6) ++ OO  (1) ++ OO  (8)     |
|       X           X          X         |
|                                        |
|o3 : coherent sheaf on X, free of rank 4|
+----------------------------------------+

Ways to use this method:
========================

  * CoherentSheaf ** CoherentSheaf,
    -- tensor produce of coherent sheaves
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:903:0.

CoherentSheaf ++ CoherentSheaf -- direct sum of coherent sheaves
****************************************************************

  * Operator: ++ (Macaulay2Doc),
  * Usage:
        F ++ G
  * Inputs:
      * F, a coherent sheaf,
      * G, a coherent sheaf,
  * Outputs:
      * a coherent sheaf, the direct sum of F and G

Description
===========

+--------------------------------------------+
|i1 : X = Proj(QQ[x,y,z])                    |
|                                            |
|o1 = X                                      |
|                                            |
|o1 : ProjectiveVariety                      |
+--------------------------------------------+
|i2 : OO_X(3) ++ OO_X(4)                     |
|                                            |
|        1          1                        |
|o2 = OO  (3) ++ OO  (4)                     |
|       X          X                         |
|                                            |
|o2 : coherent sheaf on X, free of rank 2    |
+--------------------------------------------+
|i3 : module oo                              |
|                                            |
|               2                            |
|o3 = (QQ[x..z])                             |
|                                            |
|o3 : QQ[x..z]-module, free, degrees {-3, -4}|
+--------------------------------------------+

Ways to use this method:
========================

  * CoherentSheaf ++ CoherentSheaf, --
    direct sum of coherent sheaves
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:890:0.

CoherentSheaf / CoherentSheaf -- quotient of coherent sheaves
*************************************************************

  * Operator: / (Macaulay2Doc),
  * Usage:
        F / G
  * Inputs:
      * F, a coherent sheaf,
      * G, a coherent sheaf, or an ideal (Macaulay2Doc),
  * Outputs:
      * a coherent sheaf, the quotient sheaf F/G

Description
===========

We compute the cohomology of two sheaves supported on an elliptic curve.
+-----------------------------------------------------------------------------+
|i1 : X = Proj(QQ[x,y,z])                                                     |
|                                                                             |
|o1 = X                                                                       |
|                                                                             |
|o1 : ProjectiveVariety                                                       |
+-----------------------------------------------------------------------------+
|i2 : I = ideal(y^2*z-x*(x-z)*(x-11*z))                                       |
|                                                                             |
|              3      2     2         2                                       |
|o2 = ideal(- x  + 12x z + y z - 11x*z )                                      |
|                                                                             |
|o2 : Ideal of QQ[x..z]                                                       |
+-----------------------------------------------------------------------------+
|i3 : N = (sheaf module I)/(sheaf module I^2)                                 |
|                                                                             |
|o3 = subquotient (| -x3+12x2z+y2z-11xz2 |, | x6-24x5z-2x3y2z+166x4z2+24x2y2z2|
|                                                                             |
|                                            1                                |
|o3 : coherent sheaf on X, subquotient of OO                                  |
|                                           X                                 |
|-----------------------------------------------------------------------------|
|+y4z2-264x3z3-22xy2z3+121x2z4 |)                                             |
+-----------------------------------------------------------------------------+
|i4 : G = OO_X^1/I                                                            |
|                                                                             |
|o4 = cokernel | -x3+12x2z+y2z-11xz2 |                                        |
|                                                                             |
|                                         1                                   |
|o4 : coherent sheaf on X, quotient of OO                                     |
|                                        X                                    |
+-----------------------------------------------------------------------------+
|i5 : HH^1(G)                                                                 |
|                                                                             |
|       1                                                                     |
|o5 = QQ                                                                      |
|                                                                             |
|o5 : QQ-module, free                                                         |
+-----------------------------------------------------------------------------+
|i6 : HH^1(N)                                                                 |
|                                                                             |
|       9                                                                     |
|o6 = QQ                                                                      |
|                                                                             |
|o6 : QQ-module, free                                                         |
+-----------------------------------------------------------------------------+

See also
========

  * Proj -- make a projective variety
  * Spec -- make an affine variety
  * sheaf -- make a coherent sheaf
  * HH^ZZ CoherentSheaf, --
    cohomology of a coherent sheaf on a projective variety
  * OO -- the structure sheaf

Ways to use this method:
========================

  * CoherentSheaf / CoherentSheaf, --
    quotient of coherent sheaves
  * "CoherentSheaf / Ideal"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:942:0.

CoherentSheaf ^ ZZ -- direct sum
********************************

  * Operator: ^ (Macaulay2Doc),
  * Usage:
        F^n
  * Inputs:
      * F, a coherent sheaf, , or a a sheaf of rings,
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * a coherent sheaf, the direct sum of n copies of F

Description
===========

+------------------------------------------+
|i1 : R = QQ[a..d]/(a*d-b*c)               |
|                                          |
|o1 = R                                    |
|                                          |
|o1 : QuotientRing                         |
+------------------------------------------+
|i2 : Q = Proj R                           |
|                                          |
|o2 = Q                                    |
|                                          |
|o2 : ProjectiveVariety                    |
+------------------------------------------+
|i3 : OO_Q^5                               |
|                                          |
|        5                                 |
|o3 = OO                                   |
|       Q                                  |
|                                          |
|o3 : coherent sheaf on Q, free of rank 5  |
+------------------------------------------+
|i4 : IL = sheaf module ideal(a,b)         |
|                                          |
|o4 = image | a b |                        |
|                                          |
|                                         1|
|o4 : coherent sheaf on Q, subsheaf of OO  |
|                                        Q |
+------------------------------------------+
|i5 : IL^3                                 |
|                                          |
|o5 = image | a b 0 0 0 0 |                |
|           | 0 0 a b 0 0 |                |
|           | 0 0 0 0 a b |                |
|                                          |
|                                         3|
|o5 : coherent sheaf on Q, subsheaf of OO  |
|                                        Q |
+------------------------------------------+

See also
========

  * Proj -- make a projective variety
  * sheaf -- make a coherent sheaf

Ways to use this method:
========================

  * "CoherentSheaf ^ List"
  * CoherentSheaf ^ ZZ -- direct sum
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:875:0.

CoherentSheaf ^** ZZ -- tensor power
************************************

  * Operator: ^** (Macaulay2Doc),
  * Usage:
        M^**i
  * Inputs:
      * M, a coherent sheaf,
      * i, an integer (Macaulay2Doc),
  * Outputs:
      * a coherent sheaf, the i-th tensor power of M

Description
===========

The second symmetric power of the canonical sheaf of the rational quartic:
+-----------------------------------------------------------------------------+
|i1 : R = QQ[a..d];                                                           |
+-----------------------------------------------------------------------------+
|i2 : I = monomialCurveIdeal(R,{1,3,4})                                       |
|                                                                             |
|                        3      2     2    2    3    2                        |
|o2 = ideal (b*c - a*d, c  - b*d , a*c  - b d, b  - a c)                      |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : X = variety I                                                           |
|                                                                             |
|o3 = X                                                                       |
|                                                                             |
|o3 : ProjectiveVariety                                                       |
+-----------------------------------------------------------------------------+
|i4 : KX = sheaf(Ext^1(I,R^{-4}) ** ring X)                                   |
|                                                                             |
|o4 = cokernel {1} | 1 0 0 0 0 0  0 0  |                                      |
|              {1} | 0 1 0 c a -d 0 -b |                                      |
|              {1} | 0 0 0 d b 0  c 0  |                                      |
|              {1} | 0 0 0 0 0 c  b a  |                                      |
|              {1} | 0 1 0 0 0 0  0 0  |                                      |
|              {1} | 0 0 1 0 0 0  0 0  |                                      |
|                                                                             |
|                                         6                                   |
|o4 : coherent sheaf on X, quotient of OO  (-1)                               |
|                                        X                                    |
+-----------------------------------------------------------------------------+
|i5 : K2 = KX^**2                                                             |
|                                                                             |
|o5 = cokernel {2} | 1 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 1 0 c a -d 0 -b 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 d b 0  c 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 c  b a  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 1 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 1 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  1 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 1 0 c a -d 0 -b 0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 d b 0  c 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 c  b a  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 1 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 1 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  1 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 c a -d 0 -b 0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 d b 0  c 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 c  b a  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 1 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  1 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|              {2} | 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0|
|                                                                             |
|                                         36                                  |
|o5 : coherent sheaf on X, quotient of OO   (-2)                              |
|                                        X                                    |
|-----------------------------------------------------------------------------|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  1 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  1 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 c a -d 0 -b 0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 c a|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 d b 0  c 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 d b|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 c  b a  0 0 0 0 0|
|0 c a -d 0 -b 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 d b 0  c 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 c  b a  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|1 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  1 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 1 0 c a -d 0 -b 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 0 0|
|0 0 0 0  0 0  0 0 0 d b 0  c 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 c  b a  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 1 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 1 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  1 0 0 0 0 0  0 0  0 0 1 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 c a -d 0 -b 0 0 0 0 0 0  0 0  0 0 1 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 d b 0  c 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 c  b a  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 1 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0|
|-----------------------------------------------------------------------------|
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  1 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  1 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  1 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  1 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|-d 0 -b 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 1 0 c a -d 0 -b 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 1 0 c a -d 0 -b 0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 c a -d 0 -b 0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 c a -d 0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  c 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 d b 0  c 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 d b 0  c 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 d b 0  c 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 d b 0  c |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|c  b a  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 c  b a  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 c  b a  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 c  b a  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 c  b |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 1 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 1 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 1 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 1 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 1 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 1 0 0 0  0 0  0 0 0 0 0 0  0 |
|0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 0 0 0 0  0 0  0 0 1 0 0 0  0 |
|-----------------------------------------------------------------------------|
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|-b |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|a  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
|0  |                                                                         |
+-----------------------------------------------------------------------------+
|i6 : prune K2                                                                |
|                                                                             |
|o6 = cokernel {1} | c2 bd ac b2 |                                            |
|              {2} | d  c  b  a  |                                            |
|                                                                             |
|                                         1           1                       |
|o6 : coherent sheaf on X, quotient of OO  (-1) ++ OO  (-2)                   |
|                                        X           X                        |
+-----------------------------------------------------------------------------+
Notice that the resulting sheaf is not always presented in the most economical
manner.  Use prune (Macaulay2Doc), to improve the presentation.

See also
========

  * monomialCurveIdeal (Macaulay2Doc) -- make the
    ideal of a monomial curve
  * Ext (Macaulay2Doc) -- compute an Ext module
  * variety -- the underlying variety over
    which a coherent sheaf or morphism is defined.
  * sheaf -- make a coherent sheaf
  * prune (Macaulay2Doc) -- prune, e.g., compute a minimal
    presentation

Ways to use this method:
========================

  * CoherentSheaf ^** ZZ -- tensor power
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:924:0.

CoherentSheaf ZZ -- canonical twist of a coherent sheaf
*******************************************************

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        F(n)
  * Inputs:
      * F, a coherent sheaf, or a sheaf of rings,
        on a projective variety
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * a coherent sheaf, the twist of F on a projective
        variety by the n-th power of the hyperplane line bundle.

Description
===========

+----------------------------------------+
|i1 : X = Proj(QQ[x,y,z])                |
|                                        |
|o1 = X                                  |
|                                        |
|o1 : ProjectiveVariety                  |
+----------------------------------------+
|i2 : F = OO_X                           |
|                                        |
|o2 = OO                                 |
|       X                                |
|                                        |
|o2 : SheafOfRings                       |
+----------------------------------------+
|i3 : G = F(3)                           |
|                                        |
|        1                               |
|o3 = OO  (3)                            |
|       X                                |
|                                        |
|o3 : coherent sheaf on X, free of rank 1|
+----------------------------------------+
|i4 : module G                           |
|                                        |
|               1                        |
|o4 = (QQ[x..z])                         |
|                                        |
|o4 : QQ[x..z]-module, free, degrees {-3}|
+----------------------------------------+
|i5 : degrees oo                         |
|                                        |
|o5 = {{-3}}                             |
|                                        |
|o5 : List                               |
+----------------------------------------+

Ways to use this method:
========================

  * CoherentSheaf ZZ -- canonical twist of a coherent
    sheaf
  * "SheafOfRings ZZ"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:848:0.

cotangentSheaf -- cotangent sheaf of a projective variety
*********************************************************

  * Usage:
        cotangentSheaf X
  * Inputs:
      * X, a projective variety,
  * Optional inputs (Macaulay2Doc),:
      * MinimalGenerators => a Boolean value (Macaulay2Doc),
        default value true, whether to prune (Macaulay2Doc), the
        result before returning it
      * Strategy => ..., default value null
  * Outputs:
      * a coherent sheaf,

Description
===========

This method computes the cotangent sheaf of the projective variety $X$. The
method used is to take the middle homology of the sequence associated to the
Jacobian: --finish

As an example we verify the Gauss-Bonnet theorem on a plane quartic curve:

+----------------------------------------+
|i1 : X = Proj QQ[x,y,z]/(x^4+y^4+z^4)   |
|                                        |
|o1 = X                                  |
|                                        |
|o1 : ProjectiveVariety                  |
+----------------------------------------+
|i2 : genus X                            |
|                                        |
|o2 = 3                                  |
+----------------------------------------+
|i3 : omega = cotangentSheaf X           |
|                                        |
|        1                               |
|o3 = OO  (1)                            |
|       X                                |
|                                        |
|o3 : coherent sheaf on X, free of rank 1|
+----------------------------------------+
|i4 : degree omega                       |
|                                        |
|o4 = 4                                  |
+----------------------------------------+

See also
========

  * idealSheaf -- ideal sheaf of a projective variety
  * tangentSheaf -- tangent sheaf of a projective variety
  * ProjectiveVariety -- the class of all projective
    varieties

Ways to use cotangentSheaf:
===========================

  * "cotangentSheaf(ProjectiveVariety)"
  * cotangentSheaf(ZZ,ProjectiveVariety)
    -- exterior powers of the
    cotangent sheaf of a projective variety

For the programmer
==================

The object cotangentSheaf, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:501:0.

cotangentSheaf(ZZ,ProjectiveVariety) -- exterior powers of the cotangent sheaf of a projective variety
******************************************************************************************************

  * Function: cotangentSheaf,
  * Usage:
        cotangentSheaf(p, X)
  * Inputs:
      * p, an integer (Macaulay2Doc),
      * X, a projective variety,
  * Optional inputs (Macaulay2Doc),:
      * MinimalGenerators, => a Boolean value (Macaulay2Doc),
        default value true, whether to prune (Macaulay2Doc),
        the result before returning it
      * Strategy, => ..., default value null, cotangent
        sheaf of a projective variety
  * Outputs:
      * a coherent sheaf,

Description
===========

This function computes the $p$-th exterior power of the cotangent sheaf,
of a projective variety $X$, usually denoted $\Omega_X^p$.

As an example we compute $h^{1,1}$ on a K3 surface (a quartic in projective
threespace):

+------------------------------------------------------------------------+
|i1 : K3 = Proj QQ[x_0..x_3]/(x_0^4+x_1^4+x_2^4+x_3^4-11*x_0*x_1*x_2*x_3)|
|                                                                        |
|o1 = K3                                                                 |
|                                                                        |
|o1 : ProjectiveVariety                                                  |
+------------------------------------------------------------------------+
|i2 : omega1 = cotangentSheaf(1, K3);                                    |
+------------------------------------------------------------------------+
|i3 : HH^1(omega1)                                                       |
|                                                                        |
|       20                                                               |
|o3 = QQ                                                                 |
|                                                                        |
|o3 : QQ-module, free                                                    |
+------------------------------------------------------------------------+

As a second example we compute Hodge numbers, of the Fermat quintic
in projective fourspace:

+----------------------------------------------------------------------+
|i4 : FermatQuintic = Proj QQ[x_0..x_4]/(x_0^5+x_1^5+x_2^5+x_3^5+x_4^5)|
|                                                                      |
|o4 = FermatQuintic                                                    |
|                                                                      |
|o4 : ProjectiveVariety                                                |
+----------------------------------------------------------------------+
|i5 : omega1 = cotangentSheaf(1, FermatQuintic);                       |
+----------------------------------------------------------------------+
|i6 : HH^1(omega1)                                                     |
|                                                                      |
|       1                                                              |
|o6 = QQ                                                               |
|                                                                      |
|o6 : QQ-module, free                                                  |
+----------------------------------------------------------------------+
|i7 : HH^2(omega1)                                                     |
|                                                                      |
|       101                                                            |
|o7 = QQ                                                               |
|                                                                      |
|o7 : QQ-module, free                                                  |
+----------------------------------------------------------------------+
|i8 : omega2 = cotangentSheaf(2, FermatQuintic);                       |
+----------------------------------------------------------------------+
|i9 : HH^1(omega2)                                                     |
|                                                                      |
|       101                                                            |
|o9 = QQ                                                               |
|                                                                      |
|o9 : QQ-module, free                                                  |
+----------------------------------------------------------------------+
|i10 : HH^2(omega2)                                                    |
|                                                                      |
|        1                                                             |
|o10 = QQ                                                              |
|                                                                      |
|o10 : QQ-module, free                                                 |
+----------------------------------------------------------------------+

See also
========

  * cotangentSheaf -- cotangent sheaf of a projective
    variety
  * ProjectiveVariety -- the class of all projective
    varieties
  * hh(Sequence,ProjectiveVariety) -- Hodge numbers of a smooth
    projective variety

Ways to use this method:
========================

  * cotangentSheaf(ZZ,ProjectiveVariety)
    -- exterior powers of the
    cotangent sheaf of a projective variety
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:501:0.

degree(ProjectiveVariety)
*************************

  * Function: degree (Macaulay2Doc),
  * Usage:
        degree X
  * Inputs:
      * X, a projective variety,
  * Outputs:
      * an integer (Macaulay2Doc), the degree of X

Description
===========

+--------------------------------------+
|i1 : S = ZZ/32003[x,y,z];             |
+--------------------------------------+
|i2 : I = ideal(x^4-4*x*y*z^2-z^4-y^4);|
|                                      |
|o2 : Ideal of S                       |
+--------------------------------------+
|i3 : R = S/I;                         |
+--------------------------------------+
|i4 : X = variety I                    |
|                                      |
|o4 = X                                |
|                                      |
|o4 : ProjectiveVariety                |
+--------------------------------------+
|i5 : degree X                         |
|                                      |
|o5 = 4                                |
+--------------------------------------+
The degree of a projective variety X = V(I) = Proj R is the degree of the
homogeneous coordinate ring R = S/I of X.
+-------------------------+
|i6 : degree X == degree I|
|                         |
|o6 = true                |
+-------------------------+
|i7 : degree X == degree R|
|                         |
|o7 = true                |
+-------------------------+

See also
========

  * degree(Ideal) (Macaulay2Doc)
  * variety -- the underlying variety over
    which a coherent sheaf or morphism is defined.
  * varieties

Ways to use this method:
========================

  * degree(ProjectiveVariety)
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:383:0.

degrees(CoherentSheaf) -- degrees of a coherent sheaf
*****************************************************

  * Function: degrees (Macaulay2Doc),
  * Usage:
        degrees F
  * Inputs:
      * F, a coherent sheaf,
  * Outputs:
      * a list (Macaulay2Doc),

See also
========

  * degrees(Module) (Macaulay2Doc) -- degrees of
    generators

Ways to use this method:
========================

  * degrees(CoherentSheaf) -- degrees of a
    coherent sheaf
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:684:0.

dim(AffineVariety) -- dimension of the affine variety
*****************************************************

  * Function: dim (Macaulay2Doc),
  * Usage:
        dim V
  * Inputs:
      * V, an affine variety,
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

Computes the dimension of the affine algebraic set V as the Krull dimension of
its affine coordinate ring.
+------------------------------------+
|i1 : R = ZZ/101[x,y];               |
+------------------------------------+
|i2 : point = ideal(x,y);            |
|                                    |
|o2 : Ideal of R                     |
+------------------------------------+
|i3 : line = ideal(2*x+3*y-1);       |
|                                    |
|o3 : Ideal of R                     |
+------------------------------------+
|i4 : V=Spec(R/intersect(point,line))|
|                                    |
|o4 = V                              |
|                                    |
|o4 : AffineVariety                  |
+------------------------------------+
|i5 : dim V                          |
|                                    |
|o5 = 1                              |
+------------------------------------+
|i6 : Z=Spec(R/(point+line))         |
|                                    |
|o6 = Z                              |
|                                    |
|o6 : AffineVariety                  |
+------------------------------------+
|i7 : dim Z                          |
|                                    |
|o7 = -1                             |
+------------------------------------+

See also
========

  * Spec -- make an affine variety
  * dim(ProjectiveVariety) -- dimension of
    the projective variety

Ways to use this method:
========================

  * dim(AffineVariety) -- dimension of the
    affine variety
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:210:0.

dim(ProjectiveVariety) -- dimension of the projective variety
*************************************************************

  * Function: dim (Macaulay2Doc),
  * Usage:
        dim V
  * Inputs:
      * V, a projective variety,
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

Computes the dimension of the projective algebraic set from the Krull dimension
of its homogeneous coordinate ring.
+----------------------------------------------------+
|i1 : R = ZZ/101[x_0..x_4];                          |
+----------------------------------------------------+
|i2 : M = matrix{{x_0,x_1,x_2,x_3},{x_1,x_2,x_3,x_4}}|
|                                                    |
|o2 = | x_0 x_1 x_2 x_3 |                            |
|     | x_1 x_2 x_3 x_4 |                            |
|                                                    |
|             2      4                               |
|o2 : Matrix R  <-- R                                |
+----------------------------------------------------+
|i3 : V = Proj(R/minors(2,M));                       |
+----------------------------------------------------+
|i4 : degree V                                       |
|                                                    |
|o4 = 4                                              |
+----------------------------------------------------+
|i5 : dim V                                          |
|                                                    |
|o5 = 1                                              |
+----------------------------------------------------+
|i6 : dim minors(2,M)                                |
|                                                    |
|o6 = 2                                              |
+----------------------------------------------------+

See also
========

  * Proj -- make a projective variety
  * dim(AffineVariety) -- dimension of the
    affine variety

Ways to use this method:
========================

  * dim(ProjectiveVariety) -- dimension of
    the projective variety
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:230:0.

dual(CoherentSheaf) -- dual coherent sheaf
******************************************

  * Function: dual (Macaulay2Doc),

Description
===========

dual M -- the dual of a coherent sheaf.

Ways to use this method:
========================

  * dual(CoherentSheaf) -- dual coherent sheaf
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:856:0.

euler -- Euler characteristic
*****************************

See also
========

  * eulers (Macaulay2Doc)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use euler:
==================

  * euler(CoherentSheaf) -- Euler
    characteristic of coherent sheaf
  * euler(Complex) (missing documentation)
  * euler(Ideal)
  * euler(Module)
  * euler(ProjectiveHilbertPolynomial) (Macaulay2Doc)
    -- constant term of
    the Hilbert polynomial
  * euler(ProjectiveVariety), --
    topological Euler characteristic of a (smooth) projective variety
  * euler(Ring)

For the programmer
==================

The object euler (Macaulay2Doc), is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/euler-doc.m2:12:0.

euler(CoherentSheaf) -- Euler characteristic of coherent sheaf
**************************************************************

  * Function: euler (Macaulay2Doc),
  * Usage:
        euler F
  * Inputs:
      * F, a coherent sheaf,
  * Outputs:
      * an integer (Macaulay2Doc),  the Euler characteristic of the
        cohomology of the sheaf

Description
===========

The command returns chi(F) the Euler characteristic of the sheaf F i.e. the
alternated sum of the dimensions of its cohomology groups

See also
========

  * eulers(CoherentSheaf)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use this method:
========================

  * euler(CoherentSheaf) -- Euler
    characteristic of coherent sheaf
-------------------------------------------------------------------------------

The source of this document is in Varieties/euler-doc.m2:54:0.

euler(Ideal)
************

  * Function: euler (Macaulay2Doc),

Description
===========

This needs to be documented.

See also
========

  * eulers(Ideal) (missing documentation)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use this method:
========================

  * euler(Ideal)
-------------------------------------------------------------------------------

The source of this document is in Varieties/euler-doc.m2:72:0.

euler(Module)
*************

  * Function: euler (Macaulay2Doc),

Description
===========

This needs to be documented.

See also
========

  * eulers(Module) (missing documentation)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use this method:
========================

  * euler(Module)
-------------------------------------------------------------------------------

The source of this document is in Varieties/euler-doc.m2:60:0.

euler(ProjectiveVariety) -- topological Euler characteristic of a (smooth) projective variety
*********************************************************************************************

  * Function: euler (Macaulay2Doc),
  * Usage:
        euler V
  * Inputs:
      * V, a projective variety,
  * Outputs:
      * an integer (Macaulay2Doc), the topological Euler
        characteristics of the variety V

Description
===========

The command computes the topological Euler characteristic of the (smooth)
projective variety V as an alternated sum of its Hodge numbers. The Hodge
numbers can be computed directly using the command hh.

A smooth plane quartic curve has genus 3 and topological Euler characteristic
-4:
+----------------------------------------------------------+
|i1 : Quartic = Proj(QQ[x_0..x_2]/ideal(x_0^4+x_1^4+x_2^4))|
|                                                          |
|o1 = Quartic                                              |
|                                                          |
|o1 : ProjectiveVariety                                    |
+----------------------------------------------------------+
|i2 : euler(Quartic)                                       |
|                                                          |
|o2 = -4                                                   |
+----------------------------------------------------------+

The topological Euler characteristic of a smooth quintic hypersurface in
projective fourspace is -200:
+-----------------------------------------------------------------------------+
|i3 : Quintic = Proj(QQ[x_0..x_4]/ideal(x_0^5+x_1^5+x_2^5+x_3^5+x_4^5-101*x_0*|
|                                                                             |
|o3 = Quintic                                                                 |
|                                                                             |
|o3 : ProjectiveVariety                                                       |
|-----------------------------------------------------------------------------|
|x_1*x_2*x_3*x_4))                                                            |
+-----------------------------------------------------------------------------+
|i4 : euler(Quintic)                                                          |
|                                                                             |
|o4 = -200                                                                    |
+-----------------------------------------------------------------------------+

Caveat
======

No test is made to see if the projective variety is smooth

See also
========

  * Proj -- make a projective variety
  * genus (Macaulay2Doc) -- genus of an object
  * hh -- Hodge numbers of a smooth projective variety

Ways to use this method:
========================

  * euler(ProjectiveVariety), --
    topological Euler characteristic of a (smooth) projective variety
-------------------------------------------------------------------------------

The source of this document is in Varieties/euler-doc.m2:40:0.

euler(Ring)
***********

  * Function: euler (Macaulay2Doc),

Description
===========

This needs to be documented.

See also
========

  * eulers(Ring) (missing documentation)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use this method:
========================

  * euler(Ring)
-------------------------------------------------------------------------------

The source of this document is in Varieties/euler-doc.m2:66:0.

eulers -- list the sectional Euler characteristics
**************************************************

See also
========

  * euler (Macaulay2Doc)
  * genera (Macaulay2Doc)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use eulers:
===================

  * eulers(CoherentSheaf)
  * "eulers(Module)" -- see eulers(CoherentSheaf),
  * eulers(Ideal)
  * eulers(Ring)

For the programmer
==================

The object eulers (Macaulay2Doc), is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/euler-doc.m2:78:0.

eulers(CoherentSheaf)
*********************

  * Function: eulers (Macaulay2Doc),
  * Usage:
        eulers E
  * Inputs:
      * E, a coherent sheaf,
  * Outputs:
      * a list (Macaulay2Doc), the successive sectional Euler
        characteristics of a coherent sheaf, or a module.

Description
===========

Computes a list of the successive sectional Euler characteristics of a coherent
sheaf, the i-th entry on the list being the Euler characteristic of the i-th
generic hyperplane restriction of E

The Horrocks-Mumford bundle on the projective fourspace:
+------------------------------------------------------------+
|i1 : R = QQ[x_0..x_4];                                      |
+------------------------------------------------------------+
|i2 : a = {1,0,0,0,0}                                        |
|                                                            |
|o2 = {1, 0, 0, 0, 0}                                        |
|                                                            |
|o2 : List                                                   |
+------------------------------------------------------------+
|i3 : b = {0,1,0,0,1}                                        |
|                                                            |
|o3 = {0, 1, 0, 0, 1}                                        |
|                                                            |
|o3 : List                                                   |
+------------------------------------------------------------+
|i4 : c = {0,0,1,1,0}                                        |
|                                                            |
|o4 = {0, 0, 1, 1, 0}                                        |
|                                                            |
|o4 : List                                                   |
+------------------------------------------------------------+
|i5 : M1 = matrix table(5,5, (i,j)-> x_((i+j)%5)*a_((i-j)%5))|
|                                                            |
|o5 = | x_0 0   0   0   0   |                                |
|     | 0   x_2 0   0   0   |                                |
|     | 0   0   x_4 0   0   |                                |
|     | 0   0   0   x_1 0   |                                |
|     | 0   0   0   0   x_3 |                                |
|                                                            |
|             5      5                                       |
|o5 : Matrix R  <-- R                                        |
+------------------------------------------------------------+
|i6 : M2 = matrix table(5,5, (i,j)-> x_((i+j)%5)*b_((i-j)%5))|
|                                                            |
|o6 = | 0   x_1 0   0   x_4 |                                |
|     | x_1 0   x_3 0   0   |                                |
|     | 0   x_3 0   x_0 0   |                                |
|     | 0   0   x_0 0   x_2 |                                |
|     | x_4 0   0   x_2 0   |                                |
|                                                            |
|             5      5                                       |
|o6 : Matrix R  <-- R                                        |
+------------------------------------------------------------+
|i7 : M3 = matrix table(5,5, (i,j)-> x_((i+j)%5)*c_((i-j)%5))|
|                                                            |
|o7 = | 0   0   x_2 x_3 0   |                                |
|     | 0   0   0   x_4 x_0 |                                |
|     | x_2 0   0   0   x_1 |                                |
|     | x_3 x_4 0   0   0   |                                |
|     | 0   x_0 x_1 0   0   |                                |
|                                                            |
|             5      5                                       |
|o7 : Matrix R  <-- R                                        |
+------------------------------------------------------------+
|i8 : M = M1 | M2 | M3;                                      |
|                                                            |
|             5      15                                      |
|o8 : Matrix R  <-- R                                        |
+------------------------------------------------------------+
|i9 : betti (C=res coker M)                                  |
|                                                            |
|            0  1  2  3  4 5                                 |
|o9 = total: 5 15 29 37 20 2                                 |
|         0: 5 15 10  2  . .                                 |
|         1: .  .  4  .  . .                                 |
|         2: .  . 15 35 20 .                                 |
|         3: .  .  .  .  . 2                                 |
|                                                            |
|o9 : BettiTally                                             |
+------------------------------------------------------------+
|i10 : N = transpose submatrix(C.dd_3,{10..28},{2..36});     |
|                                                            |
|              35      19                                    |
|o10 : Matrix R   <-- R                                      |
+------------------------------------------------------------+
|i11 : betti (D=res coker N)                                 |
|                                                            |
|              0  1  2  3  4 5                               |
|o11 = total: 35 19 19 35 20 2                               |
|         -5: 35 15  .  .  . .                               |
|         -4:  .  4  .  .  . .                               |
|         -3:  .  .  .  .  . .                               |
|         -2:  .  .  .  .  . .                               |
|         -1:  .  .  .  .  . .                               |
|          0:  .  .  4  .  . .                               |
|          1:  .  . 15 35 20 .                               |
|          2:  .  .  .  .  . 2                               |
|                                                            |
|o11 : BettiTally                                            |
+------------------------------------------------------------+
|i12 : Pfour = Proj(R)                                       |
|                                                            |
|o12 = Pfour                                                 |
|                                                            |
|o12 : ProjectiveVariety                                     |
+------------------------------------------------------------+
|i13 : HorrocksMumford = sheaf(coker D.dd_3);                |
+------------------------------------------------------------+
|i14 : HH^0(HorrocksMumford(1))                              |
|                                                            |
|o14 = 0                                                     |
|                                                            |
|o14 : QQ-module                                             |
+------------------------------------------------------------+
|i15 : HH^0(HorrocksMumford(2))                              |
|                                                            |
|        4                                                   |
|o15 = QQ                                                    |
|                                                            |
|o15 : QQ-module, free                                       |
+------------------------------------------------------------+
|i16 : eulers(HorrocksMumford(2))                            |
|                                                            |
|o16 = {2, 12, 12, 7, 2}                                     |
|                                                            |
|o16 : List                                                  |
+------------------------------------------------------------+

See also
========

  * genera (Macaulay2Doc)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use this method:
========================

  * eulers(CoherentSheaf)
  * "eulers(Module)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/euler-doc.m2:111:0.

eulers(Ideal)
*************

  * Function: eulers (Macaulay2Doc),
  * Usage:
        eulers I
  * Inputs:
      * I, an ideal (Macaulay2Doc),
  * Outputs:
      * the successive sectional Euler characteristics of an ideal (sheaf)., a
        list (Macaulay2Doc),

Description
===========

Computes a list of the successive sectional Euler characteristics of an ideal
(sheaf), the i-th entry in the list being the Euler characteristic of the i-th
generic hyperplane restriction of I
+--------------------------+
|i1 : R = ZZ/101[a,b,c];   |
+--------------------------+
|i2 : I =ideal(a^3+b^3+c^3)|
|                          |
|            3    3    3   |
|o2 = ideal(a  + b  + c )  |
|                          |
|o2 : Ideal of R           |
+--------------------------+
|i3 : eulers I             |
|                          |
|o3 = {0, 3}               |
|                          |
|o3 : List                 |
+--------------------------+

See also
========

  * genera (Macaulay2Doc)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use this method:
========================

  * eulers(Ideal)
-------------------------------------------------------------------------------

The source of this document is in Varieties/euler-doc.m2:130:0.

eulers(Ring)
************

  * Function: eulers (Macaulay2Doc),
  * Usage:
        eulers R
  * Inputs:
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * the successive sectional Euler characteristics of a (sheaf of)
        ring(s)., a list (Macaulay2Doc),

Description
===========

Computes a list of the successive sectional Euler characteristics of a ring
(sheaf of), the i-th entry in the list being the Euler characteristic of the
i-th generic hyperplane restriction of R
+-----------------------------------+
|i1 : S = ZZ/101[a,b,c];            |
+-----------------------------------+
|i2 : I = ideal(a^3+b^3+c^3)        |
|                                   |
|            3    3    3            |
|o2 = ideal(a  + b  + c )           |
|                                   |
|o2 : Ideal of S                    |
+-----------------------------------+
|i3 : R = S/I                       |
|                                   |
|o3 = R                             |
|                                   |
|o3 : QuotientRing                  |
+-----------------------------------+
|i4 : eulers(R)                     |
|                                   |
|o4 = {0, 3}                        |
|                                   |
|o4 : List                          |
+-----------------------------------+
|i5 : J = substitute(ideal(b,a+c),R)|
|                                   |
|o5 = ideal (b, a + c)              |
|                                   |
|o5 : Ideal of R                    |
+-----------------------------------+
|i6 : eulers(R/J)                   |
|                                   |
|o6 = {1}                           |
|                                   |
|o6 : List                          |
+-----------------------------------+

See also
========

  * genera (Macaulay2Doc)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use this method:
========================

  * eulers(Ring)
-------------------------------------------------------------------------------

The source of this document is in Varieties/euler-doc.m2:152:0.

Ext^ZZ(CoherentSheaf,CoherentSheaf) -- global Ext
*************************************************

  * Scripted functor: Ext (Macaulay2Doc),
  * Usage:
        Ext^i(F, G)
  * Inputs:
      * i, an integer (Macaulay2Doc),
      * F, a sheaf of rings, or a coherent sheaf,
      * G, a sheaf of rings, or a coherent sheaf,
  * Outputs:
      * a module (Macaulay2Doc), the global Ext module
        $\mathrm{Ext}^i_X(\mathcal F, \mathcal G)$

Description
===========

The global Ext module $\operatorname{Ext}^i_X (\mathcal F, \mathcal G)$ is a
vector space, defined as the $i$th right derived functor of the global Hom
functor $\operatorname{Hom}_X (\mathcal{F}, -)$. The elements of the $i$th
global Ext functor represent extensions of the sheaf $\mathcal{F}$ by
$\mathcal{G}$; that is, exact sequences of sheaves of the form $$0 \to
\mathcal{G} \to \mathcal{C}_i \to \mathcal{C}_{i-1} \to \cdots \to
\mathcal{C}_1 \to \mathcal{F} \to 0.$$ These representatives can be accessed
using the --put in yonedaSheafExt command

Of course, in Macaulay2 these vector spaces are not computed using injective
resolutions of sheaves. Instead, a result of Greg Smith is used that shows that
if $\mathca{F}$ and $\mathcal{G}$ are sheaves represented by modules $M$ and
$N$, respectively, then there exists an integer $d$ (depending on $M$, $N$, and
$i$) such that $$\operatorname{Ext}^i_X (\mathcal F, \mathcal G) =
\operatorname{Ext}^i_S (M_{\geq d} , N)_0,$$ where in the above $S$ is some
polynomial ring over a field, $M_{\geq d}$ denotes truncation, and $(-)_0$
denotes the degree $0$ part of a graded module. Moreover, the modules $M$ and
$N$ are being viewed as modules over the polynomial ring $S$ via restriction of
scalars along the canonical surjection $S \to R$, where $X =
\operatorname{Proj} (R)$.

If F or G is a sheaf of rings, it is regarded as a sheaf
of modules in the evident way.

Both F and S must be coherent sheaves on the same projective variety or scheme
$X$.

As an example, we compute $\mathrm{Hom}_X(\mathcal I_X,\mathcalO_X)$ and
$\mathrm{Ext}^1_X(\mathcal I_X,\mathcal O_X)$, for the rational quartic curve
in $\PP^3$.

+----------------------------------------------------------+
|i1 : S = QQ[a..d];                                        |
+----------------------------------------------------------+
|i2 : I = monomialCurveIdeal(S,{1,3,4})                    |
|                                                          |
|                        3      2     2    2    3    2     |
|o2 = ideal (b*c - a*d, c  - b*d , a*c  - b d, b  - a c)   |
|                                                          |
|o2 : Ideal of S                                           |
+----------------------------------------------------------+
|i3 : R = S/I                                              |
|                                                          |
|o3 = R                                                    |
|                                                          |
|o3 : QuotientRing                                         |
+----------------------------------------------------------+
|i4 : X = Proj R                                           |
|                                                          |
|o4 = X                                                    |
|                                                          |
|o4 : ProjectiveVariety                                    |
+----------------------------------------------------------+
|i5 : IX = sheaf (module I ** R)                           |
|                                                          |
|o5 = cokernel {2} | c2 bd ac b2 |                         |
|              {3} | -b -a 0  0  |                         |
|              {3} | d  c  -b -a |                         |
|              {3} | 0  0  -d -c |                         |
|                                                          |
|                                         1           3    |
|o5 : coherent sheaf on X, quotient of OO  (-2) ++ OO  (-3)|
|                                        X           X     |
+----------------------------------------------------------+
|i6 : Hom(IX, OO_X)                                        |
|                                                          |
|       16                                                 |
|o6 = QQ                                                   |
|                                                          |
|o6 : QQ-module, free                                      |
+----------------------------------------------------------+
|i7 : Ext^1(IX, OO_X)                                      |
|                                                          |
|o7 = 0                                                    |
|                                                          |
|o7 : QQ-module                                            |
+----------------------------------------------------------+

The $\mathrm{Ext}^1$ being zero says that the point corresponding to $I$ on the
Hilbert scheme is smooth (unobstructed), and vector space dimension of
$\mathrm{Hom}$ tells us that the dimension of the component at the point $I$ is
16.

The algorithm used may be found in:

  * Smith, G., Computing global extension modules, J. Symbolic Comp (2000) 29,
    729-746.

If the module $\bigoplus_{a\geq 0} \mathrm{Ext}^i(M, N(a))$ is desired, see
Ext^ZZ(CoherentSheaf,SumOfTwists).

See also
========

  * freeResolution (Complexes) -- compute a free
    resolution of a module or ideal
  * Tor (Macaulay2Doc) -- Tor module
  * Hom (Macaulay2Doc) -- module of homomorphisms
  * HH (Macaulay2Doc) -- general homology and cohomology functor
  * sheafExt -- sheaf extension of coherent sheaves

Ways to use this method:
========================

  * Ext^ZZ(CoherentSheaf,CoherentSheaf)
    -- global Ext
  * "Ext^ZZ(CoherentSheaf,SheafOfRings)"
  * "Ext^ZZ(SheafOfRings,CoherentSheaf)"
  * "Ext^ZZ(SheafOfRings,SheafOfRings)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

Ext^ZZ(CoherentSheaf,SheafMap) -- maps on global Ext induced by a sheaf map
***************************************************************************

  * Scripted functor: Ext (Macaulay2Doc),
  * Usage:
        Ext^i(F, g)
  * Inputs:
      * i, an integer (Macaulay2Doc),
      * F, a coherent sheaf,
      * g, a morphism of sheaves,
  * Outputs:
      * a matrix (Macaulay2Doc), the induced map on global Ext
        $\mathrm{Ext}^i_X(\mathcal{F} , g)$, where $g$ is some morphism of
        sheaves

Description
===========

As explained in Ext^ZZ(CoherentSheaf,CoherentSheaf),
the global Ext module
$\operatorname{Ext}^i_X (\mathcal F, \mathcal G)$ is a vector space, defined as
the $i$th right derived functor of the global Hom functor $\operatorname{Hom}_X
(\mathcal{F}, -)$. In particular, this implies that for any morphism of sheaves
$g : \mathcal{G} \to \mathcal{G}'$ there is an induced map
$$\operatorname{Ext}^i_X (\mathcal F , g) : \operatorname{Ext}^i_X (\mathcal F
, \mathcal G) \to \operatorname{Ext}^i_X (\mathcal F , \mathcal{G}').$$

In Macaulay2, these vector spaces are not computed using injective resolutions
of sheaves. Instead, a result of Greg Smith is used that shows that if
$\mathca{F}$ and $\mathcal{G}$ are sheaves represented by modules $M$ and $N$,
respectively, then there exists an integer $d$ (depending on $M$, $N$, and $i$)
such that $$\operatorname{Ext}^i_X (\mathcal F, \mathcal G) =
\operatorname{Ext}^i_S (M_{\geq d} , N)_0,$$ where in the above $S$ is some
polynomial ring over a field, $M_{\geq d}$ denotes truncation, and $(-)_0$
denotes the degree $0$ part of a graded module. Moreover, the modules $M$ and
$N$ are being viewed as modules over the polynomial ring $S$ via restriction of
scalars along the canonical surjection $S \to R$, where $X =
\operatorname{Proj} (R)$. In particular, if $\mathcal{G}'$ is represented by
some module $N'$, then after taking $d$ to be the maximum of the integers
required to satisfy the assumptions of G. Smith's result, the induced map on
global Ext may be computed as $$\operatorname{Ext}^i_X (\mathcal F , g) =
\operatorname{Ext}_S^i (M_{\geq d} , \widehat{g} )_0,$$ where $\widetilde{g}$
is some map of modules whose associated sheaf is equal to $g$.

If F or G is a sheaf of rings, it is regarded as a free
$\mathcal{O}_X$-module of rank $1$. In particular, if $\mathcal{F} =
\mathcal{O}_X$ then the map being computed is just the induced map on
cohomology $$H^i (g) : H^i (\mathcal{G}) \to H^i (\mathcal{G}').$$

Both F and G must be coherent sheaves on the same projective variety or scheme
$X$.

As an example, we compute $\mathrm{Hom}_X(\mathcal I_X,\mathcal O_X)$ and
$\mathrm{Ext}^1_X(\mathcal I_X,\mathcal O_X)$, for the rational quartic curve
in $\PP^3$.

+----------------------------------------------------------+
|i1 : S = QQ[a..d]; --KELLER: need to add examples here    |
+----------------------------------------------------------+
|i2 : I = monomialCurveIdeal(S,{1,3,4})                    |
|                                                          |
|                        3      2     2    2    3    2     |
|o2 = ideal (b*c - a*d, c  - b*d , a*c  - b d, b  - a c)   |
|                                                          |
|o2 : Ideal of S                                           |
+----------------------------------------------------------+
|i3 : R = S/I                                              |
|                                                          |
|o3 = R                                                    |
|                                                          |
|o3 : QuotientRing                                         |
+----------------------------------------------------------+
|i4 : X = Proj R                                           |
|                                                          |
|o4 = X                                                    |
|                                                          |
|o4 : ProjectiveVariety                                    |
+----------------------------------------------------------+
|i5 : IX = sheaf (module I ** R)                           |
|                                                          |
|o5 = cokernel {2} | c2 bd ac b2 |                         |
|              {3} | -b -a 0  0  |                         |
|              {3} | d  c  -b -a |                         |
|              {3} | 0  0  -d -c |                         |
|                                                          |
|                                         1           3    |
|o5 : coherent sheaf on X, quotient of OO  (-2) ++ OO  (-3)|
|                                        X           X     |
+----------------------------------------------------------+
|i6 : Hom(IX, OO_X)                                        |
|                                                          |
|       16                                                 |
|o6 = QQ                                                   |
|                                                          |
|o6 : QQ-module, free                                      |
+----------------------------------------------------------+
|i7 : Ext^1(IX, OO_X)                                      |
|                                                          |
|o7 = 0                                                    |
|                                                          |
|o7 : QQ-module                                            |
+----------------------------------------------------------+

The $\mathrm{Ext}^1$ being zero says that the point corresponding to $I$ on the
Hilbert scheme is smooth (unobstructed), and vector space dimension of
$\mathrm{Hom}$ tells us that the dimension of the component at the point $I$ is
16.

The algorithm used may be found in:

  * Smith, G., Computing global extension modules, J. Symbolic Comp (2000) 29,
    729-746.

If the module $\bigoplus_{a\geq 0} \mathrm{Ext}^i(M, N(a))$ is desired, see
Ext^ZZ(CoherentSheaf,SumOfTwists).

See also
========

  * freeResolution (Complexes) -- compute a free
    resolution of a module or ideal
  * Tor (Macaulay2Doc) -- Tor module
  * Hom (Macaulay2Doc) -- module of homomorphisms
  * HH (Macaulay2Doc) -- general homology and cohomology functor
  * sheafExt -- sheaf extension of coherent sheaves

Ways to use this method:
========================

  * Ext^ZZ(CoherentSheaf,SheafMap),
    -- maps on global Ext induced by a sheaf map
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

Ext^ZZ(CoherentSheaf,SumOfTwists) -- global Ext
***********************************************

  * Scripted functor: Ext (Macaulay2Doc),
  * Usage:
        Ext^i(F, G(>=d))
  * Inputs:
      * i, an integer (Macaulay2Doc),
      * F, a coherent sheaf, or a sheaf of rings,
      * G(>=d), a sum of twists, see G(>=d),;
  * Outputs:
      * a module (Macaulay2Doc), $\bigoplus_{j \geq d}
        \mathrm{Ext}_X^i(F, G(j))$

Description
===========

If F or G is a sheaf of rings, it is regarded as a sheaf
of modules in the evident way.

Both F and G must be coherent sheaves on the same projective variety or scheme
$X$.

As an example, we consider the rational quartic curve in $\mathbf P^3$.

+-------------------------------------------------------------------------+
|i1 : S = QQ[a..d]                                                        |
|                                                                         |
|o1 = S                                                                   |
|                                                                         |
|o1 : PolynomialRing                                                      |
+-------------------------------------------------------------------------+
|i2 : I = monomialCurveIdeal(S, {1,3,4})                                  |
|                                                                         |
|                        3      2     2    2    3    2                    |
|o2 = ideal (b*c - a*d, c  - b*d , a*c  - b d, b  - a c)                  |
|                                                                         |
|o2 : Ideal of S                                                          |
+-------------------------------------------------------------------------+
|i3 : R = S/I                                                             |
|                                                                         |
|o3 = R                                                                   |
|                                                                         |
|o3 : QuotientRing                                                        |
+-------------------------------------------------------------------------+
|i4 : X = Proj R                                                          |
|                                                                         |
|o4 = X                                                                   |
|                                                                         |
|o4 : ProjectiveVariety                                                   |
+-------------------------------------------------------------------------+
|i5 : IX = sheaf (module I ** R)                                          |
|                                                                         |
|o5 = cokernel {2} | c2 bd ac b2 |                                        |
|              {3} | -b -a 0  0  |                                        |
|              {3} | d  c  -b -a |                                        |
|              {3} | 0  0  -d -c |                                        |
|                                                                         |
|                                         1           3                   |
|o5 : coherent sheaf on X, quotient of OO  (-2) ++ OO  (-3)               |
|                                        X           X                    |
+-------------------------------------------------------------------------+
|i6 : Ext^1(IX, OO_X(>=-3))                                               |
|                                                                         |
|o6 = cokernel {-3} | d c b a 0 0 0 0 0 0 0 0 0 0 0 0 |                   |
|              {-2} | 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 |                   |
|              {-2} | 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 |                   |
|              {-2} | 0 0 0 0 0 0 0 0 0 0 0 0 d c b a |                   |
|                                                                         |
|                            4                                            |
|o6 : R-module, quotient of R                                             |
+-------------------------------------------------------------------------+
|i7 : Ext^0(IX, OO_X(>=-10))                                              |
|                                                                         |
|o7 = cokernel {-1} | b  0  a  0  d   -c 0  0   0  0   0  0  c2  0   0   ||
|              {-1} | 0  c  0  a  0   0  0  d   d  0   0  b  -d2 -bd b2  ||
|              {-1} | -d -d -c -b 0   0  -c 0   0  d   0  0  0   c2  -ac ||
|              {-1} | 0  0  0  0  c   0  0  b   0  a   0  0  0   0   0   ||
|              {-1} | 0  0  0  0  -2d c  a  0   0  0   b  0  0   0   0   ||
|              {-1} | 0  0  0  0  0   -d -b 0   c  0   0  a  0   0   0   ||
|              {-1} | 0  0  0  0  0   0  0  -2d -d -2c -c -b 0   0   0   ||
|                                                                         |
|                            7                                            |
|o7 : R-module, quotient of R                                             |
+-------------------------------------------------------------------------+

The algorithm used may be found in:

  * Smith, G., Computing global extension modules, J. Symbolic Comp (2000) 29,
    729-746.

If the vector space $\mathrm{Ext}^i(M, N)$ is desired, see
Ext^ZZ(CoherentSheaf,CoherentSheaf).

See also
========

  * freeResolution (Complexes) -- compute a free
    resolution of a module or ideal
  * Tor (Macaulay2Doc) -- Tor module
  * Hom (Macaulay2Doc) -- module of homomorphisms
  * HH (Macaulay2Doc) -- general homology and cohomology functor
  * sheafExt -- sheaf extension of coherent sheaves

Ways to use this method:
========================

  * Ext^ZZ(CoherentSheaf,SumOfTwists)
    -- global Ext
  * "Ext^ZZ(SheafOfRings,SumOfTwists)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

exteriorPower(ZZ,CoherentSheaf) -- exterior power
*************************************************

  * Function: exteriorPower (Macaulay2Doc),
  * Usage:
        exteriorPower(i,F)
  * Inputs:
      * i, an integer (Macaulay2Doc),
      * F, a coherent sheaf,
  * Optional inputs (Macaulay2Doc),:
      * Strategy (Macaulay2Doc),
        => ..., default value null,
  * Outputs:
      * a coherent sheaf, the i-th exterior power of F

Ways to use this method:
========================

  * exteriorPower(ZZ,CoherentSheaf)
    -- exterior power
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:951:0.

genera -- list of the successive linear sectional arithmetic genera
*******************************************************************

See also
========

  * genus (Macaulay2Doc) -- genus of an object
  * hilbertPolynomial (Macaulay2Doc) -- compute the
    Hilbert polynomial
  * euler (Macaulay2Doc)

Ways to use genera:
===================

  * genera(CoherentSheaf)
  * "genera(Module)" -- see genera(CoherentSheaf),
  * genera(Ideal)
  * genera(ProjectiveVariety)
  * genera(Ring)

For the programmer
==================

The object genera (Macaulay2Doc), is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/genera-doc.m2:10:0.

genera(CoherentSheaf)
*********************

  * Function: genera (Macaulay2Doc),
  * Usage:
        genera M
  * Inputs:
      * M, a coherent sheaf,
  * Outputs:
      * a list (Macaulay2Doc), of the successive linear sectional
        arithmetic genera of the successive generic hyperplane restrictions of
        M

Description
===========

Computes the list of successive generic linear sectional arithmetic genera,
where the i-th entry in the list is (-1)^dim-support -i  * (chi(M **
OO_lin-section) - 1)).
+--------------------------------------------------+
|i1 : V = Proj(ZZ/101[x_0..x_2]);                  |
+--------------------------------------------------+
|i2 : M = sheaf(image matrix {{x_0^3+x_1^3+x_2^3}})|
|                                                  |
|o2 = image | x_0^3+x_1^3+x_2^3 |                  |
|                                                  |
|                                         1        |
|o2 : coherent sheaf on V, subsheaf of OO          |
|                                        V         |
+--------------------------------------------------+
|i3 : genera M                                     |
|                                                  |
|o3 = {0, 3, 0}                                    |
|                                                  |
|o3 : List                                         |
+--------------------------------------------------+

See also
========

  * euler (Macaulay2Doc)

Ways to use this method:
========================

  * genera(CoherentSheaf)
  * "genera(Module)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/genera-doc.m2:49:0.

genera(Ideal)
*************

  * Function: genera (Macaulay2Doc),
  * Usage:
        genera I
  * Inputs:
      * I, an ideal (Macaulay2Doc),
  * Outputs:
      * a list (Macaulay2Doc), of the successive linear sectional
        arithmetic genera of I

Description
===========

Computes the list of successive linear sectional arithmetic genera, where the
i-th entry in the list is the arithmetic genus of the i-th successive generic
hyperplane section of the zero-locus of I (= (-1)^dim-lin-section *
(chi(OO_lin-section) - 1)).

A complete intersection of type (2,3) in projective fourspace; its hyperplane
section is a canonical curve of genus 4:
+--------------------------------------+
|i1 : R = ZZ/101[x_0..x_4];            |
+--------------------------------------+
|i2 : I = ideal random(R^1, R^{-2,-3});|
|                                      |
|o2 : Ideal of R                       |
+--------------------------------------+
|i3 : genera I                         |
|                                      |
|o3 = {1, 4, 5}                        |
|                                      |
|o3 : List                             |
+--------------------------------------+

See also
========

  * euler (Macaulay2Doc)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use this method:
========================

  * genera(Ideal)
-------------------------------------------------------------------------------

The source of this document is in Varieties/genera-doc.m2:71:0.

genera(ProjectiveVariety)
*************************

  * Function: genera (Macaulay2Doc),
  * Usage:
        genera V
  * Inputs:
      * V, a projective variety,
  * Outputs:
      * a list (Macaulay2Doc), of the successive linear sectional
        arithmetic genera of V

Description
===========

Computes the list of successive linear sectional arithmetic genera, where the
i-th entry in the list is the arithmetic genus of the i-th successive generic
hyperplane section of V (= (-1)^dim-lin-section * (chi(OO_lin-section) - 1)).

A complete intersection of type (2,3) in projective fourspace; its hyperplane
section is a canonical curve of genus 4:
+------------------------------------------------+
|i1 : R = ZZ/101[x_0..x_4];                      |
+------------------------------------------------+
|i2 : V = Proj(R/(ideal random(R^1, R^{-2,-3})));|
+------------------------------------------------+
|i3 : genera V                                   |
|                                                |
|o3 = {1, 4, 5}                                  |
|                                                |
|o3 : List                                       |
+------------------------------------------------+

See also
========

  * euler (Macaulay2Doc)
  * genus (Macaulay2Doc) -- genus of an object

Ways to use this method:
========================

  * genera(ProjectiveVariety)
-------------------------------------------------------------------------------

The source of this document is in Varieties/genera-doc.m2:94:0.

genera(Ring)
************

  * Function: genera (Macaulay2Doc),
  * Usage:
        genera R
  * Inputs:
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * a list (Macaulay2Doc), of the successive linear sectional
        arithmetic genera of projective scheme V with homogeneous coordinate
        ring R

Description
===========

Computes the list of successive linear sectional arithmetic genera, where the
i-th entry in the list is the arithmetic genus of the i-th successive generic
hyperplane section of V (= (-1)^dim-lin-section * (chi(OO_lin-section) - 1)).
+--------------------------------------+
|i1 : R = ZZ/101[x_0..x_4];            |
+--------------------------------------+
|i2 : I = ideal random(R^1, R^{-2,-3});|
|                                      |
|o2 : Ideal of R                       |
+--------------------------------------+
|i3 : genera(R/I)                      |
|                                      |
|o3 = {1, 4, 5}                        |
|                                      |
|o3 : List                             |
+--------------------------------------+

See also
========

  * genus (Macaulay2Doc) -- genus of an object
  * euler (Macaulay2Doc)

Ways to use this method:
========================

  * genera(Ring)
-------------------------------------------------------------------------------

The source of this document is in Varieties/genera-doc.m2:30:0.

genus -- arithmetic genus
*************************

See also
========

  * genera (Macaulay2Doc)
  * euler (Macaulay2Doc)

Ways to use genus:
==================

  * genus(CoherentSheaf) -- genus of an object
  * "genus(Ideal)" -- see genus(CoherentSheaf),
    -- genus of an object
  * "genus(Module)" -- see genus(CoherentSheaf),
    -- genus of an object
  * genus(ProjectiveVariety) -- genus of
    an object
  * genus(Ring) -- genus of an object

For the programmer
==================

The object genus (Macaulay2Doc), is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/genus-doc.m2:10:0.

genus(CoherentSheaf) -- genus of an object
******************************************

  * Function: genus (Macaulay2Doc),
  * Usage:
        genus F
  * Inputs:
      * F, a coherent sheaf, a coherent sheaf,
        a module (Macaulay2Doc), or an
        ideal (Macaulay2Doc),
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

Computes the arithmetic genus of the coherent sheaf F that is (-1)^dim-support
* (chi(F) - 1)).  If F is a module over a ring, then the genus of F^~ is
computed.  If I is an ideal in a ring R then the genus of (R/I)^~ is computed.
+-----------------------------------------------+
|i1 : V = Proj(QQ[x,y,z]/ideal(y^2*z-x^2*(x+z)))|
|                                               |
|o1 = V                                         |
|                                               |
|o1 : ProjectiveVariety                         |
+-----------------------------------------------+
|i2 : genus OO_V^1                              |
|                                               |
|o2 = 1                                         |
+-----------------------------------------------+

See also
========

  * genera (Macaulay2Doc)
  * euler (Macaulay2Doc)

Ways to use this method:
========================

  * genus(CoherentSheaf) -- genus of an object
  * "genus(Ideal)"
  * "genus(Module)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/genus-doc.m2:24:0.

genus(ProjectiveVariety) -- genus of an object
**********************************************

  * Function: genus (Macaulay2Doc),
  * Usage:
        genus V
  * Inputs:
      * V, a projective variety,
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

Computes the arithmetic genus of the projective scheme VA nodal plane cubic
curve has arithmetic genus 1:
+-----------------------------------------------+
|i1 : V = Proj(QQ[a,b,c]/ideal(b^2*c-a^2*(a+c)))|
|                                               |
|o1 = V                                         |
|                                               |
|o1 : ProjectiveVariety                         |
+-----------------------------------------------+
|i2 : genus V                                   |
|                                               |
|o2 = 1                                         |
+-----------------------------------------------+
The Fano model of a Reye type Enriques surface in projective fivespace:
+-----------------------------------+
|i3 : R = ZZ/101[x_0..x_5];         |
+-----------------------------------+
|i4 : M = random(R^4, R^{4:-1});    |
|                                   |
|             4      4              |
|o4 : Matrix R  <-- R               |
+-----------------------------------+
|i5 : I = minors(3, M+transpose(M));|
|                                   |
|o5 : Ideal of R                    |
+-----------------------------------+
|i6 : V = Proj(R/I);                |
+-----------------------------------+
|i7 : genus V                       |
|                                   |
|o7 = 0                             |
+-----------------------------------+

See also
========

  * genera (Macaulay2Doc)
  * euler (Macaulay2Doc)

Ways to use this method:
========================

  * genus(ProjectiveVariety) -- genus of
    an object
-------------------------------------------------------------------------------

The source of this document is in Varieties/genus-doc.m2:47:0.

genus(Ring) -- genus of an object
*********************************

  * Function: genus (Macaulay2Doc),
  * Usage:
        genus R
  * Inputs:
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * an integer (Macaulay2Doc),

Description
===========

Computes the arithmetic genus of the projective scheme V with homogeneous
coordinate ring R
+-----------------------------------+
|i1 : R = QQ[x,y,z]/ideal(y^2*z-x^3)|
|                                   |
|o1 = R                             |
|                                   |
|o1 : QuotientRing                  |
+-----------------------------------+
|i2 : genus R                       |
|                                   |
|o2 = 1                             |
+-----------------------------------+

See also
========

  * genera (Macaulay2Doc)
  * euler (Macaulay2Doc)

Ways to use this method:
========================

  * genus(Ring) -- genus of an object
-------------------------------------------------------------------------------

The source of this document is in Varieties/genus-doc.m2:62:0.

hh -- Hodge numbers of a smooth projective variety
**************************************************

  * Usage:
        hh^(p,q)(X)
  * Inputs:
      * (p,q), a pair of integers between 0 and $\dim X$
      * X, a projective variety,
  * Outputs:
      * an integer (Macaulay2Doc), the $(p,q)$-Hodge numbers of $X$

Description
===========

The command computes the Hodge numbers $$ h^{p,q}(X) = \dim H^q(\Omega_X^p) $$
of the smooth projective variety $X$, calculated as HH^q(cotangentSheaf(p, X)).

As an example we compute the Hodge diamond of a smooth K3 surface (Fermat
quartic in projective threespace):

+-------------------------------------------------------------------+
|i1 : X = Proj QQ[x_0..x_3]/ideal(x_0^4+x_1^4+x_2^4+x_3^4)          |
|                                                                   |
|o1 = X                                                             |
|                                                                   |
|o1 : ProjectiveVariety                                             |
+-------------------------------------------------------------------+
|i2 : assert isSmooth X                                             |
+-------------------------------------------------------------------+
|i3 : matrix table(toList(0..2), toList(0..2), (p,q) -> hh^(p,q)(X))|
|                                                                   |
|o3 = | 1 0  1 |                                                    |
|     | 0 20 0 |                                                    |
|     | 1 0  1 |                                                    |
|                                                                   |
|              3       3                                            |
|o3 : Matrix ZZ  <-- ZZ                                             |
+-------------------------------------------------------------------+
|i4 : euler X                                                       |
|                                                                   |
|o4 = 24                                                            |
+-------------------------------------------------------------------+

See also
========

  * cotangentSheaf(ZZ,ProjectiveVariety)
    -- exterior powers of the
    cotangent sheaf of a projective variety
  * HH^ZZ CoherentSheaf, --
    cohomology of a coherent sheaf on a projective variety
  * euler(ProjectiveVariety), --
    topological Euler characteristic of a (smooth) projective variety

Ways to use hh:
===============

  * "hh(Sequence,ProjectiveVariety)"

For the programmer
==================

The object hh, is a scripted functor (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

HH^ZZ SheafOfRings -- cohomology of a sheaf of rings on a projective variety
****************************************************************************

  * Function: cohomology (Macaulay2Doc),
  * Usage:
        HH^d(OX)
  * Inputs:
      * i, an integer (Macaulay2Doc),
      * OX, a sheaf of rings, on a projective variety,
        $X$
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value 0,
  * Outputs:
      * a module (Macaulay2Doc), representing a vector space over
        the coefficient field of $X$

Description
===========

The command computes the $i$-th cohomology group of $OX$ as a vector space over
the coefficient field of $X$.

+-------------------------------------------------------+
|i1 : Cubic = Proj QQ[x_0..x_2]/ideal(x_0^3+x_1^3+x_2^3)|
|                                                       |
|o1 = Cubic                                             |
|                                                       |
|o1 : ProjectiveVariety                                 |
+-------------------------------------------------------+
|i2 : HH^1(OO_Cubic)                                    |
|                                                       |
|       1                                               |
|o2 = QQ                                                |
|                                                       |
|o2 : QQ-module, free                                   |
+-------------------------------------------------------+

See also
========

  * SheafOfRings -- the class of sheaves of rings
  * HH^ZZ SumOfTwists -- coherent sheaf cohomology
    module
  * HH^ZZ CoherentSheaf, --
    cohomology of a coherent sheaf on a projective variety

Ways to use this method:
========================

  * HH^ZZ SheafOfRings -- cohomology of a sheaf of
    rings on a projective variety
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

HH^ZZ SumOfTwists -- coherent sheaf cohomology module
*****************************************************

  * Function: cohomology (Macaulay2Doc),
  * Usage:
        HH^i(F(>=d))
        HH^i(F(*))
  * Inputs:
      * i, an integer (Macaulay2Doc),
      * F(>=d), a sum of twists, see F(>=d),;
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value 0,
  * Outputs:
      * a module (Macaulay2Doc), over the homogeneous coordinate
        ring of the variety $X$

Description
===========

Given a coherent sheaf, F on a projective variety,
$X$, the notation F(>=d) creates an object representing the
sum of twists, $\bigoplus_{a=d}^\infty\mathcal F(a)$.

This command computes a graded module $M$ over the homogeneous coordinate ring
of the variety $X$ such that the graded component $M_a$ for $a\geq d$ is
isomorphic to the cohomology group HH^i(F(a)).

To discard the part of the module $M$ of degree less than $d$, truncate the
module with truncate(d, M) (Truncations).

Use HH^i(F(>d)) to compute the cohomology of the twists strictly greater than
$d$ and HH^i(F(*)) to try to compute the whole graded module. When $i=0$, this
is known as the module of twisted global sections $$ \Gamma_*(\mathcal F) =
\bigoplus_{a\in\mathbf Z}(X, \mathcal F(a)).$$ Note that this computation will
fail if the module is not finitely generated.

As a first example we look at the cohomology of line bundles on the projective
plane.

+-------------------------------------------------------------------+
|i1 : X = Proj QQ[x_0..x_2]                                         |
|                                                                   |
|o1 = X                                                             |
|                                                                   |
|o1 : ProjectiveVariety                                             |
+-------------------------------------------------------------------+
|i2 : HH^0(OO_X^1(>=0))                                             |
|                                                                   |
|                 1                                                 |
|o2 = (QQ[x ..x ])                                                  |
|          0   2                                                    |
|                                                                   |
|o2 : QQ[x ..x ]-module, free                                       |
|         0   2                                                     |
+-------------------------------------------------------------------+
|i3 : HH^1(OO_X^1(>=0))                                             |
|                                                                   |
|o3 = 0                                                             |
|                                                                   |
|o3 : QQ[x ..x ]-module                                             |
|         0   2                                                     |
+-------------------------------------------------------------------+
|i4 : HH^2(OO_X^1(>=-3)) -- this should change to * once implemented|
|                                                                   |
|o4 = cokernel {-3} | x_2 x_1 x_0 |                                 |
|                                                                   |
|                                                1                  |
|o4 : QQ[x ..x ]-module, quotient of (QQ[x ..x ])                   |
|         0   2                           0   2                     |
+-------------------------------------------------------------------+
|i5 : TruncDual = HH^2(OO_X^1(>=-4))                                |
|                                                                   |
|o5 = cokernel {-4} | x_2 x_1 0   0   x_0  0    0   0   |           |
|              {-4} | 0   0   x_2 x_0 0    x_1  0   0   |           |
|              {-4} | 0   0   0   0   -x_2 -x_2 x_1 x_0 |           |
|                                                                   |
|                                                3                  |
|o5 : QQ[x ..x ]-module, quotient of (QQ[x ..x ])                   |
|         0   2                           0   2                     |
+-------------------------------------------------------------------+
|i6 : hilbertFunction(-4, TruncDual)                                |
|                                                                   |
|o6 = 3                                                             |
+-------------------------------------------------------------------+
|i7 : hilbertFunction(-3, TruncDual)                                |
|                                                                   |
|o7 = 1                                                             |
+-------------------------------------------------------------------+

As a second example we compute the $H^1$ cohomology module $T$ of the
Horrocks-Mumford bundle on the projective fourspace, which is an artinian
module with Hilbert function (5,10,10,2):

+-----------------------------------------------------------------------------+
|i8 : R = QQ[x_0..x_4];                                                       |
+-----------------------------------------------------------------------------+
|i9 : a = {1,0,0,0,0}                                                         |
|                                                                             |
|o9 = {1, 0, 0, 0, 0}                                                         |
|                                                                             |
|o9 : List                                                                    |
+-----------------------------------------------------------------------------+
|i10 : b = {0,1,0,0,1}                                                        |
|                                                                             |
|o10 = {0, 1, 0, 0, 1}                                                        |
|                                                                             |
|o10 : List                                                                   |
+-----------------------------------------------------------------------------+
|i11 : c = {0,0,1,1,0}                                                        |
|                                                                             |
|o11 = {0, 0, 1, 1, 0}                                                        |
|                                                                             |
|o11 : List                                                                   |
+-----------------------------------------------------------------------------+
|i12 : M1 = matrix table(5,5, (i,j)-> x_((i+j)%5)*a_((i-j)%5))                |
|                                                                             |
|o12 = | x_0 0   0   0   0   |                                                |
|      | 0   x_2 0   0   0   |                                                |
|      | 0   0   x_4 0   0   |                                                |
|      | 0   0   0   x_1 0   |                                                |
|      | 0   0   0   0   x_3 |                                                |
|                                                                             |
|              5      5                                                       |
|o12 : Matrix R  <-- R                                                        |
+-----------------------------------------------------------------------------+
|i13 : M2 = matrix table(5,5, (i,j)-> x_((i+j)%5)*b_((i-j)%5))                |
|                                                                             |
|o13 = | 0   x_1 0   0   x_4 |                                                |
|      | x_1 0   x_3 0   0   |                                                |
|      | 0   x_3 0   x_0 0   |                                                |
|      | 0   0   x_0 0   x_2 |                                                |
|      | x_4 0   0   x_2 0   |                                                |
|                                                                             |
|              5      5                                                       |
|o13 : Matrix R  <-- R                                                        |
+-----------------------------------------------------------------------------+
|i14 : M3 = matrix table(5,5, (i,j)-> x_((i+j)%5)*c_((i-j)%5))                |
|                                                                             |
|o14 = | 0   0   x_2 x_3 0   |                                                |
|      | 0   0   0   x_4 x_0 |                                                |
|      | x_2 0   0   0   x_1 |                                                |
|      | x_3 x_4 0   0   0   |                                                |
|      | 0   x_0 x_1 0   0   |                                                |
|                                                                             |
|              5      5                                                       |
|o14 : Matrix R  <-- R                                                        |
+-----------------------------------------------------------------------------+
|i15 : M = M1 | M2 | M3;                                                      |
|                                                                             |
|              5      15                                                      |
|o15 : Matrix R  <-- R                                                        |
+-----------------------------------------------------------------------------+
|i16 : betti (C=res coker M)                                                  |
|                                                                             |
|             0  1  2  3  4 5                                                 |
|o16 = total: 5 15 29 37 20 2                                                 |
|          0: 5 15 10  2  . .                                                 |
|          1: .  .  4  .  . .                                                 |
|          2: .  . 15 35 20 .                                                 |
|          3: .  .  .  .  . 2                                                 |
|                                                                             |
|o16 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i17 : N = transpose submatrix(C.dd_3,{10..28},{2..36});                      |
|                                                                             |
|              35      19                                                     |
|o17 : Matrix R   <-- R                                                       |
+-----------------------------------------------------------------------------+
|i18 : betti (D=res coker N)                                                  |
|                                                                             |
|              0  1  2  3  4 5                                                |
|o18 = total: 35 19 19 35 20 2                                                |
|         -5: 35 15  .  .  . .                                                |
|         -4:  .  4  .  .  . .                                                |
|         -3:  .  .  .  .  . .                                                |
|         -2:  .  .  .  .  . .                                                |
|         -1:  .  .  .  .  . .                                                |
|          0:  .  .  4  .  . .                                                |
|          1:  .  . 15 35 20 .                                                |
|          2:  .  .  .  .  . 2                                                |
|                                                                             |
|o18 : BettiTally                                                             |
+-----------------------------------------------------------------------------+
|i19 : Pfour = Proj(R)                                                        |
|                                                                             |
|o19 = Pfour                                                                  |
|                                                                             |
|o19 : ProjectiveVariety                                                      |
+-----------------------------------------------------------------------------+
|i20 : HorrocksMumford = sheaf(coker D.dd_3);                                 |
+-----------------------------------------------------------------------------+
|i21 : T = HH^1(HorrocksMumford(>=-1))                                        |
|                                                                             |
|o21 = cokernel {-1} | x_4 x_2  0   0   x_0  0   0    0    x_3 0   0   0      |
|               {-1} | 0   -x_3 x_1 0   0    x_4 x_2  0    0   0   0   x_0    |
|               {-1} | 0   0    0   x_3 -x_2 x_0 0    x_1  0   0   0   0      |
|               {-1} | 0   0    0   0   0    0   -x_4 -x_2 x_1 x_0 x_3 0      |
|               {-1} | 0   0    0   0   0    0   0    0    0   0   x_4 -x_3   |
|                                                                             |
|                             5                                               |
|o21 : R-module, quotient of R                                                |
|-----------------------------------------------------------------------------|
|0   0    x_1 |                                                               |
|0   0    0   |                                                               |
|0   -x_4 0   |                                                               |
|0   0    0   |                                                               |
|x_2 x_1  x_0 |                                                               |
+-----------------------------------------------------------------------------+
|i22 : apply(-1..2, i-> hilbertFunction(i,T))                                 |
|                                                                             |
|o22 = (5, 10, 10, 2)                                                         |
|                                                                             |
|o22 : Sequence                                                               |
+-----------------------------------------------------------------------------+

Caveat
======

The computation of HH^0(F(*)) will fail if the module is not finitely
generated. Also the version HH^i(F(*)) for $i>0$ is not yet implemented.

See also
========

  * HH (Macaulay2Doc) -- general homology and cohomology functor
  * HH^ZZ CoherentSheaf, --
    cohomology of a coherent sheaf on a projective variety
  * HH^ZZ Module (Macaulay2Doc) -- local cohomology of a
    module
  * prune(CoherentSheaf), --
    minimal presentation of a coherent sheaf or sheaf map
  * prune(SheafMap) -- minimal
    presentation of a coherent sheaf or sheaf map

Ways to use this method:
========================

  * HH^ZZ SumOfTwists -- coherent sheaf cohomology
    module
  * "HH^ZZ(ProjectiveVariety,SumOfTwists)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

HH^ZZ(AffineVariety,CoherentSheaf) -- general cohomology functor
****************************************************************

  * Function: cohomology (Macaulay2Doc),

Ways to use this method:
========================

  * HH^ZZ(AffineVariety,CoherentSheaf)
    -- general cohomology functor
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

HH^ZZ(ProjectiveVariety,CoherentSheaf) -- cohomology of a coherent sheaf on a projective variety
************************************************************************************************

  * Function: cohomology (Macaulay2Doc),
  * Usage:
        HH^i(X,F)
        HH^i F
        cohomology(i,X,F)
        cohomology(i,F)
  * Inputs:
      * i, an integer (Macaulay2Doc),
      * X, a projective variety,
      * F, a coherent sheaf, on the projective variety X
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value 0,
  * Outputs:
      * a module (Macaulay2Doc), the $i$-th cohomology group of F
        as a vector space over the coefficient field of X

Description
===========

The command computes the $i$-th cohomology group of F as a vector space over
the coefficient field of X. For $i>0$ this is currently done via local duality.
More precisely, the code takes advantage of the isomorphism $$H^i (X,
\mathcal{F}) = ( H_{\mathfrak{m}}^i ( M) )_0,$$ where the notation $(-)_0$
denotes the degree $0$ part of a module, and $M$ is any module representing
$\mathcal F$. Combining this with the local duality isomorphism for the graded
polynomial ring $S$ yields $$H_{\mathfrak{m}}^i (M) \cong
\operatorname{Ext}^{d-i}_S (M, S(-n-1)),$$ where we are viewing $X$ as being
embedded into $\mathbb{P}^n$ via some affine morphism. For $i=0$, things are
not as simple since there is not a direct isomorphism between the global
sections of a sheaf and the degree 0 part of the $0$th local cohomology. Thus
it is instead computed as a limit of Hom (Macaulay2Doc),s.

See cohomologyTable (BGG), and cohomologyHashTable (TateOnProducts),
for alternative sheaf cohomology
algorithms via the Bernstein-Gelfand-Gelfand correspondence.

As examples we compute the Picard numbers, Hodge numbers and dimension of the
infinitesimal deformation spaces of various quintic hypersurfaces in projective
fourspace (or their Calabi-Yau small resolutions).

We will make computations for quintics V in the family given by $$
x_0^5+x_1^5+x_2^5+x_3^5+x_4^5-5\lambda x_0x_1x_2x_3x_4=0 $$ for various values
of $\lambda$. If $\lambda$ is general (that is, $\lambda$ not a 5-th root of
unity, 0 or $\infty$), then the quintic V is smooth, so is a Calabi-Yau
threefold, and in that case the Hodge numbers are as follows. $$ h^{1,1}(V)=1,
h^{2,1}(V) = h^{1,2}(V) = 101, $$ so the Picard group of V has rank 1
(generated by the hyperplane section) and the moduli space of V (which is
unobstructed) has dimension 101:

+-----------------------------------------------------------------------------+
|i1 : Quintic = Proj QQ[x_0..x_4]/ideal(x_0^5+x_1^5+x_2^5+x_3^5+x_4^5-101*x_0*|
|                                                                             |
|o1 = Quintic                                                                 |
|                                                                             |
|o1 : ProjectiveVariety                                                       |
|-----------------------------------------------------------------------------|
|x_1*x_2*x_3*x_4)                                                             |
+-----------------------------------------------------------------------------+
|i2 : singularLocus Quintic                                                   |
|                                                                             |
|         /QQ[x ..x ]\                                                        |
|         |    0   4 |                                                        |
|o2 = Proj|----------|                                                        |
|         \     1    /                                                        |
|                                                                             |
|o2 : ProjectiveVariety                                                       |
+-----------------------------------------------------------------------------+
|i3 : omegaQuintic = cotangentSheaf Quintic;                                  |
+-----------------------------------------------------------------------------+
|i4 : h11 = rank HH^1(omegaQuintic)                                           |
|                                                                             |
|o4 = 1                                                                       |
+-----------------------------------------------------------------------------+
|i5 : h12 = rank HH^2(omegaQuintic)                                           |
|                                                                             |
|o5 = 101                                                                     |
+-----------------------------------------------------------------------------+

By Hodge duality this is $h^{2,1}$.  Directly $h^{2,1}$ could be computed as:

+------------------------------------------------+
|i6 : h21 = rank HH^1(cotangentSheaf(2, Quintic))|
|                                                |
|o6 = 101                                        |
+------------------------------------------------+

The Hodge numbers of a (smooth) projective variety can also be computed
directly using the hh, command:

+----------------------+
|i7 : hh^(2,1)(Quintic)|
|                      |
|o7 = 101              |
+----------------------+
|i8 : hh^(1,1)(Quintic)|
|                      |
|o8 = 1                |
+----------------------+

Using the Hodge number we compute the topological Euler characteristic of V:

+------------------+
|i9 : euler Quintic|
|                  |
|o9 = -200         |
+------------------+

When $\lambda$ is a 5th root of unity the quintic V is singular. It has 125
ordinary double points (nodes), namely the orbit of the point
$(1:\lambda:\lambda:\lambda:\lambda)$ under a natural action of $\ZZ/5^3$. Then
V has a projective small resolution $W$ which is a Calabi-Yau threefold (since
the action of $\ZZ/5^3$ is transitive on the sets of nodes of V, or for
instance, just by blowing up one of the $(1,5)$ polarized abelian surfaces V
contains). Perhaps the most interesting such 3-fold is the one for the value
$\lambda=1$, which is defined over $\QQ$ and is modular (see Schoen's work). To
compute the Hodge numbers of the small resolution $W$ of V we proceed as
follows:

+-----------------------------------------------------------------------------+
|i10 : SchoensQuintic = Proj                                                  |
|                                                                             |
|o10 = SchoensQuintic                                                         |
|                                                                             |
|o10 : ProjectiveVariety                                                      |
|-----------------------------------------------------------------------------|
|QQ[x_0..x_4]/ideal(x_0^5+x_1^5+x_2^5+x_3^5+x_4^5-5*x_0*x_1*x_2*x_3*x_4)      |
+-----------------------------------------------------------------------------+
|i11 : Z = singularLocus SchoensQuintic                                       |
|                                                                             |
|o11 = Z                                                                      |
|                                                                             |
|o11 : ProjectiveVariety                                                      |
+-----------------------------------------------------------------------------+
|i12 : degree Z                                                               |
|                                                                             |
|o12 = 125                                                                    |
+-----------------------------------------------------------------------------+
|i13 : II'Z = sheaf module ideal Z                                            |
|                                                                             |
|o13 = image | x_3^4-x_0x_1x_2x_4 x_0x_1x_2x_3-x_4^4 x_2^4-x_0x_1x_3x_4 x_1^4-|
|                                                                             |
|                                                                        1    |
|o13 : coherent sheaf on Proj(QQ[x ..x ]), subsheaf of OO                     |
|                                 0   4                  Proj(QQ[x ..x ])     |
|                                                                 0   4       |
|-----------------------------------------------------------------------------|
|x_0x_2x_3x_4 x_0^4-x_1x_2x_3x_4 x_2^3x_3^3-x_0^2x_1^2x_4^2                   |
|-----------------------------------------------------------------------------|
|x_1^3x_3^3-x_0^2x_2^2x_4^2 x_0^3x_3^3-x_1^2x_2^2x_4^2                        |
|-----------------------------------------------------------------------------|
|x_1^2x_2^2x_3^2-x_0^3x_4^3 x_0^2x_2^2x_3^2-x_1^3x_4^3                        |
|-----------------------------------------------------------------------------|
|x_0^2x_1^2x_3^2-x_2^3x_4^3 x_1^3x_2^3-x_0^2x_3^2x_4^2                        |
|-----------------------------------------------------------------------------|
|x_0^3x_2^3-x_1^2x_3^2x_4^2 x_0^2x_1^2x_2^2-x_3^3x_4^3                        |
|-----------------------------------------------------------------------------|
|x_0^3x_1^3-x_2^2x_3^2x_4^2 |                                                 |
+-----------------------------------------------------------------------------+

The defect of $W$ (that is, $h^{1,1}(W)-1$) can be computed from the cohomology
of the ideal sheaf of the singular locus $Z$ of V twisted by 5 (see Werner's
thesis):

+---------------------------------+
|i14 : defect = rank HH^1(II'Z(5))|
|                                 |
|o14 = 24                         |
+---------------------------------+
|i15 : h11 = defect + 1           |
|                                 |
|o15 = 25                         |
+---------------------------------+

The number $h^{2,1}(W)$ (the dimension of the moduli space of $W$) can be
computed (Clemens-Griffiths, Werner) as $\dim H^0({\mathbf
I}_Z(5))/\mathrm{JacobianIdeal}(V)_5$.

+----------------------------------------------------+
|i16 : quinticsJac = numgens source basis(5, ideal Z)|
|                                                    |
|o16 = 25                                            |
+----------------------------------------------------+
|i17 : h21 = rank HH^0(II'Z(5)) - quinticsJac        |
|                                                    |
|o17 = 0                                             |
+----------------------------------------------------+

In other words W is rigid. It has the following topological Euler
characteristic.

+-----------------------------------------+
|i18 : chiW = euler Quintic + 2 * degree Z|
|                                         |
|o18 = 50                                 |
+-----------------------------------------+

See also
========

  * coherent sheaves
  * HH^ZZ SumOfTwists -- coherent sheaf cohomology
    module
  * HH^ZZ Module (Macaulay2Doc) -- local cohomology of a
    module
  * hh -- Hodge numbers of a smooth projective variety
  * CoherentSheaf -- the class of all coherent sheaves

Ways to use this method:
========================

  * "HH^ZZ CoherentSheaf"
  * HH^ZZ(ProjectiveVariety,CoherentSheaf)
    -- cohomology of a coherent
    sheaf on a projective variety
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

HH^ZZ(ProjectiveVariety,SheafMap) -- general cohomology functor
***************************************************************

  * Function: cohomology (Macaulay2Doc),

Ways to use this method:
========================

  * "HH^ZZ SheafMap"
  * HH^ZZ(ProjectiveVariety,SheafMap)
    -- general cohomology functor
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

hilbertPolynomial(CoherentSheaf) -- compute the Hilbert polynomial of the coherent sheaf
****************************************************************************************

  * Function: hilbertPolynomial (Macaulay2Doc),
  * Usage:
        hilbertPolynomial S
  * Inputs:
      * S, a coherent sheaf,
  * Optional inputs (Macaulay2Doc),:
      * Projective (Macaulay2Doc),
        => ..., default value true,
  * Outputs:
      * a projective Hilbert polynomial (Macaulay2Doc),
        unless the option
        Projective is false

Description
===========

We compute the Hilbert polynomial (Macaulay2Doc), of a
coherent sheaf.
+--------------------------------------------------+
|i1 : R = ZZ/101[x_0..x_2];                        |
+--------------------------------------------------+
|i2 : V = Proj R;                                  |
+--------------------------------------------------+
|i3 : S = sheaf(image matrix {{x_0^3+x_1^3+x_2^3}})|
|                                                  |
|o3 = image | x_0^3+x_1^3+x_2^3 |                  |
|                                                  |
|                                         1        |
|o3 : coherent sheaf on V, subsheaf of OO          |
|                                        V         |
+--------------------------------------------------+
|i4 : h = hilbertPolynomial S                      |
|                                                  |
|o4 = 3*P  - 3*P  + P                              |
|        0      1    2                             |
|                                                  |
|o4 : ProjectiveHilbertPolynomial                  |
+--------------------------------------------------+
|i5 : hilbertPolynomial(S, Projective=>false)      |
|                                                  |
|     1 2   3                                      |
|o5 = -i  - -i + 1                                 |
|     2     2                                      |
|                                                  |
|o5 : QQ[i]                                        |
+--------------------------------------------------+

Ways to use this method:
========================

  * hilbertPolynomial(CoherentSheaf)
    -- compute the Hilbert polynomial of
    the coherent sheaf
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:748:0.

hilbertPolynomial(ProjectiveVariety) -- compute the Hilbert polynomial of the projective variety
************************************************************************************************

  * Function: hilbertPolynomial (Macaulay2Doc),
  * Usage:
        hilbertPolynomial V
  * Inputs:
      * V, a projective variety,
  * Optional inputs (Macaulay2Doc),:
      * Projective (Macaulay2Doc),
        => ..., default value true,
  * Outputs:
      * a projective Hilbert polynomial (Macaulay2Doc),
        unless the option
        Projective is false

Description
===========

We compute an example of the Hilbert polynomial (Macaulay2Doc),
of a projective Hilbert variety. This is the
same as the Hilbert polynomial of its coordinate ring.
+--------------------------------------------+
|i1 : R = QQ[a..d];                          |
+--------------------------------------------+
|i2 : I = monomialCurveIdeal(R, {1,3,4});    |
|                                            |
|o2 : Ideal of R                             |
+--------------------------------------------+
|i3 : V = Proj(R/I)                          |
|                                            |
|o3 = V                                      |
|                                            |
|o3 : ProjectiveVariety                      |
+--------------------------------------------+
|i4 : h = hilbertPolynomial V                |
|                                            |
|o4 = - 3*P  + 4*P                           |
|          0      1                          |
|                                            |
|o4 : ProjectiveHilbertPolynomial            |
+--------------------------------------------+
|i5 : hilbertPolynomial(V, Projective=>false)|
|                                            |
|o5 = 4i + 1                                 |
|                                            |
|o5 : QQ[i]                                  |
+--------------------------------------------+

These Hilbert polynomials can serve as Hilbert functions (Macaulay2Doc),
too since the values of the Hilbert polynomial
eventually are the same as the Hilbert function of the sheaf of rings or of the
underlying ring.
+--------------------------------------------+
|i6 : apply(5, k-> h(k))                     |
|                                            |
|o6 = {1, 5, 9, 13, 17}                      |
|                                            |
|o6 : List                                   |
+--------------------------------------------+
|i7 : apply(5, k-> hilbertFunction(k,ring V))|
|                                            |
|o7 = {1, 4, 9, 13, 17}                      |
|                                            |
|o7 : List                                   |
+--------------------------------------------+

Ways to use this method:
========================

  * hilbertPolynomial(ProjectiveVariety)
    -- compute the Hilbert polynomial
    of the projective variety
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:411:0.

Hom(CoherentSheaf,CoherentSheaf) -- global Hom
**********************************************

  * Function: Hom (Macaulay2Doc),
  * Usage:
        Hom(F, G)
  * Inputs:
      * F, a sheaf of rings, or a coherent sheaf,
      * G, a sheaf of rings, or a coherent sheaf,
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit (Macaulay2Doc), => ..., default value null,
      * MinimalGenerators (Macaulay2Doc), => ..., default value true,
      * Strategy (Macaulay2Doc), => ..., default value null,
  * Outputs:
      * a module (Macaulay2Doc), representing a vector space over
        the coefficient field of $X$

Description
===========

If F or G is a sheaf of rings, it is regarded as a sheaf
of modules in the evident way.

Both F and G must be coherent sheaves on the same projective variety or scheme
$X$.

The result is the sheaf associated to the graded module Hom(module F, module
G).

+-------------------------------------------------------+
|i1 : R = QQ[a..d];                                     |
+-------------------------------------------------------+
|i2 : P3 = Proj R                                       |
|                                                       |
|o2 = P3                                                |
|                                                       |
|o2 : ProjectiveVariety                                 |
+-------------------------------------------------------+
|i3 : I = monomialCurveIdeal(R, {1,3,4})                |
|                                                       |
|                        3      2     2    2    3    2  |
|o3 = ideal (b*c - a*d, c  - b*d , a*c  - b d, b  - a c)|
|                                                       |
|o3 : Ideal of R                                        |
+-------------------------------------------------------+
|i4 : G = sheaf module I                                |
|                                                       |
|o4 = image | bc-ad c3-bd2 ac2-b2d b3-a2c |             |
|                                                       |
|                                           1           |
|o4 : coherent sheaf on P3, subsheaf of OO              |
|                                         P3            |
+-------------------------------------------------------+
|i5 : Hom(OO_P3, G(3))                                  |
|                                                       |
|       7                                               |
|o5 = QQ                                                |
|                                                       |
|o5 : QQ-module, free                                   |
+-------------------------------------------------------+
|i6 : HH^0(G(3))                                        |
|                                                       |
|       7                                               |
|o6 = QQ                                                |
|                                                       |
|o6 : QQ-module, free                                   |
+-------------------------------------------------------+

See also
========

  * sheafHom -- sheaf Hom
  * sheafExt -- sheaf extension of coherent sheaves
  * Ext^ZZ(CoherentSheaf,CoherentSheaf)
    -- global Ext

Ways to use this method:
========================

  * Hom(CoherentSheaf,CoherentSheaf)
    -- global Hom
  * "Hom(CoherentSheaf,SheafOfRings)"
  * "Hom(SheafOfRings,CoherentSheaf)"
  * "Hom(SheafOfRings,SheafOfRings)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

ideal(Variety) -- returns the defining ideal
********************************************

  * Function: ideal (Macaulay2Doc),
  * Usage:
        ideal X
  * Inputs:
      * X, a variety,
  * Outputs:
      * an ideal (Macaulay2Doc), which is the defining ideal of X

Description
===========

A variety, is defined by a ring (Macaulay2Doc).
This function returns the defining ideal of the ring of X.
+--------------------------------------------+
|i1 : R = QQ[w,x,y,z];                       |
+--------------------------------------------+
|i2 : X = Spec(R/(y^2-x*z,x^2*y-z^2,x^3-y*z))|
|                                            |
|o2 = X                                      |
|                                            |
|o2 : AffineVariety                          |
+--------------------------------------------+
|i3 : ideal X                                |
|                                            |
|             2         2     2   3          |
|o3 = ideal (y  - x*z, x y - z , x  - y*z)   |
|                                            |
|o3 : Ideal of R                             |
+--------------------------------------------+
|i4 : ring X                                 |
|                                            |
|                    R                       |
|o4 = ------------------------------         |
|       2         2     2   3                |
|     (y  - x*z, x y - z , x  - y*z)         |
|                                            |
|o4 : QuotientRing                           |
+--------------------------------------------+
|i5 : Y = Proj(R/(x^2-w*y, x*y-w*z, x*z-y^2))|
|                                            |
|o5 = Y                                      |
|                                            |
|o5 : ProjectiveVariety                      |
+--------------------------------------------+
|i6 : ideal Y                                |
|                                            |
|             2                      2       |
|o6 = ideal (x  - w*y, x*y - w*z, - y  + x*z)|
|                                            |
|o6 : Ideal of R                             |
+--------------------------------------------+

See also
========

  * ring (Macaulay2Doc) -- get the associated ring of an object
  * ideal(Ring) (Macaulay2Doc) -- get the defining ideal
  * Spec -- make an affine variety
  * AffineVariety -- the class of all affine varieties
  * Proj -- make a projective variety
  * ProjectiveVariety -- the class of all projective
    varieties

Ways to use this method:
========================

  * ideal(Variety) -- returns the defining ideal
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:152:0.

idealSheaf -- ideal sheaf of a projective variety
*************************************************

  * Usage:
        idealSheaf X
  * Inputs:
      * X, a projective variety,
  * Optional inputs (Macaulay2Doc),:
      * MinimalGenerators (missing documentation) => a Boolean value (Macaulay2Doc),
        default value true, whether to prune (Macaulay2Doc),
        the result before returning it. Default value is
        true.
      * Strategy (missing documentation) => ..., default value null,
  * Outputs:
      * a coherent sheaf,

Description
===========

This method computes the ideal sheaf of the projective variety $X$

As an example, consider the projective variety defined by the equation $x^4 +
y^4 + z^4 = 0$. The ideal sheaf of this variety is computed.

+-----------------------------------------------------------------------------+
|i1 : X = Proj QQ[x,y,z]/(x^4+y^4+z^4)                                        |
|                                                                             |
|o1 = X                                                                       |
|                                                                             |
|o1 : ProjectiveVariety                                                       |
+-----------------------------------------------------------------------------+
|i2 : I = idealSheaf X                                                        |
|                                                                             |
|o2 = image | x4+y4+z4 |                                                      |
|                                                                             |
|                                                                   1         |
|o2 : coherent sheaf on Proj(QQ[x..z]), subsheaf of OO                        |
|                                                     Proj(QQ[x..z])          |
+-----------------------------------------------------------------------------+
|i3 : rho = inducedMap((ambient I)/I, ambient I) --induced inclusion of ideal |
|                                                                             |
|                                                      1                      |
|o3 = cokernel | x4+y4+z4 | <--------- OO                                     |
|                              | 1 |     Proj(QQ[x..z])                       |
|                                                                             |
|o3 : SheafMap                                                                |
|-----------------------------------------------------------------------------|
|sheaf into structure sheaf of ambient ring                                   |
+-----------------------------------------------------------------------------+
|i4 : for i to 2 list HH^i(image rho)                                         |
|                                                                             |
|        1    3                                                               |
|o4 = {QQ , QQ , 0}                                                           |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * cotangentSheaf -- cotangent sheaf of a projective
    variety
  * ProjectiveVariety -- the class of all projective
    varieties

Ways to use idealSheaf:
=======================

  * "idealSheaf(ProjectiveVariety)"

For the programmer
==================

The object idealSheaf, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:501:0.

isLocallyFree -- whether a coherent sheaf is locally free
*********************************************************

  * Usage:
        isLocallyFree F
  * Inputs:
      * F, a sum of twists, a sheaf of rings,
        or a coherent sheaf,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

This method determines whether a coherent sheaf $\mathcal F$ on $X$ is locally
free; i.e. there is an open cover of $X$ such that $\mathcal F(U)$ for each
patch $U\subset X$ is a free $\mathcal O_X(U)$-module.

+----------------------------------------------+
|i1 : X = Proj QQ[x,y,z]                       |
|                                              |
|o1 = X                                        |
|                                              |
|o1 : ProjectiveVariety                        |
+----------------------------------------------+
|i2 : isLocallyFree OO_X                       |
|                                              |
|o2 = true                                     |
+----------------------------------------------+
|i3 : isLocallyFree OO_X^{1,2,3}               |
|                                              |
|o3 = true                                     |
+----------------------------------------------+
|i4 : F = cotangentSheaf X                     |
|                                              |
|o4 = cokernel {2} | z  |                      |
|              {2} | x  |                      |
|              {2} | -y |                      |
|                                              |
|                                         3    |
|o4 : coherent sheaf on X, quotient of OO  (-2)|
|                                        X     |
+----------------------------------------------+
|i5 : isLocallyFree F                          |
|                                              |
|o5 = true                                     |
+----------------------------------------------+

Internally, the algorithm uses a computation of fitting ideals (Macaulay2Doc).

Code
====

../../../../../Macaulay2/packages/Varieties.m2:681:31-685:64: --source code:
isLocallyFree CoherentSheaf := F -> (
    if (d := rank F) == 0 then return F == 0;
    if isFreeModule module F then return true;
    dim fittingIdeal(d,   module F) <= 0
    and fittingIdeal(d-1, module F) == ideal 0_(ring variety F))

See also
========

  * fittingIdeal (Macaulay2Doc) -- Fitting ideal of a
    module
  * isFreeModule (Macaulay2Doc) -- whether something is a
    free module

Ways to use isLocallyFree:
==========================

  * "isLocallyFree(CoherentSheaf)"
  * "isLocallyFree(SheafOfRings)"
  * "isLocallyFree(SumOfTwists)"

For the programmer
==================

The object isLocallyFree, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:624:0.

isProjective -- whether a variety is projective
***********************************************

  * Usage:
        isProjective X
  * Inputs:
      * X, a variety,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

This method essentially returns whether $X$ was defined using Proj,
or Spec.

+------------------------+
|i1 : S = QQ[x,y,z]      |
|                        |
|o1 = S                  |
|                        |
|o1 : PolynomialRing     |
+------------------------+
|i2 : isProjective Proj S|
|                        |
|o2 = true               |
+------------------------+
|i3 : isProjective Spec S|
|                        |
|o3 = false              |
+------------------------+

Caveat
======

This method does absolutely no well-definedness checks and is very primitive.
To check well-definedness use isWellDefined (Macaulay2Doc),
instead.

See also
========

  * isProjective(NormalToricVariety) (NormalToricVarieties)
    -- whether a
    toric variety is projective

Ways to use isProjective:
=========================

  * "isProjective(ProjectiveVariety)"
  * "isProjective(Variety)"

For the programmer
==================

The object isProjective, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:334:0.

isSmooth(Variety) -- whether a variety is smooth
************************************************

  * Function: isSmooth (Macaulay2Doc),
  * Usage:
        isSmooth X
  * Inputs:
      * X, a variety,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

An affine variety $X$ is smooth if the singular locus (Macaulay2Doc),
of $X$ is empty, while a projective variety is
smooth if the singular locus is supported at the origin.

+-----------------------------------------------------------+
|i1 : R = quotient minors_2 genericMatrix(QQ[x,y,z,w], 2, 2)|
|                                                           |
|o1 = R                                                     |
|                                                           |
|o1 : QuotientRing                                          |
+-----------------------------------------------------------+
|i2 : isSmooth Proj R                                       |
|                                                           |
|o2 = true                                                  |
+-----------------------------------------------------------+
|i3 : isSmooth Spec R                                       |
|                                                           |
|o3 = false                                                 |
+-----------------------------------------------------------+

See also
========

  * isSmooth(NormalToricVariety) (NormalToricVarieties)
    -- whether a normal
    toric variety is smooth

Ways to use this method:
========================

  * isSmooth(Variety) -- whether a variety is
    smooth
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:362:0.

isWellDefined(CoherentSheaf) -- whether a coherent sheaf is well-defined
************************************************************************

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        isWellDefined F
  * Inputs:
      * F, a coherent sheaf,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

See also
========

  * isWellDefined(Variety) -- whether a
    variety is well-defined

Ways to use this method:
========================

  * isWellDefined(CoherentSheaf), --
    whether a coherent sheaf is well-defined
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:624:0.

isWellDefined(SheafMap) -- whether a morphism of coherent sheaves is well-defined
*********************************************************************************

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        isWellDefined phi
  * Inputs:
      * phi, a morphism of sheaves,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

See also
========

  * isWellDefined(CoherentSheaf), --
    whether a coherent sheaf is well-defined
  * isWellDefined(Variety) -- whether a
    variety is well-defined
  * isWellDefined(Matrix) (Macaulay2Doc) -- whether a map
    is well defined

Ways to use this method:
========================

  * isWellDefined(SheafMap) -- whether a
    morphism of coherent sheaves is well-defined
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:146:0.

isWellDefined(Variety) -- whether a variety is well-defined
***********************************************************

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        isWellDefined X
  * Inputs:
      * X, a variety,
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether $X$ is a
        well-defined affine or projective variety

Ways to use this method:
========================

  * isWellDefined(Variety) -- whether a
    variety is well-defined
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:170:0.

LowerBound -- the class of lower bound objects
**********************************************

Description
===========

This is a type of list that represents a lower bound.  The single element of
the list is an integer, and the object represents the condition that some other
integer, such as the index in a direct sum, should be at least as large.
+-------------------+
|i1 : LowerBound {4}|
|                   |
|o1 = LowerBound{4} |
|                   |
|o1 : LowerBound    |
+-------------------+
|i2 : >= 4          |
|                   |
|o2 = LowerBound{4} |
|                   |
|o2 : LowerBound    |
+-------------------+
|i3 : > 4           |
|                   |
|o3 = LowerBound{5} |
|                   |
|o3 : LowerBound    |
+-------------------+

Functions and methods returning an object of class LowerBound:
==============================================================

  * "> InfiniteNumber" -- see > ZZ, -- greater than
  * > ZZ -- greater than
  * ">= InfiniteNumber" -- see >= ZZ, -- greater than or equal
  * ">= List" -- see >= ZZ, -- greater than or equal
  * >= ZZ -- greater than or equal

Methods that use an object of class LowerBound:
===============================================

  * "CoherentSheaf LowerBound"
  * "SheafOfRings LowerBound"

For the programmer
==================

The object LowerBound, is a self initializing type (Macaulay2Doc),
with ancestor classes BasicList (Macaulay2Doc),
< Thing (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:286:0.

matrix(SheafMap) -- the morphism of modules representing a morphisms of coherent sheaves
****************************************************************************************

  * Function: matrix (Macaulay2Doc),
  * Usage:
        matrix phi
        phi.map
  * Inputs:
      * phi, a morphism of sheaves,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value
        null,
  * Outputs:
      * a matrix (Macaulay2Doc),

See also
========

  * truncate(List,Module) (missing documentation)
  * truncate(Nothing,List,Matrix) (missing documentation)

Ways to use this method:
========================

  * matrix(SheafMap) -- the morphism of modules
    representing a morphisms of coherent sheaves
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:146:0.

minimalPresentation(CoherentSheaf) -- minimal presentation of a coherent sheaf or sheaf map
*******************************************************************************************

  * Function: minimalPresentation (Macaulay2Doc),
  * Usage:
        prune F
  * Inputs:
      * F, a coherent sheaf,
  * Optional inputs (Macaulay2Doc),:
      * Exclude (Macaulay2Doc), => ...,
        default value {},
  * Outputs:
      * a coherent sheaf, a sheaf represented by the
        depth 2-ification of the original representative module

Description
===========

Given a sheaf $\mathcal F$ represented by some module $M$, there are always
isomorphisms $$H^i (X , \mathcal{F}) = H^i_{\mathfrak{m}} (M)_0 \quad
\text{for} \ i > 0,$$ where $\mathfrak{m}$ denotes the irrelevant ideal. When
$i = 0$ the best one can say in general is that there is an exact sequence $$0
\to H^0_{\mathfrak{m}} (M) \to \bigoplus_{d \geq 0} H^0 (X , \mathfrak{F}(d))
\to M \to H^1_{\mathfrak{m}} (M) \to 0.$$ Thus, the prune command for a
coherent sheaf computes a graded module $M'$ representing the same sheaf
$\mathca{F}$, but such that there is an honest isomorphism $$M' \cong
\bigoplus_{d \geq 0} H^0 (X , \mathcal{F} (d)).$$ In other words, the prune
command computes a module with depth at least 2 that represents the same sheaf
$\mathcal{F}$.

+---------------------------------------+
|i1 : Q = QQ[x..z]; --KELLER: do example|
+---------------------------------------+

The pruning isomorphism of sheaves is cached with the key pruningMap. It is an
isomorphism of sheaves that is essentially never represented by an isomorphism
of the underlying modules (at least in interesting cases).

+------------------------------------------------------------+
|i2 : Q = QQ[x..z] -- DO example of accessing the pruning map|
|                                                            |
|o2 = Q                                                      |
|                                                            |
|o2 : PolynomialRing                                         |
+------------------------------------------------------------+

Pruning also applies in a functorial way to morphisms of sheaves.

The method for computing the pruned representative proceeds with a few steps:
first, the representative module $M$ is replaced by $M / H^0_{\mathfrak{m}}
(M)$, which kills any torsion. Next, since $M$ is now torsion-free, we have an
equality $\operatorname{Hom}_S (N , M) = 0$ for any module $N$ with finite
length. Thus, we can choose a large formal Frobenius power $\mathfrak{m}^{[m]}
= (x_1^m , \dots , x_n^m)$ of the maximal ideal so that $\operatorname{Hom}_S
(\mathfrak{m}^{[m]} , M)$ has depth at least $2$. Applying the functor
$\operatorname{Hom}_S ( - , M)$ to the short exact sequence $$0 \to
\mathfrak{m}^{[m]} \to S \to S / \mathfrak{m}^{[m]} \to 0$$ yields a short
exact sequence $$0 \to \operatorname{Hom}_S (\mathfrak{m}^{[m]} , M) \to M \to
\operatorname{Ext}^1_S (S / \mathfrak{m}^{[m]} , M) \to 0.$$ The induced map
$\operatorname{Hom}_S (\mathfrak{m}^{[m]} , M) \to M$ is not an isomorphism of
modules, but sheafifies to an isomorphism since the cokernel has finite length.
This induced sheaf map is the pruning map, and the new representative is the
sheaf associated to the module $\operatorname{Hom}_R (\mathfrak{m}^{[m]} , M)$.

For morphisms, the above process can be made compatible with maps without much
difficulty, since one only needs to conjugate the map by the pruning maps to
get an induced map on the pruned representatives.

Caveat
======

Since the pruning operation for sheaves tends to be much more involved, one
should be careful about the fact that pruning sheaves at every step of a
computation may slow cause significant slowdowns.

See also
========

  * prune (Macaulay2Doc) -- prune, e.g., compute a minimal
    presentation

Ways to use this method:
========================

  * minimalPresentation(CoherentSheaf)
    -- minimal presentation of a
    coherent sheaf or sheaf map
  * "minimalPresentation(SheafMap)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:818:0.

module(CoherentSheaf) -- get the module defining a coherent sheaf
*****************************************************************

  * Function: module (Macaulay2Doc),
  * Usage:
        module F
  * Inputs:
      * F, a coherent sheaf,
  * Outputs:
      * a module (Macaulay2Doc), the module from which the
        coherent sheaf F was defined

Description
===========

+----------------------------------------+
|i1 : X = Proj(QQ[x,y,z])                |
|                                        |
|o1 = X                                  |
|                                        |
|o1 : ProjectiveVariety                  |
+----------------------------------------+
|i2 : F = OO_X(3)                        |
|                                        |
|        1                               |
|o2 = OO  (3)                            |
|       X                                |
|                                        |
|o2 : coherent sheaf on X, free of rank 1|
+----------------------------------------+
|i3 : module F                           |
|                                        |
|               1                        |
|o3 = (QQ[x..z])                         |
|                                        |
|o3 : QQ[x..z]-module, free, degrees {-3}|
+----------------------------------------+
|i4 : degrees oo                         |
|                                        |
|o4 = {{-3}}                             |
|                                        |
|o4 : List                               |
+----------------------------------------+

See also
========

  * OO -- the structure sheaf
  * degrees (Macaulay2Doc) -- degrees of generators
  * Proj -- make a projective variety

Ways to use this method:
========================

  * module(CoherentSheaf) -- get the module
    defining a coherent sheaf
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:558:0.

module(SheafOfRings) -- make or get a module
********************************************

  * Function: module (Macaulay2Doc),
  * Usage:
        module F
  * Inputs:
      * F, a sheaf of rings,
  * Outputs:
      * a module (Macaulay2Doc), the module corresponding to F

Description
===========

+----------------------------------------+
|i1 : R = QQ[x..z]                       |
|                                        |
|o1 = R                                  |
|                                        |
|o1 : PolynomialRing                     |
+----------------------------------------+
|i2 : X = Proj R                         |
|                                        |
|o2 = X                                  |
|                                        |
|o2 : ProjectiveVariety                  |
+----------------------------------------+
|i3 : OO_X^6                             |
|                                        |
|        6                               |
|o3 = OO                                 |
|       X                                |
|                                        |
|o3 : coherent sheaf on X, free of rank 6|
+----------------------------------------+
|i4 : module oo                          |
|                                        |
|      6                                 |
|o4 = R                                  |
|                                        |
|o4 : R-module, free                     |
+----------------------------------------+

See also
========

  * Variety -- the class of all algebraic varieties
  * OO -- the structure sheaf

Ways to use this method:
========================

  * module(SheafOfRings) -- make or get a
    module
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:571:0.

numgens(CoherentSheaf) -- the number of generators of the underlying module
***************************************************************************

  * Function: numgens (Macaulay2Doc),
  * Usage:
        numgens F
  * Inputs:
      * F, a coherent sheaf,
  * Outputs:
      * an integer (Macaulay2Doc), number of generators of the
        underlying module M of F

Description
===========

In Macaulay2, each coherent sheaf comes equipped with a module over the
coordinate ring.  In the homogeneous case, this is not necessarily the number
of generators of the sum of twists H^0(F(d)), summed over all d, which in fact
could be infinitely generated.
+-----------------------------------------------+
|i1 : R = QQ[a..d]/(a^3+b^3+c^3+d^3)            |
|                                               |
|o1 = R                                         |
|                                               |
|o1 : QuotientRing                              |
+-----------------------------------------------+
|i2 : X = Proj R;                               |
+-----------------------------------------------+
|i3 : T' = cotangentSheaf X                     |
|                                               |
|o3 = cokernel {2} | c  0  0  d  0   a2  b2 0  ||
|              {2} | a  d  0  0  b2  -c2 0  0  ||
|              {2} | -b 0  d  0  a2  0   c2 0  ||
|              {2} | 0  b  a  0  -d2 0   0  c2 ||
|              {2} | 0  -c 0  a  0   -d2 0  b2 ||
|              {2} | 0  0  -c -b 0   0   d2 a2 ||
|                                               |
|                                         6     |
|o3 : coherent sheaf on X, quotient of OO  (-2) |
|                                        X      |
+-----------------------------------------------+
|i4 : numgens T'                                |
|                                               |
|o4 = 6                                         |
+-----------------------------------------------+
|i5 : module T'                                 |
|                                               |
|o5 = cokernel {2} | c  0  0  d  0   a2  b2 0  ||
|              {2} | a  d  0  0  b2  -c2 0  0  ||
|              {2} | -b 0  d  0  a2  0   c2 0  ||
|              {2} | 0  b  a  0  -d2 0   0  c2 ||
|              {2} | 0  -c 0  a  0   -d2 0  b2 ||
|              {2} | 0  0  -c -b 0   0   d2 a2 ||
|                                               |
|                            6                  |
|o5 : R-module, quotient of R                   |
+-----------------------------------------------+

See also
========

  * module(CoherentSheaf) -- get the module
    defining a coherent sheaf
  * tangentSheaf -- tangent sheaf of a projective variety

Ways to use this method:
========================

  * numgens(CoherentSheaf) -- the number of
    generators of the underlying module
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:705:0.

OO -- the structure sheaf
*************************

  * Usage:
        OO_X
  * Inputs:
      * X, a variety
  * Outputs:
      * the structure sheaf of X.

Description
===========

+--------------------------------------------+
|i1 : R = QQ[x,y,z]/(y^2*z-x*(x-z)*(x-37*z));|
+--------------------------------------------+
|i2 : X = Proj R                             |
|                                            |
|o2 = X                                      |
|                                            |
|o2 : ProjectiveVariety                      |
+--------------------------------------------+
|i3 : OO_X                                   |
|                                            |
|o3 = OO                                     |
|       X                                    |
|                                            |
|o3 : SheafOfRings                           |
+--------------------------------------------+
|i4 : HH^1(OO_X)                             |
|                                            |
|       1                                    |
|o4 = QQ                                     |
|                                            |
|o4 : QQ-module, free                        |
+--------------------------------------------+
|i5 : HH^0(OO_X(3))                          |
|                                            |
|       9                                    |
|o5 = QQ                                     |
|                                            |
|o5 : QQ-module, free                        |
+--------------------------------------------+

See also
========

  * CoherentSheaf -- the class of all coherent sheaves
  * cohomology (Macaulay2Doc) -- general cohomology functor

For the programmer
==================

The object OO, is a scripted functor (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:115:0.

pdim(CoherentSheaf) -- calculate the projective dimension
*********************************************************

  * Function: pdim (Macaulay2Doc),
  * Usage:
        pdim S
  * Inputs:
      * S, a coherent sheaf,
  * Outputs:
      * an integer (Macaulay2Doc), the projective dimension

Description
===========

+--------------------------------------------------+
|i1 : V = Proj(ZZ/101[x_0..x_2]);                  |
+--------------------------------------------------+
|i2 : S = sheaf(image matrix {{x_0^3+x_1^3+x_2^3}})|
|                                                  |
|o2 = image | x_0^3+x_1^3+x_2^3 |                  |
|                                                  |
|                                         1        |
|o2 : coherent sheaf on V, subsheaf of OO          |
|                                        V         |
+--------------------------------------------------+
|i3 : pdim S                                       |
|                                                  |
|o3 = 0                                            |
+--------------------------------------------------+

Ways to use this method:
========================

  * pdim(CoherentSheaf) -- calculate the
    projective dimension
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:760:0.

Proj -- make a projective variety
*********************************

  * Usage:
        Proj R
  * Inputs:
      * R
  * Outputs:
      * the projective variety (or scheme) formed from the graded ring R

Description
===========

+----------------------+
|i1 : R = QQ[x,y];     |
+----------------------+
|i2 : Proj R           |
|                      |
|o2 = Proj R           |
|                      |
|o2 : ProjectiveVariety|
+----------------------+

Ways to use Proj:
=================

  * "Proj(Ring)"

For the programmer
==================

The object Proj, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:72:0.

quotient(SheafMap,SheafMap) -- factoring a morphism of coherent sheaves through another
***************************************************************************************

  * Function: quotient (Macaulay2Doc),

Ways to use this method:
========================

  * quotient(SheafMap,SheafMap), --
    factoring a morphism of coherent sheaves through another
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:230:0.

rank(CoherentSheaf) -- rank of a coherent sheaf
***********************************************

  * Function: rank (Macaulay2Doc),
  * Usage:
        rank F
  * Inputs:
      * F, a coherent sheaf,
  * Outputs:
      * an integer (Macaulay2Doc),

See also
========

  * rank(Module) (Macaulay2Doc) -- compute the rank
  * degree(Module) (Macaulay2Doc) -- get the degree
    of a module
  * degree(Ring) (Macaulay2Doc)

Ways to use this method:
========================

  * rank(CoherentSheaf) -- rank of a coherent
    sheaf
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:684:0.

ring(CoherentSheaf) -- the coordinate ring of the underlying variety
********************************************************************

  * Function: ring (Macaulay2Doc),

Ways to use this method:
========================

  * ring(CoherentSheaf) -- the coordinate ring
    of the underlying variety
  * "ring(SheafMap)"
  * "ring(SheafOfRings)"
  * "ring(SumOfTwists)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:542:0.

ring(Variety) -- coordinate ring of the variety
***********************************************

  * Function: ring (Macaulay2Doc),

Ways to use this method:
========================

  * ring(Variety) -- coordinate ring of the variety
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:133:0.

sheaf -- make a coherent sheaf
******************************

Ways to use sheaf:
==================

  * sheaf(Matrix) -- the sheafification functor for
    morphisms
  * "sheaf(Matrix,ZZ)" -- see sheaf(Matrix), -- the
    sheafification functor for morphisms
  * "sheaf(Variety,Matrix)" -- see sheaf(Matrix), --
    the sheafification functor for morphisms
  * "sheaf(Variety,Matrix,ZZ)" -- see sheaf(Matrix),
    -- the sheafification functor for morphisms
  * "sheaf(Ideal)" -- see sheaf(Module), -- make a
    coherent sheaf
  * sheaf(Module) -- make a coherent sheaf
  * sheaf(Ring) -- make a coherent sheaf of rings
  * sheaf(SheafMap) (missing documentation)
  * sheaf(Variety) -- make a coherent sheaf
  * "sheaf(Variety,Ideal)" -- see sheaf(Variety,Module),
    -- make a coherent sheaf
  * sheaf(Variety,Module) -- make a
    coherent sheaf
  * sheaf(Variety,Ring) -- make a coherent
    sheaf of rings

For the programmer
==================

The object sheaf, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:117:0.

sheaf(Matrix) -- the sheafification functor for morphisms
*********************************************************

  * Function: sheaf,

Ways to use this method:
========================

  * sheaf(Matrix) -- the sheafification functor for
    morphisms
  * "sheaf(Matrix,ZZ)"
  * "sheaf(Variety,Matrix)"
  * "sheaf(Variety,Matrix,ZZ)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:146:0.

sheaf(Module) -- make a coherent sheaf
**************************************

  * Function: sheaf,
  * Usage:
        sheaf M
        M^~
  * Inputs:
      * M, a module (Macaulay2Doc), homogeneous
  * Outputs:
      * a coherent sheaf, the coherent sheaf on a
        projective variety X corresponding to M

Description
===========

+-----------------------------------------+
|i1 : R = QQ[x,y,z];                      |
+-----------------------------------------+
|i2 : X = Proj R                          |
|                                         |
|o2 = X                                   |
|                                         |
|o2 : ProjectiveVariety                   |
+-----------------------------------------+
|i3 : M = R^{1,2,3}                       |
|                                         |
|      3                                  |
|o3 = R                                   |
|                                         |
|o3 : R-module, free, degrees {-1, -2, -3}|
+-----------------------------------------+
|i4 : sheaf M                             |
|                                         |
|        1          1          1          |
|o4 = OO  (1) ++ OO  (2) ++ OO  (3)       |
|       X          X          X           |
|                                         |
|o4 : coherent sheaf on X, free of rank 3 |
+-----------------------------------------+
|i5 : M^~                                 |
|                                         |
|        1          1          1          |
|o5 = OO  (1) ++ OO  (2) ++ OO  (3)       |
|       X          X          X           |
|                                         |
|o5 : coherent sheaf on X, free of rank 3 |
+-----------------------------------------+

Ways to use this method:
========================

  * "sheaf(Ideal)"
  * sheaf(Module) -- make a coherent sheaf
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:196:0.

sheaf(Ring) -- make a coherent sheaf of rings
*********************************************

  * Function: sheaf,
  * Usage:
        sheaf R
        R^~
  * Inputs:
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * a sheaf of rings, the coherent sheaf on a
        projective variety X corresponding to M

Description
===========

+----------------------+
|i1 : R = QQ[x,y,z];   |
+----------------------+
|i2 : X = Proj R       |
|                      |
|o2 = X                |
|                      |
|o2 : ProjectiveVariety|
+----------------------+
|i3 : sheaf R          |
|                      |
|o3 = OO               |
|       X              |
|                      |
|o3 : SheafOfRings     |
+----------------------+
|i4 : R^~              |
|                      |
|o4 = OO               |
|       X              |
|                      |
|o4 : SheafOfRings     |
+----------------------+

Ways to use this method:
========================

  * sheaf(Ring) -- make a coherent sheaf of rings
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:210:0.

sheaf(Variety) -- make a coherent sheaf
***************************************

  * Function: sheaf,
  * Usage:
        sheaf X
  * Inputs:
      * X, a variety,
  * Outputs:
      * a sheaf of rings, the structure sheaf of rings on
        the variety X

Description
===========

+----------------------+
|i1 : R = QQ[x,y,z]    |
|                      |
|o1 = R                |
|                      |
|o1 : PolynomialRing   |
+----------------------+
|i2 : X = Proj R       |
|                      |
|o2 = X                |
|                      |
|o2 : ProjectiveVariety|
+----------------------+
|i3 : Y = Spec R       |
|                      |
|o3 = Y                |
|                      |
|o3 : AffineVariety    |
+----------------------+
|i4 : sheaf X          |
|                      |
|o4 = OO               |
|       X              |
|                      |
|o4 : SheafOfRings     |
+----------------------+
|i5 : sheaf Y          |
|                      |
|o5 = OO               |
|       Y              |
|                      |
|o5 : SheafOfRings     |
+----------------------+

Ways to use this method:
========================

  * sheaf(Variety) -- make a coherent sheaf
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:131:0.

sheaf(Variety,Module) -- make a coherent sheaf
**********************************************

  * Function: sheaf,
  * Usage:
        sheaf(X,M)
  * Inputs:
      * X, a variety,
      * M, a module (Macaulay2Doc),
  * Outputs:
      * a coherent sheaf, the coherent sheaf on the
        variety X corresponding to the module M

Description
===========

If X is the affine variety Spec R, then M should be an R-module.  If X is the
projective variety Proj R, then M should be a homogeneous R-module.

Ways to use this method:
========================

  * "sheaf(Variety,Ideal)"
  * sheaf(Variety,Module) -- make a
    coherent sheaf
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:181:0.

sheaf(Variety,Ring) -- make a coherent sheaf of rings
*****************************************************

  * Function: sheaf,

Description
===========

sheaf(X,R) -- produce the coherent sheaf on the variety X corresponding to the
ring R.  The variety X must be Spec R or Proj R.
+----------------------+
|i1 : R = QQ[x,y,z]    |
|                      |
|o1 = R                |
|                      |
|o1 : PolynomialRing   |
+----------------------+
|i2 : X = Proj R       |
|                      |
|o2 = X                |
|                      |
|o2 : ProjectiveVariety|
+----------------------+
|i3 : Y = Spec R       |
|                      |
|o3 = Y                |
|                      |
|o3 : AffineVariety    |
+----------------------+
|i4 : sheaf(X,R)       |
|                      |
|o4 = OO               |
|       X              |
|                      |
|o4 : SheafOfRings     |
+----------------------+
|i5 : sheaf(Y,R)       |
|                      |
|o5 = OO               |
|       Y              |
|                      |
|o5 : SheafOfRings     |
+----------------------+

Ways to use this method:
========================

  * sheaf(Variety,Ring) -- make a coherent
    sheaf of rings
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:143:0.

sheafExt -- sheaf extension of coherent sheaves
***********************************************

  * Usage:
        sheafExt^n(F,G)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * F, a sheaf of rings, or a coherent sheaf,
      * G, a sheaf of rings, or a coherent sheaf,
  * Outputs:
      * a coherent sheaf, the n-th sheaf extension of F
        and G

Description
===========

If F or G is a sheaf of rings, it is regarded as a sheaf
of modules in the evident way.

Both F and S must be coherent sheaves on the same projective variety or scheme
$X$.

The result is the sheaf associated to the graded module Ext^n(module F, module
G).

+----------------------------------------+
|i1 : X = Proj QQ[x,y]                   |
|                                        |
|o1 = X                                  |
|                                        |
|o1 : ProjectiveVariety                  |
+----------------------------------------+
|i2 : sheafExt^1(OO_X^1(2), OO_X^1(-11)) |
|                                        |
|o2 = 0                                  |
|                                        |
|o2 : coherent sheaf on X, free of rank 0|
+----------------------------------------+

See also
========

  * sheafHom -- sheaf Hom
  * Hom (Macaulay2Doc) -- module of homomorphisms
  * Ext (Macaulay2Doc) -- compute an Ext module
  * HH (Macaulay2Doc) -- general homology and cohomology functor
  * Ext^ZZ(CoherentSheaf,CoherentSheaf)
    -- global Ext

Ways to use sheafExt:
=====================

  * "sheafExt^ZZ(CoherentSheaf,CoherentSheaf)"
  * "sheafExt^ZZ(CoherentSheaf,SheafOfRings)"
  * "sheafExt^ZZ(SheafOfRings,CoherentSheaf)"
  * "sheafExt^ZZ(SheafOfRings,SheafOfRings)"

For the programmer
==================

The object sheafExt, is a scripted functor (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

sheafHom -- sheaf Hom
*********************

  * Usage:
        sheafHom(F, G)
  * Inputs:
      * F, a coherent sheaf, or a sheaf of rings,
      * G, a coherent sheaf, or a sheaf of rings,
  * Optional inputs (Macaulay2Doc),:
      * DegreeLimit => ..., default value null
      * MinimalGenerators => ..., default value true
      * Strategy => ..., default value null
  * Outputs:
      * a coherent sheaf, corresponding to homomorphisms
        from $M \to N$, where $F = \tilde M$ and $G = \tilde N$

Description
===========

If F or G is a sheaf of rings, it is regarded as a sheaf
of modules in the evident way.

Both F and G must be coherent sheaves on the same projective variety or scheme
$X$.

The result is the sheaf associated to the graded module Hom(module F, module
G).

+----------------------------------------+
|i1 : S = QQ[x,y]                        |
|                                        |
|o1 = S                                  |
|                                        |
|o1 : PolynomialRing                     |
+----------------------------------------+
|i2 : X = Proj S                         |
|                                        |
|o2 = X                                  |
|                                        |
|o2 : ProjectiveVariety                  |
+----------------------------------------+
|i3 : sheafHom(OO_X^1(2), OO_X^1(11))    |
|                                        |
|        1                               |
|o3 = OO  (9)                            |
|       X                                |
|                                        |
|o3 : coherent sheaf on X, free of rank 1|
+----------------------------------------+
|i4 : Hom(S^{2}, S^{11})                 |
|                                        |
|      1                                 |
|o4 = S                                  |
|                                        |
|o4 : S-module, free, degrees {-9}       |
+----------------------------------------+

Code
====

../../../../../Macaulay2/packages/Varieties.m2:695:59-696:77: --source code:
sheafHom(CoherentSheaf, CoherentSheaf) := CoherentSheaf => opts -> (F, G) -> (
    assertSameVariety(F, G); sheaf(variety F, Hom(module F, module G, opts)))

See also
========

  * Hom(Module,Module) (Macaulay2Doc) -- module of homomorphisms
  * Hom(CoherentSheaf,CoherentSheaf)
    -- global Hom
  * sheafHom(CoherentSheaf,SheafMap),
    -- functor of sheaf Hom
  * sheafExt^ZZ(CoherentSheaf,CoherentSheaf) -- sheaf
    extension of coherent sheaves

Ways to use sheafHom:
=====================

  * "sheafHom(CoherentSheaf,CoherentSheaf)"
  * "sheafHom(CoherentSheaf,SheafOfRings)"
  * "sheafHom(SheafOfRings,CoherentSheaf)"
  * "sheafHom(SheafOfRings,SheafOfRings)"
  * "sheafHom(CoherentSheaf,SheafMap)" -- see
    sheafHom(SheafMap,SheafMap), -- functor
    of sheaf Hom
  * "sheafHom(SheafMap,CoherentSheaf)" -- see
    sheafHom(SheafMap,SheafMap), -- functor
    of sheaf Hom
  * sheafHom(SheafMap,SheafMap), --
    functor of sheaf Hom
  * "sheafHom(SheafMap,SheafOfRings)" -- see sheafHom(SheafMap,SheafMap),
    -- functor of sheaf Hom
  * "sheafHom(SheafOfRings,SheafMap)" -- see sheafHom(SheafMap,SheafMap),
    -- functor of sheaf Hom

For the programmer
==================

The object sheafHom, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

sheafHom(SheafMap,SheafMap) -- functor of sheaf Hom
***************************************************

  * Function: sheafHom,

Ways to use this method:
========================

  * "sheafHom(CoherentSheaf,SheafMap)"
  * "sheafHom(SheafMap,CoherentSheaf)"
  * sheafHom(SheafMap,SheafMap), --
    functor of sheaf Hom
  * "sheafHom(SheafMap,SheafOfRings)"
  * "sheafHom(SheafOfRings,SheafMap)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-functors.m2:600:0.

SheafMap ++ SheafMap -- takes the direct sum of two sheaf maps
**************************************************************

  * Operator: ++ (Macaulay2Doc),
  * Usage:
        f ++ g
  * Inputs:
      * f, a morphism of sheaves, a sheaf map
      * g, a morphism of sheaves, another sheaf map
  * Outputs:
      * a morphism of sheaves, the direct sum of sheaf maps f
        and g

Description
===========

This will create a sheaf map h which is the direct sum of f and g.

+-------------------+
|i1 : R = QQ[x,y,z] |
|                   |
|o1 = R             |
|                   |
|o1 : PolynomialRing|
+-------------------+

Ways to use this method:
========================

  * SheafMap ++ SheafMap -- takes the direct sum
    of two sheaf maps
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:230:0.

SheafMap ^ ZZ -- raises a SheafMap to a power
*********************************************

  * Operator: ^ (Macaulay2Doc),
  * Usage:
        f ^ n
  * Inputs:
      * f, a morphism of sheaves, a sheaf map
      * n, an integer (Macaulay2Doc), a non-negative integer
  * Outputs:
      * a morphism of sheaves, the sheaf map f raised to the
        power n

Description
===========

This will create a sheaf map g which is the square of f.

+----------------------------------------+
|i1 : R = QQ[x,y,z]                      |
|                                        |
|o1 = R                                  |
|                                        |
|o1 : PolynomialRing                     |
+----------------------------------------+
|i2 : X = variety R                      |
|                                        |
|o2 = X                                  |
|                                        |
|o2 : ProjectiveVariety                  |
+----------------------------------------+
|i3 : f = sheafHom(OO_X, OO_X)           |
|                                        |
|        1                               |
|o3 = OO                                 |
|       X                                |
|                                        |
|o3 : coherent sheaf on X, free of rank 1|
+----------------------------------------+
|i4 : g = f ^ 2                          |
|                                        |
|        2                               |
|o4 = OO                                 |
|       X                                |
|                                        |
|o4 : coherent sheaf on X, free of rank 2|
+----------------------------------------+

Ways to use this method:
========================

  * SheafMap ^ ZZ -- raises a SheafMap to a power
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:230:0.

SheafMap ^** ZZ -- repeatedly tensors a map
*******************************************

  * Operator: ^** (Macaulay2Doc),
  * Usage:
        f ^** n
  * Inputs:
      * f, a morphism of sheaves, a sheaf map
      * n, an integer (Macaulay2Doc), a non-negative integer
  * Outputs:
      * a morphism of sheaves, the sheaf map f tensor n times

Description
===========

This will create a sheaf map g which is the tensor of f with itself.

+----------------------------------------+
|i1 : R = QQ[x,y,z]                      |
|                                        |
|o1 = R                                  |
|                                        |
|o1 : PolynomialRing                     |
+----------------------------------------+
|i2 : X = variety R                      |
|                                        |
|o2 = X                                  |
|                                        |
|o2 : ProjectiveVariety                  |
+----------------------------------------+
|i3 : f = sheafHom(OO_X, OO_X)           |
|                                        |
|        1                               |
|o3 = OO                                 |
|       X                                |
|                                        |
|o3 : coherent sheaf on X, free of rank 1|
+----------------------------------------+
|i4 : g = f ^** 2                        |
|                                        |
|        1                               |
|o4 = OO                                 |
|       X                                |
|                                        |
|o4 : coherent sheaf on X, free of rank 1|
+----------------------------------------+

Ways to use this method:
========================

  * SheafMap ^** ZZ -- repeatedly tensors a map
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-maps.m2:230:0.

SheafOfRings ^ List -- make a graded free coherent sheaf
********************************************************

  * Operator: ^ (Macaulay2Doc),
  * Usage:
        M = R^{i,j,k,...}
  * Inputs:
      * R, a sheaf of rings,
      * {i,j,k, ...}, a list (Macaulay2Doc), of integers or lists
        of integers
  * Outputs:
      * a coherent sheaf, , a graded free coherent sheaf
        whose generators have degrees -i, -j, -k, ...

Description
===========

+----------------------------------------+
|i1 : R = QQ[a..d]/(a*b*c*d)             |
|                                        |
|o1 = R                                  |
|                                        |
|o1 : QuotientRing                       |
+----------------------------------------+
|i2 : X = Proj R                         |
|                                        |
|o2 = X                                  |
|                                        |
|o2 : ProjectiveVariety                  |
+----------------------------------------+
|i3 : OO_X^{-1,-2,3}                     |
|                                        |
|        1           1           1       |
|o3 = OO  (-1) ++ OO  (-2) ++ OO  (3)    |
|       X           X           X        |
|                                        |
|o3 : coherent sheaf on X, free of rank 3|
+----------------------------------------+

If i, j, ... are lists of integers, then they represent multi-degrees, as in
graded and multigraded polynomial rings (Macaulay2Doc).
+--------------------------------------------------------+
|i4 : Y = Proj (QQ[x,y,z,Degrees=>{{1,0},{1,-1},{1,-2}}])|
|                                                        |
|o4 = Y                                                  |
|                                                        |
|o4 : ProjectiveVariety                                  |
+--------------------------------------------------------+
|i5 : OO_Y^{{1,2},{-1,3}}                                |
|                                                        |
|        1              1                                |
|o5 = OO   (1, 2) ++ OO   (-1, 3)                        |
|       Y              Y                                 |
|                                                        |
|o5 : coherent sheaf on Y, free of rank 2                |
+--------------------------------------------------------+
|i6 : degrees oo                                         |
|                                                        |
|o6 = {{-1, -2}, {1, -3}}                                |
|                                                        |
|o6 : List                                               |
+--------------------------------------------------------+

See also
========

  * OO -- the structure sheaf
  * Proj -- make a projective variety
  * degrees (Macaulay2Doc) -- degrees of generators
  * graded and multigraded polynomial rings (missing documentation)

Ways to use this method:
========================

  * SheafOfRings ^ List -- make a graded free
    coherent sheaf
  * "SheafOfRings ^ ZZ"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:169:0.

singularLocus(AffineVariety) -- the locus of singular points in a variety
*************************************************************************

  * Function: singularLocus (Macaulay2Doc),
  * Usage:
        singularLocus X
  * Inputs:
      * X, an affine variety, or a projective variety,
  * Outputs:
      * an affine variety, or a projective variety,

Description
===========

The singular locus of a variety is the set of singular points of some variety
$X$. Geometrically it is the intersection of the points in the variety $X$ with
the points at which the associated jacobian matrix does not have maximal rank.
Algebraically, this corresponds to the variety defined the ideal obtained by
taking the sum of the defining ideal of $X$ and the maximal minors of the
Jacobian matrix. In the projective case, one should also saturate to make sure
the ideal defines a reduced object.

+-----------------------------+
|i1 : R = QQ[x,y]/(x^3 - y^2);|
+-----------------------------+
|i2 : X = Spec R              |
|                             |
|o2 = X                       |
|                             |
|o2 : AffineVariety           |
+-----------------------------+
|i3 : S = singularLocus X     |
|                             |
|o3 = S                       |
|                             |
|o3 : AffineVariety           |
+-----------------------------+
|i4 : codim S                 |
|                             |
|o4 = 2                       |
+-----------------------------+
|i5 : trim ideal ring S       |
|                             |
|                2            |
|o5 = ideal (y, x )           |
|                             |
|o5 : Ideal of QQ[x..y]       |
+-----------------------------+

In the projective case, there may be additional irrelevant components that we
would like to saturate away:

+----------------------------------------------+
|i6 : Q = QQ[x,y]/(x^2*y);                     |
+----------------------------------------------+
|i7 : Y = Proj(Q)                              |
|                                              |
|o7 = Y                                        |
|                                              |
|o7 : ProjectiveVariety                        |
+----------------------------------------------+
|i8 : S' = singularLocus Y                     |
|                                              |
|o8 = S'                                       |
|                                              |
|o8 : ProjectiveVariety                        |
+----------------------------------------------+
|i9 : I = ideal ring S'                        |
|                                              |
|o9 = ideal x                                  |
|                                              |
|o9 : Ideal of QQ[x..y]                        |
+----------------------------------------------+
|i10 : J = minors(1,jacobian ideal Q) + ideal Q|
|                                              |
|                    2   2                     |
|o10 = ideal (2x*y, x , x y)                   |
|                                              |
|o10 : Ideal of QQ[x..y]                       |
+----------------------------------------------+
|i11 : primaryDecomposition J                  |
|                                              |
|                           2                  |
|o11 = {ideal x, ideal (y, x )}                |
|                                              |
|o11 : List                                    |
+----------------------------------------------+

As we see in the above, without saturating there is an irrelevant component
arising from the ideal $(x^2 , y)$ that disappears upon saturating.

See also
========

  * singularLocus(Ring) (Macaulay2Doc) -- singular locus

Ways to use this method:
========================

  * singularLocus(AffineVariety), --
    the locus of singular points in a variety
  * "singularLocus(ProjectiveVariety)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:300:0.

Spec -- make an affine variety
******************************

  * Usage:
        Spec R
  * Inputs:
      * R
  * Outputs:
      * the affine variety (or scheme) formed from the ring R

Description
===========

+------------------+
|i1 : R = QQ[x,y]; |
+------------------+
|i2 : Spec R       |
|                  |
|o2 = Spec R       |
|                  |
|o2 : AffineVariety|
+------------------+

Ways to use Spec:
=================

  * "Spec(Ring)"

For the programmer
==================

The object Spec, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:60:0.

tangentSheaf -- tangent sheaf of a projective variety
*****************************************************

  * Usage:
        tangentSheaf X
  * Inputs:
      * X, a projective variety,
  * Optional inputs (Macaulay2Doc),:
      * MinimalGenerators => a Boolean value (Macaulay2Doc),
        default value true, whether to prune (Macaulay2Doc), the
        result before returning it. The default value is true.
      * Strategy => ..., default value null
  * Outputs:
      * a coherent sheaf,

Description
===========

This method computes the tangent sheaf of the projective variety $X$. It is
computed by taking the dual of the cotangentSheaf.

Tangent sheaf of the projective plane:

+-----------------------------------------------+
|i1 : P2 = Proj QQ[a,b,c]                       |
|                                               |
|o1 = P2                                        |
|                                               |
|o1 : ProjectiveVariety                         |
+-----------------------------------------------+
|i2 : TP = tangentSheaf P2                      |
|                                               |
|o2 = image {-2} | a  b 0 |                     |
|           {-2} | -c 0 b |                     |
|           {-2} | 0  c a |                     |
|                                               |
|                                           3   |
|o2 : coherent sheaf on P2, subsheaf of OO   (2)|
|                                         P2    |
+-----------------------------------------------+
|i3 : HH^0(TP(-1))                              |
|                                               |
|       3                                       |
|o3 = QQ                                        |
|                                               |
|o3 : QQ-module, free                           |
+-----------------------------------------------+
|i4 : HH^1(TP(-3))                              |
|                                               |
|       1                                       |
|o4 = QQ                                        |
|                                               |
|o4 : QQ-module, free                           |
+-----------------------------------------------+

Tangent sheaf of a plane nodal and cuspidal curve:

+--------------------------------------------------------------------+
|i5 : N = Proj QQ[a,b,c]/(b^2*c-a^2*(a+c))                           |
|                                                                    |
|o5 = N                                                              |
|                                                                    |
|o5 : ProjectiveVariety                                              |
+--------------------------------------------------------------------+
|i6 : TN = tangentSheaf N                                            |
|                                                                    |
|o6 = image {0}  | 0  0       |                                      |
|           {-1} | 3b 3a2+3ac |                                      |
|           {-1} | 2a 2bc     |                                      |
|                                                                    |
|                                         1       2                  |
|o6 : coherent sheaf on N, subsheaf of OO   ++ OO  (1)               |
|                                        N       N                   |
+--------------------------------------------------------------------+
|i7 : HH^0(TN), HH^1(TN)                                             |
|                                                                    |
|        1                                                           |
|o7 = (QQ , 0)                                                       |
|                                                                    |
|o7 : Sequence                                                       |
+--------------------------------------------------------------------+
|i8 : C = Proj QQ[a,b,c]/(b^2*c-a^3)                                 |
|                                                                    |
|o8 = C                                                              |
|                                                                    |
|o8 : ProjectiveVariety                                              |
+--------------------------------------------------------------------+
|i9 : TC = tangentSheaf C                                            |
|                                                                    |
|o9 = image {1}  | 0   0   |                                         |
|           {-1} | -2a -2b |                                         |
|           {-2} | 3bc 3a2 |                                         |
|                                                                    |
|                                         1           1          1   |
|o9 : coherent sheaf on C, subsheaf of OO  (-1) ++ OO  (1) ++ OO  (2)|
|                                        C           C          C    |
+--------------------------------------------------------------------+
|i10 : HH^0(TC), HH^1(TC)                                            |
|                                                                    |
|         2                                                          |
|o10 = (QQ , 0)                                                      |
|                                                                    |
|o10 : Sequence                                                      |
+--------------------------------------------------------------------+

See also
========

  * idealSheaf -- ideal sheaf of a projective variety
  * cotangentSheaf -- cotangent sheaf of a projective
    variety
  * ProjectiveVariety -- the class of all projective
    varieties

Ways to use tangentSheaf:
=========================

  * "tangentSheaf(ProjectiveVariety)"

For the programmer
==================

The object tangentSheaf, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:501:0.

varieties
*********

We may use Spec, to create an affine scheme (or algebraic variety)
with a specified coordinate ring and ring (Macaulay2Doc), to recover
the ring.
+--------------------+
|i1 : R = ZZ/2[x,y,z]|
|                    |
|o1 = R              |
|                    |
|o1 : PolynomialRing |
+--------------------+
|i2 : X = Spec R     |
|                    |
|o2 = X              |
|                    |
|o2 : AffineVariety  |
+--------------------+
|i3 : ring X         |
|                    |
|o3 = R              |
|                    |
|o3 : PolynomialRing |
+--------------------+
|i4 : dim X          |
|                    |
|o4 = 3              |
+--------------------+
The variety X is a 3-dimensional affine space.

We may form products.
+-------------------------------------+
|i5 : X ** X                          |
|                                     |
|          ZZ                         |
|o5 = Spec(--[x , y , z , x , y , z ])|
|           2  0   0   0   1   1   1  |
|                                     |
|o5 : AffineVariety                   |
+-------------------------------------+
|i6 : dim oo                          |
|                                     |
|o6 = 6                               |
+-------------------------------------+

We may use Proj, to create a projective scheme (or algebraic
variety) with a specified homogeneous coordinate ring.
+----------------------+
|i7 : Y = Proj R       |
|                      |
|o7 = Y                |
|                      |
|o7 : ProjectiveVariety|
+----------------------+
|i8 : ring Y           |
|                      |
|o8 = R                |
|                      |
|o8 : PolynomialRing   |
+----------------------+
|i9 : dim Y            |
|                      |
|o9 = 2                |
+----------------------+
The most important reason for introducing the notion of algebraic variety into
a computer algebra system is to support the notion of coherent sheaf.  See
coherent sheaves, for information about that.

For more details about varieties, see Variety.
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:48:0.

variety(CoherentSheaf) -- the underlying variety over which a coherent sheaf or morphism is defined.
****************************************************************************************************

  * Function: variety,
  * Usage:
        variety F
  * Inputs:
      * F, a coherent sheaf, a sheaf of rings,
        a sum of twists, or a morphism of sheaves,
  * Outputs:
      * a variety,

Description
===========

+-------------------------+
|i1 : X = Proj QQ[x,y,z]  |
|                         |
|o1 = X                   |
|                         |
|o1 : ProjectiveVariety   |
+-------------------------+
|i2 : variety OO_X        |
|                         |
|o2 = X                   |
|                         |
|o2 : ProjectiveVariety   |
+-------------------------+
|i3 : variety OO_X(3)     |
|                         |
|o3 = X                   |
|                         |
|o3 : ProjectiveVariety   |
+-------------------------+
|i4 : variety id_(OO_X(3))|
|                         |
|o4 = X                   |
|                         |
|o4 : ProjectiveVariety   |
+-------------------------+

Ways to use this method:
========================

  * variety(CoherentSheaf) -- the underlying
    variety over which a coherent sheaf or morphism is defined.
  * "variety(SheafMap)"
  * "variety(SheafOfRings)"
  * "variety(SumOfTwists)"
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-sheaves.m2:531:0.

variety(Ideal) -- the closed projective subvariety defined by an ideal
**********************************************************************

  * Function: variety,
  * Usage:
        variety I
  * Inputs:
      * I, an ideal (Macaulay2Doc), a homogeneous ideal
  * Outputs:
      * a variety, the closed subvariety defined by an ideal

Description
===========

In the example, we compute the dimension of a line in the projective plane.
+----------------------+
|i1 : R = QQ[x..z]     |
|                      |
|o1 = R                |
|                      |
|o1 : PolynomialRing   |
+----------------------+
|i2 : variety ideal x  |
|                      |
|          R           |
|o2 = Proj(-)          |
|          x           |
|                      |
|o2 : ProjectiveVariety|
+----------------------+
|i3 : dim oo           |
|                      |
|o3 = 1                |
+----------------------+

Caveat
======

An alternative task for this function would be to define the affine subvariety,
so if something like this eventually becomes useful, we may have to redesign
it.  Suggestions welcome.

Ways to use this method:
========================

  * variety(Ideal) -- the closed projective
    subvariety defined by an ideal
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:92:0.

variety(Ring) -- the variety previously associated to a given ring
******************************************************************

  * Function: variety,
  * Usage:
        variety S
  * Inputs:
      * S, a ring (Macaulay2Doc), the intersection ring of a
        variety $X$, say, or the homogeneous (Cox) ring of a normal toric
        variety, or another ring that has been associated to a variety, or an
        element in such a ring
  * Outputs:
      * a variety, $X$, the variety associated with S

Description
===========

+----------------------------------------+
|i1 : needsPackage "NormalToricVarieties"|
|                                        |
|o1 = NormalToricVarieties               |
|                                        |
|o1 : Package                            |
+----------------------------------------+
|i2 : X = toricProjectiveSpace 1         |
|                                        |
|o2 = X                                  |
|                                        |
|o2 : NormalToricVariety                 |
+----------------------------------------+
|i3 : S = ring X                         |
|                                        |
|o3 = S                                  |
|                                        |
|o3 : PolynomialRing                     |
+----------------------------------------+
|i4 : X === variety S                    |
|                                        |
|o4 = true                               |
+----------------------------------------+
+-----------------------------------------------+
|i5 : needsPackage "Schubert2"                  |
|                                               |
|o5 = Schubert2                                 |
|                                               |
|o5 : Package                                   |
+-----------------------------------------------+
|i6 : Y = abstractProjectiveSpace 1             |
|                                               |
|o6 = Y                                         |
|                                               |
|o6 : a flag bundle with subquotient ranks {2:1}|
+-----------------------------------------------+
|i7 : IY = intersectionRing Y                   |
|                                               |
|o7 = IY                                        |
|                                               |
|o7 : QuotientRing                              |
+-----------------------------------------------+
|i8 : Y === variety IY                          |
|                                               |
|o8 = true                                      |
+-----------------------------------------------+

For package developers: All this function does is to look up the symbol variety
in S. This is currently used in two packages, but can be used in other
settings, if desired.

Code
====

../../../../../Macaulay2/packages/Varieties.m2:220:17-220:62: --source code:
variety Ring  := S -> if S.?variety then S.variety else Proj S

See also
========

  * NormalToricVarieties -- routines for
    working with normal toric varieties and related objects
  * Schubert2 -- characteristic classes for varieties
    without equations

Ways to use this method:
========================

  * variety(Ring) -- the variety previously
    associated to a given ring
-------------------------------------------------------------------------------

The source of this document is in Varieties/doc-varieties.m2:127:0.