Bill Page wrote:
> 
> 
> In 'elemntry.spad' I see the following code:
> 
> https://github.com/fricas/fricas/blob/master/src/algebra//elemntry.spad#L642
>
<snip> 
> I propose the following patch:
> 
> wspage@opensuse:~/fricas/src/algebra> svn diff elemntry.spad
> Index: elemntry.spad
> ===================================================================
> --- elemntry.spad       (revision 1825)
> +++ elemntry.spad       (working copy)
> @@ -641,15 +641,15 @@
> 
>  -- THIS DETERMINES WHEN TO PERFORM THE log exp f -> f SIMPLIFICATION
>  -- CURRENT BEHAVIOR:
> ---     IF R IS COMPLEX(S) THEN ONLY ELEMENTS WHICH ARE RETRACTABLE TO R
> ---     AND EQUAL TO THEIR CONJUGATES ARE DEEMED REAL (OVERRESTRICTIVE FOR 
> NOW)
> ---     OTHERWISE (e.g. R = INT OR FRAC INT), ALL THE ELEMENTS ARE DEEMED REAL
> +--     ELEMENTS WHICH ARE NOT EQUAL TO THEIR CONJUGATES ARE DEEMED NOT REAL
> +--     ALL OTHER ELEMENTS ARE DEEMED REAL
> 
> -    if (R has imaginary : () -> R) and (R has conjugate : R -> R) then
> +    if (F has conjugate : F -> F) then
> +         localReal? x == x = conjugate(x)
> +    else if (R has imaginary : () -> R) and (R has conjugate : R -> R) then
>           localReal? x ==
>              (u := retractIfCan(x)@Union(R, "failed")) case R
>                 and (u::R) = conjugate(u::R)
> -
>      else localReal? x == true
> 
>      iiilog x ==

What is the goal of your change?  Could you give a use case?

Let me add that assumptions like "exements of Expression(Integer)
are real" are in general unsound.  In case of log the assumption
is frequently true and not making it would stop useful
simplifications.  However, I would rather move in direction
of removing unsoudness than adding mor of it.  To be more
precise: currently the assumption is made blindly regardless
of user wishes.  We should improve FriCAS to be able to do
more simplifications without extra assumptions and to allow
user specified assumptions -- such changes should allow
removing unsoud assumptions without loss of computing power.

-- 
                              Waldek Hebisch
hebi...@math.uni.wroc.pl 

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
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