I've been experimenting with lazy leading-term generation for unexpanded polynomials after working on "yet another method of computing degree without relying on full expansion". The prototype aims to generate leading terms without expanding the expression. I have a basic system working but am now investigating how to handle larger products. For example, (and I let AI take over from here):
After reversing \(x\) via \(t=1/x\), products such as
\[ \prod_i(a_i+b_it)^{n_i} \]have a first-order differential annihilator, and converting that to a coefficient recurrence lets us generate only the leading polynomial terms that are requested.
I discovered that this is essentially the same transformation already implemented by HolonomicFunction.to_sequence(): for a two-factor example it produces exactly the same recurrence as the prototype.
I am wondering what the intended architectural boundary of the holonomic machinery is. HolonomicSequence currently seems mainly to store an annihilator recurrence and initial conditions, while recurrence evaluation is done by HolonomicFunction.series().
Would it make sense to factor out a lightweight “differential annihilator -> coefficient recurrence” and/or recurrence-coefficient iterator that could be reused outside holonomic? In particular, polys cannot reasonably depend on holonomic since holonomic already depends on polys.
Is HolonomicSequence intended eventually to be the general P-recursive sequence abstraction for this sort of use, or would a lightweight lower-level recurrence utility be more appropriate?
/c
I am wondering what the intended architectural boundary of the holonomic machinery is. HolonomicSequence currently seems mainly to store an annihilator recurrence and initial conditions, while recurrence evaluation is done by HolonomicFunction.series().
Would it make sense to factor out a lightweight “differential annihilator -> coefficient recurrence” and/or recurrence-coefficient iterator that could be reused outside holonomic? In particular, polys cannot reasonably depend on holonomic since holonomic already depends on polys.