So, I guess the easiest thing is to require characteristic 0 for
TranscendentalFunctionCategory - that's what you suggested, right?

Ooops, I was somehow wrong. Not differentiation is the problem, but integration. This is where rational numbers come in.

In sttaylor.spad.pamphlet we have

    if A has Algebra RN then
      integrate  : (A,ST A) -> ST A
        ++ integrate(r,a) returns the integral of the power series \spad{a}
        ++ with respect to the power series variableintegration where
        ++ r denotes the constant of integration. Thus
        ++ \spad{integrate(a,[a0,a1,a2,...]) = [a,a0,a1/2,a2/3,...]}.
      lazyIntegrate  : (A,() -> ST A) -> ST A
        ++ lazyIntegrate(r,f) is a local function
        ++ used for fixed point computations.

Oh? lazyIntegrate is "local", but exported? Intentions probably were that it is local, but it is currently used in other places, so we must ignore the "local" in the documentation.

In particular, lazyIntegrate is used in sttf.spad.pamplet (StreamTranscendentalFunctions).

1) Replace the above "if A has Algebra RN then" by

    if A has Algebra RN and A has CharacteristicZero then

2) To me it seems that all exports of StreamTranscendentalFunctions require the coefficient ring to be CharacteristicZero. So we should have

StreamTranscendentalFunctions(Coef): Exports == Implementation where
  Coef : Join(Algebra Fraction Integer, CharcteristicZero)
                                        ^^^^^^^^^^^^^^^^^(added)

Unfortunately, it seems that we cannot make the exports in TRANFUN
conditional, so I'm afraid that we need to check every constructor that
exports TRANFUN.

I don't quite understand what you wanted to do with that. Doesn't look mine like a better fix. (I'm sure that there are nasty details lurking somewhere if I really compile with the above changes, but to me it looks like the way to go.)

Ralf

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to