On Sun, Jun 18, 2023 at 05:21:42PM +0200, Ralf Hemmecke wrote:
> Hello Waldek,
>
> in the package I have written, I called (wrongly)
>
> precision(e1)
>
> and got the answer 1. That surprised me a bit, since e1 was of type
>
> (171) -> e1
>
> 2 3
> (171) 1 - q - q + O(q )
> Type: QEtaTayloreries(Fraction(Integer))
>
> and for that the function precision was not defined.
>
> I cut the definition down to a simple file (attached).
The file just invokes ')compile' but I see no .spad file.
> The interpreter seems to find some way to convert an element of type
> QEtaTaylorSeries(QQ) into QEtaTruncatedTaylorSeries(QQ) and that although
> there is neither a coerce nor a convert or retract function available.
Actually there is one more possibility, namely 'map'. 'map' is used
to lift coercions from base domain to derived domains.
Well, modemap selection has many special cases and those print tracing
and debugging info. But if no special case apply, then FriCAS tries
"general modemap selection". Unfortunately, there is almost no
debugging info in general case. And the code has know bugs, for
example it may create invalid types. Before the problem is
solved it is hard to say if you see one of know bugs or a new bug.
Or maybe the case above works as designed due to some unexpected
coincidence.
It seem that Weber paper which was in reference section on the wiki
gives outline of the method.
--
Waldek Hebisch