Hi Robert,

On 21 Okt., 00:02, Robert Bradshaw <[email protected]>
wrote:
> > Yes. But the point is that I am popping from (several) input lists,
> > while I am only appending to the list that will eventually be
> > returned. I can revert the input lists (profiting from fast L.pop())
> > and don't need to revert the output list.
>
> Ah, in that case it would make total sense. Your example feels a lot
> like the category pushout stuff :).

It is eventually supposed to be in sage.categories, but it is about
all_super_categories,not about pushout.

The idea is: If C is a category then C.parent_class.mro() should be
exactly parallel to C.all_super_categories() - that's a matter of
consistency. But C.all_super_categories() is currently not using the
underlying algorithm of mro (which is called C3 algorithm, if I am not
mistaken).

I would love to simply import the function used by python to determine
__mro__ of a type, but apparently it can't be just imported and it is
restricted to lists of types (while I'd use it on lists of
categories).

So, I'm implementing C3 myself. Presumably it will only be applied on
small examples (say, input is at most 4 lists of size at most 60). But
in that range, it should be as fast as possible: The stuff in elliptic
curves tends to create polynomial rings over thousands of different
finite fields. Polynomial rings involve the creation of a category of
algebras over their base ring (by #9138); #11900 and #11935 cope with
the resulting speed regression.

Thus, each example of C.all_super_categories() is small, but a single
elliptic curve computation could easily involve thousands of examples.

Cheers,
Simon

-- 
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-support
URL: http://www.sagemath.org

Reply via email to