Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*- 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) """ #***************************************************************************** # Copyright (C) 2016 John H. Palmieri <palmieri at math.washington.edu> # # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ # # This code is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # See the GNU General Public License for more details; the full text # is available at: # # http://www.gnu.org/licenses/ # #*****************************************************************************
SimplicialSet_arbitrary, SimplicialSet_finite
######################################################################## # The nerve of a finite monoid, used in sage.categories.finite_monoid.
""" The nerve of a multiplicative monoid.
INPUT:
- ``monoid`` -- a multiplicative monoid
See :meth:`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] """
latex_name=latex(monoid.one())) # self._n_skeleton: cache the highest dimensional skeleton # calculated so far for this simplicial set, along with its # dimension. # self._simplex_data: a tuple whose elements are pairs (simplex, list # of monoid elements). Omit the base point.
""" Return ``True`` if ``self`` and ``other`` are equal.
This checks that the underlying monoids and the underlying base points are the same. Because the base points will be different each time the nerve is constructed, different instances will not be equal.
EXAMPLES::
sage: C3 = groups.misc.MultiplicativeAbelian([3]) sage: C3.nerve() == C3.nerve() False sage: BC3 = C3.nerve() sage: BC3 == BC3 True """ and self._monoid == other._monoid and self.base_point() == other.base_point())
""" Return the negation of `__eq__`.
EXAMPLES::
sage: C3 = groups.misc.MultiplicativeAbelian([3]) sage: G3 = groups.permutation.Cyclic(3) sage: C3.nerve() != G3.nerve() True sage: C3.nerve() != C3.nerve() True """
def __hash__(self): """ The hash is formed from the monoid and the base point.
EXAMPLES::
sage: G3 = groups.permutation.Cyclic(3) sage: hash(G3.nerve()) # random 17
Different instances yield different base points, hence different hashes::
sage: X = G3.nerve() sage: Y = G3.nerve() sage: X.base_point() != Y.base_point() True sage: hash(X) != hash(Y) True """
""" 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: 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 """ # Build up chains of elements inductively, from dimension d-1 # to dimension d. We start with the cached # self._n_skeleton. If only the 0-skeleton has been # constructed, we construct the 1-cells by hand.
# There is a single vertex. Name it after the identity # element of the monoid. # Build the dictionary simplices, to be used for # constructing the simplicial set.
# face_dict: dictionary of simplices: keys are # composites of monoid elements (as tuples), values are # the corresponding simplices.
# chain: chain of group elements to multiply, # as a tuple. # bdries: the face maps applied to chain, in a # format suitable for passing to the DeltaComplex # constructor. name=' * '.join(str(_) for _ in chain), latex_name = ' * '.join(latex(_) for _ in chain))
# Compute faces of x. # Degenerate. else: + chain[i+2:]].apply_degeneracies(i)) else: # Non-degenerate. + (product,) + chain[i+2:]])
######################################################################## # Catalog of examples. These are accessed via simplicial_set_catalog.py.
r""" 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] """ name='S^0') latex_name='\\sigma_{}'.format(n)) name='S^{}'.format(n), latex_name='S^{{{}}}'.format(n))
r""" Return the classifying space of ``group``, as a simplicial set.
INPUT:
- ``group`` -- a finite group or finite monoid
See :meth:`sage.categories.finite_monoids.FiniteMonoids.ParentMethods.nerve` for more details and more examples.
EXAMPLES::
sage: C2 = groups.misc.MultiplicativeAbelian([2]) sage: BC2 = simplicial_sets.ClassifyingSpace(C2) sage: H = BC2.homology(range(9), base_ring=GF(2)) sage: [H[i].dimension() for i in range(9)] [0, 1, 1, 1, 1, 1, 1, 1, 1]
sage: Klein4 = groups.misc.MultiplicativeAbelian([2, 2]) sage: BK = simplicial_sets.ClassifyingSpace(Klein4) sage: BK Classifying space of Multiplicative Abelian group isomorphic to C2 x C2 sage: BK.homology(range(5), base_ring=GF(2)) # long time (1 second) {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} """
""" 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: 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) sage: latex(BC2) RP^{\infty} """ else:
r""" 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) {0: Z, 1: Z x C2, 2: 0} sage: K Klein bottle """ name='Klein bottle')
r""" 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) {0: Z, 1: Z x Z, 2: Z} """
r""" 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)] """ name='{}-simplex'.format(n), latex_name='\\Delta^{{{}}}'.format(n))
def Empty(): """ Return the empty simplicial set.
This should return the same simplicial set each time it is called.
EXAMPLES::
sage: from sage.homology.simplicial_set_examples import Empty sage: E = Empty() sage: E Empty simplicial set sage: E.nondegenerate_simplices() [] sage: E is Empty() True """
def Point(): """ 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 """ name='Point', latex_name='*')
r""" 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)] """
r""" 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) {0: Z, 1: 0, 2: Z, 3: 0, 4: Z} sage: CP3 = simplicial_sets.ComplexProjectiveSpace(3) sage: CP3 CP^3 sage: latex(CP3) CP^{3} sage: CP3.f_vector() [1, 0, 3, 10, 25, 30, 15]
sage: K = CP3.suspension() # long time (1 second) sage: R = K.cohomology_ring(GF(2)) # long time sage: R.gens() # long time (h^{0,0}, h^{3,0}, h^{5,0}, h^{7,0}) sage: x = R.gens()[1] # long time sage: x.Sq(2) # long time h^{5,0}
sage: simplicial_sets.ComplexProjectiveSpace(4).f_vector() [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 """ return Point() return Sphere(2) # v: Kenzo name <<GBar>> # f_2_i: Kenzo name <<GBar<- (i)><- NIL>>> for i=1,2 # f3_110: Kenzo name <<GBar<- (1 1)><0 NIL><- NIL>>> # f3_011: Kenzo name <<GBar<0 (1)><- (1)><- NIL>>> # f3_111: Kenzo name <<GBar<1 (1)><- (1)><- NIL>>> # f4_101101: Kenzo name <<GBar<1-0 (1)><1-0 NIL><- (1)><- NIL>>> # f4_201110: Kenzo name <<GBar<2-0 (1)><1 (1)><0 NIL><- NIL>>> # f4_211010: Kenzo name <<GBar<2-1 (1)><0 (1)><0 NIL><- NIL>>> v.apply_degeneracies(0), v.apply_degeneracies(0)), f2_2: (v.apply_degeneracies(0), v.apply_degeneracies(0), v.apply_degeneracies(0)), f3_110: (f2_1, f2_2, f2_1, v.apply_degeneracies(1, 0)), f3_011: (f2_1, f2_1, f2_1, f2_1), f3_111: (v.apply_degeneracies(1, 0), f2_1, f2_2, f2_1), f4_101101: (f2_1.apply_degeneracies(0), f2_1.apply_degeneracies(0), f3_011, f2_1.apply_degeneracies(2), f2_1.apply_degeneracies(2)), f4_201110: (f2_1.apply_degeneracies(1), f3_111, f3_011, f3_110, f2_1.apply_degeneracies(1)), f4_211010: (f2_1.apply_degeneracies(2), f3_111, f2_1.apply_degeneracies(1), f3_110, f2_1.apply_degeneracies(0))}, base_point=v, name='CP^2', latex_name='CP^{2}') latex_name='CP^{3}') latex_name='CP^{4}')
""" Return data to construct a simplicial set, given Kenzo output.
INPUT:
- ``filename`` -- name of file containing the output from Kenzo's :func:`show-structure` function
OUTPUT: data to construct a simplicial set from the Kenzo output
Several files with Kenzo output are in the directory :file:`SAGE_ROOT/src/ext/kenzo/`.
EXAMPLES::
sage: from sage.homology.simplicial_set_examples import simplicial_data_from_kenzo_output sage: from sage.homology.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)) sage: S4.homology(reduced=False) {0: Z, 1: 0, 2: 0, 3: 0, 4: Z} """ # simplex_data: data for constructing the simplicial set. # simplex_names: simplices indexed by their names else: else:
# f has the form 'DEGENS NAME>', possibly with a trailing space. # DEGENS is a hyphen-separated list, like # '3-2-1-0' or '0' or '-'. else: for _ in degen_str.split('-')] else:
r""" 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
Using the Hopf map to attach a cell::
sage: X = g.mapping_cone() sage: CP2 = simplicial_sets.ComplexProjectiveSpace(2) sage: X.homology() == CP2.homology() True
sage: X.f_vector() [1, 0, 5, 9, 6] sage: CP2.f_vector() [1, 0, 2, 3, 3] """ # The 2-sphere and its simplices. # The 3-sphere and its simplices. beta_23: (w_0, w_0), beta_44: (w_0, w_0), beta_1: (w_1, beta_11, w_1), beta_2: (w_1, beta_22, beta_23), beta_3: (w_1, beta_23, w_1), beta_4: (w_1, beta_44, w_1), alpha_12: (beta_11, beta_23, w_1), alpha_23: (beta_11, beta_22, w_1), alpha_34: (beta_11, beta_22, beta_44), alpha_45: (w_1, beta_23, beta_44), alpha_56: (w_1, beta_23, w_1), alpha_1: (beta_1, beta_3, alpha_12, w_2), alpha_2: (beta_11.apply_degeneracies(1), beta_2, alpha_23, alpha_12), alpha_3: (beta_11.apply_degeneracies(0), alpha_34, alpha_23, beta_4), alpha_4: (beta_1, beta_2, alpha_34, alpha_45), alpha_5: (w_2, alpha_45, alpha_56, beta_4), alpha_6: (w_2, beta_3, alpha_56, w_2)}, base_point=w_0) alpha_3:s2_sigma, alpha_4:s0_sigma, alpha_5:s2_sigma, alpha_6:s1_sigma})
|