#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: |
Attachments (4)
Change History (15)
Changed 11 years ago by
Attachment: | trac_12959-improve_with_realizations-fs.patch added |
---|
comment:1 Changed 11 years ago by
Authors: | Nicolas M. Thiéry, ... → Nicolas M. Thiéry, Franco Saliola |
---|---|
Cc: | Chris Berg added |
Keywords: | sd40 added |
Status: | new → needs_review |
comment:2 Changed 11 years ago by
Cc: | Mike Zabrocki added |
---|
Changed 11 years ago by
Attachment: | trac_12959-doctest_fix-fs.patch added |
---|
Changed 11 years ago by
Attachment: | trac_12959-100_percent_coverage_for_algebras_with_basis-fs.patch added |
---|
100% doctest coverage for algebras_with_basis
comment:3 Changed 11 years ago by
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
Attachment: | trac_12959-remove_lower_from_realization_name-fs.patch added |
---|
comment:4 follow-up: 11 Changed 11 years ago by
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
Status: | needs_review → positive_review |
---|
comment:7 Changed 11 years ago by
Reviewers: | → Mike Zabrocki |
---|
comment:8 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:9 Changed 11 years ago by
Merged in: | → sage-5.3.beta0 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
comment:10 Changed 10 years ago by
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 Changed 10 years ago by
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.
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 ifproduct_on_basis
is not availableMagmas.Realizations
added andMagmas.Realizations.ParentMethods.product_by_coercion
usesself.a_realization()
CommutativeAdditiveMonoids.WithRealizations
added andCommutativeAdditiveMonoids.WithRealizations.ParentMethods.zero
returnsself.a_realization().zero()
Monoids.WithRealizations
added andMonoids.WithRealizations.ParentMethods.one
returnsself.a_realization().one()
Sets.WithRealizations.ParentMethods.inject_shorthands
: injects any shorthands names for realizations provided in the_shorthands
attribute_shorthand
attribute to the example insage.categories.example.with_realizations
And update
examples/with_realizations.py
accordingly.