#8881: Functorial constructions in categories
---------------------------------+------------------------------------------
   Reporter:  hivert             |       Owner:  nthiery                 
       Type:  enhancement        |      Status:  needs_work              
   Priority:  critical           |   Milestone:  sage-4.4.3              
  Component:  categories         |    Keywords:  Functorial constructions
     Author:  Nicolas M. ThiƩry  |    Upstream:  N/A                     
   Reviewer:  Florent Hivert     |      Merged:                          
Work_issues:                     |  
---------------------------------+------------------------------------------
Changes (by was):

  * status:  positive_review => needs_work


Comment:

 This causes doctest failures, including the following.
 {{{

 sage -t  sage/categories/sets_cat.py
 **********************************************************************
 File "/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/devel
 /sage-main/sage/categories/sets_cat.py", line 624:
     sage: A = Monoids().example().algebra(QQ); A
 Exception raised:
     Traceback (most recent call last):
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/bin/sagedoctest.py",
 line 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_16[4]>", line 1, in <module>
         A = Monoids().example().algebra(QQ); A###line 624:
     sage: A = Monoids().example().algebra(QQ); A
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/lib/python
 /site-packages/sage/categories/sets_cat.py", line 637, in algebra
         return CombinatorialFreeModule(base_ring, self, category =
 category.Algebras(base_ring))
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/lib/python
 /site-packages/sage/misc/classcall_metaclass.py", line 256, in __call__
         return cls.__classcall_private__(cls, *args, **options)
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/lib/python
 /site-packages/sage/combinat/free_module.py", line 850, in
 __classcall_private__
         return super(CombinatorialFreeModule, cls).__classcall__(cls,
 *args, **keywords)
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/lib/python
 /site-packages/sage/misc/cachefunc.py", line 115, in __call__
         w = self.f(*args, **kwds)
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/lib/python
 /site-packages/sage/structure/unique_representation.py", line 447, in
 __classcall__
         instance = type.__call__(cls, *args, **options)
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/lib/python
 /site-packages/sage/combinat/free_module.py", line 892, in __init__
         element_constructor = self._element_constructor_)
       File "parent.pyx", line 457, in
 sage.structure.parent.Parent.__init__ (sage/structure/parent.c:3851)
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/lib/python
 /site-packages/sage/categories/magmas.py", line 115, in __init_extra__
         if (self.product != self.product_from_element_class_mul) and
 hasattr(self, "element_class") and hasattr(self.element_class,
 "_mul_parent"):
       File "element.pyx", line 860, in
 sage.structure.element.Element.__richcmp__ (sage/structure/element.c:7061)
       File "element.pyx", line 801, in
 sage.structure.element.Element._richcmp (sage/structure/element.c:6441)
       File "coerce.pyx", line 907, in
 sage.structure.coerce.CoercionModel_cache_maps.canonical_coercion
 (sage/structure/coerce.c:8537)
       File "sage_object.pyx", line 101, in
 sage.structure.sage_object.SageObject.__repr__
 (sage/structure/sage_object.c:1370)
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/lib/python
 /site-packages/sage/categories/homset.py", line 302, in _repr_
         self._domain, self._codomain, self.__category)
       File "sage_object.pyx", line 101, in
 sage.structure.sage_object.SageObject.__repr__
 (sage/structure/sage_object.c:1370)
       File
 
"/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/local/lib/python
 /site-packages/sage/combinat/free_module.py", line 1163, in _repr_
         return self._name + " over %s"%self.base_ring()
       File "parent.pyx", line 676, in
 sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:5239)
       File "parent.pyx", line 263, in
 sage.structure.parent.getattr_from_other_class
 (sage/structure/parent.c:2753)
       File "parent.pyx", line 171, in
 sage.structure.parent.raise_attribute_error (sage/structure/parent.c:2625)
     AttributeError: 'CombinatorialFreeModule_with_category' object has no
 attribute '_name'
 **********************************************************************
 File "/mnt/usb1/scratch/wstein/build/release/4.4.3/sage-4.4.3.alpha2/devel
 /sage-main/sage/categories/sets_cat.py", line 626:
     sage: A.category()
 Expected:
     Category of monoid algebras over Rational Field
 Got:
     Category of set algebras over Rational Field
 **********************************************************************
 1 items had failures:
    2 of   8 in __main__.example_16
 ***Test Failed*** 2 failures.
 For whitespace errors, see the file
 /scratch/wstein/sage//tmp/.doctest_sets_cat.py
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8881#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
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