Ticket #12959 (closed enhancement: fixed)

Opened 12 months ago

Last modified 10 months ago

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 Work issues:
Report Upstream: N/A Reviewers: Mike Zabrocki
Authors: Nicolas M. Thiéry, Franco Saliola Merged in: sage-5.3.beta0
Dependencies: #12953 Stopgaps:

Attachments

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

Change History

Changed 10 months ago by saliola

comment:1 Changed 10 months ago by saliola

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

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 10 months ago by saliola

  • Cc zabrocki added

Changed 10 months ago by saliola

Changed 10 months ago by saliola

100% doctest coverage for algebras_with_basis

comment:3 Changed 10 months 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.

Changed 10 months ago by saliola

comment:4 follow-up: ↓ 11 Changed 10 months 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 10 months ago by zabrocki

  • Status changed from needs_review to positive_review

comment:6 Changed 10 months ago by jdemeyer

Please fill in your real name as Reviewer.

comment:7 Changed 10 months ago by saliola

  • Reviewers set to Mike Zabrocki

comment:8 Changed 10 months ago by saliola

  • Description modified (diff)

comment:9 Changed 10 months ago by jdemeyer

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

comment:10 Changed 10 months 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 10 months 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.