Yrogirg wrote:
>
> Thank you for HyperDoc hint, it turned out to be not so scary.
>
> But if log is not log: P -> R how can the simplifications be done?
> Consider
>
> log (x*y)
>
> and when I write it I mean log to be of type P -> R, however I can't
> say it to FriCAS. If I don't know anything about x and y (except the
> are both R, x*y is P) then I leave this expression. However I actually
> assume x and y to be in P and
>
> log x + log y
>
> can be used. How does FriCAS assure an expression to be valid if not
> by types used?
>
log(x*y) = log(x) + log(y)
is valid in many cases even if logs involved are not real.
Currently FriCAS uses 3 different approaches to decide if it
should apply given simplification:
- sometines it performs deductions based on variables ranges
(this is possible for definite integrals and limits)
- sometimes FriCAS makes assumption based on types: for
Expression(Integer) FriCAS in few places assumes that values
are real (while Expression(Complex(Integer)) is regared as
complex). This really is not sound: sqrt(-1) is of type
Expression(Integer) and is not real.
- some functions assume that user/caller verified that
simplification is possible -- for example normalize is
in this group. This would be sound if all callers
verified assumptions, but currently this means that
assumptions "propagate" in a way that is hard to understand
for users.
Let me mention variation on point 3 above: simplification
may be invalid if you think about single-valued functions
but both input and output are multivalied functions such
that results after simplification are equivalent. For example:
integrate(log(f(x)*g(x), x)
is defined only up to a constant, so we get equivalent
result from:
integrate(log(f(x)), x) + integrate(log(g(x)), x)
This is really not satisfying and we would like to do better.
But the problem is hard (other systems have troubles too) and
types (at least as currently used in FriCAS) does not really
help here.
--
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.