Opened 10 years ago

Last modified 2 years ago

#5891 closed enhancement

Categories for the working mathematics programmer — at Initial Version

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

Description

This (series of) patch(es) extends the Sage category framework as a design pattern for organizing generic code.

Under development on combinat.sagemath.org/patches:

  • categories-nt.patch: the category framework itself

+ updates to combinatorial free modules (will be split before submission)

Related patches (will need to be applied to recover all previous functionalities):

  • family_enumset-fh.patch
  • enumset_unions-fh.patch
  • categories-sf-nt.patch Symmetric functions
  • ncsf-nt.patch Non commutative Symmetric Functions
  • root_systems-4326-nt.patch

Small technical patches they depend on:

  • unique_representation-5120-submitted.patch
  • lazy_attributes-fixes-5783-final.patch
  • element_wrapper-nt.patch
  • 5598-coerce-declare.patch
  • cached_in_parent_method-5449.new
  • explain-pickle-v1.patch
  • cPickle-copy_reg_classes-nt.patch
  • cPickle-nested-classes-nt.patch
  • dynamic_class-nt.patch
  • compositions-cleanup-5600-nt.patch
  • transitive_ideal-nt.patch

Current status:

  • Real life applications: see related patches, automatic monoids, ...
  • Categories:
    • All the mathematical categories of Axiom and MuPAD
    • EnumeratedSets? (with example)
    • Semigroups (with example, basic methods, subquotients)
    • FiniteSemigroups? (with example, cayley graphs, basic representation theory, ...)
    • ModulesWithBasis? (with example, morphisms)
    • HopfAlgebras? & friends (with example)
    • Cleanup:
      • Have unique representation by default (no need to inherit from Category_uniq)
      • Have construction / reduce by default
  • Functorial constructions:
    • direct sum
    • tensor product
    • cartesian product (todo)
    • dual (in progress)
    • subquotient, subset, quotient (in progress)
    • isomorphism type (todo)
  • Homomorphisms
    • Integrates with current sage morphisms
    • Adds morphisms for some categories
    • Some general infrastructure
  • Generic test framework
    • Functional, final design clear, needs cleanup (2/3 hours)
  • Combinatorial free modules
    • Have unique representation
  • Todo:
    • Naming cleanup:
      • Parent -> ParentMethods? (or _ParentMethods? or ?)
      • Element -> ElementMethods? + move them as a nested class of ParentMethods?
      • super_categories should be a method
      • zero, one should be methods
      • standardize the names: mult / product / multiplication / multiply?
      • check -> test
      • self.tester(keywords)
      • intrusive cat.tensor_category / ...
      • cat.example() -> /an_example/an_object/... ?
      • class.an_instance() ?
      • all_weakly_super_categories -> ?
    • Category graph picture
  • Fixes:
    • Pickling: essentially works; polish the remaining
    • Integration in the Sage library: some tests are broken. Help welcome!
    • Pickling from old sage: technically feasible. Need help!
    • Inheritance from category for Cython classes: technically feasible. Need help!
  • Hom is *not* a functorial construction, the design and user interface needs to be discussed
  • Support for multivariate morphims, i.e. morphisms A x B -> C where the specializations A x b -> C are morphisms for a given category and a x B -> C are morphisms for a possibly different category
  • Discussion:
    • Defining new inline operators, at least within the sage interpreter

Change History (0)

Note: See TracTickets for help on using tickets.