Skip to content

Completion of the free algebra, and also lazy symmetric functions in a single alphabet should not have a shift method #37633

Open
@mantepse

Description

Steps To Reproduce

Currently, we have

sage: R = algebras.Free(QQ, ('a', 'b'), degrees=(1, 2))
sage: L = R.completion()
sage: e = L(R.gen(0))
sage: e, e.valuation(), e.shift(1), e.shift(1).valuation()
(a, 1, a, 2)

which is nonsense. The same is true for LazySymmetricFunctions(SymmetricFunctions(QQ).s()).

Expected Behavior

The shift method should raise an error or should not be available at all.

Actual Behavior

See above.

Additional Information

I think we are using _arity for two things which are only superficially related, and I guess we should simply unentangle that, perhaps as follows:

  • _arity, for any code related to composition of series. In particular, we could very likely reuse PowerSeries.__call__ for the completion of the FreeAlgebra.
  • _shiftable (or something better), a boolean that tells us whether a coefficient in the stream knows its degree or doesn't.

Perhaps this also has something to do with _internal_poly_ring and _laurent_poly_ring, but I haven't thought about it.

At the same time, we might want to add special classes similar to LazySymmetricFunction for the completion of the free algebra.

Environment

irrelevant.

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions