from application tropical
This encodes a patchworking structure on a hypersurface.
UNDOCUMENTED
UNDOCUMENTED
BETTI_NUMBERS_Z2
The Z_2 Betti numbers of the patchworked hypersurface. See the documentation of CHAIN_COMPLEX_Z2 for details.
A patchworked hyperplane in n-dimensional real projective space is topologically the (n-1)-dimensional real projective space:
> $h = new tropical::Hypersurface<Max>(POLYNOMIAL=>toTropicalPolynomial("max(a,b,c,d,e,f)")); > $p = $h->PATCHWORK(SIGNS=>[0,0,0,0,0,0]); > print $p->BETTI_NUMBERS_Z2; 1 1 1 1 1
CHAIN_COMPLEX_Z2
The cellular chain complex with Z_2 coefficients of the patchworked hypersurface. The d-th entry represents the d-th boundary matrix, i.e., the one mapping (d+1)-chains to d-chains. It is computed directly from the dual subdivision, which means that, instead of a tropical polynomial, one may initiate the Hypersurface object via its dual subdivision, which in turn allows this computation to be carried out on non-regular subdivisions.
A patchworked line in the real projective plane is combinatorially a triangle:
> $h = new tropical::Hypersurface<Max>(MONOMIALS=>unit_matrix(3),COEFFICIENTS=>ones_vector(3)); > $p = $h->PATCHWORK(SIGNS=>[0,1,0]); > $c = $p->CHAIN_COMPLEX_Z2; > $b = $c->boundary_matrix(1); > print $b->rows, "x", $b->cols; 3x3
> print rank($b); 2
A non-regular example:
> $points = [[1,4,0,0],[1,0,4,0],[1,0,0,4],[1,2,1,1],[1,1,2,1],[1,1,1,2]]; > $cells = [[0,1,3],[0,2,5],[0,3,5],[1,2,4],[1,3,4],[2,4,5],[3,4,5]]; > $moae = new fan::SubdivisionOfPoints(POINTS=>$points, MAXIMAL_CELLS=>$cells); > $h = new Hypersurface<Min>(DUAL_SUBDIVISION=>$moae); > $p = $h->PATCHWORK(SIGNS=>[0,0,0,0,0,0]); > print $p->CHAIN_COMPLEX_Z2->type->full_name; ChainComplex<SparseMatrix<GF2, NonSymmetric>>
REAL_FACETS
Facets of the real part of the patchworked hypersurface. Row indices correspond to orthants (ordered lexicographically), column indices correspond to facets of the original hypersurface. This is the transpose of REAL_PHASE
.
REAL_PHASE
Real phase structure of the patchworked hypersurface. Row indices correspond to facets of the original hypersurface, column indices correspond to orthants (ordered lexicographically). I.e., a copy of facet i appears in orthant j, iff the j-th entry in the i-th row is 1. This is the transpose of REAL_FACETS
.
> $h = new tropical::Hypersurface<Max>(MONOMIALS=>unit_matrix(3),COEFFICIENTS=>ones_vector(3)); > $p = $h->PATCHWORK(SIGNS=>[0,1,0]); > print $p->REAL_PHASE; {0 2} {2 3} {0 3}
> $p->realize->VISUAL;
SIGNS
Sign distribution on the support of the POLYNOMIAL
. Indices correspond to row indices of MONOMIALS
.
realize(String method)
The real part of the patchworked hypersurface, realized as a polyhedral hypersurface in IR^dim. The vertices of each of the 2^dim copies of the hypersurface will be moved to the interior of the respective orthant (according to method), and relevant unbounded facets will be joined. If method is “rigid” (default), vertices will be translated to the positive orthant, and then reflected to their corresponding orthant. If method is “uniform”, vertices will be moved to the barycenter of the respective dual cell in the dual subdivision of the support, and then reflected to their corresponding orthant (this only works if the hypersurface is simplicial, e.g. for curves).
String
method
: “rigid” (default) or “uniform”
Visualize a patchworked plane:
> $h1 = new tropical::Hypersurface<Max>(POLYNOMIAL=>toTropicalPolynomial("max(a,b,c,d)")); > $p1 = $h1->PATCHWORK(SIGNS=>[1,0,1,0]); > $p1->realize->VISUAL;
A “nice” visualization for a curve:
> $h2 = harnack_curve(3); > $p2 = $h2->PATCHWORK; > $p2->realize("uniform")->VISUAL;