#5386: [with patch, needs review] simplicial complexes and their homology
-------------------------+--------------------------------------------------
 Reporter:  jhpalmieri   |       Owner:  jhpalmieri
     Type:  enhancement  |      Status:  new       
 Priority:  major        |   Milestone:  sage-3.4.2
Component:  misc         |    Keywords:            
-------------------------+--------------------------------------------------

Comment(by was):

 Some things changed in sage-3.4.1.rc2, so this needs to be fixed (this is
 purely due to bitrot, not your fault):
 {{{
 wst...@sage:~/build/sage-3.4.1.rc2-ref2$ ./sage -t
 devel/sage/sage/homology/simplicial_complex.py
 sage -t  "devel/sage/sage/homology/simplicial_complex.py"
 **********************************************************************
 File
 
"/scratch/wstein/build/sage-3.4.1.rc2-ref2/devel/sage/sage/homology/simplicial_complex.py",
 line 863:
     sage: Z = SimplicialComplex(S, S.subsets())
 Exception raised:
     Traceback (most recent call last):
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_28[3]>", line 1, in <module>
         Z = SimplicialComplex(S, S.subsets())###line 863:
     sage: Z = SimplicialComplex(S, S.subsets())
       File "/scratch/wstein/build/sage-3.4.1.rc2-ref2/local/lib/python2.5
 /site-packages/sage/homology/simplicial_complex.py", line 693, in __init__
         if len(maximal_faces) == 0:
       File "/scratch/wstein/build/sage-3.4.1.rc2-ref2/local/lib/python2.5
 /site-packages/sage/combinat/combinat.py", line 869, in __len__
         raise AttributeError, "__len__ has been removed; use
 .cardinality() instead"
     AttributeError: __len__ has been removed; use .cardinality() instead
 **********************************************************************
 File
 
"/scratch/wstein/build/sage-3.4.1.rc2-ref2/devel/sage/sage/homology/simplicial_complex.py",
 line 864:
     sage: Z
 Exception raised:
     Traceback (most recent call last):
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_28[4]>", line 1, in <module>
         Z###line 864:
     sage: Z
     NameError: name 'Z' is not defined
 **********************************************************************
 File
 
"/scratch/wstein/build/sage-3.4.1.rc2-ref2/devel/sage/sage/homology/simplicial_complex.py",
 line 866:
     sage: Z.n_faces(2)
 Exception raised:
     Traceback (most recent call last):
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_28[5]>", line 1, in <module>
         Z.n_faces(Integer(2))###line 866:
     sage: Z.n_faces(2)
     NameError: name 'Z' is not defined
 **********************************************************************
 File
 
"/scratch/wstein/build/sage-3.4.1.rc2-ref2/devel/sage/sage/homology/simplicial_complex.py",
 line 869:
     sage: Z.n_faces(2, subcomplex=K)
 Exception raised:
     Traceback (most recent call last):
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_28[7]>", line 1, in <module>
         Z.n_faces(Integer(2), subcomplex=K)###line 869:
     sage: Z.n_faces(2, subcomplex=K)
     NameError: name 'Z' is not defined
 **********************************************************************
 File
 
"/scratch/wstein/build/sage-3.4.1.rc2-ref2/devel/sage/sage/homology/simplicial_complex.py",
 line 887:
     sage: Z = SimplicialComplex(S, S.subsets()); Z
 Exception raised:
     Traceback (most recent call last):
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_29[3]>", line 1, in <module>
         Z = SimplicialComplex(S, S.subsets()); Z###line 887:
     sage: Z = SimplicialComplex(S, S.subsets()); Z
       File "/scratch/wstein/build/sage-3.4.1.rc2-ref2/local/lib/python2.5
 /site-packages/sage/homology/simplicial_complex.py", line 693, in __init__
         if len(maximal_faces) == 0:
       File "/scratch/wstein/build/sage-3.4.1.rc2-ref2/local/lib/python2.5
 /site-packages/sage/combinat/combinat.py", line 869, in __len__
         raise AttributeError, "__len__ has been removed; use
 .cardinality() instead"
     AttributeError: __len__ has been removed; use .cardinality() instead
 **********************************************************************
 File
 
"/scratch/wstein/build/sage-3.4.1.rc2-ref2/devel/sage/sage/homology/simplicial_complex.py",
 line 889:
     sage: Z.f_vector()
 Exception raised:
     Traceback (most recent call last):
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_29[4]>", line 1, in <module>
         Z.f_vector()###line 889:
     sage: Z.f_vector()
     NameError: name 'Z' is not defined
 **********************************************************************
 File
 
"/scratch/wstein/build/sage-3.4.1.rc2-ref2/devel/sage/sage/homology/simplicial_complex.py",
 line 905:
     sage: Z = SimplicialComplex(S, S.subsets()); Z
 Exception raised:
     Traceback (most recent call last):
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_30[3]>", line 1, in <module>
         Z = SimplicialComplex(S, S.subsets()); Z###line 905:
     sage: Z = SimplicialComplex(S, S.subsets()); Z
       File "/scratch/wstein/build/sage-3.4.1.rc2-ref2/local/lib/python2.5
 /site-packages/sage/homology/simplicial_complex.py", line 693, in __init__
         if len(maximal_faces) == 0:
       File "/scratch/wstein/build/sage-3.4.1.rc2-ref2/local/lib/python2.5
 /site-packages/sage/combinat/combinat.py", line 869, in __len__
         raise AttributeError, "__len__ has been removed; use
 .cardinality() instead"
     AttributeError: __len__ has been removed; use .cardinality() instead
 **********************************************************************
 File
 
"/scratch/wstein/build/sage-3.4.1.rc2-ref2/devel/sage/sage/homology/simplicial_complex.py",
 line 907:
     sage: [Z._f_dict()[n] for n in range(-1, 4)]
 Exception raised:
     Traceback (most recent call last):
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/scratch/wstein/build/sage-3.4.1.rc2/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_30[4]>", line 1, in <module>
         [Z._f_dict()[n] for n in range(-Integer(1), Integer(4))]###line
 907:
     sage: [Z._f_dict()[n] for n in range(-1, 4)]
     NameError: name 'Z' is not defined
 **********************************************************************
 3 items had failures:
    4 of   8 in __main__.example_28
    2 of   7 in __main__.example_29
    2 of   7 in __main__.example_30
 ***Test Failed*** 8 failures.
 For whitespace errors, see the file
 /scratch/wstein/build/sage-3.4.1.rc2-ref2/tmp/.doctest_simplicial_complex.py
          [3.0 s]
 exit code: 1024

 ----------------------------------------------------------------------
 The following tests failed:


         sage -t  "devel/sage/sage/homology/simplicial_complex.py"
 Total time for all tests: 3.0 seconds
 }}}


 I think there is a bug in stanly_reisener_ring:
 {{{
 sage: S = SimplicialComplex(['a', 'b', 'c'], (('a', 'b'), ('a', 'c'),
 ('b', 'c')))
 sage: S.stanley_reisner_ring()
 Quotient of Multivariate Polynomial Ring in a, c, b over Integer Ring by
 the ideal (a*c*b)
 sage: S.product(S).stanley_reisner_ring()
 ...
 ValueError: variable names must be alphanumeric, but one is '('b', 'c')'
 which is not.
 }}}

 * It should be easier to get at all the standard examples of complexes,
 e.g., like with graphs if you do {{{graphs.<tab>}}} you get a bunch of
 graphs.  Could you make it so there is something like
 {{{complexes.<tab>}}} or something like that (which makes senses) and
 gives examples?

 Please ping me once you fix the above, so I can give this ''amazing
 patch'' (!) a positive review.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5386#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to