To support DynamicPolynomials.jl in RecurrenceRelationships.jl I had to be careful to use the type of a polynomial (which is different than a variable). A quick-and-dirty fix was this:
https://github.com/JuliaApproximation/RecurrenceRelationships.jl/blob/82125b04d75df222024abaf7a10670fa6a99e9bc/src/RecurrenceRelationships.jl#L5
Though now I'm also support matrices and so this doesn't work.
I'm wondering if there's a canonical function for determining the type of a polynomial given the type of the coefficients and the type of the variable.