thanks,I have solved my problem successfully,though the process is a bit strange.
On Nov 2, 1:58 am, Bill Page <[email protected]> wrote: > Ok, a deficiency in map$Stream I would admit. > > I suppose that it depends on how one wants to define > 'explicitlyFinite?'. It is important to consider how this relates to > 'possiblyInfinite?'. Note that 'possiblyInfinite?' currently returns > 'true' until the stream is evaluated. > > I suppose that you could specifically ask for the completion like this: > > s2:=complete(map(x+->x+1,s1)); > > but you risk an infinite loop if s1 is not explicityFinite. > > What is the "right answer"? In general the finiteness of a stream > could be undecidable. For this reason a result of Boolean from both > 'explicitlyFinite?' and 'possiblyInfinite?' is a kind of compromise. > Really the appropriate logic is more complicated. > > Regards, > Bill Page. > > 2011/11/1 Liu Xiaojun <[email protected]>: > > > > > 在 2011年11月2日星期三,上午12:29,Ralf Hemmecke 写道: > > > On 11/01/2011 05:20 PM, Liu Xiaojun wrote: > > > Oh, this explanation is quite reasonable. What should we do if we want > > "explicitlyFinite?" > > returns right answer (true) in a function call ? Namely is there a way to > > make the "lazy" > > computation performed within a function call. > > > Well, in fact, I am not quite satisfied with the implementation. Look at > > this... (mind the semicolon). > > (2) -> s1:Stream(INT) := res::Stream(INT); > > Type: Stream(Integer) > > (3) -> explicitlyFinite? s1 > > (3) true > > Type: Boolean > > The stream knows that s1 is explicitlyFinite, because it comes from a list. > > The map function should return a stream of the same length as the input > > stream, so being a finite stream should not be forgotten by map. > > I'd consider this a bug, but I would have to dig a bit deeper into the > > source code to propose a fix. > > > Thanks in advance :) > > > 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. > > > -- > > 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. > > -- 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.
