# Revision history [back]

If you want vertices to be given as integers rather than (in the case of RP^5) tuples, you can create a dictionary to translate vertices to integers:

RP5 = simplicial_complexes.RealProjectiveSpace(5)
d = {y:x for x,y in enumerate(RP5.vertices())}


Then you can use that dictionary to translate the actual facets to tuples of integers:

[tuple(d[v] for v in f) for f in RP5.facets()]


As I noted in a comment, this will get unwieldy pretty quickly, as the dimension goes up.

If you want vertices to be given as integers rather than (in the case of RP^5) tuples, you can create a dictionary to translate vertices to integers:

RP5 = simplicial_complexes.RealProjectiveSpace(5)
d = {y:x for x,y in enumerate(RP5.vertices())}


(By the way, Sage constructs such a dictionary already for its own uses, so you can replace the second line with d = RP5._vertex_to_index. This is not an advertised feature, so knowing how to construct your own dictionary for this translation is useful.)

Then you can use that dictionary to translate the actual facets to tuples of integers:

[tuple(d[v] for v in f) for f in RP5.facets()]


As I noted in a comment, this will get unwieldy pretty quickly, as the dimension goes up.