I do not see any advantage in allowing finite coefficient streams. In
particular, I have no idea what you meant with:
Then you could not check s=s as I said above, so you would lose
computational power.
Let's maybe rather talk about aldor-combinat and the domain DataStream,
because there I know what I've implemented. Stream in FriCAS is
conceptually pretty much the same. As an extension it does not only
allow repeating the last element, but even end in a cycle of elements.
http://www.risc.jku.at/people/hemmecke/AldorCombinat/combinatse12.html
You can create a DataStream(String) by saying:
s: DataStrem(String) := stream("x")
this creates the sequence "x", "x", ...
But internally this object is finite, i.e. if somebody defines
t: DataStrem(String) := stream("x")
then I could, in principle say that s=t in finite time. For obvious
reasons DataStream does not export an equality operation. But it exports
a function "constant?" with the meaning, that it returns true if it is
"know" that after a finite number of terms the stream keeps repeating
the last element. I.e. constant?(s) would return true, while
constant?(stream(generate {repeat yield "x"}))
never returns true.
See the exact specification here
http://www.risc.jku.at/people/hemmecke/AldorCombinat/combinatsu39.html#constant?:DataStream:PER-%3EBoolean
So in some sense this "constant?" function is not a function. Depending
on whether or not you see the input having a state, it is
non-deterministic or not.
Anyway, it allows you to easily compare two streams that are known to be
constant.
In FriCAS the function explicitlyFinite? is quite similar to my
"constant?" function. Stream in FriCAS, however, has a slightly
different meaning to my DataStrem. But yes, for a user, all my
DataStream(S) elements are always to considered as having infinitely
many elements, meaning that s.n returns an element of S.
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.