#10963: More functorial constructions
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner: stumpc5
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.1
Component: categories | Resolution:
Keywords: days54 | Merged in:
Authors: Nicolas M. Thiéry | Reviewers: Simon King, Frédéric
Report Upstream: N/A | Chapoton
Branch: | Work issues:
public/ticket/10963 | Commit:
Dependencies: #11224, #8327, | 8045aa4a4b7ada735b3eb6055382f9b341a39f1e
#10193, #12895, #14516, #14722, | Stopgaps:
#13589, #14471, #15069, #15094, |
#11688, #13394, #15150, #15506 |
-------------------------------------+-------------------------------------
Comment (by vbraun):
So I read the documentation and it does a pretty good job of explaining
what is going on. The goals are very nice and I totally agree with you. I
didn't see it spelled how and what kind of identities between different
categories with axioms can be found automaticaly. It seems that this is
about the same problem as normal form for toric ideals so there needs to
be some decision about monomials / axiom orderings.
But thats not what I really want to bring up. I'm also more and more
convinced that the whole "axioms as strings" is an absolutely terrible
implementation. The very first example:
{{{#!python
sage: class Cs(Category):
....: def super_categories(self):
....: return [Sets()]
....: class Finite(CategoryWithAxiom):
....: class ParentMethods:
....: def foo(self):
....: print "I am a method on finite C's"
}}}
implements
{{{#!python
sage: P = Parent(category=Cs().Finite())
sage: P.foo() # ok, nice
I am a method on finite C's
sage: P.is_finite() # What is this I don't even
True
}}}
From a Python programmer's perspective, the fact that class names get
parsed under the hood is just about entirely unexpected. Sure its possible
to implement, but it is also entirely opposite of Python best practices. I
don't even want to bring up the poor guy who'll try this with "Endlich"
instead of "Finite" as a class name and be in for a surprise.
Slightly different angle, same problem IMHO:
{{{
sage: Cs().Finite().super_categories() # ok, nice
[Category of finite sets, Category of cs]
sage: Cs().Finite().axioms() # really, this is the best
we can do?
frozenset(['Finite'])
}}}
Axioms are at the end of the day the analog of mixins in the category
framework, and as such implemented as classes. Just return the classes.
This should be obvious.
--
Ticket URL: <http://trac.sagemath.org/ticket/10963#comment:380>
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.