No time yet to look in deeper detail to Waldek's proposal...

> a choice of a fixed variable seems unnatural to me and may interfere
> with other calculations, it is simple enough to do
> p::UP(x, R)
> or the like.

There is also a function "outputForm".

And... maybe, we change the default unknown-variable-name from "?" to
"#". The question mark always looks a bit as if there were an error and
the system didn't know how to handle it. I don't even think that it
would hurt if we show the default variable of SparseUnivariatePolynomial
as "x".

Maybe the bigger problem is if there is a non-trivial element of
SUP(SUP(INT)) shown.

In fact, if FriCAS allowed optional parameters we could define

  SparseUnivariatePolynomial(R: Ring, v: Symbol == "x"::Symbol): ...

with the meaning that

  SUP(Integer)

is equivalent to

  SUP(Integer, "x"::Symbol)

(or whatever default we choose for the unknown variable name).

Then there wouldn't be need to have both SparseUnivariatePolynomial and
UnivariatePolynomial. Currently, the latter is anyway just a special
case of the first.

And, btw, I don't quite like that in UP('x, K) the variable name is
specified before the coefficient ring.

Ralf

(12) -> U ==> SUP K
                                                                   Type:
Void
(17) -> u:U := y^2

          2
   (17)  ?
                          Type:
SparseUnivariatePolynomial(Fraction(Integer))
(18) -> v:U := z^2+1

          2
   (18)  ?  + 1
                          Type:
SparseUnivariatePolynomial(Fraction(Integer))
(19) -> u - v

   (19)  - 1
                          Type:
SparseUnivariatePolynomial(Fraction(Integer))
(20) -> outputForm(v, "blah"::Symbol::OutputForm)

             2
   (20)  blah  + 1
                                                             Type:
OutputForm
(21) -> outputForm(v, "#"::Symbol::OutputForm)

          2
   (21)  #  + 1
                                                             Type:
OutputForm

-- 
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 http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to