#10963: More functorial constructions
-------------------------+-------------------------------------------------
       Reporter:         |         Owner:  stumpc5
  nthiery                |        Status:  needs_work
           Type:         |     Milestone:
  enhancement            |    Resolution:
       Priority:  major  |     Merged in:
      Component:         |     Reviewers:  Simon King
  categories             |   Work issues:  Reduce startup time by 5%. Avoid
       Keywords:         |  "recursion depth exceeded (ignored)". Trivial
        Authors:         |  doctest fixes.
  Nicolas M. ThiƩry      |  Dependencies:  #11224, #8327, #10193, #12895,
Report Upstream:  N/A    |  #14516, #14722, #13589
         Branch:         |
       Stopgaps:         |
-------------------------+-------------------------------------------------

Comment (by nthiery):

 Replying to [comment:57 SimonKing]:
 > OK, that's a considerable change. In the "good" old times, a
 > category C was (by definition) a sub-category of another category D,
 > if and only if D was contained in `C.all_super_categories()`. So,
 > you say this shall change (or already has?).

 This was already like this for join categories. E.g. with plain sage
 5.11.beta3:

 {{{
 sage: C1 = Category.join([Magmas(), CommutativeAdditiveMonoids()])
 sage: C2 = Rings()
 sage: C2.is_subcategory(C1)
 True
 }}}


 > But then, I still don't see why this should be implemented by a plain
 join category.
 >
 > Do we agree that there is a category `Magmas().Commutative()`, such
 > that all information on `Algebras(ZZ).Commutative()` is provided by
 > `Algebras(ZZ)` together with `Magmas().Commutative()`?

 Those two pieces are indeed sufficient to recover the category:
 {{{
     sage: C = Algebras(ZZ) & Magmas().Commutative(); C
     Category of commutative algebras over Integer Ring
 }}}

 But the join calculation is non trivial since Sage discovers by
 introspection that there is a specific category for commutative rings,
 so we get:
 {{{
     sage: C.super_categories()
     [Category of algebras over Integer Ring, Category of commutative
 rings]
 }}}

 Granted, the example is not so great since the commutative rings
 category is actually currently empty; so we could think about removing
 it, though it's likely to eventually contain something. For a more
 interesting example we can look at:

 Maybe a better example is:
 {{{
 sage: Rings().Finite().super_categories()
 [Category of rings, Category of finite monoids]
 }}}

 And some good tests (compare with the sources!):
 {{{
 sage: from sage.categories.category_with_axiom import
 TestObjectsOverBaseRing
 sage: C = TestObjectsOverBaseRing(QQ)
 sage:
 
C.Facade().Commutative().FiniteDimensional().Finite().Unital().super_categories()
 [Category of finite finite dimensional test objects over base ring over
 Rational Field,
  Category of finite commutative test objects over base ring over Rational
 Field,
  Category of facade commutative test objects over base ring over Rational
 Field,
  Category of finite dimensional commutative unital test objects over base
 ring over Rational Field]
 sage: C.Facade().Commutative().Finite().Unital().super_categories()
 [Category of finite commutative test objects over base ring over Rational
 Field,
  Category of facade commutative test objects over base ring over Rational
 Field,
  Category of unital test objects over base ring over Rational Field]
 }}}

 > Sure, we could then implement `Algebras(ZZ).Commutative()` by a
 `JoinCategory`.
 >
 > But then, I would expect that we can have a class which is similar
 > to `JoinCategory` but is specially designed and thus faster. After
 > all, creating the join of a list of categories should be more
 > complicated then adding a list of "axiom categories" (such as
 > `Magmas().Commutative()` and `Magmas().Division()` and
 > `Sets().Finite()`) to a given category (such as `Rings()`).

 I guess I don't see at this point what can be made really
 simpler/lighter for a join category when it comes from adding axioms
 to a category. I still believe we can't spare the join calculation.

 Cheers,
                              Nicolas

--
Ticket URL: <http://trac.sagemath.org/ticket/10963#comment:61>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to