Ask Your Question
1

which parent class for C-finite sequences?

asked 2014-02-10 12:07:10 +0100

rws gravatar image

updated 2014-02-17 06:14:26 +0100

Hello, I would like to embed a structure (C-finite sequences) in the Sage ring hierarchy. Fortunately, C-finite sequences are equivalent to the fractions of Laurent polynomials, any fraction is an ordinary generating function for a sequence, and it's a bijection. Now, I'm a bit confused as to the implementation procedure:

Can I just subclass the "right" ring class (FractionField?), and override the members. But which class? Can I create a specific ring class for Laurent polynomial fractions and just call it CFiniteSequenceRing? Maybe I don't even need a new ring, just a class for the elements? If so, is there a way to declare the bijection?

Given that there are P-finite sequences, a superset of the above, what should be done to ensure that they fit into the scheme?

Any hint would be welcome.

Update: It turned out that, in order to support combinatorial generating functions as well as multivariate generating functions, the ring of C-Finite Sequences should not be restricted, and the information which generator is associated with the ring element should be in the element. This makes the ring undistinguishable from an abstract fraction field. However, the elements are different from fraction field elements in that they contain more (and in the multivar case mandatory) information.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-02-17 06:26:00 +0100

rws gravatar image

Given the updated question, I will simply create a subclass of FractionField, and call it RationalGeneratingFunctionField, overriding the methods that deal with elements. Please comment if you think this is stupid, or give a better answer.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-02-10 12:07:10 +0100

Seen: 277 times

Last updated: Feb 17 '14