someone wrote:
> 
> Hi,
> 
> 
> > The following works, but is (of course) not the right solution.
> > 
> >     rows(A:M, si:SPI) : M ==
> >       rows(A, (expand(si pretend Segment(Integer))$Segment(Integer))
> > pretend List(PI))
> 
> Yes, this would work.
> 
> > > (1) -> PI has ORDRING
> > > 
> > >    (1)  false
> > 
> > > This means I can not expand a Segment(PI) into a List?
> > 
> > Exactly.
> 
> Too bad. OTOH the interpreter can do it without any hassle.
>  
> > > Why not, it seems to be a natural operation, no?
> > 
> > Right, but the current library implementation is unnecessarily
> > restrictive.
> > 
> > I guess for "expand" we only need OrderedSet, a distinct element 1
> > (default step size) and an operation +. In fact, disregarding the "by"
> > construction of a segment, a function next: %->% would be enough.
> 
> Maybe we should try to lessen these restrictions?
> What do you think about this, would it be feasible
> or rather introduce new trouble somewhere?

Note that internally a Segment always has an _integer_ increment.
So, to be sure that expand succeds you need to make sure that
there is a coercion from Integer to the base type.  I am not
sure if in practice this gives more generality than just
requesting OrderedRing -- at least there is no coercion from
Integer to PositiveInteger.

I am affraid that to fix this one has to reorganize Segment
quite a bit:

- require that argument is a join of OrderedAbelianSemigroup
  and Monoid (to have 1)
- change increment to be of the same type as base
- update algebra, interpreter and Spad compiler to cope with
  non-integer increments.

> (87) -> )display op coerce
> 
> There are 86 exposed functions called coerce :
>    [1] D1 -> D from D if D has ALGEBRA(D1) and D1 has COMRING
>  
>    >> System error:
>    The value D2 is not of type SEQUENCE.
> 
> What happens here? I think this is a bug, isn't it?

Yes, a bug.  Need to track what exactly causes the problem.
 
-- 
                              Waldek Hebisch
[email protected] 

-- 
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