Thank you, Qian,

I wonder, how the origininal code can ever have worked.

Furthermore, we can avoid

     nniToI st == delay
       empty? st => empty()
       term : Term := [(frst st).k, (frst st).c]
       concat(term, nniToI rst st)

altogether. It is similar to

coerce(uts : SUTS) == uts pretend %                             (*)

https://github.com/fricas/fricas/blob/master/src/algebra/sups.spad#L1512

in SparseUnivariateLaurentSeries. The current code looks as if the
programmers couldn't decide whether it's safe to say (n pretend Integer)
instead of (n::Integer). Se either

(A) we allow (*) ... and then mark such places such that if ever
    NNI and Integer don't share the same representation, these places
    can be found easily, or
(B) forbid such (potentially) dangerous "pretend"s.

I'm somewhat in favour of (A) (restricted to NNI <--> PI <--> INT).

Ralf


-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to