Hello!


I have written a program in Mathematica 7, which calculates for a (finite abstract) simplicial complex all its homology groups. I would really like to test it on the projective spaces, but cannot find a way to triangulate them. There seem to be very few articles on this matter and none of them states directly how the actual triangulations might be achieved, so I turn to MO for help.


**How can the real projective spaces
$$RP^n \approx B^n/\_{x\:\sim-x;\;\; x\in\partial B^n}$$
be triangulated as simplicial complexes?** A simplicial complex is presented as a list of simplices that aren't a face of any bigger simplex (the "main simplices"). Each k-simplex is just an ordered list of some k+1 integers. 


For example, {0,1,2} is a 2-simplex, as is {1,3,15}, etc. Examples of simplicial complexes: {{0,...,n}} is a n-dimensional ball, {{1,2},{1,3},{2,3}} is an empty triangle, skeleton[{Range[n+2]},n] is a n-sphere, etc.


I have already found a concrete triangulation for the real projective plane, but nothing more general.


It would also be **appreciated, that the actual triangulation is reasonably small** (not necessarily minimal), so that the program calculates homology groups fast enough. Also, **answers in code / pseudocode are much desirable** (projectiveSpace[n\_]:=???).


P.S. I have already written some functions, which can be used (sc...simplicial complex):


1. skeleton[sc,k] ...list of all k-faces of all simplices
2. sum[sc1,sc2]...topological sum (disjoint union)
3. connected sum[sc1,sc2] ...removes two k-simplicices and adds a tunnel between them
4. product[sc1,sc2]...staircase triangulation of a product (reorders the vertices)
5. cone[sc]
6. suspension[sc]



How to triangulate real projective spaces (as simplicial complexes in Mathematica)?
If you want code, see the patch for Sage at <http://trac.sagemath.org/sage_trac/attachment/ticket/9125/trac_9125-projective-space.patch>. This patch also includes references for triangulations of $\mathbf{R}P^n$, but I'll summarize the results here, too. For $n=3$, every triangulation must have at least 11 vertices, and the code gives an 11-vertex triangulation as described by Lutz in <http://arxiv.org/abs/math/0506372>. For $n=4$, every triangulation must have at least 16 vertices, and the code gives such a triangulation, also given by Lutz.


For $n>4$, I think that no minimal examples are known, or at least they weren't a year ago. But to get a triangulation of $\mathbf{R}P^n$, take the $n$-sphere as $\partial \Delta^{n+1}$, the boundary of an $(n+1)$-simplex. Barycentrically subdivide once; the resulting complex $K$ is still a sphere, but with vertices in one-to-one correspondence with the non-empty faces of $\partial \Delta^{n+1}$, which is to say in one-to-one correspondence with the nonempty proper subsets of $T= (0, 1, 2, ..., n+1)$. (I'm not sure why I can't get curly braces to show up here...). This triangulation $K$ of the sphere has a simplicial $\mathbf{Z}/2\mathbf{Z}$-action: on vertices (which correspond to nonempty proper subsets of $T$), send the vertex corresponding to a set $S$ to the vertex corresponding to $T-S$. The quotient space is a triangulation of $\mathbf{R}P^n$, with $2^{n+1}-1$ vertices.


