Examples of simplicial sets.#

These are accessible via simplicial_sets.Sphere(3), simplicial_sets.Torus(), etc. Type simplicial_sets.[TAB] to see a complete list.

AUTHORS:

  • John H. Palmieri (2016-07)

  • Miguel Marco (2022-12)

sage.topology.simplicial_set_examples.ClassifyingSpace(group)[source]#

Return the classifying space of group, as a simplicial set.

INPUT:

  • group – a finite group or finite monoid

See sage.categories.finite_monoids.FiniteMonoids.ParentMethods.nerve() for more details and more examples.

EXAMPLES:

sage: # needs sage.groups
sage: C2 = groups.misc.MultiplicativeAbelian([2])
sage: BC2 = simplicial_sets.ClassifyingSpace(C2)
sage: H = BC2.homology(range(9), base_ring=GF(2))                               # needs sage.modules
sage: [H[i].dimension() for i in range(9)]                                      # needs sage.modules
[0, 1, 1, 1, 1, 1, 1, 1, 1]

sage: Klein4 = groups.misc.MultiplicativeAbelian([2, 2])                        # needs sage.groups
sage: BK = simplicial_sets.ClassifyingSpace(Klein4); BK                         # needs sage.groups
Classifying space of Multiplicative Abelian group isomorphic to C2 x C2
sage: BK.homology(range(5), base_ring=GF(2))    # long time (1 second)          # needs sage.groups sage.modules
{0: Vector space of dimension 0 over Finite Field of size 2,
 1: Vector space of dimension 2 over Finite Field of size 2,
 2: Vector space of dimension 3 over Finite Field of size 2,
 3: Vector space of dimension 4 over Finite Field of size 2,
 4: Vector space of dimension 5 over Finite Field of size 2}
>>> from sage.all import *
>>> # needs sage.groups
>>> C2 = groups.misc.MultiplicativeAbelian([Integer(2)])
>>> BC2 = simplicial_sets.ClassifyingSpace(C2)
>>> H = BC2.homology(range(Integer(9)), base_ring=GF(Integer(2)))                               # needs sage.modules
>>> [H[i].dimension() for i in range(Integer(9))]                                      # needs sage.modules
[0, 1, 1, 1, 1, 1, 1, 1, 1]

>>> Klein4 = groups.misc.MultiplicativeAbelian([Integer(2), Integer(2)])                        # needs sage.groups
>>> BK = simplicial_sets.ClassifyingSpace(Klein4); BK                         # needs sage.groups
Classifying space of Multiplicative Abelian group isomorphic to C2 x C2
>>> BK.homology(range(Integer(5)), base_ring=GF(Integer(2)))    # long time (1 second)          # needs sage.groups sage.modules
{0: Vector space of dimension 0 over Finite Field of size 2,
 1: Vector space of dimension 2 over Finite Field of size 2,
 2: Vector space of dimension 3 over Finite Field of size 2,
 3: Vector space of dimension 4 over Finite Field of size 2,
 4: Vector space of dimension 5 over Finite Field of size 2}
sage.topology.simplicial_set_examples.ComplexProjectiveSpace(n)[source]#

Return complex \(n\)-dimensional projective space, as a simplicial set.

This is only defined when \(n\) is at most 4. It is constructed using the simplicial set decomposition provided by Kenzo, as described by Sergeraert [Ser2010]

EXAMPLES:

sage: simplicial_sets.ComplexProjectiveSpace(2).homology(reduced=False)         # needs sage.modules
{0: Z, 1: 0, 2: Z, 3: 0, 4: Z}
sage: CP3 = simplicial_sets.ComplexProjectiveSpace(3); CP3                      # needs pyparsing
CP^3
sage: latex(CP3)                                                                # needs pyparsing
CP^{3}
sage: CP3.f_vector()                                                            # needs pyparsing
[1, 0, 3, 10, 25, 30, 15]

sage: # long time, needs pyparsing sage.modules
sage: K = CP3.suspension()              # long time (1 second)
sage: R = K.cohomology_ring(GF(2))
sage: R.gens()
(h^{0,0}, h^{3,0}, h^{5,0}, h^{7,0})
sage: x = R.gens()[1]
sage: x.Sq(2)
h^{5,0}

sage: simplicial_sets.ComplexProjectiveSpace(4).f_vector()                      # needs pyparsing
[1, 0, 4, 22, 97, 255, 390, 315, 105]

sage: simplicial_sets.ComplexProjectiveSpace(5)
Traceback (most recent call last):
...
ValueError: complex projective spaces are only available in dimensions between 0 and 4
>>> from sage.all import *
>>> simplicial_sets.ComplexProjectiveSpace(Integer(2)).homology(reduced=False)         # needs sage.modules
{0: Z, 1: 0, 2: Z, 3: 0, 4: Z}
>>> CP3 = simplicial_sets.ComplexProjectiveSpace(Integer(3)); CP3                      # needs pyparsing
CP^3
>>> latex(CP3)                                                                # needs pyparsing
CP^{3}
>>> CP3.f_vector()                                                            # needs pyparsing
[1, 0, 3, 10, 25, 30, 15]

>>> # long time, needs pyparsing sage.modules
>>> K = CP3.suspension()              # long time (1 second)
>>> R = K.cohomology_ring(GF(Integer(2)))
>>> R.gens()
(h^{0,0}, h^{3,0}, h^{5,0}, h^{7,0})
>>> x = R.gens()[Integer(1)]
>>> x.Sq(Integer(2))
h^{5,0}

>>> simplicial_sets.ComplexProjectiveSpace(Integer(4)).f_vector()                      # needs pyparsing
[1, 0, 4, 22, 97, 255, 390, 315, 105]

>>> simplicial_sets.ComplexProjectiveSpace(Integer(5))
Traceback (most recent call last):
...
ValueError: complex projective spaces are only available in dimensions between 0 and 4
sage.topology.simplicial_set_examples.Empty()[source]#

Return the empty simplicial set.

This should return the same simplicial set each time it is called.

EXAMPLES:

sage: from sage.topology.simplicial_set_examples import Empty
sage: E = Empty()
sage: E
Empty simplicial set
sage: E.nondegenerate_simplices()
[]
sage: E is Empty()
True
>>> from sage.all import *
>>> from sage.topology.simplicial_set_examples import Empty
>>> E = Empty()
>>> E
Empty simplicial set
>>> E.nondegenerate_simplices()
[]
>>> E is Empty()
True
sage.topology.simplicial_set_examples.HopfMap()[source]#

Return a simplicial model of the Hopf map \(S^3 \to S^2\)

This is taken from Exemple II.1.19 in the thesis of Clemens Berger [Ber1991].

The Hopf map is a fibration \(S^3 \to S^2\). If it is viewed as attaching a 4-cell to the 2-sphere, the resulting adjunction space is 2-dimensional complex projective space. The resulting model is a bit larger than the one obtained from simplicial_sets.ComplexProjectiveSpace(2).

EXAMPLES:

sage: g = simplicial_sets.HopfMap()
sage: g.domain()
Simplicial set with 20 non-degenerate simplices
sage: g.codomain()
S^2
>>> from sage.all import *
>>> g = simplicial_sets.HopfMap()
>>> g.domain()
Simplicial set with 20 non-degenerate simplices
>>> g.codomain()
S^2

Using the Hopf map to attach a cell:

sage: X = g.mapping_cone()
sage: CP2 = simplicial_sets.ComplexProjectiveSpace(2)
sage: X.homology() == CP2.homology()                                            # needs sage.modules
True

sage: X.f_vector()
[1, 0, 5, 9, 6]
sage: CP2.f_vector()
[1, 0, 2, 3, 3]
>>> from sage.all import *
>>> X = g.mapping_cone()
>>> CP2 = simplicial_sets.ComplexProjectiveSpace(Integer(2))
>>> X.homology() == CP2.homology()                                            # needs sage.modules
True

>>> X.f_vector()
[1, 0, 5, 9, 6]
>>> CP2.f_vector()
[1, 0, 2, 3, 3]
sage.topology.simplicial_set_examples.Horn(n, k)[source]#

Return the horn \(\Lambda^n_k\).

This is the subsimplicial set of the \(n\)-simplex obtained by removing its \(k\)-th face.

EXAMPLES:

sage: L = simplicial_sets.Horn(3, 0)
sage: L
(3, 0)-Horn
sage: L.n_cells(3)
[]
sage: L.n_cells(2)
[(0, 1, 2), (0, 1, 3), (0, 2, 3)]

sage: L20 = simplicial_sets.Horn(2, 0)
sage: latex(L20)
\Lambda^{2}_{0}
sage: L20.inclusion_map()
Simplicial set morphism:
  From: (2, 0)-Horn
  To:   2-simplex
  Defn: [(0,), (1,), (2,), (0, 1), (0, 2)] --> [(0,), (1,), (2,), (0, 1), (0, 2)]
>>> from sage.all import *
>>> L = simplicial_sets.Horn(Integer(3), Integer(0))
>>> L
(3, 0)-Horn
>>> L.n_cells(Integer(3))
[]
>>> L.n_cells(Integer(2))
[(0, 1, 2), (0, 1, 3), (0, 2, 3)]

>>> L20 = simplicial_sets.Horn(Integer(2), Integer(0))
>>> latex(L20)
\Lambda^{2}_{0}
>>> L20.inclusion_map()
Simplicial set morphism:
  From: (2, 0)-Horn
  To:   2-simplex
  Defn: [(0,), (1,), (2,), (0, 1), (0, 2)] --> [(0,), (1,), (2,), (0, 1), (0, 2)]
sage.topology.simplicial_set_examples.KleinBottle()[source]#

Return the Klein bottle as a simplicial set.

This converts the \(\Delta\)-complex version to a simplicial set. It has one 0-simplex, three 1-simplices, and two 2-simplices.

EXAMPLES:

sage: K = simplicial_sets.KleinBottle()
sage: K.f_vector()
[1, 3, 2]
sage: K.homology(reduced=False)                                                 # needs sage.modules
{0: Z, 1: Z x C2, 2: 0}
sage: K
Klein bottle
>>> from sage.all import *
>>> K = simplicial_sets.KleinBottle()
>>> K.f_vector()
[1, 3, 2]
>>> K.homology(reduced=False)                                                 # needs sage.modules
{0: Z, 1: Z x C2, 2: 0}
>>> K
Klein bottle
class sage.topology.simplicial_set_examples.Nerve(monoid)[source]#

Bases: SimplicialSet_arbitrary

The nerve of a multiplicative monoid.

INPUT:

  • monoid – a multiplicative monoid

See sage.categories.finite_monoids.FiniteMonoids.ParentMethods.nerve() for full documentation.

EXAMPLES:

sage: M = FiniteMonoids().example()
sage: M
An example of a finite multiplicative monoid: the integers modulo 12
sage: X = M.nerve()
sage: list(M)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
sage: X.n_cells(0)
[1]
sage: X.n_cells(1)
[0, 10, 11, 2, 3, 4, 5, 6, 7, 8, 9]
>>> from sage.all import *
>>> M = FiniteMonoids().example()
>>> M
An example of a finite multiplicative monoid: the integers modulo 12
>>> X = M.nerve()
>>> list(M)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
>>> X.n_cells(Integer(0))
[1]
>>> X.n_cells(Integer(1))
[0, 10, 11, 2, 3, 4, 5, 6, 7, 8, 9]
n_skeleton(n)[source]#

Return the \(n\)-skeleton of this simplicial set.

That is, the simplicial set generated by all nondegenerate simplices of dimension at most \(n\).

INPUT:

  • n – the dimension

EXAMPLES:

sage: # needs sage.groups
sage: K4 = groups.misc.MultiplicativeAbelian([2,2])
sage: BK4 = simplicial_sets.ClassifyingSpace(K4)
sage: BK4.n_skeleton(3)
Simplicial set with 40 non-degenerate simplices
sage: BK4.n_cells(1) == BK4.n_skeleton(3).n_cells(1)
True
sage: BK4.n_cells(3) == BK4.n_skeleton(1).n_cells(3)
False
>>> from sage.all import *
>>> # needs sage.groups
>>> K4 = groups.misc.MultiplicativeAbelian([Integer(2),Integer(2)])
>>> BK4 = simplicial_sets.ClassifyingSpace(K4)
>>> BK4.n_skeleton(Integer(3))
Simplicial set with 40 non-degenerate simplices
>>> BK4.n_cells(Integer(1)) == BK4.n_skeleton(Integer(3)).n_cells(Integer(1))
True
>>> BK4.n_cells(Integer(3)) == BK4.n_skeleton(Integer(1)).n_cells(Integer(3))
False
sage.topology.simplicial_set_examples.Point()[source]#

Return a single point called “*” as a simplicial set.

This should return the same simplicial set each time it is called.

EXAMPLES:

sage: P = simplicial_sets.Point()
sage: P.is_pointed()
True
sage: P.nondegenerate_simplices()
[*]

sage: Q = simplicial_sets.Point()
sage: P is Q
True
sage: P == Q
True
>>> from sage.all import *
>>> P = simplicial_sets.Point()
>>> P.is_pointed()
True
>>> P.nondegenerate_simplices()
[*]

>>> Q = simplicial_sets.Point()
>>> P is Q
True
>>> P == Q
True
sage.topology.simplicial_set_examples.PresentationComplex(G)[source]#

Return a simplicial set constructed from a group presentation. The result is a subdivision of the presentation complex.

The presentation complex has a single vertex and it has one edge for each generator. Then triangles (and eventually new edges to glue them) are added to realize the relations.

INPUT:

  • “G” – a finitely presented group

EXAMPLES:

sage: # needs sage.groups
sage: G = SymmetricGroup(2).as_finitely_presented_group(); G
Finitely presented group < a | a^2 >
sage: S = simplicial_sets.PresentationComplex(G); S
Simplicial set with 5 non-degenerate simplices
sage: S.face_data()
{Delta^0: None,
 a: (Delta^0, Delta^0),
 a^-1: (Delta^0, Delta^0),
 Ta: (a, s_0 Delta^0, a^-1),
 a^2: (a, s_0 Delta^0, a)}
sage: S.fundamental_group()
Finitely presented group < e0 | e0^2 >
>>> from sage.all import *
>>> # needs sage.groups
>>> G = SymmetricGroup(Integer(2)).as_finitely_presented_group(); G
Finitely presented group < a | a^2 >
>>> S = simplicial_sets.PresentationComplex(G); S
Simplicial set with 5 non-degenerate simplices
>>> S.face_data()
{Delta^0: None,
 a: (Delta^0, Delta^0),
 a^-1: (Delta^0, Delta^0),
 Ta: (a, s_0 Delta^0, a^-1),
 a^2: (a, s_0 Delta^0, a)}
>>> S.fundamental_group()
Finitely presented group < e0 | e0^2 >
sage.topology.simplicial_set_examples.RealProjectiveSpace(n)[source]#

Return real \(n\)-dimensional projective space, as a simplicial set.

This is constructed as the \(n\)-skeleton of the nerve of the group of order 2, and therefore has a single non-degenerate simplex in each dimension up to \(n\).

EXAMPLES:

sage: # needs sage.groups
sage: simplicial_sets.RealProjectiveSpace(7)
RP^7
sage: RP5 = simplicial_sets.RealProjectiveSpace(5)
sage: RP5.homology()
{0: 0, 1: C2, 2: 0, 3: C2, 4: 0, 5: Z}
sage: RP5
RP^5
sage: latex(RP5)
RP^{5}

sage: BC2 = simplicial_sets.RealProjectiveSpace(Infinity)                       # needs sage.groups
sage: latex(BC2)                                                                # needs sage.groups
RP^{\infty}
>>> from sage.all import *
>>> # needs sage.groups
>>> simplicial_sets.RealProjectiveSpace(Integer(7))
RP^7
>>> RP5 = simplicial_sets.RealProjectiveSpace(Integer(5))
>>> RP5.homology()
{0: 0, 1: C2, 2: 0, 3: C2, 4: 0, 5: Z}
>>> RP5
RP^5
>>> latex(RP5)
RP^{5}

>>> BC2 = simplicial_sets.RealProjectiveSpace(Infinity)                       # needs sage.groups
>>> latex(BC2)                                                                # needs sage.groups
RP^{\infty}
sage.topology.simplicial_set_examples.Simplex(n)[source]#

Return the \(n\)-simplex as a simplicial set.

EXAMPLES:

sage: K = simplicial_sets.Simplex(2)
sage: K
2-simplex
sage: latex(K)
\Delta^{2}
sage: K.n_cells(0)
[(0,), (1,), (2,)]
sage: K.n_cells(1)
[(0, 1), (0, 2), (1, 2)]
sage: K.n_cells(2)
[(0, 1, 2)]
>>> from sage.all import *
>>> K = simplicial_sets.Simplex(Integer(2))
>>> K
2-simplex
>>> latex(K)
\Delta^{2}
>>> K.n_cells(Integer(0))
[(0,), (1,), (2,)]
>>> K.n_cells(Integer(1))
[(0, 1), (0, 2), (1, 2)]
>>> K.n_cells(Integer(2))
[(0, 1, 2)]
sage.topology.simplicial_set_examples.Sphere(n)[source]#

Return the \(n\)-sphere as a simplicial set.

It is constructed with two non-degenerate simplices: a vertex \(v_0\) (which is the base point) and an \(n\)-simplex \(\sigma_n\).

INPUT:

  • n – integer

EXAMPLES:

sage: S0 = simplicial_sets.Sphere(0)
sage: S0
S^0
sage: S0.nondegenerate_simplices()
[v_0, w_0]
sage: S0.is_pointed()
True
sage: simplicial_sets.Sphere(4)
S^4
sage: latex(simplicial_sets.Sphere(4))
S^{4}
sage: simplicial_sets.Sphere(4).nondegenerate_simplices()
[v_0, sigma_4]
>>> from sage.all import *
>>> S0 = simplicial_sets.Sphere(Integer(0))
>>> S0
S^0
>>> S0.nondegenerate_simplices()
[v_0, w_0]
>>> S0.is_pointed()
True
>>> simplicial_sets.Sphere(Integer(4))
S^4
>>> latex(simplicial_sets.Sphere(Integer(4)))
S^{4}
>>> simplicial_sets.Sphere(Integer(4)).nondegenerate_simplices()
[v_0, sigma_4]
sage.topology.simplicial_set_examples.Torus()[source]#

Return the torus as a simplicial set.

This computes the product of the circle with itself, where the circle is represented using a single 0-simplex and a single 1-simplex. Thus it has one 0-simplex, three 1-simplices, and two 2-simplices.

EXAMPLES:

sage: T = simplicial_sets.Torus()
sage: T.f_vector()
[1, 3, 2]
sage: T.homology(reduced=False)                                                 # needs sage.modules
{0: Z, 1: Z x Z, 2: Z}
>>> from sage.all import *
>>> T = simplicial_sets.Torus()
>>> T.f_vector()
[1, 3, 2]
>>> T.homology(reduced=False)                                                 # needs sage.modules
{0: Z, 1: Z x Z, 2: Z}
sage.topology.simplicial_set_examples.simplicial_data_from_kenzo_output(filename)[source]#

Return data to construct a simplicial set, given Kenzo output.

INPUT:

  • filename – name of file containing the output from Kenzo’s show-structure() function

OUTPUT: data to construct a simplicial set from the Kenzo output

Several files with Kenzo output are in the directory SAGE_EXTCODE/kenzo/.

EXAMPLES:

sage: from sage.topology.simplicial_set_examples import simplicial_data_from_kenzo_output
sage: from sage.topology.simplicial_set import SimplicialSet
sage: sphere = os.path.join(SAGE_ENV['SAGE_EXTCODE'], 'kenzo', 'S4.txt')
sage: S4 = SimplicialSet(simplicial_data_from_kenzo_output(sphere))             # needs pyparsing
sage: S4.homology(reduced=False)                                                # needs pyparsing
{0: Z, 1: 0, 2: 0, 3: 0, 4: Z}
>>> from sage.all import *
>>> from sage.topology.simplicial_set_examples import simplicial_data_from_kenzo_output
>>> from sage.topology.simplicial_set import SimplicialSet
>>> sphere = os.path.join(SAGE_ENV['SAGE_EXTCODE'], 'kenzo', 'S4.txt')
>>> S4 = SimplicialSet(simplicial_data_from_kenzo_output(sphere))             # needs pyparsing
>>> S4.homology(reduced=False)                                                # needs pyparsing
{0: Z, 1: 0, 2: 0, 3: 0, 4: Z}