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

GKMVarieties -- computations with GKM varieties and moment graphs
*****************************************************************

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

A GKM variety is a variety $X$, often assumed to be smooth and complete, with
an action of an algebraic torus $T$ satisfying the following conditions: (i)
$X$ is equivariantly formal with respect to the action of $T$, (ii) $X$ has
finitely many $T$-fixed points, and (iii) $X$ has finitely many one-dimensional
$T$-orbits.  The data of the zero and one dimensional $T$-orbits of $X$ define
the moment graph of $X$, with which one can carry out $T$-equivariant
cohomology and $T$-equivariant $K$-theory computations via the method of
localization. This package provides methods for these computations in
Macaulay2.

For mathematical background see:

  * [BM01] T. Braden and R. MacPherson.  From moment graphs to intersection
    cohomology.  Math. Ann. 321 (2001), 533-551.
  * [BGH02] E. Bolker, V. Guillemin, and T. Holm.  How is a graph like a
    manifold?  arXiv:math/0206103.
  * [CDMS18] A. Cameron, R. Dinu, M. Michalek, and T. Seynnaeve.  Flag
    matroids: algebra and geometry.  arXiv:1811.00272.
  * [DES20] R. Dinu, C. Eur, and T. Seynnaeve.  K-theoretic Tutte polynomials
    of morphisms of matroids.  arXiv:math/2004.00112.
  * [FS12] A. Fink and S. Speyer.  K-classes for matroids and equivariant
    localization.  Duke Math. J. 161 (2012), no. 14, 2699-2723.
  * [GKM98] M. Goresky, R. Kottwitz, and R. MacPherson.  Equivariant
    cohomology, Koszul duality, and the localization theorem. Invent. Math. 131
    (1998), no. 1, 25-83.
  * [RK03] I. Rosu.  Equivariant K-theory and equivariant cohomology.  With an
    Appendix by I. Rosu and A. Knutson.  Math. Z. 243 (2003), 423-448.
  * [Tym05] J. Tymoczko.  An introduction to equivariant cohomology and
    homology, following Goresky, Kottwitz, and MacPherson.  Contemp. Math. 388
    (2005), 169-188.
  * [VV03] G. Vezzosi and A. Vistoli.  Higher algebraic K-theory for actions of
    diagonalizable groups. Invent. Math. 153 (2003), no. 1, 1–44.

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

The following people have contributed code, improved existing code, or enhanced
the documentation: Tim Seynnaeve (see
https://www.mis.mpg.de/combag/members/tim-seynnaeve.html ).

See also
========

  * Example_colon_ generalized flag varieties
  * Example_colon_ smooth toric varieties

Authors
=======

  * Chris Eur (see https://web.stanford.edu/~chriseur ) <chriseur@stanford.edu>
  * Ritvik Ramkumar (see https://math.berkeley.edu/~ritvik )
    <ritvik@math.berkeley.edu>

Version
=======

This documentation describes version 0.1 of GKMVarieties, released August 1,
2020.

Citation
========

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

+-----------------------------------------------------------------------------+
|@misc{GKMVarietiesSource,                                                    |
|  title = {{GKMVarieties: computations with GKM manifolds and moment graphs. |
|  author = {Chris Eur and Ritvik Ramkumar},                                  |
|  howpublished = {A \emph{Macaulay2} package available at                    |
|    "https://github.com/chrisweur/GKMVarieties"}                             |
|}                                                                            |
|-----------------------------------------------------------------------------|
|Version~0.1}},                                                               |
+-----------------------------------------------------------------------------+

Exports
=======

  * Types
      * EquivariantMap -- the class of all equivariant
        morphisms between GKM varieties
      * FlagMatroid -- the class of all flag matroids
      * GKMVariety -- the class of all GKM varieties
      * KClass -- the class of all equivariant K-classes
      * MomentGraph -- the class of all moment graphs
  * Functions and commands
      * affineToricRing -- computes the toric ring
        associated to a monomial map
      * ampleKClass -- the class of an ample line bundle
      * bruhatOrder -- computes the Bruhat order on a
        generalized flag variety
      * cellOrder -- the poset of a stratification of a GKM
        variety
      * charts -- outputs the torus-invariant affine charts of a
        GKM variety
      * diagonalMap -- constructs the diagonal morphism
      * flagGeomTuttePolynomial -- computes the
        flag-geometric Tutte polynomial of flag matroids
      * flagMap -- creates equivariant maps between generalized
        flag varieties
      * flagMatroid -- construct a flag matroid
      * generalizedFlagVariety -- makes a
        generalized flag variety as a GKM variety
      * generalizedSchubertVariety -- create
        a generalized Schubert variety
      * lieType -- outputs the Lie type of a generalized flag
        variety
      * makeCharacterRing -- constructs the character
        ring of a torus
      * makeGKMVariety -- constructs a GKM variety
      * makeKClass -- constructs an equivariant K-class
      * momentGraph -- creates a moment graph
      * orbitClosure -- computes the equivariant K-class
        of a torus orbit closure of a point in a generalized flag variety
      * projectiveSpace -- constructs projective space
        as a GKM variety
      * pushforward -- computes the pushforward map of
        equivariant K-classes of an equivariant map
      * setIndicator -- computes the signed indicator
        vector of an admissible set
      * trivialKClass -- the equivariant K-class of the
        structure sheaf
  * Methods
      * "affineToricRing(List)" -- see affineToricRing,
        -- computes the toric ring associated to a monomial map
      * "affineToricRing(Matrix)" -- see affineToricRing,
        -- computes the toric ring associated to a monomial
        map
      * "ampleKClass(GKMVariety)" -- see ampleKClass, -- the
        class of an ample line bundle
      * "ampleKClass(GKMVariety,KClass)" -- see ampleKClass,
        -- the class of an ample line bundle
      * bases(FlagMatroid) -- compute the bases
        of a flag matroid
      * "bruhatOrder(GKMVariety)" -- see bruhatOrder, --
        computes the Bruhat order on a generalized flag variety
      * "cellOrder(GKMVariety)" -- see cellOrder, -- the poset
        of a stratification of a GKM variety
      * "cellOrder(MomentGraph)" -- see cellOrder, -- the
        poset of a stratification of a GKM variety
      * cellOrder(MomentGraph,Poset),
        -- define a cell order on a moment graph
      * "charts(GKMVariety)" -- see charts, -- outputs the
        torus-invariant affine charts of a GKM variety
      * "charts(GKMVariety,List)" -- see charts, -- outputs the
        torus-invariant affine charts of a GKM variety
      * compose(EquivariantMap,EquivariantMap)
        -- computes the
        composition of two equivariant morphisms
      * "diagonalMap(GKMVariety)" -- see diagonalMap, --
        constructs the diagonal morphism
      * EquivariantMap ** EquivariantMap
        -- computes the product of two equivariant morphisms
      * euler(KClass) -- computes the equivariant
        Euler characteristic of an equivariant K-class
      * "flagGeomTuttePolynomial(FlagMatroid)" -- see
        flagGeomTuttePolynomial, -- computes the
        flag-geometric Tutte polynomial of flag matroids
      * "flagMap(GKMVariety,GKMVariety)" -- see flagMap, --
        creates equivariant maps between generalized flag varieties
      * "flagMatroid(List)" -- see flagMatroid, -- construct
        a flag matroid
      * "flagMatroid(Matrix,List)" -- see flagMatroid, --
        construct a flag matroid
      * "generalizedFlagVariety(String,ZZ,List)" -- see
        generalizedFlagVariety, -- makes a generalized
        flag variety as a GKM variety
      * "generalizedFlagVariety(String,ZZ,List,Ring)" -- see
        generalizedFlagVariety, -- makes a generalized
        flag variety as a GKM variety
      * "generalizedSchubertVariety(GKMVariety,Thing)" -- see
        generalizedSchubertVariety, -- create a
        generalized Schubert variety
      * GKMVariety ** GKMVariety, --
        product of GKM varieties
      * isWellDefined(FlagMatroid), --
        check if a flag matroid is well-defined
      * isWellDefined(KClass) -- whether the
        input is a well-defined equivariant K-class
      * KClass * KClass -- computes the product of
        two equivariant K-classes
      * KClass + KClass -- computes the sum of two
        equivariant K-classes
      * KClass ^ ZZ -- computes powers of an equivariant
        K-classes
      * latticePoints(FlagMatroid), --
        lattice points of a base polytope of a flag matroid
      * "lieType(GKMVariety)" -- see lieType, -- outputs the Lie
        type of a generalized flag variety
      * "makeCharacterRing(ZZ)" -- see makeCharacterRing,
        -- constructs the character ring of a torus
      * "makeGKMVariety(KClass)" -- see makeGKMVariety,
        -- constructs a GKM variety
      * "makeGKMVariety(List,List,Ring)" -- see makeGKMVariety,
        -- constructs a GKM variety
      * "makeGKMVariety(List,Ring)" -- see makeGKMVariety,
        -- constructs a GKM variety
      * "makeGKMVariety(MomentGraph)" -- see makeGKMVariety,
        -- constructs a GKM variety
      * "makeGKMVariety(MomentGraph,Ring)" -- see makeGKMVariety,
        -- constructs a GKM variety
      * "makeGKMVariety(NormalToricVariety)" -- see makeGKMVariety,
        -- constructs a GKM variety
      * "makeGKMVariety(NormalToricVariety,Ring)" -- see makeGKMVariety,
        -- constructs a GKM variety
      * "makeKClass(GKMVariety,List)" -- see makeKClass, --
        constructs an equivariant K-class
      * makeKClass(GKMVariety,FlagMatroid)
        -- the equivariant K-class of
        a flag matroid
      * makeKClass(GKMVariety,ToricDivisor)
        -- create the KClass from a
        ToricDivisor
      * map(GKMVariety,GKMVariety,List)
        -- creates a EquivariantMap
      * "momentGraph(List,HashTable,Ring)" -- see momentGraph,
        -- creates a moment graph
      * MomentGraph ** MomentGraph, --
        the product of two moment graphs
      * momentGraph(GKMVariety) -- view the
        moment graph of a GKM variety
      * momentGraph(GKMVariety,MomentGraph)
        -- define a moment graph for
        a GKM variety
      * normalToricVariety(GKMVariety)
        -- converts a GKM variety back into
        a toric variety
      * "orbitClosure(GKMVariety,Matrix)" -- see orbitClosure,
        -- computes the equivariant K-class of a torus orbit
        closure of a point in a generalized flag variety
      * "projectiveSpace(ZZ)" -- see projectiveSpace, --
        constructs projective space as a GKM variety
      * "projectiveSpace(ZZ,Ring)" -- see projectiveSpace,
        -- constructs projective space as a GKM variety
      * pullback(EquivariantMap), --
        computes the pullback map of equivariant K-classes of an equivariant
        map
      * "pushforward(EquivariantMap)" -- see pushforward, --
        computes the pushforward map of equivariant K-classes of an equivariant
        map
      * "setIndicator(Set,ZZ)" -- see setIndicator, --
        computes the signed indicator vector of an admissible set
      * "trivialKClass(GKMVariety)" -- see trivialKClass,
        -- the equivariant K-class of the structure sheaf
      * underlyingGraph(MomentGraph),
        -- the underlying (undirected) graph of a moment graph
  * Symbols

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:57:0.

affineToricRing -- computes the toric ring associated to a monomial map
***********************************************************************

  * Usage:
        affineToricRing L
        affineToricRing M
  * Inputs:
      * L, a list (Macaulay2Doc), of lists; each list corresponds
        to a vector in $\mathbb Z^n$
      * M, a matrix (Macaulay2Doc), with each column
        corresponding to a vector in $\mathbb Z^n$
  * Outputs:
      * a ring (Macaulay2Doc),

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

Given a list $\{v_1,...,v_d\}$ of vectors in $\mathbb Z^n$ this function
computes the toric ring $R/I$ where $R$ is the polynomial ring
$\mathbb{Q}[x_1,\dots,x_d]$ with $x_i$ having degree $v_i$ and $I$ is the
associated toric ideal. In particular $I$ is the kernel of the map $R \to
\mathbb{Q}[y_1,\dots,y_n]$ defined by $x_i \mapsto \mathbb y^{v_i}$.

+----------------------------------------------------------+
|i1 : L = {{2,0},{1,1},{0,2}};                             |
+----------------------------------------------------------+
|i2 : X = affineToricRing L; -- The singular quadric in A^3|
+----------------------------------------------------------+
|i3 : I = ideal X                                          |
|                                                          |
|            2                                             |
|o3 = ideal(x  - x x )                                     |
|            1    0 2                                      |
|                                                          |
|o3 : Ideal of QQ[x ..x ]                                  |
|                  0   2                                   |
+----------------------------------------------------------+
|i4 : hilbertSeries I                                      |
|                                                          |
|                   2 2                                    |
|              1 - T T                                     |
|                   0 1                                    |
|o4 = --------------------------                           |
|           2                 2                            |
|     (1 - T )(1 - T T )(1 - T )                           |
|           1       0 1       0                            |
|                                                          |
|o4 : Expression of class Divide                           |
+----------------------------------------------------------+

Ways to use affineToricRing:
============================

  * "affineToricRing(List)"
  * "affineToricRing(Matrix)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1771:0.

ampleKClass -- the class of an ample line bundle
************************************************

  * Usage:
        ampleKClass(X)
  * Inputs:
      * X, a GKM variety,
      * C, an equivariant K-class,
  * Outputs:
      * an equivariant K-class,

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

If $X$ is a GKM variety with a distinguished ample equivariant line bundle,
this method returns the KClass, of the line bundle. If no such
line bundle is defined, it allows the user to construct one.

The following example describes the ample line bundle on the Lagrangian
Grassmannian $SpGr(2,4)$. The line bundle is precisely the pullback of O(1)
under the Plücker embedding $SpGr(2,4) \to \mathbb P^4$.

+-----------------------------------------------------------------------------+
|i1 : SpGr24 = generalizedFlagVariety("C",2,{2})                              |
|                                                                             |
|o1 = a "GKM variety" with an action of a 2-dimensional torus                 |
|                                                                             |
|o1 : GKMVariety                                                              |
+-----------------------------------------------------------------------------+
|i2 : O1 = ampleKClass SpGr24                                                 |
|                                                                             |
|o2 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o2 : KClass                                                                  |
+-----------------------------------------------------------------------------+
|i3 : peek O1                                                                 |
|                                                                             |
|o3 = KClass{variety => a "GKM variety" with an action of a 2-dimensional     |
|                                                          -1                 |
|            KPolynomials => HashTable{{set {0, 1*}} => T T    }              |
|                                                        0 1                  |
|                                      {set {0, 1}} => T T                    |
|                                                       0 1                   |
|                                                         -1 -1               |
|                                      {set {1*, 0*}} => T  T                 |
|                                                         0  1                |
|                                                        -1                   |
|                                      {set {1, 0*}} => T  T                  |
|                                                        0  1                 |
|-----------------------------------------------------------------------------|
|torus}                                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * makeKClass -- constructs an equivariant K-class
  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety

Ways to use ampleKClass:
========================

  * "ampleKClass(GKMVariety)"
  * "ampleKClass(GKMVariety,KClass)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1375:0.

bases(FlagMatroid) -- compute the bases of a flag matroid
*********************************************************

  * Function: bases (Matroids),
  * Usage:
        B = bases(FM)
  * Inputs:
      * FM, a flag matroid,
  * Outputs:
      * B, a list (Macaulay2Doc),

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

An ordered list $\{B_1, \ldots, B_k\}$ of sets is a basis of a flag matroid
$\mathbf M = \{M_1, \ldots, M_k\}$ if $B_i$ is a basis of $M_i$ and $B_i
\subseteq B_{i+1}$ for all $i$.  This method computes the bases of a flag
matroid.

+-----------------------------------------------------------------------------+
|i1 : FM = flagMatroid {uniformMatroid(2,4),uniformMatroid(3,4)}              |
|                                                                             |
|o1 = a "flag matroid" with rank sequence {2, 3} on 4 elements                |
|                                                                             |
|o1 : FlagMatroid                                                             |
+-----------------------------------------------------------------------------+
|i2 : bases FM                                                                |
|                                                                             |
|o2 = {{set {0, 1}, set {0, 1, 2}}, {set {0, 1}, set {0, 1, 3}}, {set {0, 2}, |
|     ------------------------------------------------------------------------|
|     set {0, 2, 3}}, {set {0, 2}, set {0, 1, 2}}, {set {1, 2}, set {1, 2,    |
|     ------------------------------------------------------------------------|
|     3}}, {set {1, 2}, set {0, 1, 2}}, {set {0, 3}, set {0, 2, 3}}, {set {0, |
|     ------------------------------------------------------------------------|
|     3}, set {0, 1, 3}}, {set {1, 3}, set {1, 2, 3}}, {set {1, 3}, set {0, 1,|
|     ------------------------------------------------------------------------|
|     3}}, {set {2, 3}, set {0, 2, 3}}, {set {2, 3}, set {1, 2, 3}}}          |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * FlagMatroid -- the class of all flag matroids

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

  * bases(FlagMatroid) -- compute the bases of a
    flag matroid
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1919:0.

bruhatOrder -- computes the Bruhat order on a generalized flag variety
**********************************************************************

  * Usage:
        P = bruhatOrder(X)
  * Inputs:
      * X, a GKM variety, a generalized flag variety or
        Schubert variety
  * Outputs:
      * P, an instance of the type Poset (Posets), the Bruhat
        order

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

Given a GKMVariety, $X$ created by either
generalizedFlagVariety, or
generalizedSchubertVariety, computes and returns
the Bruhat order corresponding to the Bruhat decomposition.  The resulting
poset is cached in $X$, and can be accessed by either cellOrder,
or bruhatOrder.

+-----------------------------------------------------------------+
|i1 : Fl3 = generalizedFlagVariety("A",2,{1,2})                   |
|                                                                 |
|o1 = a GKM variety with an action of a 3-dimensional torus       |
|                                                                 |
|o1 : GKMVariety                                                  |
+-----------------------------------------------------------------+
|i2 : cellOrder Fl3                                               |
|stdio:2:1:(3): error:  no cell order defined on this moment graph|
+-----------------------------------------------------------------+
|i2 : P = bruhatOrder Fl3                                         |
|                                                                 |
|o2 = P                                                           |
|                                                                 |
|o2 : Poset                                                       |
+-----------------------------------------------------------------+
|i3 : #(coveringRelations P) == 8                                 |
|                                                                 |
|o3 = true                                                        |
+-----------------------------------------------------------------+
|i4 : cellOrder Fl3                                               |
|                                                                 |
|o4 = P                                                           |
|                                                                 |
|o4 : Poset                                                       |
+-----------------------------------------------------------------+

See also
========

  * cellOrder -- the poset of a stratification of a GKM
    variety
  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety
  * generalizedSchubertVariety -- create a
    generalized Schubert variety

Ways to use bruhatOrder:
========================

  * "bruhatOrder(GKMVariety)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1594:0.

cellOrder -- the poset of a stratification of a GKM variety
***********************************************************

  * Usage:
        P = cellOrder(G)
        P = cellOrder(X)
  * Inputs:
      * G, a moment graph, on which a cell order has been
        defined already
      * X, a GKM variety, whose moment graph has a cell
        order defined already
  * Outputs:
      * P, an instance of the type Poset (Posets),

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

If a moment graph $G$ arises from a (possibly singular) GKM variety $X$ with an
equivariant stratification, with each strata having a unique torus-fixed point,
the vertices of $G$ (which correspond to the torus-fixed point of $X$) form a
poset where $v_1 \leq v_2$ if the closure of the stratum corresponding to $v_1$
contains that of $v_2$. The following example features the Schubert variety of
projective lines in $\mathbb P^3$ meeting a distinguished line. The poset of
its stratification by smaller Schubert cells is a subposet of the Bruhat poset.

+------------------------------------------------------------+
|i1 : Gr24 = generalizedFlagVariety("A",3,{2})               |
|                                                            |
|o1 = a "GKM variety" with an action of a 4-dimensional torus|
|                                                            |
|o1 : GKMVariety                                             |
+------------------------------------------------------------+
|i2 : X = generalizedSchubertVariety(Gr24, {set{0,2}})       |
|                                                            |
|o2 = a "GKM variety" with an action of a 4-dimensional torus|
|                                                            |
|o2 : GKMVariety                                             |
+------------------------------------------------------------+
|i3 : cellOrder X                                            |
|                                                            |
|o3 = Relation Matrix: | 1 1 1 1 1 |                         |
|                      | 0 1 0 1 1 |                         |
|                      | 0 0 1 1 1 |                         |
|                      | 0 0 0 1 1 |                         |
|                      | 0 0 0 0 1 |                         |
|                                                            |
|o3 : Poset                                                  |
+------------------------------------------------------------+

See also
========

  * cellOrder(MomentGraph,Poset), --
    define a cell order on a moment graph
  * bruhatOrder -- computes the Bruhat order on a
    generalized flag variety

Ways to use cellOrder:
======================

  * "cellOrder(GKMVariety)"
  * "cellOrder(MomentGraph)"
  * cellOrder(MomentGraph,Poset), --
    define a cell order on a moment graph

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1492:0.

cellOrder(MomentGraph,Poset) -- define a cell order on a moment graph
*********************************************************************

  * Function: cellOrder,
  * Usage:
        cellOrder(G,P)
  * Inputs:
      * G, a moment graph,
      * P, an instance of the type Poset (Posets), whose ground
        set is the vertices of G

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

Defines a Poset (Posets), $P$ to be a cell order on the
MomentGraph, $G$.  Overwrites if there was one already defined on
$G$.

+-----------------------------------------------------------------+
|i2 : PP3 = projectiveSpace 3                                     |
|                                                                 |
|o2 = a GKM variety with an action of a 4-dimensional torus       |
|                                                                 |
|o2 : GKMVariety                                                  |
+-----------------------------------------------------------------+
|i3 : cellOrder PP3                                               |
|stdio:3:1:(3): error:  no cell order defined on this moment graph|
+-----------------------------------------------------------------+
|i4 : V = (momentGraph PP3).vertices                              |
|                                                                 |
|o4 = {set {0}, set {1}, set {2}, set {3}}                        |
|                                                                 |
|o4 : List                                                        |
+-----------------------------------------------------------------+
|i5 : P = poset(V, {{V_0,V_1},{V_1,V_2},{V_2,V_3}})               |
|                                                                 |
|o5 = P                                                           |
|                                                                 |
|o5 : Poset                                                       |
+-----------------------------------------------------------------+
|i6 : cellOrder(momentGraph PP3, P)                               |
+-----------------------------------------------------------------+
|i7 : cellOrder PP3                                               |
|                                                                 |
|o7 = P                                                           |
|                                                                 |
|o7 : Poset                                                       |
+-----------------------------------------------------------------+

See also
========

  * cellOrder -- the poset of a stratification of a GKM
    variety
  * bruhatOrder -- computes the Bruhat order on a
    generalized flag variety

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

  * cellOrder(MomentGraph,Poset), --
    define a cell order on a moment graph
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1542:0.

charts -- outputs the torus-invariant affine charts of a GKM variety
********************************************************************

  * Usage:
        charts X
        charts(X,L)
  * Inputs:
      * X, a GKM variety,
      * L, a list (Macaulay2Doc), of lists
  * Outputs:
      * H, a hash table (Macaulay2Doc), whose keys are the
        torus-fixed points of X and values are the (negatives) of characters of
        the torus action on a torus-invariant affine chart around the
        corresponding point.

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

Assume $X$ is a GKM-variety for which there exists a contracting
torus-invariant affine chart around each torus-fixed point.  For instance,
generalized flag varieties and smooth toric varieties have this property. This
returns a HashTable (Macaulay2Doc), whose keys are the
torus-fixed points of $X$ and the values are the negatives of characters of the
torus action on the associated contracting affine chart.

The following example describes the charts of the isotropic Grassmannian
$SpGr(2,6)$.

+-----------------------------------------------------------------------------+
|i1 : X = generalizedFlagVariety("C",3,{2});                                  |
+-----------------------------------------------------------------------------+
|i2 : X.charts                                                                |
|                                                                             |
|o2 = HashTable{{set {0, 1*}} => {{-1, 0, 1}, {-1, 0, -1}, {0, 1, 1}, {0, 1,  |
|               {set {0, 1}} => {{-1, 0, 1}, {-1, 0, -1}, {0, -1, 1}, {0, -1  |
|               {set {0, 2}} => {{-1, 1, 0}, {-1, -1, 0}, {0, 0, -2}, {-2, 0  |
|               {set {1*, 0*}} => {{1, 0, 1}, {1, 0, -1}, {0, 1, 1}, {0, 1,   |
|               {set {1*, 2}} => {{0, 2, 0}, {0, 1, -1}, {0, 0, -2}, {1, 1,   |
|               {set {1, 0*}} => {{1, 0, 1}, {1, 0, -1}, {0, -1, 1}, {0, -1,  |
|               {set {1, 2}} => {{0, 0, -2}, {0, -2, 0}, {0, -1, -1}, {1, -1  |
|               {set {2*, 0*}} => {{1, 1, 0}, {1, -1, 0}, {1, 0, 1}, {2, 0,   |
|               {set {2*, 0}} => {{-1, 1, 0}, {-1, -1, 0}, {0, 0, 2}, {-1, 0  |
|               {set {2*, 1*}} => {{0, 1, 1}, {0, 2, 0}, {0, 0, 2}, {1, 1, 0  |
|               {set {2*, 1}} => {{0, 0, 2}, {0, -1, 1}, {0, -2, 0}, {1, -1,  |
|               {set {2, 0*}} => {{1, 1, 0}, {1, -1, 0}, {2, 0, 0}, {1, 0, -  |
|                                                                             |
|o2 : HashTable                                                               |
|-----------------------------------------------------------------------------|
| -1}, {0, 2, 0}, {-1, 1, 0}, {-2, 0, 0}}   }                                 |
|, -1}, {0, -2, 0}, {-2, 0, 0}, {-1, -1, 0}}                                  |
|, 0}, {-1, 0, -1}, {0, 1, -1}, {0, -1, -1}}                                  |
|-1}, {1, 1, 0}, {2, 0, 0}, {0, 2, 0}}                                        |
|0}, {-1, 1, 0}, {1, 0, -1}, {-1, 0, -1}}                                     |
| -1}, {2, 0, 0}, {1, -1, 0}, {0, -2, 0}}                                     |
|, 0}, {-1, -1, 0}, {1, 0, -1}, {-1, 0, -1}}                                  |
|0}, {0, 0, 2}, {0, 1, 1}, {0, -1, 1}}                                        |
|, 1}, {-2, 0, 0}, {0, 1, 1}, {0, -1, 1}}                                     |
|}, {-1, 1, 0}, {1, 0, 1}, {-1, 0, 1}}                                        |
| 0}, {-1, -1, 0}, {1, 0, 1}, {-1, 0, 1}}                                     |
|1}, {0, 0, -2}, {0, 1, -1}, {0, -1, -1}}                                     |
+-----------------------------------------------------------------------------+

If $X$ does not have its charts stored, we can manually cache it as follows.

+----------------------------------------------------------------------------+
|i3 : R = makeCharacterRing 2;                                               |
+----------------------------------------------------------------------------+
|i4 : X = makeGKMVariety({{0,1},{0,3},{1,2},{2,3}},R);                       |
+----------------------------------------------------------------------------+
|i5 : peek X                                                                 |
|                                                                            |
|o5 = GKMVariety{cache => CacheTable{}                     }                 |
|                characterRing => R                                          |
|                points => {{0, 1}, {0, 3}, {1, 2}, {2, 3}}                  |
+----------------------------------------------------------------------------+
|i6 : L = {{{-1,0},{0,-1}},{{-1,0},{0,1}},{{-3,-1},{1,0}},{{1,0},{3,1}}};    |
+----------------------------------------------------------------------------+
|i7 : charts(X,L);                                                           |
+----------------------------------------------------------------------------+
|i8 : peek X                                                                 |
|                                                                            |
|o8 = GKMVariety{cache => CacheTable{}                            }          |
|                characterRing => R                                          |
|                charts => HashTable{{0, 1} => {{-1, 0}, {0, -1}}}           |
|                                    {0, 3} => {{-1, 0}, {0, 1}}             |
|                                    {1, 2} => {{-3, -1}, {1, 0}}            |
|                                    {2, 3} => {{1, 0}, {3, 1}}              |
|                points => {{0, 1}, {0, 3}, {1, 2}, {2, 3}}                  |
+----------------------------------------------------------------------------+
|i9 : peek makeGKMVariety hirzebruchSurface 3                                |
|                                                                            |
|o9 = GKMVariety{cache => CacheTable{...1...}                               }|
|                characterRing => ZZ[T ..T ]                                 |
|                                     0   1                                  |
|                charts => HashTable{{0, 1} => {{-1, 0}, {0, -1}}}           |
|                                    {0, 3} => {{-1, 0}, {0, 1}}             |
|                                    {1, 2} => {{-3, -1}, {1, 0}}            |
|                                    {2, 3} => {{1, 0}, {3, 1}}              |
|                momentGraph => a "moment graph" on 4 vertices with 4 edges  |
|                points => {{0, 1}, {0, 3}, {1, 2}, {2, 3}}                  |
+----------------------------------------------------------------------------+

See also
========

  * makeGKMVariety -- constructs a GKM variety
  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety

Ways to use charts:
===================

  * "charts(GKMVariety)"
  * "charts(GKMVariety,List)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1678:0.

compose(EquivariantMap,EquivariantMap) -- computes the composition of two equivariant morphisms
***********************************************************************************************

  * Function: compose (Macaulay2Doc),
  * Usage:
        compose(f,g)
  * Inputs:
      * f, an equivariant map,
      * g, an equivariant map,
  * Outputs:
      * an equivariant map, the composition of f and g

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

This method computes the composition of two equivariant morphisms. The
following example constructs the composition of two projection maps between
standard flag varieties.

+---------------------------------------------------------------------+
|i1 : R = makeCharacterRing 4;                                        |
+---------------------------------------------------------------------+
|i2 : X = generalizedFlagVariety("A",3,{1,2,3},R);                    |
+---------------------------------------------------------------------+
|i3 : Y = generalizedFlagVariety("A",3,{2,3},R);                      |
+---------------------------------------------------------------------+
|i4 : Z = generalizedFlagVariety("A",3,{2},R);                        |
+---------------------------------------------------------------------+
|i5 : f = flagMap(X,Y); --the projection of Fl(1,2,3;4) onto Fl(2,3;4)|
+---------------------------------------------------------------------+
|i6 : g = flagMap(Y,Z); --the projection of Fl(2,3;4) onto Gr(2;4)    |
+---------------------------------------------------------------------+
|i7 : h = compose(g,f)                                                |
|                                                                     |
|o7 = an "equivariant map" of GKM varieties                           |
|                                                                     |
|o7 : EquivariantMap                                                  |
+---------------------------------------------------------------------+
|i8 : h === flagMap(X,Z)                                              |
|                                                                     |
|o8 = true                                                            |
+---------------------------------------------------------------------+

See also
========

  * EquivariantMap ** EquivariantMap
    -- computes the product of two equivariant morphisms
  * map(GKMVariety,GKMVariety,List)
    -- creates a EquivariantMap
  * flagMap -- creates equivariant maps between generalized
    flag varieties

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

  * compose(EquivariantMap,EquivariantMap)
    -- computes the composition
    of two equivariant morphisms
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:928:0.

diagonalMap -- constructs the diagonal morphism
***********************************************

  * Usage:
        diagonalMap X
  * Inputs:
      * X, a GKM variety,
  * Outputs:
      * an equivariant map,

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

Given a GKM variety $X$ this method constructs a EquivariantMap,
representing the diagonal morphism $X \to X \times X$. Note
that $X \times X$ is a GKM variety via the diagonal action of the torus.

+-----------------------------------------------------------------------------+
|i1 : X = generalizedFlagVariety("A",3,{2}); -- The Grassmannian Gr(2,4)      |
+-----------------------------------------------------------------------------+
|i2 : f = diagonalMap X;                                                      |
+-----------------------------------------------------------------------------+
|i3 : peek f                                                                  |
|                                                                             |
|o3 = EquivariantMap{cache => CacheTable{}                                    |
|                    ptsMap => HashTable{{set {0, 1}} => ({set {0,            |
|                                        {set {0, 2}} => ({set {0,            |
|                                        {set {0, 3}} => ({set {0,            |
|                                        {set {1, 2}} => ({set {1,            |
|                                        {set {1, 3}} => ({set {1,            |
|                                        {set {2, 3}} => ({set {2,            |
|                    source => a "GKM variety" with an action of a            |
|                    target => a "GKM variety" with an action of a            |
|-----------------------------------------------------------------------------|
|                   }                                                         |
|1}}, {set {0, 1}})}                                                          |
|2}}, {set {0, 2}})                                                           |
|3}}, {set {0, 3}})                                                           |
|2}}, {set {1, 2}})                                                           |
|3}}, {set {1, 3}})                                                           |
|3}}, {set {2, 3}})                                                           |
|4-dimensional torus                                                          |
|4-dimensional torus                                                          |
+-----------------------------------------------------------------------------+

See also
========

  * map(GKMVariety,GKMVariety,List)
    -- creates a EquivariantMap

Ways to use diagonalMap:
========================

  * "diagonalMap(GKMVariety)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1706:0.

EquivariantMap -- the class of all equivariant morphisms between GKM varieties
******************************************************************************

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

Given two GKM varieties $X$ and $Y$, an equivariant morphism from $X$ to $Y$
induces a map from the torus-fixed points of $X$ to the torus-fixed points of
$Y$.

A EquivariantMap, C is a HashTable (Macaulay2Doc),
consisting of three keys:

  * source, whose value is a GKMVariety, corresponding to the
    domain of f
  * target, whose value is a GKMVariety, corresponding to the
    codomain of f
  * ptsMap, whose value is a HashTable (Macaulay2Doc),; its
    keys are X.points and the values are points of Y.points that the key maps
    to.

See also
========

  * EquivariantMap ** EquivariantMap
    -- computes the product of two equivariant morphisms
  * compose(EquivariantMap,EquivariantMap)
    -- computes the composition
    of two equivariant morphisms
  * map(GKMVariety,GKMVariety,List)
    -- creates a EquivariantMap
  * flagMap -- creates equivariant maps between generalized
    flag varieties
  * pullback(EquivariantMap) -- computes
    the pullback map of equivariant K-classes of an equivariant map
  * pushforward -- computes the pushforward map of
    equivariant K-classes of an equivariant map
  * euler(KClass) -- computes the equivariant Euler
    characteristic of an equivariant K-class

Functions and methods returning an equivariant map:
===================================================

  * compose(EquivariantMap,EquivariantMap)
    -- computes the composition
    of two equivariant morphisms
  * "diagonalMap(GKMVariety)" -- see diagonalMap, --
    constructs the diagonal morphism
  * EquivariantMap ** EquivariantMap
    -- computes the product of two equivariant morphisms
  * "flagMap(GKMVariety,GKMVariety)" -- see flagMap, -- creates
    equivariant maps between generalized flag varieties
  * map(GKMVariety,GKMVariety,List)
    -- creates a EquivariantMap

Methods that use an equivariant map:
====================================

  * pullback(EquivariantMap) -- computes
    the pullback map of equivariant K-classes of an equivariant map
  * "pushforward(EquivariantMap)" -- see pushforward, --
    computes the pushforward map of equivariant K-classes of an equivariant map

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:857:0.

EquivariantMap ** EquivariantMap -- computes the product of two equivariant morphisms
*************************************************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        f ** g
  * Inputs:
      * f, an equivariant map,
      * g, an equivariant map,
  * Outputs:
      * an equivariant map, the product of f and g

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

This method computes the cartesian product of two equivariant morphisms.

+-----------------------------------------------------------------------------+
|i1 : R = makeCharacterRing 3;                                                |
+-----------------------------------------------------------------------------+
|i2 : X = generalizedFlagVariety("A",2,{1,2},R);                              |
+-----------------------------------------------------------------------------+
|i3 : Y = generalizedFlagVariety("A",2,{1},R);                                |
+-----------------------------------------------------------------------------+
|i4 : f = flagMap(X,Y); -- the projection of Fl(1,2;3) onto Gr(2,3)           |
+-----------------------------------------------------------------------------+
|i5 : h = f ** f                                                              |
|                                                                             |
|o5 = an "equivariant map" of GKM varieties                                   |
|                                                                             |
|o5 : EquivariantMap                                                          |
+-----------------------------------------------------------------------------+
|i6 : peek h                                                                  |
|                                                                             |
|o6 = EquivariantMap{cache => CacheTable{}                                    |
|                    ptsMap => HashTable{({set {0}, set {0, 1}},              |
|                                        ({set {0}, set {0, 1}},              |
|                                        ({set {0}, set {0, 1}},              |
|                                        ({set {0}, set {0, 1}},              |
|                                        ({set {0}, set {0, 1}},              |
|                                        ({set {0}, set {0, 1}},              |
|                                        ({set {0}, set {0, 2}},              |
|                                        ({set {0}, set {0, 2}},              |
|                                        ({set {0}, set {0, 2}},              |
|                                        ({set {0}, set {0, 2}},              |
|                                        ({set {0}, set {0, 2}},              |
|                                        ({set {0}, set {0, 2}},              |
|                                        ({set {1}, set {0, 1}},              |
|                                        ({set {1}, set {0, 1}},              |
|                                        ({set {1}, set {0, 1}},              |
|                                        ({set {1}, set {0, 1}},              |
|                                        ({set {1}, set {0, 1}},              |
|                                        ({set {1}, set {0, 1}},              |
|                                        ({set {1}, set {1, 2}},              |
|                                        ({set {1}, set {1, 2}},              |
|                                        ({set {1}, set {1, 2}},              |
|                                        ({set {1}, set {1, 2}},              |
|                                        ({set {1}, set {1, 2}},              |
|                                        ({set {1}, set {1, 2}},              |
|                                        ({set {2}, set {0, 2}},              |
|                                        ({set {2}, set {0, 2}},              |
|                                        ({set {2}, set {0, 2}},              |
|                                        ({set {2}, set {0, 2}},              |
|                                        ({set {2}, set {0, 2}},              |
|                                        ({set {2}, set {0, 2}},              |
|                                        ({set {2}, set {1, 2}},              |
|                                        ({set {2}, set {1, 2}},              |
|                                        ({set {2}, set {1, 2}},              |
|                                        ({set {2}, set {1, 2}},              |
|                                        ({set {2}, set {1, 2}},              |
|                                        ({set {2}, set {1, 2}},              |
|                    source => a "GKM variety" with an action of              |
|                    target => a "GKM variety" with an action of              |
|-----------------------------------------------------------------------------|
|                                                 }                           |
|{set {0}, set {0, 1}}) => ({set {0}}, {set {0}})}                            |
|{set {0}, set {0, 2}}) => ({set {0}}, {set {0}})                             |
|{set {1}, set {0, 1}}) => ({set {0}}, {set {1}})                             |
|{set {1}, set {1, 2}}) => ({set {0}}, {set {1}})                             |
|{set {2}, set {0, 2}}) => ({set {0}}, {set {2}})                             |
|{set {2}, set {1, 2}}) => ({set {0}}, {set {2}})                             |
|{set {0}, set {0, 1}}) => ({set {0}}, {set {0}})                             |
|{set {0}, set {0, 2}}) => ({set {0}}, {set {0}})                             |
|{set {1}, set {0, 1}}) => ({set {0}}, {set {1}})                             |
|{set {1}, set {1, 2}}) => ({set {0}}, {set {1}})                             |
|{set {2}, set {0, 2}}) => ({set {0}}, {set {2}})                             |
|{set {2}, set {1, 2}}) => ({set {0}}, {set {2}})                             |
|{set {0}, set {0, 1}}) => ({set {1}}, {set {0}})                             |
|{set {0}, set {0, 2}}) => ({set {1}}, {set {0}})                             |
|{set {1}, set {0, 1}}) => ({set {1}}, {set {1}})                             |
|{set {1}, set {1, 2}}) => ({set {1}}, {set {1}})                             |
|{set {2}, set {0, 2}}) => ({set {1}}, {set {2}})                             |
|{set {2}, set {1, 2}}) => ({set {1}}, {set {2}})                             |
|{set {0}, set {0, 1}}) => ({set {1}}, {set {0}})                             |
|{set {0}, set {0, 2}}) => ({set {1}}, {set {0}})                             |
|{set {1}, set {0, 1}}) => ({set {1}}, {set {1}})                             |
|{set {1}, set {1, 2}}) => ({set {1}}, {set {1}})                             |
|{set {2}, set {0, 2}}) => ({set {1}}, {set {2}})                             |
|{set {2}, set {1, 2}}) => ({set {1}}, {set {2}})                             |
|{set {0}, set {0, 1}}) => ({set {2}}, {set {0}})                             |
|{set {0}, set {0, 2}}) => ({set {2}}, {set {0}})                             |
|{set {1}, set {0, 1}}) => ({set {2}}, {set {1}})                             |
|{set {1}, set {1, 2}}) => ({set {2}}, {set {1}})                             |
|{set {2}, set {0, 2}}) => ({set {2}}, {set {2}})                             |
|{set {2}, set {1, 2}}) => ({set {2}}, {set {2}})                             |
|{set {0}, set {0, 1}}) => ({set {2}}, {set {0}})                             |
|{set {0}, set {0, 2}}) => ({set {2}}, {set {0}})                             |
|{set {1}, set {0, 1}}) => ({set {2}}, {set {1}})                             |
|{set {1}, set {1, 2}}) => ({set {2}}, {set {1}})                             |
|{set {2}, set {0, 2}}) => ({set {2}}, {set {2}})                             |
|{set {2}, set {1, 2}}) => ({set {2}}, {set {2}})                             |
|a 3-dimensional torus                                                        |
|a 3-dimensional torus                                                        |
+-----------------------------------------------------------------------------+

See also
========

  * map(GKMVariety,GKMVariety,List)
    -- creates a EquivariantMap
  * flagMap -- creates equivariant maps between generalized
    flag varieties
  * compose(EquivariantMap,EquivariantMap)
    -- computes the composition
    of two equivariant morphisms

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

  * EquivariantMap ** EquivariantMap
    -- computes the product of two equivariant morphisms
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:889:0.

euler(KClass) -- computes the equivariant Euler characteristic of an equivariant K-class
****************************************************************************************

  * Function: euler (Macaulay2Doc),
  * Usage:
        euler C
  * Inputs:
      * C, an equivariant K-class,
  * Outputs:
      * a ring element (Macaulay2Doc), in the character ring
        of the torus of the GKM variety on which C is defined

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

This method computes the pushforward of a KClass, on a
GKMVariety, $X$ along the structure map $X \to pt$, where $pt$ is a
point with trivial torus-action.

+------------------------------------------------------------+
|i1 : PP3 = projectiveSpace 3                                |
|                                                            |
|o1 = a "GKM variety" with an action of a 4-dimensional torus|
|                                                            |
|o1 : GKMVariety                                             |
+------------------------------------------------------------+
|i2 : O1 = ampleKClass PP3                                   |
|                                                            |
|o2 = an "equivariant K-class" on a GKM variety              |
|                                                            |
|o2 : KClass                                                 |
+------------------------------------------------------------+
|i3 : euler O1                                               |
|                                                            |
|o3 = T  + T  + T  + T                                       |
|      0    1    2    3                                      |
|                                                            |
|o3 : ZZ[T ..T ]                                             |
|         0   3                                              |
+------------------------------------------------------------+

See also
========

  * pushforward -- computes the pushforward map of
    equivariant K-classes of an equivariant map
  * ampleKClass -- the class of an ample line bundle

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

  * euler(KClass) -- computes the equivariant Euler
    characteristic of an equivariant K-class
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1104:0.

Example: generalized flag varieties
***********************************

Let $G$ be a reductive complex Lie group and $P$ a parabolic subgroup
containing a maximal torus $T$.  The generalized flag variety $G/P$ is a GKM
variety with the action of $T$.  This package allows users to create a
generalized flag variety for classical Lie types ($A$, $B$, $C$, and $D$) as a
GKMVariety, with conventions explicitly laid out as follows.

For type $A_{n-1}$, the group $G$ is $GL_{n}$, and the torus $T$ is $diag(t_1,
\ldots, t_n)$, the group of invertible diagonal matrices.

For type $B_n$, the group $G$ is $SO_{2n+1}$, where we set the standard
symmetric bilinear form on $\mathbb C^{2n+1}$ to be is given by the matrix
$$\begin{pmatrix} 0 & I_n & 0 \\ I_n & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix}$$ and
the torus $T$ is $diag(t_1, \ldots,t_n, t_1^{-1}, \ldots, t_n^{-1}, 1)$.

For type $C_n$, the group $G$ is $Sp_{2n}$, where we set the standard
alternating bilinear form on $\mathbb C^{2n}$ to be given by the matrix
$$\begin{pmatrix} 0 & -I_n \\ I_n & 0 \end{pmatrix}$$ and the torus $T$ is
$diag(t_1, \ldots,t_n, t_1^{-1}, \ldots, t_n^{-1})$.

For type $D_n$, the group $G$ is $SO_{2n}$, where we set the standard symmetric
bilinear form on $\mathbb C^{2n}$ to be given by the matrix $$\begin{pmatrix} 0
& I_n \\ I_n & 0 \end{pmatrix}$$ and the torus $T$ is $diag(t_1, \ldots,t_n,
t_1^{-1} \ldots, t_n^{-1})$.

In all the cases, the standard action of $(\mathbb C^*)^m$ on $\mathbb C^m$ is
defined by $(t_1, \ldots, t_m) \cdot (x_1, \ldots, x_m) = (t_1^{-1}x_1, \ldots,
t_m^{-1}x_m)$.

Let $\{w_1, \ldots, w_n\}$ be a set of fundamental weights, which for classical
Lie types are explicitly set to be as follows:

($A_{n-1}$): $\{w_1, \ldots, w_n\}= \{e_1, e_1+e_2, \ldots ,
e_1+e_2+\cdots+e_{n-1}\}$

($B_n$): $\{w_1, \ldots, w_n\}= \{e_1, e_1+e_2, \ldots , e_1+\cdots+e_{n-1},
(1/2)(e_1+\cdots e_n)\}$

($C_n$): $\{w_1, \ldots, w_n\}= \{e_1, e_1+e_2, \ldots , e_1+\cdots+e_{n-1},
e_1 + \cdots +e_n\}$

($D_n$): $\{w_1, \ldots, w_n\}= \{e_1, e_1+e_2, \ldots , e_1+\cdots+e_{n-2},
(1/2)(e_1+\cdots+e_{n-2} +e_{n-1}- e_{n}),
(1/2)(e_1+\cdots+e_{n-2}+e_{n-1}+e_n)\}$

For a sequence $(a_1, \ldots, a_n)\in \mathbb N^n$ of nonnegative integers, let
$I = \{i \mid a_i \neq 0\}$ and $P_I$ the corresponding parabolic subgroup of
$G$. Then the generalized flag variety $G/P_I$ is embedded in the irreducible
representation of $G$ with the highest weight $a_1w_1 + \cdots a_nw_n$. These
generalized flag varieties can be created as a GKMVariety,
using the method generalizedFlagVariety.  For
instance, the Grassmannian $Gr(2,4)$ of 2-dimensional subspaces in $\mathbb
C^4$, embedded in $\mathbb P^5$ by the usual Plücker embedding, can be created
as follows.

+-----------------------------------------------------------------------------+
|i1 : Gr24 = generalizedFlagVariety("A",3,{2})                                |
|                                                                             |
|o1 = a "GKM variety" with an action of a 4-dimensional torus                 |
|                                                                             |
|o1 : GKMVariety                                                              |
+-----------------------------------------------------------------------------+
|i2 : peek Gr24                                                               |
|                                                                             |
|o2 = GKMVariety{cache => CacheTable{...2...}                                 |
|                characterRing => ZZ[T ..T ]                                  |
|                                     0   3                                   |
|                charts => HashTable{{set {0, 1}} => {{0, -1, 1, 0}, {0, -1, 0|
|                                    {set {0, 2}} => {{0, 1, -1, 0}, {0, 0, -1|
|                                    {set {0, 3}} => {{0, 1, 0, -1}, {0, 0, 1,|
|                                    {set {1, 2}} => {{1, 0, -1, 0}, {1, -1, 0|
|                                    {set {1, 3}} => {{1, 0, 0, -1}, {1, -1, 0|
|                                    {set {2, 3}} => {{1, 0, 0, -1}, {1, 0, -1|
|                momentGraph => a "moment graph" on 6 vertices with 12 edges  |
|                points => {{set {0, 1}}, {set {0, 2}}, {set {0, 3}}, {set {1,|
|-----------------------------------------------------------------------------|
|                                    }                                        |
|                                                                             |
|                                                                             |
|, 1}, {-1, 0, 1, 0}, {-1, 0, 0, 1}}}                                         |
|, 1}, {-1, 1, 0, 0}, {-1, 0, 0, 1}}                                          |
| -1}, {-1, 1, 0, 0}, {-1, 0, 1, 0}}                                          |
|, 0}, {0, 0, -1, 1}, {0, -1, 0, 1}}                                          |
|, 0}, {0, 0, 1, -1}, {0, -1, 1, 0}}                                          |
|, 0}, {0, 1, 0, -1}, {0, 1, -1, 0}}                                          |
|                                                                             |
| 2}}, {set {1, 3}}, {set {2, 3}}}                                            |
+-----------------------------------------------------------------------------+

The MomentGraph, of $Gr(2,4)$ is the 1-skeleton of the
hypersimplex $\Delta(2,4)$, a.k.a. the octahedron.

+-----------------------------------------------------------------------------+
|i3 : G = momentGraph Gr24                                                    |
|                                                                             |
|o3 = a "moment graph" on 6 vertices with 12 edges                            |
|                                                                             |
|o3 : MomentGraph                                                             |
+-----------------------------------------------------------------------------+
|i4 : underlyingGraph G                                                       |
|                                                                             |
|o4 = Graph{{set {0, 1}} => {{set {0, 2}}, {set {0, 3}}, {set {1, 2}}, {set   |
|           {set {0, 2}} => {{set {0, 1}}, {set {0, 3}}, {set {1, 2}}, {set   |
|           {set {0, 3}} => {{set {0, 1}}, {set {0, 2}}, {set {1, 3}}, {set   |
|           {set {1, 2}} => {{set {0, 1}}, {set {0, 2}}, {set {1, 3}}, {set   |
|           {set {1, 3}} => {{set {0, 1}}, {set {0, 3}}, {set {1, 2}}, {set   |
|           {set {2, 3}} => {{set {0, 2}}, {set {0, 3}}, {set {1, 2}}, {set   |
|                                                                             |
|o4 : Graph                                                                   |
|-----------------------------------------------------------------------------|
|{1, 3}}}}                                                                    |
|{2, 3}}}                                                                     |
|{2, 3}}}                                                                     |
|{2, 3}}}                                                                     |
|{2, 3}}}                                                                     |
|{1, 3}}}                                                                     |
+-----------------------------------------------------------------------------+

The line bundle $O(1)$ on $Gr(2,4)$, corresponding to its Plücker embedding,
can be accessed by ampleKClass(GKMVariety). The method
euler(KClass), computes its Lefschetz trace (a.k.a.
equivariant Euler characteristic), which in this case is the Laurent polynomial
in the character ring of the torus $T$ whose terms correspond to be weights of
the second exterior power of the standard representation of $GL_4$.

+-----------------------------------------------------------------------------+
|i5 : O1 = ampleKClass Gr24 --the O(1) bundle on Gr24 via its Plücker         |
|                                                                             |
|o5 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o5 : KClass                                                                  |
|-----------------------------------------------------------------------------|
|embedding                                                                    |
+-----------------------------------------------------------------------------+
|i6 : euler O1                                                                |
|                                                                             |
|o6 = T T  + T T  + T T  + T T  + T T  + T T                                  |
|      0 1    0 2    0 3    1 2    1 3    2 3                                 |
|                                                                             |
|o6 : ZZ[T ..T ]                                                              |
|         0   3                                                               |
+-----------------------------------------------------------------------------+

If $Gr(2,4)$ is embedded differently, say by the line bundle $O(2)$ instead,
the Lefschetz trace changes accordingly, and its coefficients record the
multiplicities of the associated weight spaces in the second symmetric power of
the second exterior power of the standard representation of $GL_4$.

+-----------------------------------------------------------------------------+
|i7 : euler (O1^2)                                                            |
|                                                                             |
|      2 2    2        2        2 2    2        2 2      2        2          2|
|o7 = T T  + T T T  + T T T  + T T  + T T T  + T T  + T T T  + T T T  + T T T |
|      0 1    0 1 2    0 1 3    0 2    0 2 3    0 3    0 1 2    0 1 3    0 1 2|
|     ------------------------------------------------------------------------|
|                        2      2          2    2 2    2        2 2      2    |
|     + 2T T T T  + T T T  + T T T  + T T T  + T T  + T T T  + T T  + T T T  +|
|         0 1 2 3    0 1 3    0 2 3    0 2 3    1 2    1 2 3    1 3    1 2 3  |
|     ------------------------------------------------------------------------|
|          2    2 2                                                           |
|     T T T  + T T                                                            |
|      1 2 3    2 3                                                           |
|                                                                             |
|o7 : ZZ[T ..T ]                                                              |
|         0   3                                                               |
+-----------------------------------------------------------------------------+

The Schubert decomposition of $Gr(2,4)$, and more generally the Bruhat
decomposition of $G/P$, can be accessed by the method
bruhatOrder(GKMVariety), which outputs the poset of the Bruhat
order.  Moreover, the Schubert varieties can be created via the method
generalizedSchubertVariety.

+------------------------------------------------------------+
|i8 : P1 =  bruhatOrder Gr24                                 |
|                                                            |
|o8 = P1                                                     |
|                                                            |
|o8 : Poset                                                  |
+------------------------------------------------------------+
|i9 : Sch = generalizedSchubertVariety(Gr24,{set{1,2}})      |
|                                                            |
|o9 = a "GKM variety" with an action of a 4-dimensional torus|
|                                                            |
|o9 : GKMVariety                                             |
+------------------------------------------------------------+
|i10 : P2 = bruhatOrder Sch                                  |
|                                                            |
|o10 = P2                                                    |
|                                                            |
|o10 : Poset                                                 |
+------------------------------------------------------------+

The "forgetful" map from the complete flag variety $Fl(4)$ to $Gr(2,4)$, given
by forgetting the subpsaces in the complete flag except for the 2-dimensional
one, can be created as a EquivariantMap, by the method
flagMap.

+-----------------------------------------------------------------------------+
|i11 : Fl4 = generalizedFlagVariety("A",3,{1,2,3},Gr24.characterRing) --Fl(4) |
|                                                                             |
|o11 = a "GKM variety" with an action of a 4-dimensional torus                |
|                                                                             |
|o11 : GKMVariety                                                             |
|-----------------------------------------------------------------------------|
|with the torus having the same character ring as Gr24                        |
+-----------------------------------------------------------------------------+
|i12 : f = flagMap(Fl4,Gr24)                                                  |
|                                                                             |
|o12 = an "equivariant map" of GKM varieties                                  |
|                                                                             |
|o12 : EquivariantMap                                                         |
+-----------------------------------------------------------------------------+
|i13 : Fl4 === f.source and Gr24 === f.target                                 |
|                                                                             |
|o13 = true                                                                   |
+-----------------------------------------------------------------------------+

As $Fl(4)$ is a $BiProj$ of vector bundles on $Gr(2,4)$, the (derived)
pushforward of the structure sheaf of $Fl(4)$ is the structure sheaf of
$Gr(2,4)$ since the higher direct images vanish under the forgetful map.

+-----------------------------------------------------------------+
|i14 : (trivialKClass Gr24) === (pushforward f)(trivialKClass Fl4)|
|                                                                 |
|o14 = true                                                       |
+-----------------------------------------------------------------+

For type $C$, the following example features the isotropic Grassmannian
$SpGr(2,6)$ consisting of 2-dimensional subspaces in $\mathbb C^6$ that are
isotropic with respect to the standard alternating form. The vertices of its
moment graph can be considered as the vertices of the cuboctahedron.

+-----------------------------------------------------------------------------+
|i15 : SpGr26 = generalizedFlagVariety("C",3,{2})                             |
|                                                                             |
|o15 = a "GKM variety" with an action of a 3-dimensional torus                |
|                                                                             |
|o15 : GKMVariety                                                             |
+-----------------------------------------------------------------------------+
|i16 : peek SpGr26                                                            |
|                                                                             |
|o16 = GKMVariety{cache => CacheTable{...2...}                                |
|                 characterRing => ZZ[T ..T ]                                 |
|                                      0   2                                  |
|                 charts => HashTable{{set {0, 1*}} => {{-1, 0, 1}, {-1,      |
|                                     {set {0, 1}} => {{-1, 0, 1}, {-1, 0     |
|                                     {set {0, 2}} => {{-1, 1, 0}, {-1, -     |
|                                     {set {1*, 0*}} => {{1, 0, 1}, {1, 0     |
|                                     {set {1*, 2}} => {{0, 2, 0}, {0, 1,     |
|                                     {set {1, 0*}} => {{1, 0, 1}, {1, 0,     |
|                                     {set {1, 2}} => {{0, 0, -2}, {0, -2     |
|                                     {set {2*, 0*}} => {{1, 1, 0}, {1, -     |
|                                     {set {2*, 0}} => {{-1, 1, 0}, {-1,      |
|                                     {set {2*, 1*}} => {{0, 1, 1}, {0, 2     |
|                                     {set {2*, 1}} => {{0, 0, 2}, {0, -1     |
|                                     {set {2, 0*}} => {{1, 1, 0}, {1, -1     |
|                 momentGraph => a "moment graph" on 12 vertices with 42      |
|                 points => {{set {1, 2}}, {set {2*, 1}}, {set {1*, 2}},      |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|0, -1}, {0, 1, 1}, {0, 1, -1}, {0, 2, 0}, {-1, 1, 0}, {-2, 0, 0}}   }        |
|, -1}, {0, -1, 1}, {0, -1, -1}, {0, -2, 0}, {-2, 0, 0}, {-1, -1, 0}}         |
|1, 0}, {0, 0, -2}, {-2, 0, 0}, {-1, 0, -1}, {0, 1, -1}, {0, -1, -1}}         |
|, -1}, {0, 1, 1}, {0, 1, -1}, {1, 1, 0}, {2, 0, 0}, {0, 2, 0}}               |
| -1}, {0, 0, -2}, {1, 1, 0}, {-1, 1, 0}, {1, 0, -1}, {-1, 0, -1}}            |
| -1}, {0, -1, 1}, {0, -1, -1}, {2, 0, 0}, {1, -1, 0}, {0, -2, 0}}            |
|, 0}, {0, -1, -1}, {1, -1, 0}, {-1, -1, 0}, {1, 0, -1}, {-1, 0, -1}}         |
|1, 0}, {1, 0, 1}, {2, 0, 0}, {0, 0, 2}, {0, 1, 1}, {0, -1, 1}}               |
|-1, 0}, {0, 0, 2}, {-1, 0, 1}, {-2, 0, 0}, {0, 1, 1}, {0, -1, 1}}            |
|, 0}, {0, 0, 2}, {1, 1, 0}, {-1, 1, 0}, {1, 0, 1}, {-1, 0, 1}}               |
|, 1}, {0, -2, 0}, {1, -1, 0}, {-1, -1, 0}, {1, 0, 1}, {-1, 0, 1}}            |
|, 0}, {2, 0, 0}, {1, 0, -1}, {0, 0, -2}, {0, 1, -1}, {0, -1, -1}}            |
|edges                                                                        |
|{set {2*, 1*}}, {set {0, 2}}, {set {2*, 0}}, {set {2, 0*}}, {set {2*, 0*}},  |
|-----------------------------------------------------------------------------|
|                                                           }                 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|{set {0, 1}}, {set {0, 1*}}, {set {1, 0*}}, {set {1*, 0*}}}                  |
+-----------------------------------------------------------------------------+
|i17 : momentGraph SpGr26                                                     |
|                                                                             |
|o17 = a "moment graph" on 12 vertices with 42 edges                          |
|                                                                             |
|o17 : MomentGraph                                                            |
+-----------------------------------------------------------------------------+

The second fundamental representation of $Sp_{6}$ is 14-dimensional with 12
extremal weights.

+-----------------------------------------------------------------------------+
|i18 : euler ampleKClass SpGr26                                               |
|                                                                             |
|                              -1      -1      -1        -1      -1      -1   |
|o18 = T T  + T T  + T T  + T T   + T T   + T T   + 2 + T  T  + T  T  + T  T  |
|       0 1    0 2    1 2    0 2     0 1     1 2         1  2    0  1    0  2 |
|      -----------------------------------------------------------------------|
|         -1 -1    -1 -1    -1 -1                                             |
|      + T  T   + T  T   + T  T                                               |
|         1  2     0  2     0  1                                              |
|                                                                             |
|o18 : ZZ[T ..T ]                                                             |
|          0   2                                                              |
+-----------------------------------------------------------------------------+

For type $B$, the following example features the isotropic Grassmannian
$SOGr(2,5)$ consisting of 3-dimensional subspaces in $\mathbb C^5$ that are
isotropic with respect to the standard symmetric form. Its moment graph is the
a complete graph on 4 vertices. Note that Spin groups and their representations
are not implemented, so for the type $B_n$ the coefficient $a_n$ need be a
multiple of 2.

+-----------------------------------------------------------------------------+
|i19 : SOGr25 = generalizedFlagVariety("B",2,{2,2}) --inputing {2} instead of |
|                                                                             |
|o19 = a "GKM variety" with an action of a 2-dimensional torus                |
|                                                                             |
|o19 : GKMVariety                                                             |
|-----------------------------------------------------------------------------|
|{2,2} results in error: spin groups not implemented yet                      |
+-----------------------------------------------------------------------------+
|i20 : peek SOGr25                                                            |
|                                                                             |
|o20 = GKMVariety{cache => CacheTable{...2...}                                |
|                 characterRing => ZZ[T ..T ]                                 |
|                                      0   1                                  |
|                 charts => HashTable{{set {0, 1*}} => {{0, 1}, {-1, 1}, {-1, |
|                                     {set {0, 1}} => {{0, -1}, {-1, 0}, {-1, |
|                                     {set {1*, 0*}} => {{1, 1}, {1, 0}, {0, 1|
|                                     {set {1, 0*}} => {{1, 0}, {1, -1}, {0, -|
|                 momentGraph => a "moment graph" on 4 vertices with 6 edges  |
|                 points => {{set {0, 1}}, {set {0, 1*}}, {set {1, 0*}}, {set |
|-----------------------------------------------------------------------------|
|          }                                                                  |
|                                                                             |
|                                                                             |
|0}} }                                                                        |
|-1}}                                                                         |
|}}                                                                           |
|1}}                                                                          |
|                                                                             |
|{1*, 0*}}}                                                                   |
+-----------------------------------------------------------------------------+
|i21 : euler ampleKClass SOGr25                                               |
|                                                                             |
|                          -1        -1      -1    -1    -1 -1                |
|o21 = T T  + T  + T  + T T   + 2 + T  T  + T   + T   + T  T                  |
|       0 1    0    1    0 1         0  1    1     0     0  1                 |
|                                                                             |
|o21 : ZZ[T ..T ]                                                             |
|          0   1                                                              |
+-----------------------------------------------------------------------------+

For type $D$, the following example features the isotropic Grassmannian
$SOGr(3,8)$ consisting of 3-dimensional subspaces in $\mathbb C^8$ that are
isotropic with respect to the standard symmetric form.

+-----------------------------------------------------------------------------+
|i22 : SOGr38 = generalizedFlagVariety("D",4,{3,4})                           |
|                                                                             |
|o22 = a "GKM variety" with an action of a 4-dimensional torus                |
|                                                                             |
|o22 : GKMVariety                                                             |
+-----------------------------------------------------------------------------+
|i23 : SOGr38.points                                                          |
|                                                                             |
|o23 = {{set {1, 2, 3}}, {set {1, 2, 3*}}, {set {2*, 1, 3}}, {set {2*, 1,     |
|      -----------------------------------------------------------------------|
|      3*}}, {set {1*, 2, 3}}, {set {1*, 2, 3*}}, {set {2*, 1*, 3}}, {set {2*,|
|      -----------------------------------------------------------------------|
|      1*, 3*}}, {set {0, 2, 3}}, {set {0, 2, 3*}}, {set {2*, 0, 3}}, {set    |
|      -----------------------------------------------------------------------|
|      {2*, 0, 3*}}, {set {2, 0*, 3}}, {set {2, 0*, 3*}}, {set {2*, 0*, 3}},  |
|      -----------------------------------------------------------------------|
|      {set {2*, 0*, 3*}}, {set {0, 1, 3}}, {set {0, 1, 3*}}, {set {0, 1*,    |
|      -----------------------------------------------------------------------|
|      3}}, {set {0, 1*, 3*}}, {set {1, 0*, 3}}, {set {1, 0*, 3*}}, {set {1*, |
|      -----------------------------------------------------------------------|
|      0*, 3}}, {set {1*, 0*, 3*}}, {set {0, 1, 2}}, {set {2*, 0, 1}}, {set   |
|      -----------------------------------------------------------------------|
|      {0, 1*, 2}}, {set {2*, 0, 1*}}, {set {1, 2, 0*}}, {set {2*, 1, 0*}},   |
|      -----------------------------------------------------------------------|
|      {set {1*, 2, 0*}}, {set {2*, 1*, 0*}}}                                 |
|                                                                             |
|o23 : List                                                                   |
+-----------------------------------------------------------------------------+

Similarly as in type $B$, Spin groups are not implemented, so the two connected
components of $SOGr(4,8)$ need be separately created in the following way.

+-----------------------------------------------------------------------------+
|i24 : SOGr48odd = generalizedFlagVariety("D",4,{3,3})                        |
|                                                                             |
|o24 = a "GKM variety" with an action of a 4-dimensional torus                |
|                                                                             |
|o24 : GKMVariety                                                             |
+-----------------------------------------------------------------------------+
|i25 : SOGr48odd.points                                                       |
|                                                                             |
|o25 = {{set {1, 0*, 2, 3}}, {set {2*, 1, 0*, 3*}}, {set {1*, 0*, 2, 3*}},    |
|      -----------------------------------------------------------------------|
|      {set {2*, 1*, 0*, 3}}, {set {0, 1, 2, 3*}}, {set {0, 2*, 1, 3}}, {set  |
|      -----------------------------------------------------------------------|
|      {0, 1*, 2, 3}}, {set {0, 2*, 1*, 3*}}}                                 |
|                                                                             |
|o25 : List                                                                   |
+-----------------------------------------------------------------------------+
|i26 : SOGr48even = generalizedFlagVariety("D",4,{4,4})                       |
|                                                                             |
|o26 = a "GKM variety" with an action of a 4-dimensional torus                |
|                                                                             |
|o26 : GKMVariety                                                             |
+-----------------------------------------------------------------------------+
|i27 : SOGr48even.points                                                      |
|                                                                             |
|o27 = {{set {0, 1, 2, 3}}, {set {0, 2*, 1, 3*}}, {set {0, 1*, 2, 3*}}, {set  |
|      -----------------------------------------------------------------------|
|      {0, 2*, 1*, 3}}, {set {1, 0*, 2, 3*}}, {set {2*, 1, 0*, 3}}, {set {1*, |
|      -----------------------------------------------------------------------|
|      0*, 2, 3}}, {set {2*, 1*, 0*, 3*}}}                                    |
|                                                                             |
|o27 : List                                                                   |
+-----------------------------------------------------------------------------+

Caveat
======

Does not check for low-dimensional isogenies.  For instance, always use type
$D_n$ with $n\geq 4$ to be safe.

See also
========

  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety
  * flagMap -- creates equivariant maps between generalized
    flag varieties
  * GKMVariety -- the class of all GKM varieties
  * makeGKMVariety -- constructs a GKM variety
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:233:0.

Example: smooth toric varieties
*******************************

A toric variety is an integral variety containing an open dense algebraic
torus. If the toric variety is smooth (or simplicial) it is naturally a GKM
variety: Let $X$ be a smooth toric variety and $U$ be an affine chart whose
associated character lattice is generated by elements of weights $a_1,\dots,
a_m$. Then $(\mathbb C^*)^n$ acts on $U$ by $t \cdot (x_1,\dots, x_n) =
(t^{-a_1}x_1,\dots, t^{-a_n}x_n)$. We caution that this package uses the outer
normals instead of inner normals.

The method normalToricVariety (NormalToricVarieties),
from the package
NormalToricVarieties, allows the user to
construct smooth toric varieties. To convert it to a GKM variety we use the
method makeGKMVariety. Here is an example with $X =
Bl_p\mathbb P^2$, the blow-up of $\mathbb P^2$ at a point, which is also the
first Hirzebruch surface.

+----------------------------------------------------------------------------+
|i1 : FF1 = hirzebruchSurface 1;                                             |
+----------------------------------------------------------------------------+
|i2 : X = makeGKMVariety FF1;                                                |
+----------------------------------------------------------------------------+
|i3 : peek FF1                                                               |
|                                                                            |
|o3 = NormalToricVariety{cache => CacheTable{...6...}              }         |
|                        max => {{0, 1}, {0, 3}, {1, 2}, {2, 3}}             |
|                        rays => {{1, 0}, {0, 1}, {-1, 1}, {0, -1}}          |
+----------------------------------------------------------------------------+
|i4 : peek X                                                                 |
|                                                                            |
|o4 = GKMVariety{cache => CacheTable{...1...}                               }|
|                characterRing => ZZ[T ..T ]                                 |
|                                     0   1                                  |
|                charts => HashTable{{0, 1} => {{-1, 0}, {0, -1}}}           |
|                                    {0, 3} => {{-1, 0}, {0, 1}}             |
|                                    {1, 2} => {{-1, -1}, {1, 0}}            |
|                                    {2, 3} => {{1, 0}, {1, 1}}              |
|                momentGraph => a "moment graph" on 4 vertices with 4 edges  |
|                points => {{0, 1}, {0, 3}, {1, 2}, {2, 3}}                  |
+----------------------------------------------------------------------------+

If a GKM variety $X$ was originally constructed from normalToricVariety (NormalToricVarieties),
we can convert it
back to a toric variety.

+--------------------------------------------------------------------------+
|i5 : Y = normalToricVariety(X); -- X defined in the previous example above|
+--------------------------------------------------------------------------+
|i6 : Y === FF1                                                            |
|                                                                          |
|o6 = true                                                                 |
+--------------------------------------------------------------------------+

Continuing this example, the following shows how to convert a torus-invariant
divisor constructed using ToricDivisor (NormalToricVarieties),
to a KClass.

+-------------------------------------------------------------------+
|i7 : antiK = - toricDivisor(FF1) -- the anti-canonical class on FF1|
|                                                                   |
|o7 = FF1  + FF1  + FF1  + FF1                                      |
|        0      1      2      3                                     |
|                                                                   |
|o7 : ToricDivisor on FF1                                           |
+-------------------------------------------------------------------+
|i8 : TantiK = makeKClass(X,antiK)                                  |
|                                                                   |
|o8 = an "equivariant K-class" on a GKM variety                     |
|                                                                   |
|o8 : KClass                                                        |
+-------------------------------------------------------------------+
|i9 : isWellDefined TantiK                                          |
|                                                                   |
|o9 = true                                                          |
+-------------------------------------------------------------------+

Since the toric variety $X = Bl_p\mathbb P^2$ is Gorenstein Fano, with its
anticanonical embedding in $\mathbb P^8$, the equivariant Euler characteristic
of the anticanonical divisor is the sum of the characters of the sections of
the associated line bundle.

+--------------------------------------------------------------+
|i10 : euler TantiK                                            |
|                                                              |
|                          -1        -1    -1    -1 -1    -2 -1|
|o10 = T T  + T  + T  + T T   + 1 + T   + T   + T  T   + T  T  |
|       0 1    0    1    0 1         1     0     0  1     0  1 |
|                                                              |
|o10 : ZZ[T ..T ]                                              |
|          0   1                                               |
+--------------------------------------------------------------+

We caution the following difference in convention: Projective $n$-space
$\mathbb P^n$ as a NormalToricVariety (NormalToricVarieties),
constructed using
toricProjectiveSpace (NormalToricVarieties), is
acted upon by an $n$-dimensional torus. However, as a GKMVariety,
constructed using projectiveSpace, it is
acted upon by an $(n+1)$-dimensional torus.

+-----------------------------------------------------------------------------+
|i11 : X = makeGKMVariety toricProjectiveSpace 2; -- the torus is C^2         |
+-----------------------------------------------------------------------------+
|i12 : Y = projectiveSpace 2; -- the torus is C^3                             |
+-----------------------------------------------------------------------------+
|i13 : peek X                                                                 |
|                                                                             |
|o13 = GKMVariety{cache => CacheTable{...1...}                               }|
|                 characterRing => ZZ[T ..T ]                                 |
|                                      0   1                                  |
|                 charts => HashTable{{0, 1} => {{0, 1}, {-1, 1}} }           |
|                                     {0, 2} => {{1, 0}, {1, -1}}             |
|                                     {1, 2} => {{-1, 0}, {0, -1}}            |
|                 momentGraph => a "moment graph" on 3 vertices with 3 edges  |
|                 points => {{0, 1}, {0, 2}, {1, 2}}                          |
+-----------------------------------------------------------------------------+
|i14 : peek Y                                                                 |
|                                                                             |
|o14 = GKMVariety{cache => CacheTable{...1...}                               }|
|                 characterRing => ZZ[T ..T ]                                 |
|                                      0   2                                  |
|                 charts => HashTable{set {0} => {{-1, 1, 0}, {-1, 0, 1}}}    |
|                                     set {1} => {{1, -1, 0}, {0, -1, 1}}     |
|                                     set {2} => {{1, 0, -1}, {0, 1, -1}}     |
|                 momentGraph => a "moment graph" on 3 vertices with 3 edges  |
|                 points => {set {0}, set {1}, set {2}}                       |
+-----------------------------------------------------------------------------+

See also
========

  * makeGKMVariety(NormalToricVariety) -- constructs a
    GKM variety
  * projectiveSpace -- constructs projective space as a
    GKM variety
  * normalToricVariety (NormalToricVarieties)
    -- make a normal
    toric variety
  * makeKClass(GKMVariety,ToricDivisor)
    -- create the KClass from a
    ToricDivisor
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:302:0.

flagGeomTuttePolynomial -- computes the flag-geometric Tutte polynomial of flag matroids
****************************************************************************************

  * Usage:
        flagGeomTuttePolynomial(FM)
  * Inputs:
      * FM, a flag matroid,
  * Outputs:
      * a ring element (Macaulay2Doc), a polynomial in
        variables $x,y$

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

This method computes the flag-geometric Tutte polynomial of a
FlagMatroid, defined via a push-pull of the KClass,
of the flag matroid.  See Definition 6.1 of [DES20]. The following is the
example 8.24 in [CDMS18].

+---------------------------------------------------------------+
|i1 : FM = flagMatroid {uniformMatroid(1,3),uniformMatroid(2,3)}|
|                                                               |
|o1 = a "flag matroid" with rank sequence {1, 2} on 3 elements  |
|                                                               |
|o1 : FlagMatroid                                               |
+---------------------------------------------------------------+
|i2 : flagGeomTuttePolynomial FM                                |
|                                                               |
|      2 2    2       2    2           2                        |
|o2 = x y  + x y + x*y  + x  + 2x*y + y                         |
|                                                               |
|o2 : ZZ[x, y]                                                  |
+---------------------------------------------------------------+

The following example negatively answers Conjecture 9.2 of [CDMS18], which had
conjectured that all coefficients of the flag-geometric Tutte polynomial of a
flag matroid are nonnegative.

+-----------------------------------------------------------------------------+
|i1 : FM = flagMatroid {uniformMatroid(1,5),uniformMatroid(3,5)}              |
|                                                                             |
|o1 = a flag matroid with rank sequence {1, 3} on 5 elements                  |
|                                                                             |
|o1 : FlagMatroid                                                             |
+-----------------------------------------------------------------------------+
|i2 : flagGeomTuttePolynomial FM                                              |
|                                                                             |
|      3 4    3 3     2 4    3 2    2 3       4    3      2 2       3     4   |
|o2 = x y  + x y  + 2x y  + x y  - x y  + 3x*y  + x y + 6x y  + 9x*y  + 4y  + |
|      3                                                                      |
|     y                                                                       |
|                                                                             |
|o2 : ZZ[x, y]                                                                |
|-----------------------------------------------------------------------------|
| 3     2        2                                                            |
|x  + 3x y + 3x*y  +                                                          |
+-----------------------------------------------------------------------------+

Here is another counterexample but one where no constituent matroids have rank
1 or corank 1.

+-----------------------------------------------------------------------------+
|i1 : FM = flagMatroid {uniformMatroid(2,6),uniformMatroid(4,6)}              |
|                                                                             |
|o1 = a flag matroid with rank sequence {2, 4} on 6 elements                  |
|                                                                             |
|o1 : FlagMatroid                                                             |
+-----------------------------------------------------------------------------+
|i2 : time flagGeomTuttePolynomial FM -- used 691.322 seconds                 |
|                                                                             |
|       4 4     4 3     3 4     4 2     3 3     2 4     4       3 2      2 3  |
|o2 = x y  + 2x y  + 2x y  + 3x y  - 6x y  + 3x y  + 4x y + 18x y  + 18x y  + |
|           2 2        3     4     3     2        2     3                     |
|      + 18x y  + 14x*y  + 5y  + 2x  + 6x y + 6x*y  + 2y                      |
|                                                                             |
|o2 : ZZ[x, y]                                                                |
|-----------------------------------------------------------------------------|
|     4     4      3                                                          |
|4x*y  + 5x  + 14x y                                                          |
+-----------------------------------------------------------------------------+

When the flag matroid has a single constituent (i.e. is a matroid), it agrees
with the usual Tutte polynomial.

+---------------------------------------------------------------+
|i3 : M = matroid graph{{a,b},{b,c},{c,a},{a,d}}                |
|                                                               |
|o3 = a "matroid" of rank 3 on 4 elements                       |
|                                                               |
|o3 : Matroid                                                   |
+---------------------------------------------------------------+
|i4 : flagGeomTuttePolynomial flagMatroid {M}, tuttePolynomial M|
|                                                               |
|       3    2         3    2                                   |
|o4 = (x  + x  + x*y, x  + x  + x*y)                            |
|                                                               |
|o4 : Sequence                                                  |
+---------------------------------------------------------------+

Caveat
======

The computation often does not finish within a reasonable time (< 10 min) if
the ground set is bigger than 5.

See also
========

  * FlagMatroid -- the class of all flag matroids
  * makeKClass(GKMVariety,FlagMatroid)
    -- the equivariant K-class of a
    flag matroid

Ways to use flagGeomTuttePolynomial:
====================================

  * "flagGeomTuttePolynomial(FlagMatroid)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:2064:0.

flagMap -- creates equivariant maps between generalized flag varieties
**********************************************************************

  * Usage:
        f = flagMap(X,Y)
  * Inputs:
      * X, a GKM variety, the source generalized flag
        variety
      * Y, a GKM variety, the target generalized flag
        variety
  * Outputs:
      * f, an equivariant map,

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

Let $L =\{k_1,\dots,k_m\}$ be a set of ranks of linear subscpaces of $\mathbb
C^n$ and consider a subset $L' \subseteq L$. Let $X = Fl(L; n)$ and
$Y=Fl(L';n)$ be the associated generalized flag varieties (if they exist). This
method produces the canonical projection from $X$ to $Y$ that forgets the
linear subspaces having ranks $L \setminus L'$.

+-----------------------------------------------------------------------------+
|i1 : R = makeCharacterRing 3                                                 |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : X = generalizedFlagVariety("B",3,{1,2},R);                              |
+-----------------------------------------------------------------------------+
|i3 : Y1 = generalizedFlagVariety("B",3,{2},R);                               |
+-----------------------------------------------------------------------------+
|i4 : Y2 = generalizedFlagVariety("B",3,{1},R);                               |
+-----------------------------------------------------------------------------+
|i5 : peek flagMap(X,Y1)                                                      |
|                                                                             |
|o5 = EquivariantMap{cache => CacheTable{}                                    |
|                    ptsMap => HashTable{{set {0*}, set                       |
|                                        {set {0*}, set                       |
|                                        {set {0*}, set                       |
|                                        {set {0*}, set                       |
|                                        {set {0}, set                        |
|                                        {set {0}, set                        |
|                                        {set {0}, set                        |
|                                        {set {0}, set                        |
|                                        {set {1*}, set                       |
|                                        {set {1*}, set                       |
|                                        {set {1*}, set                       |
|                                        {set {1*}, set                       |
|                                        {set {1}, set                        |
|                                        {set {1}, set                        |
|                                        {set {1}, set                        |
|                                        {set {1}, set                        |
|                                        {set {2*}, set                       |
|                                        {set {2*}, set                       |
|                                        {set {2*}, set                       |
|                                        {set {2*}, set                       |
|                                        {set {2}, set                        |
|                                        {set {2}, set                        |
|                                        {set {2}, set                        |
|                                        {set {2}, set                        |
|                    source => a "GKM variety" with an                        |
|                    target => a "GKM variety" with an                        |
|-----------------------------------------------------------------------------|
|                               }                                             |
| {1*, 0*}} => {set {1*, 0*}}}                                                |
| {1, 0*}} => {set {1, 0*}}                                                   |
| {2*, 0*}} => {set {2*, 0*}}                                                 |
| {2, 0*}} => {set {2, 0*}}                                                   |
|{0, 1*}} => {set {0, 1*}}                                                    |
|{0, 1}} => {set {0, 1}}                                                      |
|{0, 2}} => {set {0, 2}}                                                      |
|{2*, 0}} => {set {2*, 0}}                                                    |
| {0, 1*}} => {set {0, 1*}}                                                   |
| {1*, 0*}} => {set {1*, 0*}}                                                 |
| {1*, 2}} => {set {1*, 2}}                                                   |
| {2*, 1*}} => {set {2*, 1*}}                                                 |
|{0, 1}} => {set {0, 1}}                                                      |
|{1, 0*}} => {set {1, 0*}}                                                    |
|{1, 2}} => {set {1, 2}}                                                      |
|{2*, 1}} => {set {2*, 1}}                                                    |
| {2*, 0*}} => {set {2*, 0*}}                                                 |
| {2*, 0}} => {set {2*, 0}}                                                   |
| {2*, 1*}} => {set {2*, 1*}}                                                 |
| {2*, 1}} => {set {2*, 1}}                                                   |
|{0, 2}} => {set {0, 2}}                                                      |
|{1*, 2}} => {set {1*, 2}}                                                    |
|{1, 2}} => {set {1, 2}}                                                      |
|{2, 0*}} => {set {2, 0*}}                                                    |
|action of a 3-dimensional torus                                              |
|action of a 3-dimensional torus                                              |
+-----------------------------------------------------------------------------+
|i6 : peek flagMap(X,Y2)                                                      |
|                                                                             |
|o6 = EquivariantMap{cache => CacheTable{}                                    |
|                    ptsMap => HashTable{{set {0*}, set                       |
|                                        {set {0*}, set                       |
|                                        {set {0*}, set                       |
|                                        {set {0*}, set                       |
|                                        {set {0}, set                        |
|                                        {set {0}, set                        |
|                                        {set {0}, set                        |
|                                        {set {0}, set                        |
|                                        {set {1*}, set                       |
|                                        {set {1*}, set                       |
|                                        {set {1*}, set                       |
|                                        {set {1*}, set                       |
|                                        {set {1}, set                        |
|                                        {set {1}, set                        |
|                                        {set {1}, set                        |
|                                        {set {1}, set                        |
|                                        {set {2*}, set                       |
|                                        {set {2*}, set                       |
|                                        {set {2*}, set                       |
|                                        {set {2*}, set                       |
|                                        {set {2}, set                        |
|                                        {set {2}, set                        |
|                                        {set {2}, set                        |
|                                        {set {2}, set                        |
|                    source => a "GKM variety" with an                        |
|                    target => a "GKM variety" with an                        |
|-----------------------------------------------------------------------------|
|                               }                                             |
| {1*, 0*}} => {set {0*}}}                                                    |
| {1, 0*}} => {set {0*}}                                                      |
| {2*, 0*}} => {set {0*}}                                                     |
| {2, 0*}} => {set {0*}}                                                      |
|{0, 1*}} => {set {0}}                                                        |
|{0, 1}} => {set {0}}                                                         |
|{0, 2}} => {set {0}}                                                         |
|{2*, 0}} => {set {0}}                                                        |
| {0, 1*}} => {set {1*}}                                                      |
| {1*, 0*}} => {set {1*}}                                                     |
| {1*, 2}} => {set {1*}}                                                      |
| {2*, 1*}} => {set {1*}}                                                     |
|{0, 1}} => {set {1}}                                                         |
|{1, 0*}} => {set {1}}                                                        |
|{1, 2}} => {set {1}}                                                         |
|{2*, 1}} => {set {1}}                                                        |
| {2*, 0*}} => {set {2*}}                                                     |
| {2*, 0}} => {set {2*}}                                                      |
| {2*, 1*}} => {set {2*}}                                                     |
| {2*, 1}} => {set {2*}}                                                      |
|{0, 2}} => {set {2}}                                                         |
|{1*, 2}} => {set {2}}                                                        |
|{1, 2}} => {set {2}}                                                         |
|{2, 0*}} => {set {2}}                                                        |
|action of a 3-dimensional torus                                              |
|action of a 3-dimensional torus                                              |
+-----------------------------------------------------------------------------+

See also
========

  * map(GKMVariety,GKMVariety,List)
    -- creates a EquivariantMap
  * diagonalMap -- constructs the diagonal morphism
  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety

Ways to use flagMap:
====================

  * "flagMap(GKMVariety,GKMVariety)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1010:0.

FlagMatroid -- the class of all flag matroids
*********************************************

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

A flag matroid $\mathbf M$ is an ordered list $\{M_1, \ldots, M_k\}$ of
Matroid (Matroids),s on a common ground set such that $M_i$ is a
matroid quotient of $M_{i+1}$ for all $i=1, \ldots, k-1$.  The matroids $M_i$'s
are called the "constituent" matroids of the flag matroid $\mathbf M$.  The
class FlagMatroid, is a HashTable (Macaulay2Doc),
with two keys:

  * groundSet, whose value is a Set (Macaulay2Doc), representing the
    common ground set of the constituent matroids
  * constituents, whose value is a List (Macaulay2Doc), of
    Matroid (Matroids),s

Caveat
======

Flag matroids are the first examples beyond ordinary matroids of a more general
combinatorial family known as Coxeter matroids.  Coxeter matroids have not been
implemented yet.

See also
========

  * flagMatroid(List) -- construct a flag matroid
  * flagMatroid(Matrix,List) -- construct a flag matroid
  * makeKClass(GKMVariety,FlagMatroid)
    -- the equivariant K-class of a
    flag matroid

Functions and methods returning a flag matroid:
===============================================

  * "flagMatroid(List)" -- see flagMatroid, -- construct a
    flag matroid
  * "flagMatroid(Matrix,List)" -- see flagMatroid, --
    construct a flag matroid

Methods that use a flag matroid:
================================

  * bases(FlagMatroid) -- compute the bases of a
    flag matroid
  * "flagGeomTuttePolynomial(FlagMatroid)" -- see
    flagGeomTuttePolynomial, -- computes the
    flag-geometric Tutte polynomial of flag matroids
  * isWellDefined(FlagMatroid) -- check
    if a flag matroid is well-defined
  * latticePoints(FlagMatroid), --
    lattice points of a base polytope of a flag matroid
  * makeKClass(GKMVariety,FlagMatroid)
    -- the equivariant K-class of a
    flag matroid

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1823:0.

flagMatroid -- construct a flag matroid
***************************************

  * Usage:
        FM = flagMatroid(ML)
        FM = flagMatroid(A,L)
  * Inputs:
      * ML, a list (Macaulay2Doc), of Matroid (Matroids),
        s on a common ground set
      * A, a matrix (Macaulay2Doc),
      * L, a list (Macaulay2Doc), of integers between 1 and the
        number of rows of A (inclusive)
  * Outputs:
      * FM, a flag matroid,

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

Given a list $ML$ of matroids on a common ground set, this method stores the
data as a FlagMatroid.

+-----------------------------------------------------------------------------+
|i1 : ML = {uniformMatroid(2,6),matroid completeGraph 4}                      |
|                                                                             |
|o1 = {a "matroid" of rank 2 on 6 elements, a "matroid" of rank 3 on 6        |
|     ------------------------------------------------------------------------|
|     elements}                                                               |
|                                                                             |
|o1 : List                                                                    |
+-----------------------------------------------------------------------------+
|i2 : FM = flagMatroid(ML)                                                    |
|                                                                             |
|o2 = a "flag matroid" with rank sequence {2, 3} on 6 elements                |
|                                                                             |
|o2 : FlagMatroid                                                             |
+-----------------------------------------------------------------------------+
|i3 : isWellDefined FM                                                        |
|                                                                             |
|o3 = true                                                                    |
+-----------------------------------------------------------------------------+

For $A$ an $r\times n$ matrix over a field and $L = \{r_1, \ldots, r_k}$ a list
of integers, let $M_i$ be the Matroid (Matroids), defined by the
columns of the matrix obtained by the first $r_i$ rows of $A$. These matroids
form a flag matroid $\mathbf M = \{M_1, \ldots, M_k\}$. This method creates
this FlagMatroid.

+--------------------------------------------------------------+
|i4 : A = random(QQ^2,QQ^4)                                    |
|                                                              |
|o4 = | 9/2 3/4 7/9  7/10 |                                    |
|     | 9/4 7/4 7/10 7/3  |                                    |
|                                                              |
|              2       4                                       |
|o4 : Matrix QQ  <-- QQ                                        |
+--------------------------------------------------------------+
|i5 : FM = flagMatroid(A,{1,2})                                |
|                                                              |
|o5 = a "flag matroid" with rank sequence {1, 2} on 4 elements |
|                                                              |
|o5 : FlagMatroid                                              |
+--------------------------------------------------------------+

Caveat
======

When a list of matroids is given as input, this method does not check if the
flag matroid is well-defined.

See also
========

  * isWellDefined(FlagMatroid) -- check
    if a flag matroid is well-defined
  * FlagMatroid -- the class of all flag matroids

Ways to use flagMatroid:
========================

  * "flagMatroid(List)"
  * "flagMatroid(Matrix,List)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1866:0.

generalizedFlagVariety -- makes a generalized flag variety as a GKM variety
***************************************************************************

  * Usage:
        X = generalizedFlagVariety(LT,d,L)
        X = generalizedFlagVariety(LT,d,L,R)
  * Inputs:
      * LT, a string (Macaulay2Doc), one of "A", "B", "C", or "D"
      * d, an integer (Macaulay2Doc), the dimension of the root
        system
      * L, a list (Macaulay2Doc), of integers strictly between 1
        and d (inclusive)
      * R, a ring (Macaulay2Doc), the character ring of the torus
        acting on the generalized flag variety
  * Outputs:
      * X, a GKM variety, representing the corresponding
        generalized flag variety

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

Let $G$ be the Lie group corresponding to $LT_d$, and let $w = a_1w_1 + \cdots
+ a_dw_d$ be a nonnegative $\mathbb Z$-linear combination of fundamental
weights in the root system of type $LT_d$, where $a_i$ is the number of times
$i$ appears in the list $L$. (See Example_colon_ generalized flag varieties,
for conventions regarding
classical Lie groups and their root systems). This method outputs the GKM
variety representing the generalized flag variety $G/P$ embedded in the
irreducible representation of $G$ with the highest weight $w$.

The following example features the Lagrangian Grassmannian $LGr(2,4)$ of
2-dimensional subspaces in $\mathbb C^4$ that are isotropic under the standard
alternating form.  Its MomentGraph, is a complete graph on 4
vertices.

+-----------------------------------------------------------------------------+
|i1 : LGr24 = generalizedFlagVariety("C",2,{2})                               |
|                                                                             |
|o1 = a "GKM variety" with an action of a 2-dimensional torus                 |
|                                                                             |
|o1 : GKMVariety                                                              |
+-----------------------------------------------------------------------------+
|i2 : peek LGr24                                                              |
|                                                                             |
|o2 = GKMVariety{cache => CacheTable{...2...}                                 |
|                characterRing => ZZ[T ..T ]                                  |
|                                     0   1                                   |
|                charts => HashTable{{set {0, 1*}} => {{0, 2}, {-1, 1}, {-2,  |
|                                    {set {0, 1}} => {{0, -2}, {-2, 0}, {-1,  |
|                                    {set {1*, 0*}} => {{1, 1}, {2, 0}, {0, 2 |
|                                    {set {1, 0*}} => {{2, 0}, {1, -1}, {0, - |
|                momentGraph => a "moment graph" on 4 vertices with 6 edges   |
|                points => {{set {0, 1}}, {set {0, 1*}}, {set {1, 0*}}, {set  |
|-----------------------------------------------------------------------------|
|          }                                                                  |
|                                                                             |
|                                                                             |
|0}} }                                                                        |
|-1}}                                                                         |
|}}                                                                           |
|2}}                                                                          |
|                                                                             |
|{1*, 0*}}}                                                                   |
+-----------------------------------------------------------------------------+
|i3 : momentGraph LGr24                                                       |
|                                                                             |
|o3 = a "moment graph" on 4 vertices with 6 edges                             |
|                                                                             |
|o3 : MomentGraph                                                             |
+-----------------------------------------------------------------------------+
|i4 : euler ampleKClass LGr24                                                 |
|                                                                             |
|               -1        -1      -1 -1                                       |
|o4 = T T  + T T   + 1 + T  T  + T  T                                         |
|      0 1    0 1         0  1    0  1                                        |
|                                                                             |
|o4 : ZZ[T ..T ]                                                              |
|         0   1                                                               |
+-----------------------------------------------------------------------------+

Caveat
======

Spin groups have not been implemented.

See also
========

  * Example_colon_ generalized flag varieties
  * flagMap -- creates equivariant maps between generalized
    flag varieties

Ways to use generalizedFlagVariety:
===================================

  * "generalizedFlagVariety(String,ZZ,List)"
  * "generalizedFlagVariety(String,ZZ,List,Ring)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:824:0.

generalizedSchubertVariety -- create a generalized Schubert variety
*******************************************************************

  * Usage:
        Y = generalizedSchubertVariety(X,pt)
  * Inputs:
      * X, a GKM variety, obtained by
        generalizedFlagVariety,
      * pt, a thing (Macaulay2Doc), an element in X.points
  * Outputs:
      * Y, a GKM variety, the generalized Schubert variety
        corresponding to pt which is the union of all Bruhat cells
        corresponding to elements in X.points that are bigger than pt in the
        Bruhat order

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

This method creates a GKMVariety, that represent a
generalized Schubert variety of a generalized flag variety. The following
example is the Schubert variety of projective lines in $\mathbb P^3$ meeting a
distinguished point.

+-----------------------------------------------------------------------------+
|i1 : X = generalizedSchubertVariety(generalizedFlagVariety("A",3,{2}),{set{0,|
|                                                                             |
|o1 = a "GKM variety" with an action of a 4-dimensional torus                 |
|                                                                             |
|o1 : GKMVariety                                                              |
|-----------------------------------------------------------------------------|
|3}})                                                                         |
+-----------------------------------------------------------------------------+

See also
========

  * bruhatOrder -- computes the Bruhat order on a
    generalized flag variety
  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety

Ways to use generalizedSchubertVariety:
=======================================

  * "generalizedSchubertVariety(GKMVariety,Thing)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1626:0.

GKMVariety -- the class of all GKM varieties
********************************************

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

A GKMVariety, $X$ is a MutableHashTable (Macaulay2Doc),
representing a GKM variety $X$ with an action
of a torus $T$. Its keys include:

  * points, whose value is a list representing the torus-fixed points of $X$
  * characterRing, whose value is a ring representing the character ring of $T$
  * momentGraph, whose value is the MomentGraph, of $X$
  * charts, whose value is a HashTable (Macaulay2Doc),
    representing the (negatives of) characters of the torus action on each
    torus-invariant affine chart around a torus-fixed point.  The keys of
    X.charts are X.points and the values are lists consisting of lists of
    integers.

Every GKMVariety, created by methods in this package has at
least the two keys points and characterRing. The following example is the
projective space $\mathbb P^2$ as a GKMVariety.

+----------------------------------------------------------------------------+
|i1 : PP2 = projectiveSpace 2                                                |
|                                                                            |
|o1 = a "GKM variety" with an action of a 3-dimensional torus                |
|                                                                            |
|o1 : GKMVariety                                                             |
+----------------------------------------------------------------------------+
|i2 : peek PP2                                                               |
|                                                                            |
|o2 = GKMVariety{cache => CacheTable{...1...}                               }|
|                characterRing => ZZ[T ..T ]                                 |
|                                     0   2                                  |
|                charts => HashTable{set {0} => {{-1, 1, 0}, {-1, 0, 1}}}    |
|                                    set {1} => {{1, -1, 0}, {0, -1, 1}}     |
|                                    set {2} => {{1, 0, -1}, {0, 1, -1}}     |
|                momentGraph => a "moment graph" on 3 vertices with 3 edges  |
|                points => {set {0}, set {1}, set {2}}                       |
+----------------------------------------------------------------------------+

See also
========

  * makeGKMVariety -- constructs a GKM variety
  * Example_colon_ generalized flag varieties
  * Example_colon_ smooth toric varieties

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

  * "generalizedFlagVariety(String,ZZ,List)" -- see
    generalizedFlagVariety, -- makes a generalized flag
    variety as a GKM variety
  * "generalizedFlagVariety(String,ZZ,List,Ring)" -- see
    generalizedFlagVariety, -- makes a generalized flag
    variety as a GKM variety
  * "generalizedSchubertVariety(GKMVariety,Thing)" -- see
    generalizedSchubertVariety, -- create a
    generalized Schubert variety
  * GKMVariety ** GKMVariety -- product of
    GKM varieties
  * "makeGKMVariety(KClass)" -- see makeGKMVariety, --
    constructs a GKM variety
  * "makeGKMVariety(List,List,Ring)" -- see makeGKMVariety,
    -- constructs a GKM variety
  * "makeGKMVariety(List,Ring)" -- see makeGKMVariety, --
    constructs a GKM variety
  * "makeGKMVariety(MomentGraph)" -- see makeGKMVariety,
    -- constructs a GKM variety
  * "makeGKMVariety(MomentGraph,Ring)" -- see makeGKMVariety,
    -- constructs a GKM variety
  * "makeGKMVariety(NormalToricVariety)" -- see makeGKMVariety,
    -- constructs a GKM variety
  * "makeGKMVariety(NormalToricVariety,Ring)" -- see makeGKMVariety,
    -- constructs a GKM variety
  * "projectiveSpace(ZZ)" -- see projectiveSpace, --
    constructs projective space as a GKM variety
  * "projectiveSpace(ZZ,Ring)" -- see projectiveSpace,
    -- constructs projective space as a GKM variety

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

  * "ampleKClass(GKMVariety)" -- see ampleKClass, -- the
    class of an ample line bundle
  * "ampleKClass(GKMVariety,KClass)" -- see ampleKClass, --
    the class of an ample line bundle
  * "bruhatOrder(GKMVariety)" -- see bruhatOrder, --
    computes the Bruhat order on a generalized flag variety
  * "cellOrder(GKMVariety)" -- see cellOrder, -- the poset of
    a stratification of a GKM variety
  * "charts(GKMVariety)" -- see charts, -- outputs the
    torus-invariant affine charts of a GKM variety
  * "charts(GKMVariety,List)" -- see charts, -- outputs the
    torus-invariant affine charts of a GKM variety
  * "diagonalMap(GKMVariety)" -- see diagonalMap, --
    constructs the diagonal morphism
  * "flagMap(GKMVariety,GKMVariety)" -- see flagMap, -- creates
    equivariant maps between generalized flag varieties
  * "lieType(GKMVariety)" -- see lieType, -- outputs the Lie
    type of a generalized flag variety
  * "makeKClass(GKMVariety,List)" -- see makeKClass, --
    constructs an equivariant K-class
  * makeKClass(GKMVariety,FlagMatroid)
    -- the equivariant K-class of a
    flag matroid
  * makeKClass(GKMVariety,ToricDivisor)
    -- create the KClass from a
    ToricDivisor
  * map(GKMVariety,GKMVariety,List)
    -- creates a EquivariantMap
  * momentGraph(GKMVariety) -- view the
    moment graph of a GKM variety
  * momentGraph(GKMVariety,MomentGraph)
    -- define a moment graph for a
    GKM variety
  * normalToricVariety(GKMVariety),
    -- converts a GKM variety back into a toric variety
  * "orbitClosure(GKMVariety,Matrix)" -- see orbitClosure,
    -- computes the equivariant K-class of a torus orbit closure of a point in
    a generalized flag variety
  * "trivialKClass(GKMVariety)" -- see trivialKClass, --
    the equivariant K-class of the structure sheaf

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:373:0.

GKMVariety ** GKMVariety -- product of GKM varieties
****************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        X ** Y
  * Inputs:
      * X, a GKM variety,
      * Y, a GKM variety,
  * Outputs:
      * X, a GKM variety, product of X and Y

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

Given two GKM varieties $X$ and $Y$ with an action of a common torus $T$, the
product is $X \times Y$ with the structure of a GKM variety given by the
diagonal action of $T$. This method constructs $X \times Y$ as a
GKMVariety. To speed up computation, this method does not
automatically cache the moment graph of $X \times Y$. The user can cache this
using the method MomentGraph ** MomentGraph.

The following example exhibits the product of $\mathbb P^1$ with the Lagrangian
Grassmannian SpGr(2,4).

+-----------------------------------------------------------------------------+
|i1 : R = makeCharacterRing 2;                                                |
+-----------------------------------------------------------------------------+
|i2 : X = projectiveSpace(1,R);                                               |
+-----------------------------------------------------------------------------+
|i3 : Y = generalizedFlagVariety("C",2,{2},R);                                |
+-----------------------------------------------------------------------------+
|i4 : Z = X ** Y;                                                             |
+-----------------------------------------------------------------------------+
|i5 : peek Z                                                                  |
|                                                                             |
|o5 = GKMVariety{cache => CacheTable{}                                        |
|                characterRing => R                                           |
|                charts => HashTable{(set {0},                                |
|                                    (set {0},                                |
|                                    (set {0},                                |
|                                    (set {0},                                |
|                                    (set {1},                                |
|                                    (set {1},                                |
|                                    (set {1},                                |
|                                    (set {1},                                |
|                points => {(set {0}, {set {1,                                |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|{set {0, 1*}}) => {{-1, 1}, {0, 2}, {-1, 1}, {-2, 0}} }                      |
|{set {0, 1}}) => {{-1, 1}, {0, -2}, {-2, 0}, {-1, -1}}                       |
|{set {1*, 0*}}) => {{-1, 1}, {1, 1}, {2, 0}, {0, 2}}                         |
|{set {1, 0*}}) => {{-1, 1}, {2, 0}, {1, -1}, {0, -2}}                        |
|{set {0, 1*}}) => {{1, -1}, {0, 2}, {-1, 1}, {-2, 0}}                        |
|{set {0, 1}}) => {{1, -1}, {0, -2}, {-2, 0}, {-1, -1}}                       |
|{set {1*, 0*}}) => {{1, -1}, {1, 1}, {2, 0}, {0, 2}}                         |
|{set {1, 0*}}) => {{1, -1}, {2, 0}, {1, -1}, {0, -2}}                        |
|0*}}), (set {0}, {set {1*, 0*}}), (set {1}, {set {0, 1*}}), (set {1}, {set   |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|{0, 1}}), (set {0}, {set {0, 1*}}), (set {0}, {set {0, 1}}), (set {1}, {set  |
|-----------------------------------------------------------------------------|
|                                     }                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|{1*, 0*}}), (set {1}, {set {1, 0*}})}                                        |
+-----------------------------------------------------------------------------+

We can cache the moment graph of $Z$ as follows:

+-----------------------------------------------------------------------------+
|i6 : G = momentGraph X;                                                      |
+-----------------------------------------------------------------------------+
|i7 : H = momentGraph Y;                                                      |
+-----------------------------------------------------------------------------+
|i8 : momentGraph(Z, G** H);                                                  |
+-----------------------------------------------------------------------------+
|i9 : peek Z                                                                  |
|                                                                             |
|o9 = GKMVariety{cache => CacheTable{}                                        |
|                characterRing => R                                           |
|                charts => HashTable{(set {0}, {set {0, 1*}}) => {{-1,        |
|                                    (set {0}, {set {0, 1}}) => {{-1, 1       |
|                                    (set {0}, {set {1*, 0*}}) => {{-1,       |
|                                    (set {0}, {set {1, 0*}}) => {{-1,        |
|                                    (set {1}, {set {0, 1*}}) => {{1, -       |
|                                    (set {1}, {set {0, 1}}) => {{1, -1       |
|                                    (set {1}, {set {1*, 0*}}) => {{1,        |
|                                    (set {1}, {set {1, 0*}}) => {{1, -       |
|                momentGraph => a "moment graph" on 8 vertices with 17        |
|                points => {(set {0}, {set {1, 0*}}), (set {0}, {set {1       |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|1}, {0, 2}, {-1, 1}, {-2, 0}} }                                              |
|}, {0, -2}, {-2, 0}, {-1, -1}}                                               |
| 1}, {1, 1}, {2, 0}, {0, 2}}                                                 |
|1}, {2, 0}, {1, -1}, {0, -2}}                                                |
|1}, {0, 2}, {-1, 1}, {-2, 0}}                                                |
|}, {0, -2}, {-2, 0}, {-1, -1}}                                               |
|-1}, {1, 1}, {2, 0}, {0, 2}}                                                 |
|1}, {2, 0}, {1, -1}, {0, -2}}                                                |
|edges                                                                        |
|*, 0*}}), (set {1}, {set {0, 1*}}), (set {1}, {set {0, 1}}), (set {0}, {set  |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|{0, 1*}}), (set {0}, {set {0, 1}}), (set {1}, {set {1*, 0*}}), (set {1}, {set|
|-----------------------------------------------------------------------------|
|          }                                                                  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|{1, 0*}})}                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * makeGKMVariety -- constructs a GKM variety

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

  * GKMVariety ** GKMVariety -- product of
    GKM varieties
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:520:0.

isWellDefined(FlagMatroid) -- check if a flag matroid is well-defined
*********************************************************************

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        isWellDefined(FM)
  * Inputs:
      * FM, a flag matroid,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

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

A FlagMatroid, with constituent matroids $\{M_1, \ldots,
M_k\}$ is well-defined if $M_i$ is a matroid quotient of $M_{i+1}$ (i.e. every
flat of $M_i$ is a flat of $M_{i+1}$) for all $i = 1, \ldots, k-1$.

+-----------------------------------------------------------------------------+
|i1 : FM = flagMatroid {uniformMatroid(2,4),uniformMatroid(3,4)}              |
|                                                                             |
|o1 = a "flag matroid" with rank sequence {2, 3} on 4 elements                |
|                                                                             |
|o1 : FlagMatroid                                                             |
+-----------------------------------------------------------------------------+
|i2 : isWellDefined FM                                                        |
|                                                                             |
|o2 = true                                                                    |
+-----------------------------------------------------------------------------+
|i3 : FMbad = flagMatroid {uniformMatroid(2,4), uniformMatroid(1,2)++         |
|                                                                             |
|o3 = a "flag matroid" with rank sequence {2, 3} on 4 elements                |
|                                                                             |
|o3 : FlagMatroid                                                             |
|-----------------------------------------------------------------------------|
|uniformMatroid(2,2)}                                                         |
+-----------------------------------------------------------------------------+
|i4 : isWellDefined FMbad                                                     |
|                                                                             |
|o4 = false                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * FlagMatroid -- the class of all flag matroids
  * flagMatroid(List) -- construct a flag matroid

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

  * isWellDefined(FlagMatroid) -- check
    if a flag matroid is well-defined
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1894:0.

isWellDefined(KClass) -- whether the input is a well-defined equivariant K-class
********************************************************************************

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        isWellDefined C
  * Inputs:
      * C, an equivariant K-class,
  * Outputs:
      * a Boolean value (Macaulay2Doc), whether or not a list of
        Laurent polynomials satisfies edge compatibility condition

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

If $\{f_x \mid x\in X^T\}$ is a collection of Laurent polynomials in the
character ring $\mathbb Z[T_0, \ldots, T_n]$ of the torus $T$ acting on a
GKMVariety, $X$, one per each torus-fixed point, representing an
element $C$ of $K_T^0(X^T)$, then $C$ is in the image of $K_T^0(X)$ under the
injective restriction map $K_T^0(X)\to K_T^0(X^T)$ if and only if it satisfies
the following "edge compatibility condition":

For each one-dimensional $T$-orbit-closure in $X$ with boundary points $x$ and
$x'$, one has $$f_x \equiv f_{x'} \ \mod \ 1 - T^{\lambda(x,x')}$$ where
$\lambda(x,x')$ is the character of the action of $T$ on the one-dimensional
orbit. See [Corollary 5.12; VV03] or [Corollary A.5; RK03] for details.

+-----------------------------------------------------------------------------+
|i1 : PP3 = projectiveSpace 3                                                 |
|                                                                             |
|o1 = a "GKM variety" with an action of a 4-dimensional torus                 |
|                                                                             |
|o1 : GKMVariety                                                              |
+-----------------------------------------------------------------------------+
|i2 : isWellDefined ampleKClass PP3 --the O(1) class on PP3 is well-defined   |
|                                                                             |
|o2 = true                                                                    |
+-----------------------------------------------------------------------------+
|i3 : badC = makeKClass(PP3, reverse gens PP3.characterRing) --reverse the    |
|                                                                             |
|o3 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o3 : KClass                                                                  |
|-----------------------------------------------------------------------------|
|order of Laurent polynomials defining the O(1) class                         |
+-----------------------------------------------------------------------------+
|i4 : isWellDefined badC --no longer well-defined                             |
|incompatible edges {{set {1}, set {3}}, {set {0}, set {1}}, {set {2}, set    |
|o4 = false                                                                   |
|-----------------------------------------------------------------------------|
|{3}}, {set {0}, set {2}}}                                                    |
+-----------------------------------------------------------------------------+

Caveat
======

A MomentGraph, must be defined on the GKMVariety,
on which the KClass, is a $K$-class of.

See also
========

  * KClass -- the class of all equivariant K-classes
  * makeKClass -- constructs an equivariant K-class

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

  * isWellDefined(KClass) -- whether the
    input is a well-defined equivariant K-class
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:677:0.

KClass -- the class of all equivariant K-classes
************************************************

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

For $X$ a GKM variety with an action of a torus $T$ whose character ring is
$R$, a $T$-equivariant $K$-class $C \in K_T^0(X)$ of is encoded by its image in
$K_T^0(X^T) = \prod_{x\in X^T} R$, under the injective restriction map
$K_T^0(X) \to K_T^0(X^T)$. See [Corollary 5.12; VV03] or [Corollary A.5; RK03]
for details.

A KClass, C is a HashTable (Macaulay2Doc),
consisting of two keys:

  * variety, whose value is a GKMVariety, of which C is a
    K-class of
  * KPolynomials, whose value is a HashTable (Macaulay2Doc),;
    its keys are X.points and the values are Laurent polynomials in the
    character ring representing the values of the K-class under the restriction
    map.

See also
========

  * makeKClass -- constructs an equivariant K-class
  * isWellDefined(KClass) -- whether the
    input is a well-defined equivariant K-class
  * pushforward -- computes the pushforward map of
    equivariant K-classes of an equivariant map
  * pullback(EquivariantMap) -- computes
    the pullback map of equivariant K-classes of an equivariant map
  * euler(KClass) -- computes the equivariant Euler
    characteristic of an equivariant K-class

Functions and methods returning an equivariant K-class:
=======================================================

  * "ampleKClass(GKMVariety)" -- see ampleKClass, -- the
    class of an ample line bundle
  * "makeKClass(GKMVariety,List)" -- see makeKClass, --
    constructs an equivariant K-class
  * makeKClass(GKMVariety,FlagMatroid)
    -- the equivariant K-class of a
    flag matroid
  * makeKClass(GKMVariety,ToricDivisor)
    -- create the KClass from a
    ToricDivisor
  * "orbitClosure(GKMVariety,Matrix)" -- see orbitClosure,
    -- computes the equivariant K-class of a torus orbit closure of a point in
    a generalized flag variety
  * "trivialKClass(GKMVariety)" -- see trivialKClass, --
    the equivariant K-class of the structure sheaf

Methods that use an equivariant K-class:
========================================

  * "ampleKClass(GKMVariety,KClass)" -- see ampleKClass, --
    the class of an ample line bundle
  * euler(KClass) -- computes the equivariant Euler
    characteristic of an equivariant K-class
  * isWellDefined(KClass) -- whether the
    input is a well-defined equivariant K-class
  * KClass * KClass -- computes the product of two
    equivariant K-classes
  * KClass + KClass -- computes the sum of two
    equivariant K-classes
  * KClass ^ ZZ -- computes powers of an equivariant
    K-classes
  * "makeGKMVariety(KClass)" -- see makeGKMVariety, --
    constructs a GKM variety

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:555:0.

KClass * KClass -- computes the product of two equivariant K-classes
********************************************************************

  * Operator: * (Macaulay2Doc),
  * Usage:
        C1 * C2
  * Inputs:
      * C1, an equivariant K-class,
      * C2, an equivariant K-class,
  * Outputs:
      * an equivariant K-class, the product of C1 and C2

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

This method computes the product of two equivariant $K$-classes.

+-----------------------------------------------------------------------------+
|i1 : Gr24 = generalizedFlagVariety("A",3,{2}); --the Grassmannian of         |
|-----------------------------------------------------------------------------|
|projective lines in projective 3-space                                       |
+-----------------------------------------------------------------------------+
|i2 : O1 = ampleKClass Gr24 -- the O(1) bundle on Gr24 as an equivariant      |
|                                                                             |
|o2 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o2 : KClass                                                                  |
|-----------------------------------------------------------------------------|
|K-class                                                                      |
+-----------------------------------------------------------------------------+
|i3 : O2 = O1 * O1                                                            |
|                                                                             |
|o3 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o3 : KClass                                                                  |
+-----------------------------------------------------------------------------+
|i4 : peek O2                                                                 |
|                                                                             |
|o4 = KClass{variety => a "GKM variety" with an action of a 4-dimensional     |
|                                                       2 2                   |
|            KPolynomials => HashTable{{set {0, 1}} => T T }                  |
|                                                       0 1                   |
|                                                       2 2                   |
|                                      {set {0, 2}} => T T                    |
|                                                       0 2                   |
|                                                       2 2                   |
|                                      {set {0, 3}} => T T                    |
|                                                       0 3                   |
|                                                       2 2                   |
|                                      {set {1, 2}} => T T                    |
|                                                       1 2                   |
|                                                       2 2                   |
|                                      {set {1, 3}} => T T                    |
|                                                       1 3                   |
|                                                       2 2                   |
|                                      {set {2, 3}} => T T                    |
|                                                       2 3                   |
|-----------------------------------------------------------------------------|
|torus}                                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * makeKClass -- constructs an equivariant K-class
  * KClass ^ ZZ -- computes powers of an equivariant
    K-classes
  * KClass + KClass -- computes the sum of two
    equivariant K-classes

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

  * KClass * KClass -- computes the product of two
    equivariant K-classes
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:706:0.

KClass + KClass -- computes the sum of two equivariant K-classes
****************************************************************

  * Operator: + (Macaulay2Doc),
  * Usage:
        C1 + C2
  * Inputs:
      * C1, an equivariant K-class,
      * C2, an equivariant K-class,
  * Outputs:
      * an equivariant K-class, the sum of C1 and C2

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

This method computes the sum of two equivariant $K$-classes.

+-----------------------------------------------------------------------------+
|i1 : Gr24 = generalizedFlagVariety("A",3,{2}); --the Grassmannian of         |
|-----------------------------------------------------------------------------|
|projective lines in projective 3-space                                       |
+-----------------------------------------------------------------------------+
|i2 : O1 = ampleKClass Gr24 -- the O(1) bundle on Gr24 as an equivariant      |
|                                                                             |
|o2 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o2 : KClass                                                                  |
|-----------------------------------------------------------------------------|
|K-class                                                                      |
+-----------------------------------------------------------------------------+
|i3 : E = O1 + (O1*O1)                                                        |
|                                                                             |
|o3 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o3 : KClass                                                                  |
+-----------------------------------------------------------------------------+
|i4 : peek E                                                                  |
|                                                                             |
|o4 = KClass{variety => a "GKM variety" with an action of a 4-dimensional     |
|                                                       2 2                   |
|            KPolynomials => HashTable{{set {0, 1}} => T T  + T T }           |
|                                                       0 1    0 1            |
|                                                       2 2                   |
|                                      {set {0, 2}} => T T  + T T             |
|                                                       0 2    0 2            |
|                                                       2 2                   |
|                                      {set {0, 3}} => T T  + T T             |
|                                                       0 3    0 3            |
|                                                       2 2                   |
|                                      {set {1, 2}} => T T  + T T             |
|                                                       1 2    1 2            |
|                                                       2 2                   |
|                                      {set {1, 3}} => T T  + T T             |
|                                                       1 3    1 3            |
|                                                       2 2                   |
|                                      {set {2, 3}} => T T  + T T             |
|                                                       2 3    2 3            |
|-----------------------------------------------------------------------------|
|torus}                                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * makeKClass -- constructs an equivariant K-class
  * KClass * KClass -- computes the product of two
    equivariant K-classes

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

  * KClass + KClass -- computes the sum of two
    equivariant K-classes
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:769:0.

KClass ^ ZZ -- computes powers of an equivariant K-classes
**********************************************************

  * Operator: ^ (Macaulay2Doc),
  * Usage:
        C^n
  * Inputs:
      * C, an equivariant K-class,
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * an equivariant K-class, the n-th power of C

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

This method computes the $n$-th power of an equivariant $K$-class $C$.

+-----------------------------------------------------------------------------+
|i1 : Gr24 = generalizedFlagVariety("A",3,{2}); --the Grassmannian of         |
|-----------------------------------------------------------------------------|
|projective lines in projective 3-space                                       |
+-----------------------------------------------------------------------------+
|i2 : O1 = ampleKClass Gr24 -- the O(1) bundle on Gr24 as an equivariant      |
|                                                                             |
|o2 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o2 : KClass                                                                  |
|-----------------------------------------------------------------------------|
|K-class                                                                      |
+-----------------------------------------------------------------------------+
|i3 : O2 = O1^2                                                               |
|                                                                             |
|o3 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o3 : KClass                                                                  |
+-----------------------------------------------------------------------------+
|i4 : peek O2                                                                 |
|                                                                             |
|o4 = KClass{variety => a "GKM variety" with an action of a 4-dimensional     |
|                                                       2 2                   |
|            KPolynomials => HashTable{{set {0, 1}} => T T }                  |
|                                                       0 1                   |
|                                                       2 2                   |
|                                      {set {0, 2}} => T T                    |
|                                                       0 2                   |
|                                                       2 2                   |
|                                      {set {0, 3}} => T T                    |
|                                                       0 3                   |
|                                                       2 2                   |
|                                      {set {1, 2}} => T T                    |
|                                                       1 2                   |
|                                                       2 2                   |
|                                      {set {1, 3}} => T T                    |
|                                                       1 3                   |
|                                                       2 2                   |
|                                      {set {2, 3}} => T T                    |
|                                                       2 3                   |
|-----------------------------------------------------------------------------|
|torus}                                                                       |
+-----------------------------------------------------------------------------+
|i5 : Oneg1 = O1^(-1)                                                         |
|                                                                             |
|o5 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o5 : KClass                                                                  |
+-----------------------------------------------------------------------------+
|i6 : peek Oneg1                                                              |
|                                                                             |
|o6 = KClass{variety => a "GKM variety" with an action of a 4-dimensional     |
|                                                       -1 -1                 |
|            KPolynomials => HashTable{{set {0, 1}} => T  T  }                |
|                                                       0  1                  |
|                                                       -1 -1                 |
|                                      {set {0, 2}} => T  T                   |
|                                                       0  2                  |
|                                                       -1 -1                 |
|                                      {set {0, 3}} => T  T                   |
|                                                       0  3                  |
|                                                       -1 -1                 |
|                                      {set {1, 2}} => T  T                   |
|                                                       1  2                  |
|                                                       -1 -1                 |
|                                      {set {1, 3}} => T  T                   |
|                                                       1  3                  |
|                                                       -1 -1                 |
|                                      {set {2, 3}} => T  T                   |
|                                                       2  3                  |
|-----------------------------------------------------------------------------|
|torus}                                                                       |
+-----------------------------------------------------------------------------+

Caveat
======

$n$ is allowed to be negative only when $C$ is a line bundle, or a direct sum
of copies of a line bundle.

See also
========

  * makeKClass -- constructs an equivariant K-class
  * KClass * KClass -- computes the product of two
    equivariant K-classes
  * KClass + KClass -- computes the sum of two
    equivariant K-classes

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

  * KClass ^ ZZ -- computes powers of an equivariant
    K-classes
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:740:0.

latticePoints(FlagMatroid) -- lattice points of a base polytope of a flag matroid
*********************************************************************************

  * Function: latticePoints (Polyhedra),
  * Usage:
        P = latticePoints(FM)
  * Inputs:
      * FM, a flag matroid,
  * Outputs:
      * P, a list (Macaulay2Doc), of lists of integers representing
        the lattice points

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

For a basis $B= \{B_1, \ldots, B_k\}$ of a flag matroid $M$ (see
bases(FlagMatroid)), let $e_B$ be the sum over $i = 1,
\ldots, k$ of the indicator vectors of $B_i$. The base polytope of a flag
matroid $M$ is the convex hull of $e_B$ as $B$ ranges over all bases of $M$.
This method computes the lattice points of the base polytope of a flag matroid,
exploiting the strong normality property as proven in [CDMS18].

+-----------------------------------------------------------------------------+
|i1 : FM = flagMatroid {uniformMatroid(1,4),uniformMatroid(2,4)}              |
|                                                                             |
|o1 = a "flag matroid" with rank sequence {1, 2} on 4 elements                |
|                                                                             |
|o1 : FlagMatroid                                                             |
+-----------------------------------------------------------------------------+
|i2 : P = latticePoints FM                                                    |
|                                                                             |
|o2 = ({2, 1, 0, 0}, {2, 0, 1, 0}, {1, 1, 1, 0}, {2, 0, 0, 1}, {1, 1, 0, 1},  |
|     ------------------------------------------------------------------------|
|     {1, 0, 1, 1}, {1, 2, 0, 0}, {0, 2, 1, 0}, {0, 2, 0, 1}, {0, 1, 1, 1},   |
|     ------------------------------------------------------------------------|
|     {1, 0, 2, 0}, {0, 1, 2, 0}, {0, 0, 2, 1}, {1, 0, 0, 2}, {0, 1, 0, 2},   |
|     ------------------------------------------------------------------------|
|     {0, 0, 1, 2})                                                           |
|                                                                             |
|o2 : Sequence                                                                |
+-----------------------------------------------------------------------------+

In terms of equivariant K-theory, the lattice points of the base polytope of a
flag matroid is equal to the integer-point transform of the equivariant Euler
characteristic (see euler(KClass)) of the
KClass, defined by the flag matroid shifted by the $O(1)$ bundle on the
(partial) flag variety.

+-----------------------------------------------------------------------------+
|i3 : X = generalizedFlagVariety("A",3,{1,2})                                 |
|                                                                             |
|o3 = a "GKM variety" with an action of a 4-dimensional torus                 |
|                                                                             |
|o3 : GKMVariety                                                              |
+-----------------------------------------------------------------------------+
|i4 : FM = flagMatroid {uniformMatroid(1,4),uniformMatroid(2,4)}              |
|                                                                             |
|o4 = a "flag matroid" with rank sequence {1, 2} on 4 elements                |
|                                                                             |
|o4 : FlagMatroid                                                             |
+-----------------------------------------------------------------------------+
|i5 : C = makeKClass(X,FM)                                                    |
|                                                                             |
|o5 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o5 : KClass                                                                  |
+-----------------------------------------------------------------------------+
|i6 : chiCO1 = euler(C * ampleKClass X)                                       |
|                                                                             |
|      2      2      2        2                        2               2      |
|o6 = T T  + T T  + T T  + T T  + T T T  + T T T  + T T  + T T T  + T T  +    |
|      0 1    0 2    0 3    0 1    0 1 2    0 1 3    0 2    0 2 3    0 3      |
|     ------------------------------------------------------------------------|
|      2      2        2               2    2        2                        |
|     T T  + T T  + T T  + T T T  + T T  + T T  + T T                         |
|      1 2    1 3    1 2    1 2 3    1 3    2 3    2 3                        |
|                                                                             |
|o6 : ZZ[T ..T ]                                                              |
|         0   3                                                               |
+-----------------------------------------------------------------------------+
|i7 : set P === set exponents chiCO1                                          |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * bases(FlagMatroid) -- compute the bases of a
    flag matroid
  * euler(KClass) -- computes the equivariant Euler
    characteristic of an equivariant K-class

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

  * latticePoints(FlagMatroid), --
    lattice points of a base polytope of a flag matroid
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1957:0.

lieType -- outputs the Lie type of a generalized flag variety
*************************************************************

  * Usage:
        lieType X
  * Inputs:
      * X, a GKM variety,
  * Outputs:
      * a string (Macaulay2Doc), of the form "A", "B", "C" or "D"

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

If $X$ is a generalized flag variety or a generalized Schubert variety
constructed using the method generalizedFlagVariety,
or generalizedSchubertVariety,
this method outputs the Lie type of $X$.

+-----------------------------------------------------------------------------+
|i1 : X = generalizedFlagVariety("A",3,{2}); -- The Grassmannian Gr(2,4)      |
+-----------------------------------------------------------------------------+
|i2 : Y = generalizedFlagVariety("B",2,{1}); -- The Orthogonal Grassmannian   |
|-----------------------------------------------------------------------------|
|SOGr(1,5)                                                                    |
+-----------------------------------------------------------------------------+
|i3 : lieType(X)                                                              |
|                                                                             |
|o3 = A                                                                       |
+-----------------------------------------------------------------------------+
|i4 : lieType(Y)                                                              |
|                                                                             |
|o4 = B                                                                       |
+-----------------------------------------------------------------------------+

If the GKM variety is not a generalized flag variety or a generalized Schubert
variety, prints error.

Caveat
======

The method projectiveSpace, dose not cache the Lie type.

See also
========

  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety

Ways to use lieType:
====================

  * "lieType(GKMVariety)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1738:0.

makeCharacterRing -- constructs the character ring of a torus
*************************************************************

  * Usage:
        makeCharacterRing n
  * Inputs:
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * a ring (Macaulay2Doc), with n variables and inverses are
        allowed

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

Given an integer n, this method outputs the character ring of T = $(\mathbb
C^*)^n$.

+-----------------------------------------------------------------------------+
|i1 : R = makeCharacterRing 4                                                 |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : describe R                                                              |
|                                                                             |
|o2 = ZZ[T ..T , Degrees => {4:1}, MonomialOrder => {MonomialSize => 32},     |
|         0   3                                     {Weights => {4:1}  }      |
|                                                   {GroupLex => 4     }      |
|                                                   {Position => Up    }      |
|-----------------------------------------------------------------------------|
|Inverses => true]                                                            |
+-----------------------------------------------------------------------------+

Ways to use makeCharacterRing:
==============================

  * "makeCharacterRing(ZZ)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1161:0.

makeGKMVariety -- constructs a GKM variety
******************************************

  * Usage:
        X = makeGKMVariety(L,R)
        X = makeGKMVariety(L,M,R)
        X = makeGKMVariety(G)
        X = makeGKMVariety(G,R)
        X = makeGKMVariety(R)
        X = makeGKMVariety(Y,R)
        X = makeGKMVariety(C)
  * Inputs:
      * L, a list (Macaulay2Doc), of torus-fixed points of $X$
      * M, a list (Macaulay2Doc), of lists; the i-th list consists
        of the (negatives of) characters of the action of the torus on a
        torus-invariant affine chart around the torus-fixed point corresponding
        to L_i
      * G, a moment graph, representing the one dimensional
        torus-orbits of $X$
      * R, a ring (Macaulay2Doc), representing the character ring
        of the torus acting on $X$
      * Y, a normal toric variety (NormalToricVarieties),
      * C, an equivariant K-class,
  * Outputs:
      * X, a GKM variety,

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

The minimum data needed to create a GKMVariety, are the set
of torus-fixed points and the character ring. Here is an example with
projective space

+------------------------------------------------------------+
|i1 : L = {0,1,2,3};                                         |
+------------------------------------------------------------+
|i2 : R = makeCharacterRing 4                                |
|                                                            |
|o2 = R                                                      |
|                                                            |
|o2 : PolynomialRing                                         |
+------------------------------------------------------------+
|i3 : X = makeGKMVariety(L,R)                                |
|                                                            |
|o3 = a "GKM variety" with an action of a 4-dimensional torus|
|                                                            |
|o3 : GKMVariety                                             |
+------------------------------------------------------------+

If necessary, we can add the (negatives of) characters of the action of the
torus on each torus-invariant chart of $X$. Note that the i-th entry of the
list below corresponds to the i-th entry of L.

+-----------------------------------------------------------------------------+
|i4 : M = {{{-1, 1, 0, 0}, {-1, 0, 1, 0}, {-1, 0, 0, 1}},                     |
|             {{1, -1, 0, 0}, {0, -1, 1, 0}, {0, -1, 0, 1}},                  |
|             {{1, 0, -1, 0}, {0, 1, -1, 0}, {0, 0, -1, 1}},                  |
|             {{1, 0, 0, -1}, {0, 1, 0, -1}, {0, 0, 1, -1}}};                 |
+-----------------------------------------------------------------------------+
|i5 : Y = makeGKMVariety(L,M,R);                                              |
+-----------------------------------------------------------------------------+
|i6 : peek Y                                                                  |
|                                                                             |
|o6 = GKMVariety{cache => CacheTable{}                                        |
|                characterRing => R                                           |
|                charts => HashTable{0 => {{-1, 1, 0, 0}, {-1, 0, 1, 0},      |
|                                    1 => {{1, -1, 0, 0}, {0, -1, 1, 0},      |
|                                    2 => {{1, 0, -1, 0}, {0, 1, -1, 0},      |
|                                    3 => {{1, 0, 0, -1}, {0, 1, 0, -1},      |
|                points => {0, 1, 2, 3}                                       |
|-----------------------------------------------------------------------------|
|               }                                                             |
|                                                                             |
|{-1, 0, 0, 1}}}                                                              |
|{0, -1, 0, 1}}                                                               |
|{0, 0, -1, 1}}                                                               |
|{0, 0, 1, -1}}                                                               |
+-----------------------------------------------------------------------------+

To produce one of the generalized flag varieties we use the method
generalizedFlagVariety, Here is an example of the
Lagrangian Grassmannian $SpGr(2,4)$ consisting of 2-dimensional subspaces in
$\mathbb C^4$ that are isotropic with respect to the standard alternating form.

+-----------------------------------------------------------------------------+
|i7 : SpGr24 = generalizedFlagVariety("C",2,{2})                              |
|                                                                             |
|o7 = a "GKM variety" with an action of a 2-dimensional torus                 |
|                                                                             |
|o7 : GKMVariety                                                              |
+-----------------------------------------------------------------------------+
|i8 : peek SpGr24                                                             |
|                                                                             |
|o8 = GKMVariety{cache => CacheTable{...2...}                                 |
|                characterRing => ZZ[T ..T ]                                  |
|                                     0   1                                   |
|                charts => HashTable{{set {0, 1*}} => {{0, 2}, {-1, 1}, {-2,  |
|                                    {set {0, 1}} => {{0, -2}, {-2, 0}, {-1,  |
|                                    {set {1*, 0*}} => {{1, 1}, {2, 0}, {0, 2 |
|                                    {set {1, 0*}} => {{2, 0}, {1, -1}, {0, - |
|                momentGraph => a "moment graph" on 4 vertices with 6 edges   |
|                points => {{set {0, 1}}, {set {0, 1*}}, {set {1, 0*}}, {set  |
|-----------------------------------------------------------------------------|
|          }                                                                  |
|                                                                             |
|                                                                             |
|0}} }                                                                        |
|-1}}                                                                         |
|}}                                                                           |
|2}}                                                                          |
|                                                                             |
|{1*, 0*}}}                                                                   |
+-----------------------------------------------------------------------------+

Here is the complete flag variety of $Sp_4$.

+-----------------------------------------------------------------------------+
|i9 : SpFl4 = generalizedFlagVariety("C",2,{1,2})                             |
|                                                                             |
|o9 = a "GKM variety" with an action of a 2-dimensional torus                 |
|                                                                             |
|o9 : GKMVariety                                                              |
+-----------------------------------------------------------------------------+
|i10 : peek SpFl4                                                             |
|                                                                             |
|o10 = GKMVariety{cache => CacheTable{...2...}                                |
|                 characterRing => ZZ[T ..T ]                                 |
|                                      0   1                                  |
|                 charts => HashTable{{set {0*}, set {1*, 0*}} => {{1, 1}, {1,|
|                                     {set {0*}, set {1, 0*}} => {{1, -1}, {1,|
|                                     {set {0}, set {0, 1*}} => {{-1, -1}, {-1|
|                                     {set {0}, set {0, 1}} => {{-1, 1}, {-1, |
|                                     {set {1*}, set {0, 1*}} => {{0, 2}, {-2,|
|                                     {set {1*}, set {1*, 0*}} => {{2, 0}, {0,|
|                                     {set {1}, set {0, 1}} => {{0, -2}, {-2, |
|                                     {set {1}, set {1, 0*}} => {{2, 0}, {0, -|
|                 momentGraph => a "moment graph" on 8 vertices with 16 edges |
|                 points => {{set {1}, set {0, 1}}, {set {1*}, set {0, 1*}}, {|
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
| -1}, {2, 0}, {0, 2}} }                                                      |
| 1}, {2, 0}, {0, -2}}                                                        |
|, 1}, {0, 2}, {-2, 0}}                                                       |
|-1}, {0, -2}, {-2, 0}}                                                       |
| 0}, {1, 1}, {-1, 1}}                                                        |
| 2}, {1, 1}, {-1, 1}}                                                        |
|0}, {1, -1}, {-1, -1}}                                                       |
|2}, {1, -1}, {-1, -1}}                                                       |
|                                                                             |
|set {1}, set {1, 0*}}, {set {1*}, set {1*, 0*}}, {set {0}, set {0, 1}}, {set |
|-----------------------------------------------------------------------------|
|                                                                     }       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|{0}, set {0, 1*}}, {set {0*}, set {1, 0*}}, {set {0*}, set {1*, 0*}}}        |
+-----------------------------------------------------------------------------+

The following example produces the Orthogonal Grassmannian $SOGr(2,5)$ from its
moment graph.

+-----------------------------------------------------------------------------+
|i11 : V = {{set {0, 1}}, {set {0, "1*"}}, {set {"0*", 1}}, {set {"0*",       |
|-----------------------------------------------------------------------------|
|"1*"}}};                                                                     |
+-----------------------------------------------------------------------------+
|i12 : edgs = {{{set {"0*", 1}}, {set {"0*", "1*"}}},                         |
|              {{set {0, "1*"}}, {set {"0*", "1*"}}},                         |
|              {{set {0, "1*"}}, {set {"0*", 1}}},                            |
|              {{set {0, "1*"}}, {set {0, 1}}},                               |
|              {{set {0, 1}}, {set {"0*", "1*"}}},                            |
|              {{set {0, 1}}, {set {"0*", 1}}}};                              |
+-----------------------------------------------------------------------------+
|i13 : wghts = {{0,-1},{-1,0},{-1,1},{0,1},{-1,-1},{-1,0}}                    |
|                                                                             |
|o13 = {{0, -1}, {-1, 0}, {-1, 1}, {0, 1}, {-1, -1}, {-1, 0}}                 |
|                                                                             |
|o13 : List                                                                   |
+-----------------------------------------------------------------------------+
|i14 : E = hashTable(apply(edgs, v -> (v,wghts)));                            |
+-----------------------------------------------------------------------------+
|i15 : t = symbol t; H = QQ[t_0, t_1]                                         |
|                                                                             |
|o16 = H                                                                      |
|                                                                             |
|o16 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i17 : G = momentGraph(V,E,H);                                                |
+-----------------------------------------------------------------------------+
|i18 : Z = makeGKMVariety(G);                                                 |
+-----------------------------------------------------------------------------+
|i19 : peek Z                                                                 |
|                                                                             |
|o19 = GKMVariety{cache => CacheTable{}                                       |
|                 characterRing => ZZ[T ..T ]                                 |
|                                      0   1                                  |
|                 momentGraph => a "moment graph" on 4 vertices with 6 edges  |
|                 points => {{set {0, 1}}, {set {0, 1*}}, {set {1, 0*}}, {set |
|-----------------------------------------------------------------------------|
|          }                                                                  |
|                                                                             |
|                                                                             |
|                                                                             |
|{1*, 0*}}}                                                                   |
+-----------------------------------------------------------------------------+

Caveat
======

This function does not check if X is a valid GKM variety.

See also
========

  * GKMVariety ** GKMVariety -- product of
    GKM varieties
  * projectiveSpace -- constructs projective space as a
    GKM variety
  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety
  * map(GKMVariety,GKMVariety,List)
    -- creates a EquivariantMap

Ways to use makeGKMVariety:
===========================

  * "makeGKMVariety(KClass)"
  * "makeGKMVariety(List,List,Ring)"
  * "makeGKMVariety(List,Ring)"
  * "makeGKMVariety(MomentGraph)"
  * "makeGKMVariety(MomentGraph,Ring)"
  * "makeGKMVariety(NormalToricVariety)"
  * "makeGKMVariety(NormalToricVariety,Ring)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:473:0.

makeKClass -- constructs an equivariant K-class
***********************************************

  * Usage:
        C = makeKClass(X,L)
  * Inputs:
      * X, a GKM variety,
      * L, a list (Macaulay2Doc), of Laurent polynomials
        corresponding to each torus-fixed point
      * D, a toric divisor (NormalToricVarieties),
  * Outputs:
      * C, an equivariant K-class,

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

This method creates a KClass, given a GKMVariety,
X and a list L of Laurent polynomials in its character ring.  The
order of Laurent polynomials in the list must correspond to the order of the
list of torus-fixed points X.points.

The following example is the class of $O(1)$ on the projective space $\mathbb
P^3$.

+-----------------------------------------------------+
|i1 : PP3 = projectiveSpace 3;                        |
+-----------------------------------------------------+
|i2 : R = PP3.characterRing;                          |
+-----------------------------------------------------+
|i3 : L = gens R                                      |
|                                                     |
|o3 = {T , T , T , T }                                |
|       0   1   2   3                                 |
|                                                     |
|o3 : List                                            |
+-----------------------------------------------------+
|i4 : C = makeKClass(PP3,L) --the class of O(1) on PP3|
|                                                     |
|o4 = an "equivariant K-class" on a GKM variety       |
|                                                     |
|o4 : KClass                                          |
+-----------------------------------------------------+
|i5 : C === ampleKClass PP3                           |
|                                                     |
|o5 = true                                            |
+-----------------------------------------------------+
|i6 : isWellDefined C                                 |
|                                                     |
|o6 = true                                            |
+-----------------------------------------------------+

Caveat
======

This function does not check if X defines a GKM variety - see
isWellDefined.

See also
========

  * isWellDefined(KClass) -- whether the
    input is a well-defined equivariant K-class
  * KClass * KClass -- computes the product of two
    equivariant K-classes
  * KClass + KClass -- computes the sum of two
    equivariant K-classes
  * pullback(EquivariantMap) -- computes
    the pullback map of equivariant K-classes of an equivariant map
  * pushforward -- computes the pushforward map of
    equivariant K-classes of an equivariant map

Ways to use makeKClass:
=======================

  * "makeKClass(GKMVariety,List)"
  * makeKClass(GKMVariety,FlagMatroid)
    -- the equivariant K-class of a
    flag matroid
  * makeKClass(GKMVariety,ToricDivisor)
    -- create the KClass from a
    ToricDivisor

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:600:0.

makeKClass(GKMVariety,FlagMatroid) -- the equivariant K-class of a flag matroid
*******************************************************************************

  * Function: makeKClass,
  * Usage:
        C = makeKClass(X,FM)
  * Inputs:
      * X, a GKM variety, of lieType, "A"
        created by generalizedFlagVariety,
      * FM, a flag matroid,
  * Outputs:
      * C, an equivariant K-class,

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

A flag matroid of whose constituent matroids have ranks $r_1, \ldots, r_k$ and
ground set size $n$ defines a KClass, on the (partial) flag
variety $Fl(r_1,\ldots, r_k;n)$.  When the flag matroid arises from a matrix
representing a point on the (partial) flag variety, this equivariant K-class
coincides with that of the structure sheaf of its torus orbit closure. See
[CDMS18] or [DES20].

+--------------------------------------------------------------+
|i1 : X = generalizedFlagVariety("A",2,{1,2})                  |
|                                                              |
|o1 = a "GKM variety" with an action of a 3-dimensional torus  |
|                                                              |
|o1 : GKMVariety                                               |
+--------------------------------------------------------------+
|i2 : A = matrix{{1,2,3},{0,2,3}}                              |
|                                                              |
|o2 = | 1 2 3 |                                                |
|     | 0 2 3 |                                                |
|                                                              |
|              2       3                                       |
|o2 : Matrix ZZ  <-- ZZ                                        |
+--------------------------------------------------------------+
|i3 : FM = flagMatroid(A,{1,2})                                |
|                                                              |
|o3 = a "flag matroid" with rank sequence {1, 2} on 3 elements |
|                                                              |
|o3 : FlagMatroid                                              |
+--------------------------------------------------------------+
|i4 : C1 = makeKClass(X,FM)                                    |
|                                                              |
|o4 = an "equivariant K-class" on a GKM variety                |
|                                                              |
|o4 : KClass                                                   |
+--------------------------------------------------------------+
|i5 : C2 = orbitClosure(X,A)                                   |
|                                                              |
|o5 = an "equivariant K-class" on a GKM variety                |
|                                                              |
|o5 : KClass                                                   |
+--------------------------------------------------------------+
|i6 : C1 === C2                                                |
|                                                              |
|o6 = true                                                     |
+--------------------------------------------------------------+

See also
========

  * latticePoints(FlagMatroid), --
    lattice points of a base polytope of a flag matroid
  * orbitClosure -- computes the equivariant K-class of a
    torus orbit closure of a point in a generalized flag variety
  * flagGeomTuttePolynomial -- computes the
    flag-geometric Tutte polynomial of flag matroids

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

  * makeKClass(GKMVariety,FlagMatroid)
    -- the equivariant K-class of a
    flag matroid
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1992:0.

makeKClass(GKMVariety,ToricDivisor) -- create the KClass from a ToricDivisor
****************************************************************************

  * Function: makeKClass,
  * Usage:
        C = makeKClass(X,D)
  * Inputs:
      * X, a GKM variety, created from a
        NormalToricVariety (NormalToricVarieties),
      * D, a toric divisor (NormalToricVarieties),
  * Outputs:
      * C, an equivariant K-class,

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

If a GKM variety $X$ also admits a structure of a NormalToricVariety (NormalToricVarieties),
then the following example shows how
to obtain the KClass, of any ToricDivisor (NormalToricVarieties),
on $X$.

+-----------------------------------------------------------------------------+
|i1 : X = toricProjectiveSpace 3;                                             |
+-----------------------------------------------------------------------------+
|i2 : D = toricDivisor({1,0,0,0},X) -- the class of O(1) on P^3               |
|                                                                             |
|o2 = X                                                                       |
|      0                                                                      |
|                                                                             |
|o2 : ToricDivisor on X                                                       |
+-----------------------------------------------------------------------------+
|i3 : Y = makeGKMVariety X; -- The torus is C^3 not C^4                       |
+-----------------------------------------------------------------------------+
|i4 : C = makeKClass(Y,D)                                                     |
|                                                                             |
|o4 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o4 : KClass                                                                  |
+-----------------------------------------------------------------------------+
|i5 : assert(isWellDefined C)                                                 |
+-----------------------------------------------------------------------------+
|i6 : peek C                                                                  |
|                                                                             |
|o6 = KClass{variety => a "GKM variety" with an action of a 3-dimensional     |
|                                                    -1                       |
|            KPolynomials => HashTable{{0, 1, 2} => T  }                      |
|                                                    2                        |
|                                                    -1                       |
|                                      {0, 1, 3} => T                         |
|                                                    1                        |
|                                                    -1                       |
|                                      {0, 2, 3} => T                         |
|                                                    0                        |
|                                      {1, 2, 3} => 1                         |
|-----------------------------------------------------------------------------|
|torus}                                                                       |
+-----------------------------------------------------------------------------+

Caveat
======

Toric vector bundles are yet to be imported.

See also
========

  * makeKClass -- constructs an equivariant K-class
  * KClass -- the class of all equivariant K-classes
  * normalToricVariety(GKMVariety),
    -- converts a GKM variety back into a toric variety
  * makeGKMVariety(NormalToricVariety) -- constructs a
    GKM variety

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

  * makeKClass(GKMVariety,ToricDivisor)
    -- create the KClass from a
    ToricDivisor
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:634:0.

map(GKMVariety,GKMVariety,List) -- creates a EquivariantMap
***********************************************************

  * Function: map (Macaulay2Doc),
  * Usage:
        f = map(X,Y,L)
  * Inputs:
      * X, a GKM variety, the source GKM variety of the map
      * Y, a GKM variety, the target GKM variety of the map
      * L, a list (Macaulay2Doc), of pairs (x,y) where x and y are
        members of X.points and Y.points, respectively
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), =>
        ..., default value null,
      * DegreeLift (Macaulay2Doc), => ...,
        default value null,
      * DegreeMap (Macaulay2Doc), => ...,
        default value null,
  * Outputs:
      * f, an equivariant map,

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

This method creates a EquivariantMap, given a GKM variety
$X$, a GKM variety $Y$, and a list L of pairs (x,y) where x and y are members
of X.points and Y.points (respectively), indicating that the torus-fixed point
x of X is sent to the torus-fixed point y of Y under the map.

The following describes the projection from the third Hizerbruch surface to the
projective line.

+-----------------------------------------------------------------------------+
|i1 : R = makeCharacterRing 2;                                                |
+-----------------------------------------------------------------------------+
|i2 : F3 = makeGKMVariety(hirzebruchSurface 3,R);                             |
+-----------------------------------------------------------------------------+
|i3 : PP1 = projectiveSpace(1,R);                                             |
+-----------------------------------------------------------------------------+
|i4 : L = {({0,1},set {0}), ({0,3}, set{0}), ({1,2}, set{1}), ({2,3},         |
|-----------------------------------------------------------------------------|
|set{1})};                                                                    |
+-----------------------------------------------------------------------------+
|i5 : f = map(F3,PP1,L)                                                       |
|                                                                             |
|o5 = an "equivariant map" of GKM varieties                                   |
|                                                                             |
|o5 : EquivariantMap                                                          |
+-----------------------------------------------------------------------------+

Caveat
======

This does not check that the morphism is well defined. In particular, it does
not verify that the map on torus-fixed points is induced by a morphism of GKM
varieties.

See also
========

  * diagonalMap -- constructs the diagonal morphism
  * flagMap -- creates equivariant maps between generalized
    flag varieties
  * pullback(EquivariantMap) -- computes
    the pullback map of equivariant K-classes of an equivariant map
  * pushforward -- computes the pushforward map of
    equivariant K-classes of an equivariant map
  * euler(KClass) -- computes the equivariant Euler
    characteristic of an equivariant K-class

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

  * map(GKMVariety,GKMVariety,List)
    -- creates a EquivariantMap
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:975:0.

MomentGraph -- the class of all moment graphs
*********************************************

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

The moment graph of a GKM variety $X$ with an action of a torus $T$ has
vertices corresponding to the $T$-fixed points $X^T$ and edges corresponding to
the one-dimensional $T$-orbits.  If $\{v_1,v_2\}$ is an edge and the
corresponding one-dimensional $T$-orbit closure is $\mathbb P^1$ where $v_1 =
0$ and $v_2 = \infty$, then denote $m(v_1,v_2)$ to be the negative of the
character of the action of $T$ on $\mathbb A^1 \subset \mathbb P^1$ (where $v_1
\in \mathbb A^1$).

A MomentGraph, is a HashTable (Macaulay2Doc),
with three keys:

  * vertices, whose values represent the vertices of the moment graph
  * edges, whose value is a HashTable (Macaulay2Doc),; its keys
    are pairs {a,b} of elements in vertices representing the edges of the
    moment graph, and the values are the characters $m(a,b)$
  * HTpt, whose value is a ring representing the equivariant cohomology ring of
    a point

Caveat
======

Functionalities concerning intersection cohomology of sheaves on moment graphs,
which had been implemented before (see MG: moment graph computations (see
https://people.math.umass.edu/~braden/MG/index.html )), have not been imported
into this package yet.

See also
========

  * momentGraph -- creates a moment graph
  * makeGKMVariety -- constructs a GKM variety
  * GKMVariety -- the class of all GKM varieties

Functions and methods returning a moment graph:
===============================================

  * "momentGraph(List,HashTable,Ring)" -- see momentGraph,
    -- creates a moment graph
  * MomentGraph ** MomentGraph -- the
    product of two moment graphs
  * momentGraph(GKMVariety) -- view the
    moment graph of a GKM variety

Methods that use a moment graph:
================================

  * "cellOrder(MomentGraph)" -- see cellOrder, -- the poset of
    a stratification of a GKM variety
  * cellOrder(MomentGraph,Poset), --
    define a cell order on a moment graph
  * "makeGKMVariety(MomentGraph)" -- see makeGKMVariety,
    -- constructs a GKM variety
  * "makeGKMVariety(MomentGraph,Ring)" -- see makeGKMVariety,
    -- constructs a GKM variety
  * momentGraph(GKMVariety,MomentGraph)
    -- define a moment graph for a
    GKM variety
  * underlyingGraph(MomentGraph), --
    the underlying (undirected) graph of a moment graph

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1198:0.

momentGraph -- creates a moment graph
*************************************

  * Usage:
        G = momentGraph(L,E,H)
  * Inputs:
      * L, a list (Macaulay2Doc), of vertices
      * E, a hash table (Macaulay2Doc), whose keys are lists
        of two vertices representing edges and values are characters of
        corresponding 1-dimensional orbits
      * H, a ring (Macaulay2Doc), a polynomial ring representing
        the equivariant cohomology ring of a point
  * Outputs:
      * G, a moment graph,

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

This method creates a MomentGraph, from the data of
vertices, edges and their associated characters, and a ring representing the
equivariant cohomology ring of a point (with trivial torus-action). The
following example is the moment graph of the projective 2-space $\mathbb P^2$.

+-----------------------------------------------------------------------------+
|i1 : V = {set{0}, set{1}, set{2}};                                           |
+-----------------------------------------------------------------------------+
|i2 : E = hashTable {({set{0},set{1}},{-1,1,0}), ({set{0},set{2}},{-1,0,1}),  |
|                                                                             |
|o2 = HashTable{{set {0}, set {1}} => {-1, 1, 0}}                             |
|               {set {0}, set {2}} => {-1, 0, 1}                              |
|               {set {1}, set {2}} => {0, -1, 1}                              |
|                                                                             |
|o2 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|({set{1},set{2}},{0,-1,1})}                                                  |
+-----------------------------------------------------------------------------+
|i3 : t = symbol t; H = QQ[t_0..t_2]                                          |
|                                                                             |
|o4 = H                                                                       |
|                                                                             |
|o4 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i5 : G = momentGraph(V,E,H)                                                  |
|                                                                             |
|o5 = a "moment graph" on 3 vertices with 3 edges                             |
|                                                                             |
|o5 : MomentGraph                                                             |
+-----------------------------------------------------------------------------+
|i6 : peek G                                                                  |
|                                                                             |
|o6 = MomentGraph{cache => CacheTable{}                               }       |
|                 edges => HashTable{{set {0}, set {1}} => {-1, 1, 0}}        |
|                                    {set {0}, set {2}} => {-1, 0, 1}         |
|                                    {set {1}, set {2}} => {0, -1, 1}         |
|                 HTpt => H                                                   |
|                 vertices => {set {0}, set {1}, set {2}}                     |
+-----------------------------------------------------------------------------+
|i7 : underlyingGraph G                                                       |
|                                                                             |
|o7 = Graph{set {0} => {set {1}, set {2}}}                                    |
|           set {1} => {set {0}, set {2}}                                     |
|           set {2} => {set {0}, set {1}}                                     |
|                                                                             |
|o7 : Graph                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * MomentGraph -- the class of all moment graphs
  * underlyingGraph(MomentGraph), --
    the underlying (undirected) graph of a moment graph
  * momentGraph(GKMVariety) -- view the
    moment graph of a GKM variety

Ways to use momentGraph:
========================

  * "momentGraph(List,HashTable,Ring)"
  * momentGraph(GKMVariety) -- view the
    moment graph of a GKM variety
  * momentGraph(GKMVariety,MomentGraph)
    -- define a moment graph for a
    GKM variety

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1238:0.

MomentGraph ** MomentGraph -- the product of two moment graphs
**************************************************************

  * Operator: ** (Macaulay2Doc),
  * Usage:
        G ** H
  * Inputs:
      * G, a moment graph,
      * H, a moment graph,
  * Outputs:
      * a moment graph,

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

Let $G$ and $H$ be moment graphs associated to the GKM varieties $X$ and $Y$,
respectively. This function produces the moment graph of $X ** Y$; the latter
is a GKM variety via the diagonal action of the torus.

+-----------------------------------------------------------------------------+
|i1 : G = momentGraph projectiveSpace 1;                                      |
+-----------------------------------------------------------------------------+
|i2 : H = momentGraph generalizedFlagVariety("C",2,{2}); -- The isotropic     |
|-----------------------------------------------------------------------------|
|Grassmannian SpGr(2,4)                                                       |
+-----------------------------------------------------------------------------+
|i3 : J = G ** H;                                                             |
+-----------------------------------------------------------------------------+
|i4 : peek J                                                                  |
|                                                                             |
|o4 = MomentGraph{cache => CacheTable{}                                       |
|                 edges => HashTable{{(set {0}, {set {0, 1*}}), (set {0},     |
|                                    {(set {0}, {set {0, 1*}}), (set {0},     |
|                                    {(set {0}, {set {0, 1*}}), (set {0},     |
|                                    {(set {0}, {set {0, 1*}}), (set {1},     |
|                                    {(set {0}, {set {0, 1*}}), (set {1},     |
|                                    {(set {0}, {set {0, 1}}), (set {0}, {    |
|                                    {(set {0}, {set {0, 1}}), (set {0}, {    |
|                                    {(set {0}, {set {0, 1}}), (set {1}, {    |
|                                    {(set {0}, {set {1*, 0*}}), (set {1},    |
|                                    {(set {0}, {set {1, 0*}}), (set {0},     |
|                                    {(set {0}, {set {1, 0*}}), (set {1},     |
|                                    {(set {1}, {set {0, 1*}}), (set {1},     |
|                                    {(set {1}, {set {0, 1*}}), (set {1},     |
|                                    {(set {1}, {set {0, 1*}}), (set {1},     |
|                                    {(set {1}, {set {0, 1}}), (set {1}, {    |
|                                    {(set {1}, {set {0, 1}}), (set {1}, {    |
|                                    {(set {1}, {set {1, 0*}}), (set {1},     |
|                 HTpt => QQ[t ..t ]                                          |
|                             0   1                                           |
|                 vertices => {(set {0}, {set {1, 0*}}), (set {0}, {set {1    |
|-----------------------------------------------------------------------------|
|                                                                             |
|{set {0, 1}})} => {0, 2}    }                                                |
|{set {1*, 0*}})} => {-2, 0}                                                  |
|{set {1, 0*}})} => {-1, 1}                                                   |
|{set {0, 1*}})} => {-1, 1}                                                   |
|{set {1, 0*}})} => {-1, 1}                                                   |
|set {1*, 0*}})} => {-1, -1}                                                  |
|set {1, 0*}})} => {-2, 0}                                                    |
|set {0, 1}})} => {-1, 1}                                                     |
| {set {1*, 0*}})} => {-1, 1}                                                 |
|{set {1*, 0*}})} => {0, -2}                                                  |
|{set {1, 0*}})} => {-1, 1}                                                   |
|{set {0, 1}})} => {0, 2}                                                     |
|{set {1*, 0*}})} => {-2, 0}                                                  |
|{set {1, 0*}})} => {-1, 1}                                                   |
|set {1*, 0*}})} => {-1, -1}                                                  |
|set {1, 0*}})} => {-2, 0}                                                    |
|{set {1*, 0*}})} => {0, -2}                                                  |
|                                                                             |
|                                                                             |
|*, 0*}}), (set {1}, {set {0, 1*}}), (set {1}, {set {0, 1}}), (set {0}, {set  |
|-----------------------------------------------------------------------------|
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|{0, 1*}}), (set {0}, {set {0, 1}}), (set {1}, {set {1*, 0*}}), (set {1}, {set|
|-----------------------------------------------------------------------------|
|          }                                                                  |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|{1, 0*}})}                                                                   |
+-----------------------------------------------------------------------------+

See also
========

  * MomentGraph -- the class of all moment graphs
  * GKMVariety ** GKMVariety -- product of
    GKM varieties

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

  * MomentGraph ** MomentGraph -- the
    product of two moment graphs
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1342:0.

momentGraph(GKMVariety) -- view the moment graph of a GKM variety
*****************************************************************

  * Function: momentGraph,
  * Usage:
        G = momentGraph(X)
  * Inputs:
      * X, a GKM variety,
  * Outputs:
      * G, a moment graph, if a moment graph is defined for
        the GKMVariety, X

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

If a MomentGraph, has been defined for a GKMVariety,
X, this method method returns the moment graph, and returns error
otherwise.

+--------------------------------------------------+
|i1 : momentGraph generalizedFlagVariety("A",3,{2})|
|                                                  |
|o1 = a "moment graph" on 6 vertices with 12 edges |
|                                                  |
|o1 : MomentGraph                                  |
+--------------------------------------------------+

See also
========

  * momentGraph(GKMVariety,MomentGraph)
    -- define a moment graph for a
    GKM variety

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

  * momentGraph(GKMVariety) -- view the
    moment graph of a GKM variety
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1260:0.

momentGraph(GKMVariety,MomentGraph) -- define a moment graph for a GKM variety
******************************************************************************

  * Function: momentGraph,
  * Usage:
        momentGraph(X,G)
  * Inputs:
      * X, a GKM variety,
      * G, a moment graph,
  * Outputs:
      *

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

This methods sets a given MomentGraph, G to be the moment
graph of a GKMVariety, X. If a moment graph was already
defined for X, then overwrites it and prints that it has done so.

+----------------------------------------------------------------------------+
|i1 : R = makeCharacterRing 4                                                |
|                                                                            |
|o1 = R                                                                      |
|                                                                            |
|o1 : PolynomialRing                                                         |
+----------------------------------------------------------------------------+
|i2 : X = makeGKMVariety({set{0},set{1},set{2},set{3}},R)                    |
|                                                                            |
|o2 = a "GKM variety" with an action of a 4-dimensional torus                |
|                                                                            |
|o2 : GKMVariety                                                             |
+----------------------------------------------------------------------------+
|i3 : X.?momentGraph                                                         |
|                                                                            |
|o3 = false                                                                  |
+----------------------------------------------------------------------------+
|i4 : PP3 = projectiveSpace 3                                                |
|                                                                            |
|o4 = a "GKM variety" with an action of a 4-dimensional torus                |
|                                                                            |
|o4 : GKMVariety                                                             |
+----------------------------------------------------------------------------+
|i5 : G = momentGraph PP3                                                    |
|                                                                            |
|o5 = a "moment graph" on 4 vertices with 6 edges                            |
|                                                                            |
|o5 : MomentGraph                                                            |
+----------------------------------------------------------------------------+
|i6 : momentGraph(X,G)                                                       |
+----------------------------------------------------------------------------+
|i7 : X.?momentGraph                                                         |
|                                                                            |
|o7 = true                                                                   |
+----------------------------------------------------------------------------+
|i8 : momentGraph X                                                          |
|                                                                            |
|o8 = a "moment graph" on 4 vertices with 6 edges                            |
|                                                                            |
|o8 : MomentGraph                                                            |
+----------------------------------------------------------------------------+
|i9 : momentGraph(X,G)                                                       |
| warning: overwriting a previously defined moment graph on this GKM variety |
+----------------------------------------------------------------------------+

See also
========

  * momentGraph(GKMVariety) -- view the
    moment graph of a GKM variety
  * momentGraph(List,HashTable,Ring) -- creates a moment
    graph

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

  * momentGraph(GKMVariety,MomentGraph)
    -- define a moment graph for a
    GKM variety
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1292:0.

normalToricVariety(GKMVariety) -- converts a GKM variety back into a toric variety
**********************************************************************************

  * Function: normalToricVariety (NormalToricVarieties),
  * Usage:
        Y = normalToricVariety X
  * Inputs:
      * X, a GKM variety,
  * Optional inputs (Macaulay2Doc),:
      * CoefficientRing (NormalToricVarieties),
        => ...,
        default value QQ,
      * MinimalGenerators (NormalToricVarieties),
        => ..., default
        value false,
      * Variable (NormalToricVarieties),
        => ..., default value x,
      * WeilToClass (NormalToricVarieties),
        => ..., default value null,
  * Outputs:
      * Y, a normal toric variety (NormalToricVarieties),

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

If $X$ is a GKM variety that was originally constructed using
normalToricVariety (NormalToricVarieties),
then this method reverts $X$ to a NormalToricVariety (NormalToricVarieties).

+------------------------------------------------------------+
|i1 : X = toricProjectiveSpace 2;                            |
+------------------------------------------------------------+
|i2 : Y = makeGKMVariety X                                   |
|                                                            |
|o2 = a "GKM variety" with an action of a 2-dimensional torus|
|                                                            |
|o2 : GKMVariety                                             |
+------------------------------------------------------------+
|i3 : assert(normalToricVariety Y === X)                     |
+------------------------------------------------------------+

See also
========

  * makeGKMVariety -- constructs a GKM variety
  * normalToricVariety (NormalToricVarieties)
    -- make a normal
    toric variety

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

  * normalToricVariety(GKMVariety),
    -- converts a GKM variety back into a toric variety
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:330:0.

orbitClosure -- computes the equivariant K-class of a torus orbit closure of a point in a generalized flag variety
******************************************************************************************************************

  * Usage:
        C = orbitClosure(X,M)
  * Inputs:
      * X, a GKM variety,
      * M, a matrix (Macaulay2Doc), representing a point in a
        generalized flag variety
  * Optional inputs (Macaulay2Doc),:
      * RREFMethod => ..., default value false
  * Outputs:
      * C, an equivariant K-class,

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

Let $X$ be a generalized flag variety parameterizing flags of linear subspaces
of dimensions $\{r_1, ... , r_k\}$ in $\mathbb C^n$ with $1 <= r_1 < \cdots <
r_k$. Then a point $p$ of $X$ can be identified with a matrix $M$ of size  $r_k
\times n$ such that the first $r_i$ rows of $M$ spans a subspace of dimension
$r_i$. Given $X$ and such a matrix $M$ representing the point $p$, this method
computes the equivariant K-class of the closure of the torus orbit of $p$.

The following example computes the torus orbit closure of a point in the
standard Grassmannian $Gr(2,4)$ and in the Lagrangian Grassmannian $SpGr(2,4)$.

+-----------------------------------------------------------------------------+
|i1 : M = matrix(QQ,{{1,0,1,2},{0,1,2,1}})                                    |
|                                                                             |
|o1 = | 1 0 1 2 |                                                             |
|     | 0 1 2 1 |                                                             |
|                                                                             |
|              2       4                                                      |
|o1 : Matrix QQ  <-- QQ                                                       |
+-----------------------------------------------------------------------------+
|i2 : X1 = generalizedFlagVariety("A",3,{2})                                  |
|                                                                             |
|o2 = a "GKM variety" with an action of a 4-dimensional torus                 |
|                                                                             |
|o2 : GKMVariety                                                              |
+-----------------------------------------------------------------------------+
|i3 : X2 = generalizedFlagVariety("C",2,{2})                                  |
|                                                                             |
|o3 = a "GKM variety" with an action of a 2-dimensional torus                 |
|                                                                             |
|o3 : GKMVariety                                                              |
+-----------------------------------------------------------------------------+
|i4 : C1 = orbitClosure(X1,M)                                                 |
|                                                                             |
|o4 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o4 : KClass                                                                  |
+-----------------------------------------------------------------------------+
|i5 : C2 = orbitClosure(X2,M)                                                 |
|                                                                             |
|o5 = an "equivariant K-class" on a GKM variety                               |
|                                                                             |
|o5 : KClass                                                                  |
+-----------------------------------------------------------------------------+
|i6 : peek C1                                                                 |
|                                                                             |
|o6 = KClass{variety => a "GKM variety" with an action of a 4-dimensional     |
|                                                           -1 -1             |
|            KPolynomials => HashTable{{set {0, 1}} => 1 - T  T  T T   }      |
|                                                           0  1  2 3         |
|                                                           -1   -1           |
|                                      {set {0, 2}} => 1 - T  T T  T          |
|                                                           0  1 2  3         |
|                                                           -1     -1         |
|                                      {set {0, 3}} => 1 - T  T T T           |
|                                                           0  1 2 3          |
|                                                           -1 -1             |
|                                      {set {1, 2}} => - T T  T  T  + 1       |
|                                                         0 1  2  3           |
|                                                           -1   -1           |
|                                      {set {1, 3}} => - T T  T T   + 1       |
|                                                         0 1  2 3            |
|                                                             -1 -1           |
|                                      {set {2, 3}} => - T T T  T   + 1       |
|                                                         0 1 2  3            |
|-----------------------------------------------------------------------------|
|torus}                                                                       |
+-----------------------------------------------------------------------------+
|i7 : peek C2                                                                 |
|                                                                             |
|o7 = KClass{variety => a "GKM variety" with an action of a 2-dimensional     |
|                                                            -2 2             |
|            KPolynomials => HashTable{{set {0, 1*}} => 1 - T  T   }          |
|                                                            0  1             |
|                                                           -2 -2             |
|                                      {set {0, 1}} => 1 - T  T               |
|                                                           0  1              |
|                                                           2 2               |
|                                      {set {1*, 0*}} => - T T  + 1           |
|                                                           0 1               |
|                                                          2 -2               |
|                                      {set {1, 0*}} => - T T   + 1           |
|                                                          0 1                |
|-----------------------------------------------------------------------------|
|torus}                                                                       |
+-----------------------------------------------------------------------------+

In type "A", the equivariant K-class of the orbit closure of a point coincides
with that of its flag matroid.

+---------------------------------------------------------------+
|i8 : X = generalizedFlagVariety("A",3,{1,2})                   |
|                                                               |
|o8 = a "GKM variety" with an action of a 4-dimensional torus   |
|                                                               |
|o8 : GKMVariety                                                |
+---------------------------------------------------------------+
|i9 : Mat = random(QQ^2,QQ^4)                                   |
|                                                               |
|o9 = | 9/2 3/4 7/9  7/10 |                                     |
|     | 9/4 7/4 7/10 7/3  |                                     |
|                                                               |
|              2       4                                        |
|o9 : Matrix QQ  <-- QQ                                         |
+---------------------------------------------------------------+
|i10 : C = orbitClosure(X,Mat)                                  |
|                                                               |
|o10 = an "equivariant K-class" on a GKM variety                |
|                                                               |
|o10 : KClass                                                   |
+---------------------------------------------------------------+
|i11 : FM = flagMatroid(Mat,{1,2})                              |
|                                                               |
|o11 = a "flag matroid" with rank sequence {1, 2} on 4 elements |
|                                                               |
|o11 : FlagMatroid                                              |
+---------------------------------------------------------------+
|i12 : C' = makeKClass(X,FM)                                    |
|                                                               |
|o12 = an "equivariant K-class" on a GKM variety                |
|                                                               |
|o12 : KClass                                                   |
+---------------------------------------------------------------+
|i13 : C === C'                                                 |
|                                                               |
|o13 = true                                                     |
+---------------------------------------------------------------+

In type "D", the orthogonal Grassmannian $SOGr(n,2n)$ has two connected
components. To compute the torus orbit closure of a point $p$ it suffices to
restrict to either $SOGr(n,n;2n)$ or $SOGr(n-1,n-1;2n)$, depending on which
component $p$ is located in; see the last example in Example_colon_ generalized flag varieties,
for more
details. Here is an example with $n=4$:

+-----------------------------------------------------------------------------+
|i14 : R = makeCharacterRing 4                                                |
|                                                                             |
|o14 = R                                                                      |
|                                                                             |
|o14 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i15 : X1 = generalizedFlagVariety("D",4,{4,4},R)                             |
|                                                                             |
|o15 = a "GKM variety" with an action of a 4-dimensional torus                |
|                                                                             |
|o15 : GKMVariety                                                             |
+-----------------------------------------------------------------------------+
|i16 : X2 = generalizedFlagVariety("D",4,{3,3},R)                             |
|                                                                             |
|o16 = a "GKM variety" with an action of a 4-dimensional torus                |
|                                                                             |
|o16 : GKMVariety                                                             |
+-----------------------------------------------------------------------------+
|i17 : A = matrix{{1,3,-2,-1/4},{-1,-1,19,-61/4},{0,1,19,-73/4},{2,0,22,-89/4 |
|                                                                             |
|               4       4                                                     |
|o17 : Matrix QQ  <-- QQ                                                      |
|-----------------------------------------------------------------------------|
|}};                                                                          |
+-----------------------------------------------------------------------------+
|i18 : B = matrix(QQ,{{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}});       |
|                                                                             |
|               4       4                                                     |
|o18 : Matrix QQ  <-- QQ                                                      |
+-----------------------------------------------------------------------------+
|i19 : M = A | B                                                              |
|                                                                             |
|o19 = | 1  3  -2 -1/4  1  2  3  4  |                                         |
|      | -1 -1 19 -61/4 5  6  7  8  |                                         |
|      | 0  1  19 -73/4 9  10 11 12 |                                         |
|      | 2  0  22 -89/4 13 14 15 16 |                                         |
|                                                                             |
|o19 : Matri    4       8                                                     |
|x QQ  <-- QQ                                                                 |
+-----------------------------------------------------------------------------+
|i20 : assert(A* transpose(B)  + B *transpose(A) == 0) -- verifying that M is |
|-----------------------------------------------------------------------------|
|isotropic                                                                    |
+-----------------------------------------------------------------------------+
|i21 : C1 = orbitClosure(X1,M)                                                |
|                                                                             |
|o21 = an "equivariant K-class" on a GKM variety                              |
|                                                                             |
|o21 : KClass                                                                 |
+-----------------------------------------------------------------------------+
|i22 : C2 = orbitClosure(X2,M)                                                |
|                                                                             |
|o22 = an "equivariant K-class" on a GKM variety                              |
|                                                                             |
|o22 : KClass                                                                 |
+-----------------------------------------------------------------------------+
|i23 : peek C1                                                                |
|                                                                             |
|o23 = KClass{variety => a                                                    |
|                                                                             |
|             KPolynomials                                                    |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|-----------------------------------------------------------------------------|
|"GKM variety" with an action of a 4-dimensional torus                       }|
|                                          -1   -1      -1 -1    -2   -2      |
|=> HashTable{{set {0, 1*, 2, 3*}} => 1 - T  T T  T  - T  T   + T  T T  T   } |
|                                          0  1 2  3    0  2     0  1 2  3    |
|                                         -1 -1 -1 -1    -2 -2 -2 -2          |
|             {set {0, 1, 2, 3}} => 1 - 2T  T  T  T   + T  T  T  T            |
|                                         0  1  2  3     0  1  2  3           |
|                                          -1     -1    -1 -1    -2     -2    |
|             {set {0, 2*, 1*, 3}} => 1 - T  T T T   - T  T   + T  T T T      |
|                                          0  1 2 3     0  3     0  1 2 3     |
|                                          -1 -1        -1 -1    -2 -2        |
|             {set {0, 2*, 1, 3*}} => 1 - T  T  T T  - T  T   + T  T  T T     |
|                                          0  1  2 3    0  1     0  1  2 3    |
|                                            -1 -1            -2 -2    -1 -1  |
|             {set {1*, 0*, 2, 3}} => - T T T  T   + 1 + T T T  T   - T  T    |
|                                        0 1 2  3         0 1 2  3     2  3   |
|                                          -1 -1            -2 -2      -1 -1  |
|             {set {1, 0*, 2, 3*}} => - T T  T  T  + 1 + T T  T  T  - T  T    |
|                                        0 1  2  3        0 1  2  3    1  2   |
|             {set {2*, 1*, 0*, 3*}} => 0                                     |
|                                          -1   -1          -2   -2    -1 -1  |
|             {set {2*, 1, 0*, 3}} => - T T  T T   + 1 + T T  T T   - T  T    |
|                                        0 1  2 3         0 1  2 3     1  3   |
+-----------------------------------------------------------------------------+
|i24 : peek C2 -- since the point corresponding to M lies in X1, C2 is just   |
|                                                                             |
|o24 = KClass{KPolynomials => HashTable{{set {0, 1*, 2, 3}} => 0  }           |
|                                       {set {0, 1, 2, 3*}} => 0              |
|                                       {set {0, 2*, 1*, 3*}} => 0            |
|                                       {set {0, 2*, 1, 3}} => 0              |
|                                       {set {1*, 0*, 2, 3*}} => 0            |
|                                       {set {1, 0*, 2, 3}} => 0              |
|                                       {set {2*, 1*, 0*, 3}} => 0            |
|                                       {set {2*, 1, 0*, 3*}} => 0            |
|             variety => a "GKM variety" with an action of a 4-dimensional    |
|-----------------------------------------------------------------------------|
| the empty class i.e. 0                                                      |
|                                                                             |
|     }                                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|torus                                                                        |
+-----------------------------------------------------------------------------+

By default the option RREFMethod is set to false. In this case the method
produces the torus orbit closure by only computing the minors of the matrix. If
the option RREFMethod is set to true, the method row reduces the matrix instead
of computing its minors.

+-------------------------------------------------------------+
|i25 : X = generalizedFlagVariety("A",3,{1,2,3})              |
|                                                             |
|o25 = a "GKM variety" with an action of a 4-dimensional torus|
|                                                             |
|o25 : GKMVariety                                             |
+-------------------------------------------------------------+
|i26 : Mat = random(QQ^3,QQ^4)                                |
|                                                             |
|o26 = | 7   6   3/10 10/9 |                                  |
|      | 3/7 5/4 3/7  10   |                                  |
|      | 6/7 2/9 5    3/2  |                                  |
|                                                             |
|               3       4                                     |
|o26 : Matrix QQ  <-- QQ                                      |
+-------------------------------------------------------------+
|i27 : time C = orbitClosure(X,Mat)                           |
| -- used 0.624705s (cpu); 0.437427s (thread); 0s (gc)        |
|                                                             |
|o27 = an "equivariant K-class" on a GKM variety              |
|                                                             |
|o27 : KClass                                                 |
+-------------------------------------------------------------+
|i28 : time C = orbitClosure(X,Mat, RREFMethod => true)       |
| -- used 1.7741s (cpu); 1.16333s (thread); 0s (gc)           |
|                                                             |
|o28 = an "equivariant K-class" on a GKM variety              |
|                                                             |
|o28 : KClass                                                 |
+-------------------------------------------------------------+

See also
========

  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety
  * makeKClass(GKMVariety,FlagMatroid)
    -- the equivariant K-class of a
    flag matroid

Ways to use orbitClosure:
=========================

  * "orbitClosure(GKMVariety,Matrix)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1454:0.

projectiveSpace -- constructs projective space as a GKM variety
***************************************************************

  * Usage:
        projectiveSpace n
        projectiveSpace(n,R)
  * Inputs:
      * n, an integer (Macaulay2Doc),
      * R, a ring (Macaulay2Doc),
  * Outputs:
      * a GKM variety,

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

Given an integer $n$ this method constructs the n-dimensional projective space,
$\mathbb P^n$, as a GKM variety. The action of $(\mathbb C^*)^{n+1}$ on
$\mathbb P^n$ is defined by $(t_0, \ldots, t_n) \cdot (x_0, \ldots, x_n) =
(t_0^{-1}x_0, \ldots, t_n^{-1}x_n)$.

+-----------------------------------------------------------------------------+
|i1 : PP4 = projectiveSpace 4;                                                |
+-----------------------------------------------------------------------------+
|i2 : peek PP4                                                                |
|                                                                             |
|o2 = GKMVariety{cache => CacheTable{...1...}                                 |
|                characterRing => ZZ[T ..T ]                                  |
|                                     0   4                                   |
|                charts => HashTable{set {0} => {{-1, 1, 0, 0, 0}, {-1, 0, 1, |
|                                    set {1} => {{1, -1, 0, 0, 0}, {0, -1, 1, |
|                                    set {2} => {{1, 0, -1, 0, 0}, {0, 1, -1, |
|                                    set {3} => {{1, 0, 0, -1, 0}, {0, 1, 0, -|
|                                    set {4} => {{1, 0, 0, 0, -1}, {0, 1, 0, 0|
|                momentGraph => a "moment graph" on 5 vertices with 10 edges  |
|                points => {set {0}, set {1}, set {2}, set {3}, set {4}}      |
|-----------------------------------------------------------------------------|
|                                           }                                 |
|                                                                             |
|                                                                             |
|0, 0}, {-1, 0, 0, 1, 0}, {-1, 0, 0, 0, 1}}}                                  |
|0, 0}, {0, -1, 0, 1, 0}, {0, -1, 0, 0, 1}}                                   |
|0, 0}, {0, 0, -1, 1, 0}, {0, 0, -1, 0, 1}}                                   |
|1, 0}, {0, 0, 1, -1, 0}, {0, 0, 0, -1, 1}}                                   |
|, -1}, {0, 0, 1, 0, -1}, {0, 0, 0, 1, -1}}                                   |
+-----------------------------------------------------------------------------+

See also
========

  * flagMap -- creates equivariant maps between generalized
    flag varieties
  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety

Ways to use projectiveSpace:
============================

  * "projectiveSpace(ZZ)"
  * "projectiveSpace(ZZ,Ring)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1136:0.

pullback(EquivariantMap) -- computes the pullback map of equivariant K-classes of an equivariant map
****************************************************************************************************

  * Function: pullback (Macaulay2Doc),
  * Usage:
        pullback(f)
  * Inputs:
      * f, an equivariant map,
  * Outputs:
      * a function closure (Macaulay2Doc), whose input
        is a KClass, on the target GKMVariety,
        of f and output is its pullback along f

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

Given two GKM varieties $X$ and $Y$, this method computes the pullback of a
KClass, on $Y$ along an equivariant morphism $X \to Y$.

+------------------------------------------------------------+
|i1 : R = makeCharacterRing 4;                               |
+------------------------------------------------------------+
|i2 : FlGr = generalizedFlagVariety("A",3,{1,2},R)           |
|                                                            |
|o2 = a "GKM variety" with an action of a 4-dimensional torus|
|                                                            |
|o2 : GKMVariety                                             |
+------------------------------------------------------------+
|i3 : Gr24 = generalizedFlagVariety("A",3,{2},R)             |
|                                                            |
|o3 = a "GKM variety" with an action of a 4-dimensional torus|
|                                                            |
|o3 : GKMVariety                                             |
+------------------------------------------------------------+
|i4 : f = flagMap(FlGr,Gr24)                                 |
|                                                            |
|o4 = an "equivariant map" of GKM varieties                  |
|                                                            |
|o4 : EquivariantMap                                         |
+------------------------------------------------------------+
|i5 : O1 = ampleKClass Gr24                                  |
|                                                            |
|o5 = an "equivariant K-class" on a GKM variety              |
|                                                            |
|o5 : KClass                                                 |
+------------------------------------------------------------+
|i6 : (pullback f)(O1)                                       |
|                                                            |
|o6 = an "equivariant K-class" on a GKM variety              |
|                                                            |
|o6 : KClass                                                 |
+------------------------------------------------------------+

See also
========

  * flagMap -- creates equivariant maps between generalized
    flag varieties
  * pushforward -- computes the pushforward map of
    equivariant K-classes of an equivariant map

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

  * pullback(EquivariantMap) -- computes
    the pullback map of equivariant K-classes of an equivariant map
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1043:0.

pushforward -- computes the pushforward map of equivariant K-classes of an equivariant map
******************************************************************************************

  * Usage:
        pushforward(f)
  * Inputs:
      * f, an equivariant map,
  * Outputs:
      * a function closure (Macaulay2Doc), whose input
        is a KClass, on the source GKMVariety,
        of f and output is its pushforward along f

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

Given two GKM varieties $X$ and $Y$, this method computes the pushforward of a
KClass, on $X$ along an equivariant morphism $X \to Y$.

+------------------------------------------------------------+
|i1 : R = makeCharacterRing 4;                               |
+------------------------------------------------------------+
|i2 : FlGr = generalizedFlagVariety("A",3,{1,2},R)           |
|                                                            |
|o2 = a "GKM variety" with an action of a 4-dimensional torus|
|                                                            |
|o2 : GKMVariety                                             |
+------------------------------------------------------------+
|i3 : Gr24 = generalizedFlagVariety("A",3,{2},R)             |
|                                                            |
|o3 = a "GKM variety" with an action of a 4-dimensional torus|
|                                                            |
|o3 : GKMVariety                                             |
+------------------------------------------------------------+
|i4 : f = flagMap(FlGr,Gr24)                                 |
|                                                            |
|o4 = an "equivariant map" of GKM varieties                  |
|                                                            |
|o4 : EquivariantMap                                         |
+------------------------------------------------------------+
|i5 : O1 = ampleKClass FlGr                                  |
|                                                            |
|o5 = an "equivariant K-class" on a GKM variety              |
|                                                            |
|o5 : KClass                                                 |
+------------------------------------------------------------+
|i6 : (pushforward f)(O1)                                    |
|                                                            |
|o6 = an "equivariant K-class" on a GKM variety              |
|                                                            |
|o6 : KClass                                                 |
+------------------------------------------------------------+

See also
========

  * flagMap -- creates equivariant maps between generalized
    flag varieties
  * pullback(EquivariantMap) -- computes
    the pullback map of equivariant K-classes of an equivariant map
  * pushforward -- computes the pushforward map of
    equivariant K-classes of an equivariant map
  * euler(KClass) -- computes the equivariant Euler
    characteristic of an equivariant K-class

Ways to use pushforward:
========================

  * "pushforward(EquivariantMap)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1077:0.

setIndicator -- computes the signed indicator vector of an admissible set
*************************************************************************

  * Usage:
        setIndicator(T,n)
  * Inputs:
      * T, a set (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * a list (Macaulay2Doc), corresponding to a vector in
        $\mathbb Z^n$

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

Let $S$ be a set consisting of elements $s$, where $s$ is either equal to $i$
or $i^*$ with $0 \leq i \leq n-1$. The set $S$ is said to be admissible if for
any integer $i$, not both $i$ and $i^{*}$ are contained in $S$. This method
produces the signed indicator vector of $S$. In particular, the
setIndicator, of $S$ is $\sum c_ie_i \in \mathbb Z^n$ where $c_i
= 1$ if $i \in T$, $c_i = -1$ if $i^{*} \in T$ and $0$ otherwise.

+--------------------------+
|i1 : S1 = set{1,2,4,5};   |
+--------------------------+
|i2 : S2 = set{1,"2*"};    |
+--------------------------+
|i3 : setIndicator(S1,7)   |
|                          |
|o3 = {0, 1, 1, 0, 1, 1, 0}|
|                          |
|o3 : List                 |
+--------------------------+
|i4 : setIndicator(S2,3)   |
|                          |
|o4 = {0, 1, -1}           |
|                          |
|o4 : List                 |
+--------------------------+

If the set is not admissible it produces an error.

+----------------------------------------------------------+
|i1 : S3 = set{1,"1*","2*",3}                              |
|                                                          |
|o1 = set {1, 1*, 2*, 3}                                   |
|                                                          |
|o1 : Set                                                  |
+----------------------------------------------------------+
|i2 : setIndicator(S3,4)                                   |
|stdio:2:1:(3): error:  the signed subset is not admissible|
+----------------------------------------------------------+

See also
========

  * generalizedFlagVariety -- makes a
    generalized flag variety as a GKM variety

Ways to use setIndicator:
=========================

  * "setIndicator(Set,ZZ)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:2105:0.

trivialKClass -- the equivariant K-class of the structure sheaf
***************************************************************

  * Usage:
        trivialKClass X
  * Inputs:
      * X, a GKM variety,
  * Outputs:
      * an equivariant K-class,

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

Given a GKM variety $X$ this function computes the KClass, of the
structure sheaf $O_X$. In terms of the localization map, $O_X$ corresponds to
the constant function $1$.

+-----------------------------------------------------------------------------+
|i1 : X = projectiveSpace 3;                                                  |
+-----------------------------------------------------------------------------+
|i2 : C = trivialKClass X;                                                    |
+-----------------------------------------------------------------------------+
|i3 : peek C                                                                  |
|                                                                             |
|o3 = KClass{KPolynomials => HashTable{set {0} => 1}                          |
|                                      set {1} => 1                           |
|                                      set {2} => 1                           |
|                                      set {3} => 1                           |
|            variety => a "GKM variety" with an action of a 4-dimensional     |
|-----------------------------------------------------------------------------|
|     }                                                                       |
|                                                                             |
|                                                                             |
|                                                                             |
|torus                                                                        |
+-----------------------------------------------------------------------------+

Ways to use trivialKClass:
==========================

  * "trivialKClass(GKMVariety)"

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

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

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

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1796:0.

underlyingGraph(MomentGraph) -- the underlying (undirected) graph of a moment graph
***********************************************************************************

  * Function: underlyingGraph (Graphs),
  * Usage:
        underlyingGraph(G)
  * Inputs:
      * G, a moment graph,
  * Outputs:
      * a graph (Graphs),

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

This method outputs the underlying undirected Graph (Graphs), of a
moment graph.

+--------------------------------------------------+
|i1 : G = momentGraph projectiveSpace 3            |
|                                                  |
|o1 = a "moment graph" on 4 vertices with 6 edges  |
|                                                  |
|o1 : MomentGraph                                  |
+--------------------------------------------------+
|i2 : underlyingGraph G                            |
|                                                  |
|o2 = Graph{set {0} => {set {1}, set {2}, set {3}}}|
|           set {1} => {set {0}, set {2}, set {3}} |
|           set {2} => {set {0}, set {1}, set {3}} |
|           set {3} => {set {0}, set {1}, set {2}} |
|                                                  |
|o2 : Graph                                        |
+--------------------------------------------------+

See also
========

  * MomentGraph -- the class of all moment graphs

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

  * underlyingGraph(MomentGraph), --
    the underlying (undirected) graph of a moment graph
-------------------------------------------------------------------------------

The source of this document is in
GKMVarieties/Documentation_GKMVarieties.m2:1314:0.