Maple package Torhom

Current version: 1.3.1 (2016-06-07)

Copyright © 2000–2016 Matthias Franz

Torhom is a Maple package that provides functions to study the homology with closed support (also called "Borel-Moore homology") of real and complex toric varieties with rational, integer or prime field coefficients. Remember that for complete varieties homology with closed supports coincides with usual (singular) homology.

Toric varieties are in one-to-one correspondence with certain convex-geometric objects called fans. The Torhom package uses the Convex package to deal with cones and fans.


Torhom is distributed under the GNU General Public License.


First you have to install the Convex package (at least version 1.2.0 if you want to do homology computations with prime field coefficients, and 1.0 otherwise). Then copy the file torhom.mla ( 35K) — or torhom.lib ( 11K) and torhom.ind ( 24K) for older versions of Maple — to a directory that appears in the Maple variable libname (or create a new directory and append it to libname).

When you start Maple now, the package torhom is defined. It is convenient to load Convex first:

Convex version 1.2.0, Copyright (C) 1999-2016 Matthias Franz This package is distributed under the GNU General Public License See /~mfranz/convex/ for more information
You can access the functions provided by Torhom in the long form torhom:-function(arg1, arg2, ...). If you want to use short forms, say
Torhom version 1.3.1, Copyright (C) 2000-2016 Matthias Franz This package is distributed under the GNU General Public License
[E2hom, homreal, printarray, total]

Source code

The file torhom.mpl ( 13K) contains the source code of the package. You don't need this file in order to use the package!


The Torhom package does not define types on its own. Instead, it uses the Convex types CONE0 (pointed cones), FAN0 (pointed fans) and MODZ (Abelian groups). A click on one of the types gets you to the corresponding Convex help page.

There are plenty of ways to define cones and fans with the Convex package. Here is the absolute minimum one should know:

In both cases, the sequence of generators need not be minimal. Note that only a summary of the data stored for cones and fans is displayed. The precise meaning is explained on the help page for each type.

The type MODZ appears in the result of integral homology computations, see below.


E2hom(F::{FAN0, CONE0}, F0::FAN0, rational)::Array(nonnegint)
E2hom(F::{FAN0, CONE0}, F0::FAN0, integer)::Array(MODZ)
E2hom(F::{FAN0, CONE0}, F0::FAN0, specfunc(prime, integer))::Array(nonnegint)

This functions computes the E2 term of a certain spectral sequence converging to the homology with closed support of the complex toric variety given by F. The spectral sequence arises from the filtration of the toric variety by orbit dimension. The second (optional) argument F0 must be a subfan of F; if present, homology relative to F0 is computed. If F0 is left out, then absolute homology is calculated. The third argument determines whether homology is computed with rational, integer or prime field coefficients. (Recall that prime field coefficients require Convex version 1.2.0 or higher.) If the third argument is omitted, rational coefficients are taken.

One knows that for rational coefficients the spectral sequence degenerates on the E2 level, hence that the result of E2hom is the homology of the toric variety (after taking the total grading instead of the bigrading — see the function total below). The same holds for integer coefficients provided that the toric variety is regular (smooth) or at most 3-dimensional; in particular, there is no extension problem. Regularity of fans can be tested with the Convex function isregular.

If the support of the fan is known to be a homology manifold (e.g., complete), certain diagonals of the E2 term vanish: if the fan is regular in codimension k, the all terms E2[p, q] with p-q > k are zero. (This is essentially due to Brion.) E2hom uses some heuristics to determine whether the support is a homology manifold.


F := projspace(3); E2 := E2hom(F, integer(5));
F := FAN(3,0,[0, 0, 4])
E2 := Array(0 .. 3,0 .. 3,{(0, 0) = 1, (1, 1) = 1, (2, 2) = 1, (3, 3) = 1},datatype = anything,storage = rectangular,order = Fortran_order)
Since the output of E2hom is quite hard to read, the Torhom package provides the function printarray to make it more readable:
matrix([[0, 0, 0, 1], [0, 0, 1, 0], [0, 1, 0, 0], [1, 0, 0, 0]])
(Maple's prettyprinter actually displays a real matrix.)
homreal(F::{FAN0, CONE0}, F0::FAN0, rational)::Array(nonnegint)
homreal(F::{FAN0, CONE0}, F0::FAN0, integer)::Array(MODZ)
homreal(F::{FAN0, CONE0}, F0::FAN0, specfunc(prime, integer))::Array(nonnegint)

This function computes the homology with closed support of the real toric variety given by F. The meaning of the other arguments is the same as for E2hom.


H := homreal(F, integer): printarray(H);
vector([Z, Z[2], 0, Z])
H := homreal(F, integer(2)): printarray(H);
vector([1, 1, 1, 1])

This function shifts the indices of an array so that it is displayed conveniently by Maple's prettyprinter.


This functions computes the total grading of the bigraded (i.e., two-dimensional) array returned by E2hom.


H := total(E2hom(projspace(3)));
H := Array(0 .. 6,{(0) = 1, (2) = 1, (4) = 1, (6) = 1},datatype = anything,storage = rectangular,order = Fortran_order)
vector([1, 0, 1, 0, 1, 0, 1])

User information

In order to see what happens inside the Torhom functions, give the variable infolevel[torhom] a positive value.


Precursors of E2hom have been written by Sophie Térouanne and Marion Dieudonné under the supervision of Gottfried Barthel (Universität Konstanz). The author thanks Gottfried Barthel for helpful comments and suggestions.


  1. M. Brion, The structure of the polytope algebra, Tohoku Math. J. 49 (1997), 1–32
  2. V. I. Danilov, The geometry of toric varieties, Russian Math. Surveys 33 (1978), 97–154
  3. M. W. Davis, T. Januszkiewicz, Convex polytopes, Coxeter orbifolds and torus actions, Duke Math. J. 62 (1991), 417–451
  4. S. Fischli, On toric varieties, Ph.D. thesis, Universität Bern 1992
  5. M. Franz, The integral cohomology of toric manifolds, Proc. Steklov Inst. Math. 252 (2006), 53–62
  6. W. Fulton, Introduction to toric varieties, Ann. Math. Studies 131, Princeton Univ. Press, Princeton 1993
  7. A. Jordan, Homology and cohomology of toric varieties, Ph.D. thesis, Universität Konstanz 1997
  8. B. Totaro, Chow groups, Chow cohomology, and linear varieties, Forum Math. Sigma 2 (2014), e17

Matthias Franz, 2019-10-09