Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12959 closed enhancement (fixed)

Improvements to Sets.WithRealizations

Reported by: nthiery Owned by: nthiery
Priority: major Milestone: sage-5.3
Component: categories Keywords: realizations, sd40
Cc: sage-combinat, chrisjamesberg, zabrocki Merged in: sage-5.3.beta0
Authors: Nicolas M. Thiéry, Franco Saliola Reviewers: Mike Zabrocki
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #12953 Stopgaps:

Attachments (4)

trac_12959-improve_with_realizations-fs.patch (41.6 KB) - added by saliola 8 years ago.
trac_12959-doctest_fix-fs.patch (1.1 KB) - added by saliola 8 years ago.
trac_12959-100_percent_coverage_for_algebras_with_basis-fs.patch (1.6 KB) - added by saliola 8 years ago.
100% doctest coverage for algebras_with_basis
trac_12959-remove_lower_from_realization_name-fs.patch (19.4 KB) - added by saliola 8 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 8 years ago by saliola

  • Authors changed from Nicolas M. Thiéry, ... to Nicolas M. Thiéry, Franco Saliola
  • Cc chrisjamesberg added
  • Keywords sd40 added
  • Status changed from new to needs_review

Implement default methods for (With)Realizations that use the realization provided by the method a_realization for computations:

  • AlgebrasWithBasis.ParentMethods.product is modified to use product_by_coercion if product_on_basis is not available
  • Magmas.Realizations added and Magmas.Realizations.ParentMethods.product_by_coercion uses self.a_realization()
  • CommutativeAdditiveMonoids.WithRealizations added and CommutativeAdditiveMonoids.WithRealizations.ParentMethods.zero returns self.a_realization().zero()
  • Monoids.WithRealizations added and Monoids.WithRealizations.ParentMethods.one returns self.a_realization().one()
  • Sets.WithRealizations.ParentMethods.inject_shorthands : injects any shorthands names for realizations provided in the _shorthands attribute
  • added _shorthand attribute to the example in sage.categories.example.with_realizations

And update examples/with_realizations.py accordingly.

comment:2 Changed 8 years ago by saliola

  • Cc zabrocki added

Changed 8 years ago by saliola

Changed 8 years ago by saliola

100% doctest coverage for algebras_with_basis

comment:3 Changed 8 years ago by saliola

Mike pointed out that algebras_with_basis.py needed only 1 doctest to get 100% coverage, so this latest patch adds one.

comment:4 follow-up: Changed 8 years ago by saliola

Latest patch switches to using the class name for determining the default realization name (currently, the class name is taken and it is rendered lowercase for some reason; there was a FIXME suggesting this should not be lowercased).

comment:5 Changed 8 years ago by zabrocki

  • Status changed from needs_review to positive_review

comment:6 Changed 8 years ago by jdemeyer

Please fill in your real name as Reviewer.

comment:7 Changed 8 years ago by saliola

  • Reviewers set to Mike Zabrocki

comment:8 Changed 8 years ago by saliola

  • Description modified (diff)

comment:9 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.3.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:10 Changed 8 years ago by nthiery

For the record: I imported the latest version of the patches in the Sage-Combinat queue, and rebased my functorial construction patch on top of it.

Cheers,

comment:11 in reply to: ↑ 4 Changed 8 years ago by nthiery

Replying to saliola:

Latest patch switches to using the class name for determining the default realization name (currently, the class name is taken and it is rendered lowercase for some reason; there was a FIXME suggesting this should not be lowercased).

There was a question mark at the end of the FIXME; so this was to be discussed! Oh well, since it's merged in, I guess we can just consider the discussion as closed.

Note: See TracTickets for help on using tickets.