Waldek and Martin,

In the new Sage interface for FriCAS Martin is using

domain = P.new("dom(%s::Any)" % self._name) # domain is now a fricas SExpression

and therefore write Sage code like:

head = str(domain.car())
if head == "List":
    ...

which is nice of course, but while considering extending this to other
types I noticed that for example:

(1) -> ts:=series(sin(1/x),x=0)

            1
   (1)  sin(-)
            x
                  Type: GeneralUnivariatePowerSeries(Expression(Integer),x,0)
(2) -> dom(ts)

   (2)
   (GeneralUnivariatePowerSeries (Expression (Integer)) x ((0 . 0) 0 . 1))
                                                            Type: SExpression
(3) -> domainOf(ts)

   (3)  GeneralUnivariatePowerSeries(Expression(Integer()),x,0)
                                                             Type: OutputForm
(4) -> dom(ts).3

   (4)  x
                                                            Type: SExpression
(5) -> dom(ts).4

   (5)  ((0 . 0) 0 . 1)
                                                            Type: SExpression

This last result is not particularly useful in Sage (compare to the
result of domainOf). This makes me think that some conversion similar
to what is now done by domainOf would be desirable. E.g.

(6) -> domainOf(ts) pretend SExpression

   (6)  (GeneralUnivariatePowerSeries (Expression (Integer)) x 0)
                                                            Type: SExpression
(8) ->(8) -> %.4

   (8)  0
                                                            Type: SExpression

What do you think?

Bill.


On 19 August 2016 at 08:38, Bill Page <[email protected]> wrote:
> Thank you Waldek. Now at least the magic is better hidden. :)
>
> https://github.com/fricas/fricas/commit/05ee8d9e5b855106c08670deb35379882147aa0e
>
> Indeed I had completely forgotten about this:
>
> https://groups.google.com/d/msg/fricas-devel/_0tijpdaPng/kT46-RJbn28J
>
> Bill.
>

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