ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 10 Oct 2021 20:10:22 +0200Hasse diagram of different dimensional cells of a polyhedronhttps://ask.sagemath.org/question/59311/hasse-diagram-of-different-dimensional-cells-of-a-polyhedron/I am trying to get a facet poset diagram of a polyhedron.
What I want is an adjacency matrix describing the Hasse diagram/poset
where vertices are cells, and two vertices are connected by an edge
if one of their corresponding cells is contained in the other.
So I want a Hasse diagram where the top row consists of a vertex
for the highest dimensional cell, then the next row consists of
cells of one less dimension, and so on until the final row
corresponding to vertices.
For instance, I have:
E = polytopes.dodecahedron().face_lattice()
I don't know how to extract this kind of information from this.
I want to be able to plot the cell poset diagram in some other software to look at it.Sun, 10 Oct 2021 09:01:44 +0200https://ask.sagemath.org/question/59311/hasse-diagram-of-different-dimensional-cells-of-a-polyhedron/Comment by FrédéricC for <p>I am trying to get a facet poset diagram of a polyhedron.
What I want is an adjacency matrix describing the Hasse diagram/poset
where vertices are cells, and two vertices are connected by an edge
if one of their corresponding cells is contained in the other.</p>
<p>So I want a Hasse diagram where the top row consists of a vertex
for the highest dimensional cell, then the next row consists of
cells of one less dimension, and so on until the final row
corresponding to vertices.</p>
<p>For instance, I have:</p>
<pre><code>E = polytopes.dodecahedron().face_lattice()
</code></pre>
<p>I don't know how to extract this kind of information from this.</p>
<p>I want to be able to plot the cell poset diagram in some other software to look at it.</p>
https://ask.sagemath.org/question/59311/hasse-diagram-of-different-dimensional-cells-of-a-polyhedron/?comment=59314#post-id-59314Not clear to me what more you would like to have. E is exactly what you want, except for the added empty face of dimension -1. You can see the Hasse diagram using `E.plot(label_elements=False)`.Sun, 10 Oct 2021 14:15:28 +0200https://ask.sagemath.org/question/59311/hasse-diagram-of-different-dimensional-cells-of-a-polyhedron/?comment=59314#post-id-59314Answer by FrédéricC for <p>I am trying to get a facet poset diagram of a polyhedron.
What I want is an adjacency matrix describing the Hasse diagram/poset
where vertices are cells, and two vertices are connected by an edge
if one of their corresponding cells is contained in the other.</p>
<p>So I want a Hasse diagram where the top row consists of a vertex
for the highest dimensional cell, then the next row consists of
cells of one less dimension, and so on until the final row
corresponding to vertices.</p>
<p>For instance, I have:</p>
<pre><code>E = polytopes.dodecahedron().face_lattice()
</code></pre>
<p>I don't know how to extract this kind of information from this.</p>
<p>I want to be able to plot the cell poset diagram in some other software to look at it.</p>
https://ask.sagemath.org/question/59311/hasse-diagram-of-different-dimensional-cells-of-a-polyhedron/?answer=59318#post-id-59318To get a matrix, you can do
sage: L = polytopes.dodecahedron().face_lattice()
sage: L.hasse_diagram().adjacency_matrix()
64 x 64 dense matrix over Integer Ring (use the '.str()' method to see the entries)
and if you want to get rid of the empty face before, you can use
sage: L = L.subposet([f for f in L if f.dimension()>=0])
Sun, 10 Oct 2021 20:10:22 +0200https://ask.sagemath.org/question/59311/hasse-diagram-of-different-dimensional-cells-of-a-polyhedron/?answer=59318#post-id-59318