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.Thu, 13 Aug 2015 09:57:28 +0200Isomorphisms of 2-skeletons of polytopeshttps://ask.sagemath.org/question/28827/isomorphisms-of-2-skeletons-of-polytopes/ Hi there,
We are interested in checking whether the 2-skeletons of two distinct polytopes are isomorphic (as posets). We understand that we can get the face_lattice of each of the polytope, but we don't know who to produce a poset which contains the 2-skeleton for each polytope so that we can use the function is_isomorphic for posets?
Thank you in advance, and regards,
Guillermo Thu, 13 Aug 2015 09:19:02 +0200https://ask.sagemath.org/question/28827/isomorphisms-of-2-skeletons-of-polytopes/Answer by tmonteil for <p>Hi there,</p>
<p>We are interested in checking whether the 2-skeletons of two distinct polytopes are isomorphic (as posets). We understand that we can get the face_lattice of each of the polytope, but we don't know who to produce a poset which contains the 2-skeleton for each polytope so that we can use the function is_isomorphic for posets?</p>
<p>Thank you in advance, and regards,
Guillermo </p>
https://ask.sagemath.org/question/28827/isomorphisms-of-2-skeletons-of-polytopes/?answer=28828#post-id-28828You can restrict the face_lattice poset by using the `subposet` method to restrict the poset to elements corresponding to 0-faces, 1-faces and 2-faces as follows: if `P` is your polytope, you can do:
sage: PP = P.face_lattice()
sage: P2 = PP.subposet(P.faces(0)+P.faces(1)+P.faces(2))
Then, if you do the same with another polytope `Q`, you can then check:
sage: P2.is_isomorphic(Q2)
Thu, 13 Aug 2015 09:39:28 +0200https://ask.sagemath.org/question/28827/isomorphisms-of-2-skeletons-of-polytopes/?answer=28828#post-id-28828Comment by guillermo for <p>You can restrict the face_lattice poset by using the <code>subposet</code> method to restrict the poset to elements corresponding to 0-faces, 1-faces and 2-faces as follows: if <code>P</code> is your polytope, you can do:</p>
<pre><code>sage: PP = P.face_lattice()
sage: P2 = PP.subposet(P.faces(0)+P.faces(1)+P.faces(2))
</code></pre>
<p>Then, if you do the same with another polytope <code>Q</code>, you can then check:</p>
<pre><code>sage: P2.is_isomorphic(Q2)
</code></pre>
https://ask.sagemath.org/question/28827/isomorphisms-of-2-skeletons-of-polytopes/?comment=28831#post-id-28831Great! Thanks a lot.Thu, 13 Aug 2015 09:57:28 +0200https://ask.sagemath.org/question/28827/isomorphisms-of-2-skeletons-of-polytopes/?comment=28831#post-id-28831Comment by Nathann for <p>You can restrict the face_lattice poset by using the <code>subposet</code> method to restrict the poset to elements corresponding to 0-faces, 1-faces and 2-faces as follows: if <code>P</code> is your polytope, you can do:</p>
<pre><code>sage: PP = P.face_lattice()
sage: P2 = PP.subposet(P.faces(0)+P.faces(1)+P.faces(2))
</code></pre>
<p>Then, if you do the same with another polytope <code>Q</code>, you can then check:</p>
<pre><code>sage: P2.is_isomorphic(Q2)
</code></pre>
https://ask.sagemath.org/question/28827/isomorphisms-of-2-skeletons-of-polytopes/?comment=28830#post-id-28830It could make sense to have a .skeleton() method, by the way...Thu, 13 Aug 2015 09:43:20 +0200https://ask.sagemath.org/question/28827/isomorphisms-of-2-skeletons-of-polytopes/?comment=28830#post-id-28830