&<(F1::FAN, F2::FAN)::boolean &>(F2::FAN, F1::FAN)::boolean F1 &< F2 F2 &> F1
Test whether F1 is a proper subfan of F2. F1 and F2 must lie in the same ambient space.
&<=(F1::FAN, F2::FAN)::boolean &<=(F2::FAN, F1::FAN)::boolean F1 &<= F2 F2 &>= F1
Test whether F1 is a subfan of F2. F1 and F2 must lie in the same ambient space.
&<>(F1::FAN, F2::FAN)::boolean F1 &<> F2
Test whether F1 and F2 describe different fans. This is true if the fans lie in different ambient spaces.
&=(F1::FAN, F2::FAN)::boolean F1 &= F2
Test whether F1 and F2 describe the same fan. This is false if the fans lie in different ambient spaces.
&x(F1::FAN, ...)::FAN F1::FAN &x F2::FAN
The Cartesian product of its arguments. See CONE[&x].
FAN[`&x`]() &= zerofan(0); |
ambientdim(F::FAN)::nonnegint
The dimension of the ambient space.
codim(F::FAN)::nonnegint
The codimension of F is that of the linear hull of its elements. Note that dim(F) and codim(F) do not necessarily add up to ambientdim(F). See also dim and ambientdim.
F := fan(poshull([1, 0]), poshull([0, 1])); |
dim(F), codim(F), ambientdim(F); |
contains(F::FAN, C::CONE)::boolean contains(F::FAN, C::CONE, C2::name)::boolean
Test whether C is contained in the fan F. If there is a third argument C2, it will be assigned the corresponding element of F (of type FANCONE) in this case. It is essentially the same as C, but with the added information that it belongs to a fan.
F := fan(posorthant(2)); |
contains(F, poshull([1, 1])); |
C := poshull([1, 0]); contains(F, C, 'C2'); C2; |
C &= C2; |
convert(F::FAN, PCOMPLEX)::PCOMPLEX
Convert F to a polyhedral complex by "dehomogenizing" it. See CONE[convert/POLYHEDRON].
convert(F::FAN, affine)::PCOMPLEX convert(F::FAN, affine, v::vec)::PCOMPLEX
Convert F to a polyhedral complex containing the same cones, but now considered as polyhedra. If a third argument v is given, the origin will be shifted to v. See CONE[convert/affine].
dim(F::FAN)::nonnegint
The dimension of F is the maximum of the dimensions of the cones in F.
fan(arg1::{CONE, FAN}, ...)::FAN
This function creates an object of type FAN representing the fan generated by all the arguments. The given cones must be compatible, but may be redundant. A fan as argument is equivalent to the sequence of its (maximal) cones. See also CONE[arecompatible].
flagf(F::FAN, S::set(integer))::nonnegint
The flag f-number of F indexed by S. This is the number of chains of cones in F of dimensions given by S.
F := facefan(cube(3)); |
flagf(F, {2, 3}); |
flagf(F, {0, 1, 2, 3}); |
flagf(F, {}); |
flagh(F::FAN, S::set(integer))::nonnegint
The flag h-number of F indexed by S. This is the alternating sum over all flagf(F, T) where T runs over all subsets of S.
F := facefan(cube(3)); |
flagh(F, {2, 3}); |
fvector(F::FAN)::Array
An Array indexed from 0 to ambientdim(F) giving the number of cones in each dimension.
F := normalfan(cube(2)); fvector(F); |
genhvector(F::FAN0)::Array
Stanley's generalized h-vector (which equals for, say, complete or affine F the intersection homology Betti numbers of the associated toric variety). For simplicial F this is the same as the ordinary h-vector.
F := facefan(cube(3)); |
genhvector(F); |
homology(F::FAN, F0::FAN, rational)::Array homology(F::FAN, F0::FAN, integer)::Array homology(F::FAN, F0::FAN, specfunc(prime, integer))::Array
An Array indexed from 0 to ambientdim(F) giving the homology (with closed support) of F relative to the subfan F0. If F0 is omitted, then absolute homology is computed. One can choose between rational, integer and prime field coefficients. The default is rational. In the case of field coefficients, each Array entry is of type nonnegint and gives the corresponding Betti number. If integer is specified, each entry is of type MODZ and describes the corresponding Abelian group.
See PCOMPLEX[homology] for ways to override the default routine for Smith normal form computations.
F := facefan(cube(3)); homology(skeleton(F, 2), integer(3)); |
F := fan(posorthant(3)); homology(F, integer); |
hplanes(F::FAN)::list(vec)
This is the same as hplanes(C) where C is the linear hull of F. See CONE[hplanes].
image(F::FAN, A::{mat, rational, real_infinity})::FAN
The image of the fan F under the linear map specified by A. See CONE[image] for more on the allowed values of A. Note that unlike the preimage, the image of a fan is not necessarily a fan.
F := facefan(cube(2)); image(F, [[1,0]]); |
iscomplete(F::FAN)::boolean
Test whether F is complete. A fan is complete if its cones fill up the whole ambient space.
ispointed(F::FAN)::boolean
Test whether F is pointed. A fan is pointed if all its cones are, or, equivalently, if lines(F) is the empty list. See lines.
ispolytopal(F::FAN)::boolean ispolytopal(F::FAN, P::name)::boolean
Test whether F is polytopal. A fan is polytopal if it is the normal fan of a polytope. If this is true and a second argument is given, it receives such a polytope. See POLYHEDRON[normalfan].
ispolytopal(normalfan(cube(2)), 'P'); |
P; vertices(P); |
P &= cube(3); |
ispolytopal(fan(fullcone(3)), 'P'); |
P; vertices(P); |
v := [[-1, 0, 0], [ 0,-1, 0], [ 0, 0,-1], [ 1, 1, 1], [ 1, 1, 0], [ 0, 1, 1], [ 1, 0, 1]]; F := fan(op(map(x -> poshull(v[x[1]], v[x[2]], v[x[3]]), [[1,2,3], [1,2,6], [2,6,7], [6,7,4], [2,3,7], [3,7,5], [7,5,4], [3,1,5], [1,5,6], [5,6,4]]))); |
isregular(F), iscomplete(F), ispolytopal(F); |
isquasipolytopal(F::FAN)::boolean isquasipolytopal(F::FAN, P::name)::boolean
Test whether F is quasipolytopal. A fan is quasipolytopal if it is a subfan of the normal fan of a polytope or, equivalently, of a polyhedron. If this is true and a second argument is given, it receives such a polyhedron. Note that a fan is polytopal if and only if it is complete and quasipolytopal. See &<=, iscomplete and ispolytopal.
F := fan(posorthant(2)); ispolytopal(F); |
isquasipolytopal(F, 'P'); |
P; vertices(P); rays(P); |
isregular(F::FAN)::boolean
Test whether F is regular. A fan is regular if all its cones are. See CONE[isregular].
isregular(facefan(cube(2))); |
isregular(normalfan(cube(2))); |
issimplicial(F::FAN)::boolean
Test whether F is simplicial, that is, whether all cones in F are so. See CONE[issimplicial].
lines(F::FAN)::list(vec)
returns a basis for the lineality space of F.
maximal(F::FAN)::list(FANCONE) maximal(F::FAN, list)::list(FANCONE) maximal(F::FAN, array)::array(list(FANCONE))
The maximal elements of F, either as list (which is the default) or as array. The elements of the list are ordered by non-increasing dimension. The array is indexed from 0 to the ambient dimension; its n-th entry is a list of the maximal elements of F of dimension n.
The return type array may change to Array in future versions.
minimal(F::FAN)::list(FANCONE)
The unique minimal element of F, which is the common lineality space of all elements of F. In order to be symmetric to the function maximal, the result is wrapped up in a list.
preimage(F::FAN, A::{mat, rational, real_infinity})::FAN
The preimage of the fan F under the linear map specified by A. See CONE[preimage] for more on the allowed types of A.
projspace(n::integer)::FAN
A fan whose corresponding toric variety is projective n-space.
rays(F::FAN)::list(vec)
The rays of F are its one-dimensional elements.
regularpart(F::FAN)::FAN
The regular part of a fan is the subfan of all regular cones in it. See CONE[isregular].
regularsubdiv(F::FAN0)::FAN
A subdivision of F in which all cones are regular. The regular part of F will not be modified.
simplicialsubdiv(F::FAN0)::FAN
A subdivision of F in which all cones are simplicial. The simplicial part of F will not be modified, nor will new rays be introduced.
skeleton(F::FAN, n::integer)::FAN
The n-skeleton of F is the subfan of all cones of dimension at most n.
stellarsubdiv(F::FAN)::FAN
support(F::FAN, v1::vec, ...)::{FANCONE, FAIL}
The support of v1, ... in F. This is the smallest cone in F containing all given vectors. If no such cone exists, the function returns FAIL. See also CONE[support].
traverse(F::FAN, g::procedure)::set(set(vec))
This is some kind of map for fans instead of lists. It calls g(f, convert(rays(f), set)) for every element f of F. (Whether or not the entire fan is traversed is actually controlled by the return value of g.) For performance reasons, f is a face of some (maximal) cone in F, hence of type CFACE, not FANCONE. The result of g must evaluate to a boolean value. If it is false, then the faces of f are skipped. The function traverse returns a set. Before we describe it in detail, let us give a (silly) example:
infolevel[g] := 1: g := proc(f) userinfo(1, g, rays(f)); dim(f) > 2 end; |
F := facefan(cube(3)); |
A := traverse(F, g): |
A; |
The call traverse(F, g) is equivalent to traverse2(F, g, proc() end), see traverse2.
fv := Array(0..ambientdim(F)): traverse(F, proc(f) global fv; local d; d := dim(f); fv[d] := fv[d]+1; true end): fv; |
traverse2(F::FAN, g2::procedure)::set(set(vec)) traverse2(F::FAN, g1::procedure, g2::procedure)::set(set(vec))
The first variant calls g2(f0::CFACE, f1::CFACE, convert(rays(f0), set), convert(rays(f1), set)) for every pair f0, f1 such that f0 is a facet of f1. Both faces have the same domain. The second variant calls g1(f1::CFACE, convert(rays(f1), set)) for every element f1 of F. If g1 returns true, then for all facets f0 of f1 it calls g2(f0, f1, ...) and does the same recursively for f0 instead of f1. The result is in both cases like that of traverse.
The function homology is implemented with the help of traverse2.
infolevel[g] := 1: g := proc(f) userinfo(1, g, rays(f)); dim(f) > 2 end; g2 := proc(f0, f1) userinfo(1, g, rays(f0), rays(f1)) end; |
F := facefan(cube(2)); |
traverse2(F, g2); |
traverse2(F, g, g2); |
wprojspace(w0::posint, ..., wn::posint)::FAN
A fan corresponding to a weighted projective space with weights w0, ... wn (which is an n-dimensional toric variety). See also projspace and lensspace.
wprojspace(2, 6) &= wprojspace(1, 3); |
F := wprojspace(1,1,1); rays(F); |
zerofan(n::integer)::FAN
The origin as fan in n-space.