polytope over quadratic number fields

Questions and problems about using polymake go here.
vdelecroix
Posts: 19
Joined: 08 Jul 2016, 23:06

polytope over quadratic number fields

Postby vdelecroix » 21 Aug 2019, 14:12

Dear polymake specialists,

I had trouble building some polytopes over quadratic fields with polymake. More precisely the following examples give me back wrong f-vectors Let me mention that I ran these examples within Sage with the jupymake interface. Any confirmation that this go wrong within polymake or help on how to construct these would be appreciated.

Best
Vincent

User avatar
joswig
Main Author
Posts: 280
Joined: 24 Dec 2010, 11:10

Re: polytope over quadratic number fields

Postby joswig » 21 Aug 2019, 15:56

The following is computed with polymake 3.4 and confirmed with the brand new version 3.5:

Code: Select all

polytope > print rhombicosidodecahedron()->F_VECTOR; 60 120 62 polytope > print truncated_dodecahedron()->F_VECTOR; 60 90 32
At least these two seem to agree with yours. It also works with the Julia interface Polymake.jl:

Code: Select all

julia> using Polymake; julia> Polytope.rhombicosidodecahedron().F_VECTOR pm::Vector<pm::Integer> 60 120 62
So it looks like the most probable source of trouble is the python interface.

To be able to help any further: which version of Sage did you try with which input exactly?

PS: All these are implemented in apps/polytope/src/johnson.cc

User avatar
joswig
Main Author
Posts: 280
Joined: 24 Dec 2010, 11:10

Re: polytope over quadratic number fields

Postby joswig » 21 Aug 2019, 16:08

A second potential source of error could be that there are competing conventions as far as names are concerned.

Here is one line of polymake code which generates all Johnson solids and lists their names and f-vectors.

Code: Select all

polytope> for (my $k=1; $k<=92; ++$k) { $j = johnson_solid($k); $_=$j->description; chomp; print "$_: ", $j->F_VECTOR, "\n"; } Johnson solid J1: Square pyramid: 5 8 5 Johnson solid J2: Pentagonal pyramid: 6 10 6 Johnson solid J3: Triangular cupola: 9 15 8 Johnson solid J4: Square cupola: 12 20 10 Johnson solid J5: Pentagonal cupola: 15 25 12 Johnson solid J6: Pentagonal rotunda: 20 35 17 Johnson solid J7: Elongated triangular bipyramid: 7 12 7 Johnson solid J8: Elongated square pyramid: 9 16 9 Johnson solid J9: Elongated pentagonal pyramid: 11 20 11 Johnson solid J10: Gyroelongated square pyramid: 9 20 13 Johnson solid J11: Gyroelongated pentagonal pyramid: 11 25 16 Johnson solid J12: Triangular bipyramid: 5 9 6 Johnson solid J13: Pentagonal bipyramid: 7 15 10 Johnson solid J14: Elongated triangular bipyramid: 8 15 9 Johnson solid J15: Elongated square bipyramid: 10 20 12 Johnson solid J16: Elongated pentagonal bipyramid: 12 25 15 Johnson solid J17: Gyroelongated square bipyramid: 10 24 16 Johnson solid J18: Elongated triangular cupola: 15 27 14 Johnson solid J19: Elongated square cupola: 20 36 18 Johnson solid J20: Elongated pentagonal cupola: 25 45 22 Johnson solid J21: Elongated pentagonal rotunda: 30 55 27 Johnson solid J22: Gyroelongated triangular cupola: 15 33 20 Johnson solid J23: Gyroelongated square cupola: 20 44 26 Johnson solid J24: Gyroelongated pentagonal cupola: 25 55 32 Johnson solid J25: Gyroelongated pentagonal rotunda: 30 65 37 Johnson solid J26: Gyrobifastigium: 8 14 8 Johnson solid J27: Triangular orthobicupola: 12 24 14 Johnson solid J28: Square orthobicupola: 16 32 18 Johnson solid J29: Square gyrobicupola: 16 32 18 Johnson solid J30: Pentagonal orthobicupola: 20 40 22 Johnson solid J31: Pentagonal gyrobicupola: 20 40 22 Johnson solid J32: Pentagonal orthocupolarotunda: 25 50 27 Johnson solid J33: Pentagonal gyrocupolarotunda: 25 50 27 Johnson solid J34: Pentagonal orthobirotunda: 30 60 32 Johnson solid J35: Elongated triangular orthobicupola: 18 36 20 Johnson solid J36: Elongated triangular gyrobicupola: 18 36 20 Johnson solid J37: Elongated square gyrobicupola: 24 48 26 Johnson solid J38: Elongated pentagonal orthobicupola: 30 60 32 Johnson solid J39: Elongated pentagonal gyrobicupola: 30 60 32 Johnson solid J40: Elongated pentagonal orthocupolarotunda: 35 70 37 Johnson solid J41: Elongated pentagonal gyrocupolarotunda: 35 70 37 Johnson solid J42: Elongated pentagonal orthobirotunda: 40 80 42 Johnson solid J43: Elongated pentagonal gyrobirotunda: 40 80 42 Johnson solid J44: Gyroelongated triangular bicupola: 18 42 26 Johnson solid J45: Gyroelongated square bicupola: 24 56 34 Johnson solid J46: Gyroelongated pentagonal bicupola: 30 70 42 Johnson solid J47: Gyroelongated pentagonal cupolarotunda: 35 80 47 Johnson solid J48: Gyroelongated pentagonal birotunda: 40 90 52 Johnson solid J49: augmented triangular prism: 7 13 8 Johnson solid J50: biaugmented triangular prism: 8 17 11 Johnson solid J51: triaugmented triangular prism: 9 21 14 Johnson solid J52: augmented pentagonal prism: 11 19 10 Johnson solid J53: biaugmented pentagonal prism: 12 23 13 Johnson solid J54: augmented hexagonal prism: 13 22 11 Johnson solid J55: parabiaugmented hexagonal prism: 14 26 14 Johnson solid J56: metabiaugmented hexagonal prism: 14 26 14 Johnson solid J57: triaugmented hexagonal prism: 15 30 17 Johnson solid J58: augmented dodecahedron: 21 35 16 Johnson solid J59: parabiaugmented dodecahedron: 22 40 20 Johnson solid J60: metabiaugmented dodecahedron: 22 40 20 Johnson solid J61: triaugmented dodecahedron: 23 45 24 Johnson solid J62: metabidiminished icosahedron: 10 20 12 Johnson solid J63: tridiminished icosahedron: 9 15 8 Johnson solid J64: augmented_tridiminished icosahedron: 10 18 10 Johnson solid J65: Augmented truncated tetrahedron: 15 27 14 Johnson solid J66: Augmented truncated cube: 28 48 22 Johnson solid J67: Biaugmented truncated cube: 32 60 30 Johnson solid J68: Augmented truncated dodecahedron: 65 100 37 Johnson solid J69: Parabiaugmented truncated dodecahedron: 70 110 42 Johnson solid J70: Metabiaugmented truncated dodecahedron: 70 110 42 Johnson solid J71: Triaugmented truncated dodecahedron: 75 120 47 Johnson solid J72: Gyrate rhombicosidodecahedron: 60 120 62 Johnson solid J73: Parabigyrate rhombicosidodecahedron: 60 120 62 Johnson solid J74: Metabigyrate rhombicosidodecahedron: 60 120 62 Johnson solid J75: trigyrate rhombicosidodecahedron: 60 120 62 Johnson solid J76: diminished rhombicosidodecahedron: 55 105 52 Johnson solid J77: paragyrate diminished rhombicosidodecahedron: 55 105 52 Johnson solid J78: metagyrate diminished rhombicosidodecahedron: 55 105 52 Johnson solid J79: bigyrate diminished rhombicosidodecahedron: 55 105 52 Johnson solid J80: parabidiminished rhombicosidodecahedron: 50 90 42 Johnson solid J81: metabidiminished rhombicosidodecahedron: 50 90 42 Johnson solid J82: gyrate parabidiminished rhombicosidodecahedron: 50 90 42 Johnson solid J83: tridiminished rhombicosidodecahedron: 45 75 32 Johnson solid J84: snub disphenoid: 8 18 12 Johnson solid J85: snub square antiprism: 16 40 26 Johnson solid J86: Sphenocorona: 10 22 14 Johnson solid J87: Augmented sphenocorona: 11 26 17 Johnson solid J88: Sphenomegacorona: 12 28 18 Johnson solid J89: Hebesphenomegacorona: 14 33 21 Johnson solid J90: Disphenocingulum: 16 38 24 Johnson solid J91: bilunabirotunda: 14 26 14 Johnson solid J92: triangular hebesphenorotunda: 18 36 20

User avatar
joswig
Main Author
Posts: 280
Joined: 24 Dec 2010, 11:10

Re: polytope over quadratic number fields

Postby joswig » 21 Aug 2019, 16:16

A third source of error is that some of the Johnson solids are represented with float coordinates, i.e., coordinate-wise in an inexact way.

E.g.,

Code: Select all

polytope > $j = johnson_solid(9); $_=$j->description; chomp; print "$_: ", $j->F_VECTOR, " ", $j->type->full_name, "\n"; Johnson solid J9: Elongated pentagonal pyramid: 11 20 11 Polytope<Float>
polymake still computes the correct f-vector since the johnson_solid client produces the polytopes with the correct combinatorics, i.e., with VERTICES_IN_FACETS given. If your python interface only transports the coordinates, then this information is lost.

The reason for relying on floats occasionally is that currently polymake is unable to deal with iterated quadratic extensions. So these should require more than one square root (I did not actually check though).

vdelecroix
Posts: 19
Joined: 08 Jul 2016, 23:06

Re: polytope over quadratic number fields

Postby vdelecroix » 21 Aug 2019, 19:00

Thanks for the answer. I did not used any prebuilt function but the coordinates available in the file https://www.labri.fr/perso/vdelecro/3-d ... dron.input

To reproduce from sage

Code: Select all

x = polygen(QQ, 'x') p = x**2 - x - 1 K = NumberField(p, 'a', embedding=(1-AA(5).sqrt())/2) a = K.gen() vertices = [(0, 1/2, -3/2*a + 2), (0, 1/2, 3/2*a - 2), (0, -1/2, -3/2*a + 2), (0, -1/2, 3/2*a - 2), (-3/2*a + 2, 0, 1/2), (-3/2*a + 2, 0, -1/2), (3/2*a - 2, 0, 1/2), (3/2*a - 2, 0, -1/2), (1/2, -3/2*a + 2, 0), (1/2, 3/2*a - 2, 0), (-1/2, -3/2*a + 2, 0), (-1/2, 3/2*a - 2, 0), (1/2, -1/2*a + 1, -a + 2), (1/2, -1/2*a + 1, a - 2), (1/2, 1/2*a - 1, -a + 2), (1/2, 1/2*a - 1, a - 2), (-1/2, -1/2*a + 1, -a + 2), (-1/2, -1/2*a + 1, a - 2), (-1/2, 1/2*a - 1, -a + 2), (-1/2, 1/2*a - 1, a - 2), (-a + 2, 1/2, -1/2*a + 1), (-a + 2, 1/2, 1/2*a - 1), (-a + 2, -1/2, -1/2*a + 1), (-a + 2, -1/2, 1/2*a - 1), (a - 2, 1/2, -1/2*a + 1), (a - 2, 1/2, 1/2*a - 1), (a - 2, -1/2, -1/2*a + 1), (a - 2, -1/2, 1/2*a - 1), (-1/2*a + 1, -a + 2, 1/2), (-1/2*a + 1, -a + 2, -1/2), (-1/2*a + 1, a - 2, 1/2), (-1/2*a + 1, a - 2, -1/2), (1/2*a - 1, -a + 2, 1/2), (1/2*a - 1, -a + 2, -1/2), (1/2*a - 1, a - 2, 1/2), (1/2*a - 1, a - 2, -1/2), (-1/2*a + 1, -a + 1, -a + 3/2), (-1/2*a + 1, -a + 1, a - 3/2), (-1/2*a + 1, a - 1, -a + 3/2), (-1/2*a + 1, a - 1, a - 3/2), (1/2*a - 1, -a + 1, -a + 3/2), (1/2*a - 1, -a + 1, a - 3/2), (1/2*a - 1, a - 1, -a + 3/2), (1/2*a - 1, a - 1, a - 3/2), (-a + 3/2, -1/2*a + 1, -a + 1), (-a + 3/2, -1/2*a + 1, a - 1), (-a + 3/2, 1/2*a - 1, -a + 1), (-a + 3/2, 1/2*a - 1, a - 1), (a - 3/2, -1/2*a + 1, -a + 1), (a - 3/2, -1/2*a + 1, a - 1), (a - 3/2, 1/2*a - 1, -a + 1), (a - 3/2, 1/2*a - 1, a - 1), (-a + 1, -a + 3/2, -1/2*a + 1), (-a + 1, -a + 3/2, 1/2*a - 1), (-a + 1, a - 3/2, -1/2*a + 1), (-a + 1, a - 3/2, 1/2*a - 1), (a - 1, -a + 3/2, -1/2*a + 1), (a - 1, -a + 3/2, 1/2*a - 1), (a - 1, a - 3/2, -1/2*a + 1), (a - 1, a - 3/2, 1/2*a - 1)] P = Polyhedron(vertices, base_ring=K, backend='polymake')
The generated polyhedron has 36 vertices instead of the 60 expected!

vdelecroix
Posts: 19
Joined: 08 Jul 2016, 23:06

Re: polytope over quadratic number fields

Postby vdelecroix » 21 Aug 2019, 19:06

You were right: the interface is to blame.

The Sage polymake interface is working when the quadratic number field is QQ[sqrt(D)]. But as soon as the generating element is something else (such as (1-sqrt(5))/2) in my example, it got confused. I did the conversion of coordinates to QQ[sqrt(5)] and it works!

Sorry for the noise... I will try to fix the Sage interface.

Vincent

vdelecroix
Posts: 19
Joined: 08 Jul 2016, 23:06

Re: polytope over quadratic number fields

Postby vdelecroix » 21 Aug 2019, 19:23

Though it would help if you can demonstrate how to manipulate QuadraticExtension in polymake. Namely, construct a polyhedron from its list of vertices in coordinates. The documentation that I found is very limited...

vdelecroix
Posts: 19
Joined: 08 Jul 2016, 23:06

Re: polytope over quadratic number fields

Postby vdelecroix » 21 Aug 2019, 21:21

for information: it is fixed in SageMath with ticket 28377.

User avatar
gawrilow
Main Author
Posts: 423
Joined: 25 Dec 2010, 17:40

Re: polytope over quadratic number fields

Postby gawrilow » 22 Aug 2019, 00:05

Though it would help if you can demonstrate how to manipulate QuadraticExtension in polymake. Namely, construct a polyhedron from its list of vertices in coordinates. The documentation that I found is very limited...
Do you mean the documentation of polymake itself or the Sage interface? Our tutorials should contain enough examples of polyhedra constructions.

vdelecroix
Posts: 19
Joined: 08 Jul 2016, 23:06

Re: polytope over quadratic number fields

Postby vdelecroix » 22 Aug 2019, 16:34

Though it would help if you can demonstrate how to manipulate QuadraticExtension in polymake. Namely, construct a polyhedron from its list of vertices in coordinates. The documentation that I found is very limited...
Do you mean the documentation of polymake itself or the Sage interface? Our tutorials should contain enough examples of polyhedra constructions.
I was not asking about Sage. Just within polymake itself. Well, I tried looking around and did not find anything relevent. Could you point me a single construction of a polyhedron from a list of vertices belonging to a quadratic extension?


Return to “Helpdesk”