====== BigObject Patchwork ======
//from application [[..:tropical|tropical]]//\\
\\
This encodes a "combinatorial" patchworking structure on a hypersurface. That is, it requires the support of the dual triangulation to be the full set of lattice points in a scaled simplex. See Joswig and Vater, ICMS 2020, doi:10.1007/978-3-030-52200-1_20.
? Permutations:
:
? ConesPerm:
::UNDOCUMENTED
? TermPerm:
::UNDOCUMENTED
===== Properties =====
==== no category ====
{{anchor:betti_numbers_z2:}}
? **''BETTI_NUMBERS_Z2''**
:: The Z_2 Betti numbers of the patchworked hypersurface. See the documentation of CHAIN_COMPLEX_Z2 for details.
? Type:
:''[[..:common#Array |Array]]<[[..:common#Int |Int]]>''
? Example:
:: A patchworked hyperplane in n-dimensional real projective space is topologically the (n-1)-dimensional real projective space:
:: > $h = new tropical::Hypersurface(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
----
{{anchor:chain_complex_z2:}}
? **''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.
? Type:
:''[[..:topaz#ChainComplex |ChainComplex]]<[[..:common#SparseMatrix |SparseMatrix]]<[[..:common#GF2 |GF2]],[[..:common#NonSymmetric |NonSymmetric]]%%>>%%''
? Example:
:: A patchworked line in the real projective plane is combinatorially a triangle:
:: > $h = new tropical::Hypersurface(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
? Example:
:: 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(DUAL_SUBDIVISION=>$moae);
> $p = $h->PATCHWORK(SIGNS=>[0,0,0,0,0,0]);
> print $p->CHAIN_COMPLEX_Z2->type->full_name;
ChainComplex>
----
{{anchor:real_facets:}}
? **''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 ''[[..:tropical:Patchwork#REAL_PHASE |REAL_PHASE]]''.
? Type:
:''[[..:common#IncidenceMatrix |IncidenceMatrix]]<[[..:common#NonSymmetric |NonSymmetric]]>''
----
{{anchor: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 ''[[..:tropical:Patchwork#REAL_FACETS |REAL_FACETS]]''.
? Type:
:''[[..:common#IncidenceMatrix |IncidenceMatrix]]<[[..:common#NonSymmetric |NonSymmetric]]>''
? Example:
:: > $h = new tropical::Hypersurface(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;
----
{{anchor:signs:}}
? **''SIGNS''**
:: Sign distribution on the support of the ''[[..:tropical:LinesInCubic#POLYNOMIAL |POLYNOMIAL]]''. Indices correspond to row indices of ''[[..:tropical:Hypersurface#MONOMIALS |MONOMIALS]]''.
? Type:
:''[[..:common#Array |Array]]<[[..:common#Bool |Bool]]>''
----
===== Methods =====
==== no category ====
{{anchor:realize:}}
? **''realize([[..:common#String |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).
? Parameters:
:: ''[[..:common#String |String]]'' ''method'': "rigid" (default) or "uniform"
? Returns:
:''[[..:fan:PolyhedralComplex |PolyhedralComplex]]<[[..:common#Rational |Rational]]>''
? Example:
:: Visualize a patchworked plane:
:: > $h1 = new tropical::Hypersurface(POLYNOMIAL=>toTropicalPolynomial("max(a,b,c,d)"));
> $p1 = $h1->PATCHWORK(SIGNS=>[1,0,1,0]);
> $p1->realize->VISUAL;
? Example:
:: A "nice" visualization for a curve:
:: > $h2 = harnack_curve(3);
> $p2 = $h2->PATCHWORK;
> $p2->realize("uniform")->VISUAL;
----