dunceHatComplex S
The dunce hat is a compact topological space formed by taking a solid triangle and gluing all three sides together, with the orientation of one side reversed. Simply gluing two sides oriented in the same direction would yield a cone much like the dunce cap, but the gluing of the third side results in identifying the base of the cap with a line joining the base to the point.
Following Erik Christopher Zeeman's "On the dunce hat", Topology 2 (1964) 341–358, this method returns noncollapsible but contractible example of an abstract simplicial complex.






Our enumeration of the vertices follows the dunce hat example in Masahiro Hachimori's simplicial complex library.