> With respect to the series expansions, what I would like to understand is:
> Why does a simple series(0.1*x, x=0.0) not work,
> even with type annotations?

>> (1) -> F ==> Float
>> (2) -> E ==> Expression F
>> (3) -> P ==> UnivariatePuiseuxSeries(E, 'x, 0.1::F::E)
>> (4) -> z := monomial(1,1)$P

The two most important lines here are (3) and (4).

Since (3) actually does nothing than tell the system that P abbreviates
Puiseux series, let's concentrate on (4). That line says "let z be the
variable of P regarded as a Puiseux series over E (with a variable name
x and expanded abount 0.1).

Now let us suppose you do not do the above and let me give YOU the
expression

  series(x, x=0)

how do you know in what domain I want my series to live? Is it with
coefficients over the integers?

But that only can give you a hint that not only FriCAS would have a
problem in figuring out my intend.

Now look at this (see end of mail for full detail).

(1) -> )set message bottom on
(1) -> series(0.1*x, x=0)

You can ask FriCAS via ")set message bottom on" to show you what it will
try to make sense out of your expression. FriCAS must interpret every
single letter of it and try to find a function "series" with appropriate
types. Since x is not assigned, the best it can do is to consider it as
something of type Variable(x). Of course that doesn't work for 0.1*x, so
FriCAS tries to find an appropriate type for *: (Float, X) -> Y where X
and Y are unknown types and Variable(x) must be convertible to X.
"convertible to" simply means that FriCAS must find (among the currently
exposed library functions) a function with name "coerce", "convert" or
"retract" that has the appropriate type. Here it seemingly finds one,
namely converting Variable(x) to Polynomial(Float). So, we can use
*: (Float, Polynomial(Float)) -> Polynomial(Float).
Same thing for "x=0", where it first figures out that the type for "="
could be "(Polynomial(Integer), Polynomial(Integer) ->
Equation(Polynomial(Integer)) might work.
Bad luck now for the "series" function, since there is no such function
with the respective types.
Obviously, FriCAS gives up after looking at the available types for
"series".

So the only real hint I can give is that you have to help FriCAS in
figuring out what you actually want. FriCAS is unable (as anyone) would
to figure out what your intentions are. There are simply too many
coefficient domains that might work.

Maybe you give one of the expressions that you are working on so that I
might try to help you expand this into a Puiseux series.

Ralf

====================================================================

(1) -> )set message bottom on
(1) -> series(0.1*x, x=0)

 Function Selection for float
      Arguments: (INT, INT, PI)
      Target type: FLOAT
      From:      FLOAT

 [1]  signature:   (INT, INT, PI) -> FLOAT
      implemented: slot $(Integer)(Integer)(PositiveInteger) from FLOAT


 Function Selection for *
      Arguments: (FLOAT, VARIABLE(x))

 [1]  signature:   (FLOAT, POLY(FLOAT)) -> POLY(FLOAT)
      implemented: slot $(Float)$ from POLY(FLOAT)
 [2]  signature:   (POLY(FLOAT), POLY(FLOAT)) -> POLY(FLOAT)
      implemented: slot $$$ from POLY(FLOAT)


 Function Selection for equation
      Arguments: (VARIABLE(x), NNI)

 [1]  signature:   (POLY(INT), POLY(INT)) -> EQ(POLY(INT))
      implemented: slot $(Polynomial (Integer))(Polynomial (Integer))
from EQ(POLY(INT))


 Function Selection for series
      Arguments: (POLY(FLOAT), EQ(POLY(INT)))
   -> no function series found for arguments (POLY(FLOAT), EQ(POLY(INT)))

 Function Selection for map by coercion facility (map)
      Arguments: ((POLY(INT) -> INT), EQ(POLY(INT)))
      Target type: EQ(INT)

 [1]  signature:   ((POLY(INT) -> INT), EQ(POLY(INT))) -> EQ(INT)
      implemented: slot (Equation (Integer))(Mapping (Integer)
(Polynomial (Integer)))(Equation (Polynomial (Integer))) from
EQ2(POLY(INT),INT)


 Function Selection for series
      Arguments: (UP(x,FLOAT), EQ(POLY(INT)))
   -> no function series found for arguments (UP(x,FLOAT), EQ(POLY(INT)))

 Function Selection for map by coercion facility (map)
      Arguments: ((POLY(INT) -> INT), EQ(POLY(INT)))
      Target type: EQ(INT)

 [1]  signature:   ((POLY(INT) -> INT), EQ(POLY(INT))) -> EQ(INT)
      implemented: slot (Equation (Integer))(Mapping (Integer)
(Polynomial (Integer)))(Equation (Polynomial (Integer))) from
EQ2(POLY(INT),INT)

   There are 4 exposed and 1 unexposed library operations named series
      having 2 argument(s) but none was determined to be applicable.
      Use HyperDoc Browse, or issue
                             )display op series
      to learn more about the available operations. Perhaps
      package-calling the operation or using coercions on the arguments
      will allow you to apply the operation.

   Cannot find a definition or applicable library operation named
      series with argument type(s)
                              Polynomial(Float)
                        Equation(Polynomial(Integer))

      Perhaps you should use "@" to indicate the required return type,
      or "$" to specify which version of the function you need.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/70a00c99-edc5-7e53-13a2-499c6bf85895%40hemmecke.org.

Reply via email to