Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#12959 closed enhancement (fixed)

Improvements to Sets.WithRealizations

Reported by: Nicolas M. Thiéry Owned by: Nicolas M. Thiéry
Priority: major Milestone: sage-5.3
Component: categories Keywords: realizations, sd40
Cc: Sage Combinat CC user, Chris Berg, Mike 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:

Status badges

Attachments (4)

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

Download all attachments as: .zip

Change History (15)

Changed 11 years ago by Franco Saliola

comment:1 Changed 11 years ago by Franco Saliola

Authors: Nicolas M. Thiéry, ...Nicolas M. Thiéry, Franco Saliola
Cc: Chris Berg added
Keywords: sd40 added
Status: newneeds_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 11 years ago by Franco Saliola

Cc: Mike Zabrocki added

Changed 11 years ago by Franco Saliola

Changed 11 years ago by Franco Saliola

100% doctest coverage for algebras_with_basis

comment:3 Changed 11 years ago by Franco Saliola

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

Changed 11 years ago by Franco Saliola

comment:4 Changed 11 years ago by Franco 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 11 years ago by Mike Zabrocki

Status: needs_reviewpositive_review

comment:6 Changed 11 years ago by Jeroen Demeyer

Please fill in your real name as Reviewer.

comment:7 Changed 11 years ago by Franco Saliola

Reviewers: Mike Zabrocki

comment:8 Changed 11 years ago by Franco Saliola

Description: modified (diff)

comment:9 Changed 11 years ago by Jeroen Demeyer

Merged in: sage-5.3.beta0
Resolution: fixed
Status: positive_reviewclosed

comment:10 Changed 10 years ago by Nicolas M. Thiéry

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 years ago by Nicolas M. Thiéry

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.