Ticket #13888: trac-13888-barnette-sphere-fc.patch

File trac-13888-barnette-sphere-fc.patch, 3.6 KB (added by chapoton, 10 years ago)
  • sage/homology/examples.py

    # HG changeset patch
    # User Frederic Chapoton <chapoton at math.univ-lyon1.fr>
    # Date 1356871928 -3600
    # Node ID 15bb8b362364e04fb0ce9a754cfec237f458a045
    # Parent  fe34fbbd2093f6371cbc1c2e1aa2bb5674ddb43b
    #13888 Defines the Barnette triangulation of the 3-sphere
    * * *
    Barnette Sphere - reviewer's patch
    
    diff --git a/sage/homology/examples.py b/sage/homology/examples.py
    a b All of these examples are accessible by  
    2727You can get a list by typing ``simplicial_complexes.`` and hitting the
    2828TAB key::
    2929
     30   simplicial_complexes.BarnetteSphere
    3031   simplicial_complexes.ChessboardComplex
    3132   simplicial_complexes.ComplexProjectivePlane
    3233   simplicial_complexes.K3Surface
    class SimplicialComplexExamples(): 
    158159    Here are the available examples; you can also type
    159160    ``simplicial_complexes.``  and hit tab to get a list:
    160161
     162    - :meth:`BarnetteSphere`
    161163    - :meth:`ChessboardComplex`
    162164    - :meth:`ComplexProjectivePlane`
    163165    - :meth:`K3Surface`
    class SimplicialComplexExamples(): 
    815817                (1, 2, 4, 7, 15), (2, 3, 7, 8, 16), (1, 4, 5, 6, 10)],
    816818             is_mutable=False)
    817819
     820    def BarnetteSphere(self):
     821        r"""
     822        Returns Barnette's triangulation of the 3-sphere.
     823
     824        This is a pure simplicial complex of dimension 3 with 8
     825        vertices and 19 facets, which is a non-polytopal triangulation
     826        of the 3-sphere. It was constructed by Barnette in
     827        [B1970]_. The construction here uses the labeling from De
     828        Loera, Rambau and Santos [DLRS2010]_. Another reference is chapter
     829        III.4 of Ewald [E1996]_.
     830
     831        EXAMPLES::
     832
     833            sage: BS = simplicial_complexes.BarnetteSphere() ; BS
     834            Simplicial complex with vertex set (1, 2, 3, 4, 5, 6, 7, 8) and 19 facets
     835            sage: BS.f_vector()
     836            [1, 8, 27, 38, 19]
     837
     838        TESTS:
     839
     840        Checks that this is indeed the same Barnette Sphere as the one
     841        given on page 87 of [E1996]_.::
     842
     843            sage: BS2 = SimplicialComplex([[1,2,3,4],[3,4,5,6],[1,2,5,6],
     844            ...                            [1,2,4,7],[1,3,4,7],[3,4,6,7],
     845            ...                            [3,5,6,7],[1,2,5,7],[2,5,6,7],
     846            ...                            [2,4,6,7],[1,2,3,8],[2,3,4,8],
     847            ...                            [3,4,5,8],[4,5,6,8],[1,2,6,8],
     848            ...                            [1,5,6,8],[1,3,5,8],[2,4,6,8],
     849            ...                            [1,3,5,7]])
     850            sage: BS.is_isomorphic(BS2)
     851            True
     852
     853        REFERENCES:
     854
     855        .. [B1970] Barnette, "Diagrams and Schlegel diagrams", in
     856           Combinatorial Structures and Their Applications, Proc. Calgary
     857           Internat. Conference 1969, New York, 1970, Gordon and Breach.
     858
     859        .. [DLRS2010] De Loera, Rambau and Santos, "Triangulations:
     860           Structures for Algorithms and Applications", Algorithms and
     861           Computation in Mathematics, Volume 25, Springer, 2011.
     862
     863        .. [E1996] Ewald, "Combinatorial Convexity and Algebraic Geometry",
     864           vol. 168 of Graduate Texts in Mathematics, Springer, 1996
     865
     866        """
     867        return SimplicialComplex([
     868                (1,2,4,5),(2,3,5,6),(1,3,4,6),(1,2,3,7),(4,5,6,7),(1,2,4,7),
     869                (2,4,5,7),(2,3,5,7),(3,5,6,7),(3,1,6,7),(1,6,4,7),(1,2,3,8),
     870                (4,5,6,8),(1,2,5,8),(1,4,5,8),(2,3,6,8),(2,5,6,8),(3,1,4,8),
     871                (3,6,4,8)])
     872
    818873    ###############################################################
    819874    # examples from graph theory:
    820875