Ask Your Question

Revision history [back]

If I use your code with K being a 2-simplex, it seems to work (unless I misunderstand what the dual cell is):

sage: X = simplicial_complexes.Simplex(2)
sage: find_dual_cell(X, Simplex(X.vertices()[0]))
Simplicial complex with 4 vertices and 2 facets
sage: Y = find_dual_cell(X, Simplex(X.vertices()[0]))
sage: Y.facets()
{((0,), (0, 1, 2), (0, 2)), ((0,), (0, 1), (0, 1, 2))}

or

sage: Y = find_dual_cell(X, Simplex([0]))
sage: Y.facets()
{((0,), (0, 1, 2), (0, 2)), ((0,), (0, 1), (0, 1, 2))}

It also seems to work if K is $S^1$ or $S^2$. If I try it with a 3-sphere, I get this:

sage: X = simplicial_complexes.Sphere(3)
sage: Y = find_dual_cell(X, Simplex(X.vertices()[0]))
sage: Y
Simplicial complex with 15 vertices and 24 facets

Is this wrong? What sort of answer are you expecting?