Opened 6 years ago

Last modified 5 years ago

#15696 new enhancement

Implement an_instance for more categories, and extend category_sample

Reported by: nthiery Owned by:
Priority: major Milestone: sage-6.4
Component: categories Keywords:
Cc: sage-, SimonKing Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

category_sample should look deeper in the code to find categories. It currently only looks into sage.categories.all, and misses axiom or covariant functorial construction categories like Sets.Infinite or Sets.CartesianProducts?. It's not clear whether it should include specialized categories like

sage.combinat.ncsf_qsym.generic_basis_code.BasesOfQSymOrNCSF

an_instance should be made to work at least for the categories discovered by category_sample, and possibly more::

sage: Sets.CartesianProducts.an_instance()
...
TypeError: __init__() takes at least 2 arguments (1 given)

Attachments (1)

all_categories.py (1.3 KB) - added by nthiery 5 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:2 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:3 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

Changed 5 years ago by nthiery

comment:4 Changed 5 years ago by nthiery

Just for the record, I attach here a quick hack I did for my PyCon15 lightning talk to extract a graph of categories, by recursively extracting the functorial construction and axiom categories out of the main categories.

Progress note by the way: thanks to #18174, an_instance now works for most functorial constructions:

sage: Modules.Graded.an_instance()
Category of graded modules over Rational Field
Note: See TracTickets for help on using tickets.