# HG changeset patch
# User Christian Nassau <nassau@nullhomotopie.de>
# Date 1354972828 3600
# Node ID d74a5442d3991e3acadade1497bf66f301dc095b
# Parent e921acb11e4e0bff497fca555d4e5d87a5dff0b8
[mq]: 13566
diff git a/sage/homology/examples.py b/sage/homology/examples.py
a

b


52  52  from sage.misc.functional import is_even 
53  53  from sage.combinat.subset import Subsets 
54  54  import sage.misc.prandom as random 
 55  from sage.misc.cachefunc import cached_method 
55  56  
56  57  def matching(A, B): 
57  58  """ 
… 
… 

124  125  {0: 0, 1: Z^16, 2: 0} 
125  126  """ 
126  127  
 128  @cached_method 
127  129  def Sphere(self,n): 
128  130  """ 
129  131  A minimal triangulation of the ndimensional sphere. 
… 
… 

153  155  S = SimplicialComplex(n+1, facets) 
154  156  return S 
155  157  
 158  @cached_method 
156  159  def Simplex(self, n): 
157  160  """ 
158  161  An `n`dimensional simplex, as a simplicial complex. 
… 
… 

175  178  return SimplicialComplex(n, list(S)) 
176  179  
177  180  
 181  @cached_method 
178  182  def Torus(self): 
179  183  """ 
180  184  A minimal triangulation of the torus. 
… 
… 

189  193  [2,3,6], [0,2,6], [0,3,4], [0,3,5], 
190  194  [4,5,6], [0,4,6]]) 
191  195  
 196  @cached_method 
192  197  def RealProjectivePlane(self): 
193  198  """ 
194  199  A minimal triangulation of the real projective plane. 
… 
… 

214  219  
215  220  ProjectivePlane = RealProjectivePlane 
216  221  
 222  @cached_method 
217  223  def KleinBottle(self): 
218  224  """ 
219  225  A triangulation of the Klein bottle, formed by taking the 
… 
… 

228  234  P = simplicial_complexes.RealProjectivePlane() 
229  235  return P.connected_sum(P) 
230  236  
 237  @cached_method 
231  238  def SurfaceOfGenus(self, g, orientable=True): 
232  239  """ 
233  240  A surface of genus g. 
… 
… 

269  276  S = S.connected_sum(T) 
270  277  return S 
271  278  
 279  @cached_method 
272  280  def MooreSpace(self, q): 
273  281  """ 
274  282  Triangulation of the mod q Moore space. 
… 
… 

327  335  facets.append(["A0", Ai, Aiplus]) 
328  336  return SimplicialComplex(vertices, facets) 
329  337  
 338  @cached_method 
330  339  def ComplexProjectivePlane(self): 
331  340  """ 
332  341  A minimal triangulation of the complex projective plane. 
… 
… 

363  372  [8, 9, 3, 1, 6], [9, 7, 1, 2, 4], [7, 8, 2, 3, 5], 
364  373  [9, 7, 2, 3, 6], [7, 8, 3, 1, 4], [8, 9, 1, 2, 5]]) 
365  374  
 375  @cached_method 
366  376  def PoincareHomologyThreeSphere(self): 
367  377  """ 
368  378  A triangulation of the Poincare homology 3sphere. 
… 
… 

411  421  [9, 14, 15, 16], [10, 11, 13, 16], [10, 13, 15, 16], 
412  422  [11, 13, 14, 16], [12, 13, 14, 15], [13, 14, 15, 16]]) 
413  423  
 424  @cached_method 
414  425  def RealProjectiveSpace(self, n): 
415  426  r""" 
416  427  A triangulation of `\Bold{R}P^n` for any `n \geq 0`. 
… 
… 

581  592  facets.add(tuple(new)) 
582  593  return SimplicialComplex(list(facets)) 
583  594  
 595  @cached_method 
584  596  def K3Surface(self): 
585  597  """ 
586  598  Returns a minimal triangulation of the K3 surface. This is 
… 
… 

613  625  ############################################################### 
614  626  # examples from graph theory: 
615  627  
 628  @cached_method 
616  629  def NotIConnectedGraphs(self, n, i): 
617  630  """ 
618  631  The simplicial complex of all graphs on n vertices which are 
… 
… 

681  694  facets.append(facet) 
682  695  return SimplicialComplex(E_list, facets) 
683  696  
 697  @cached_method 
684  698  def MatchingComplex(self, n): 
685  699  """ 
686  700  The matching complex of graphs on n vertices. 
… 
… 

770  784  facets.append(facet) 
771  785  return SimplicialComplex(E_list, facets) 
772  786  
 787  @cached_method 
773  788  def ChessboardComplex(self, n, i): 
774  789  r""" 
775  790  The chessboard complex for an n by i chessboard. 