Discussion:
[fricas-devel] on setSimplifyDenomsFlag(true)
'Nasser M. Abbasi' via FriCAS - computer algebra system
2018-06-17 12:54:19 UTC
Permalink
I am using sagemath to call fricas integrate, as in

sage: integrate((x+(1+x)^(1/2))^(1/2)/(x^2+1)/(1+x)^(1/2),x,algorithm
="fricas")

The problem is that I need to setSimplifyDenomsFlag(true) before, which I
do not know how to do this from sage, since it only supports the above call
as far as I know. But I also just asked about this at the sagemath form
https://ask.sagemath.org just in case there is way.

Is it possible to build Fricas on Linux with this flag true? If so, how?
Otherwise, many integrals will timeout because of this and I could not use
sage to test fricas using this method.

Thanks
--Nasser
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
'Nasser M. Abbasi' via FriCAS - computer algebra system
2018-06-18 05:22:35 UTC
Permalink
Post by 'Nasser M. Abbasi' via FriCAS - computer algebra system
I am using sagemath to call fricas integrate, as in
sage: integrate((x+(1+x)^(1/2))^(1/2)/(x^2+1)/(1+x)^(1/2),x,
algorithm="fricas")
The problem is that I need to setSimplifyDenomsFlag(true) before, which I
do not know how to do this from sage, since it only supports the above call
as far as I know. But I also just asked about this at the sagemath form
https://ask.sagemath.org just in case there is way.
Is it possible to build Fricas on Linux with this flag true? If so, how?
Otherwise, many integrals will timeout because of this and I could not use
sage to test fricas using this method.
Thanks
--Nasser
Does Fricas has some initialization file that is read each starts it starts
(may be put it in my $HOME directory)? if so, I could put the command
setSimplifyDenomsFlag(true) in it and this should solve the problem. I
googled and could not find anything so far.
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Ralf Hemmecke
2018-06-18 07:00:14 UTC
Permalink
FriCAS init file
================

At start-up, FriCAS can read an init file according to the
following rules. First match counts.

#. An environment variable ``FRICAS_INIT`` exists.

#. If ``FriCAS_INIT`` is empty, then no init file is read.

#. Otherwise, the content of ``FRICAS_INIT`` is interpreted as
the path to a file that should be read.
If ``FRICAS_INIT`` is the empty string, nothing is read.

#. The environment does not contain ``FRICAS_INIT``.

#. If the file ``.fricas.input`` exists in $HOME, then it is read.

#. If the file ``.axiom.input`` exists in $HOME, then it is read.

#. Do not read any input file.
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
'Martin R' via FriCAS - computer algebra system
2018-06-18 07:18:37 UTC
Permalink
You can use

sage: fricas.setSimplifyDenomsFlag(fricas.true)

However, in the example below, you will hit another NotImplementedError:
rootOf has no translation to sage yet.
https://trac.sagemath.org/ticket/25597 might be necessary, I don't know.

Martin
Post by 'Nasser M. Abbasi' via FriCAS - computer algebra system
I am using sagemath to call fricas integrate, as in
sage: integrate((x+(1+x)^(1/2))^(1/2)/(x^2+1)/(1+x)^(1/2),x,
algorithm="fricas")
The problem is that I need to setSimplifyDenomsFlag(true) before, which I
do not know how to do this from sage, since it only supports the above call
as far as I know. But I also just asked about this at the sagemath form
https://ask.sagemath.org just in case there is way.
Is it possible to build Fricas on Linux with this flag true? If so, how?
Otherwise, many integrals will timeout because of this and I could not use
sage to test fricas using this method.
Thanks
--Nasser
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
'Martin R' via FriCAS - computer algebra system
2018-06-18 07:30:18 UTC
Permalink
Hi again,

what is the semantics of the InputForm of rootOf precisely? Is it as
follows:

(rootOf p v)

"defines" v to be one of (???) the roots of the polynomial p?

Isn't it important which root?

Martin
Post by 'Martin R' via FriCAS - computer algebra system
You can use
sage: fricas.setSimplifyDenomsFlag(fricas.true)
rootOf has no translation to sage yet.
https://trac.sagemath.org/ticket/25597 might be necessary, I don't know.
Martin
Post by 'Nasser M. Abbasi' via FriCAS - computer algebra system
I am using sagemath to call fricas integrate, as in
sage: integrate((x+(1+x)^(1/2))^(1/2)/(x^2+1)/(1+x)^(1/2),x,
algorithm="fricas")
The problem is that I need to setSimplifyDenomsFlag(true) before, which I
do not know how to do this from sage, since it only supports the above call
as far as I know. But I also just asked about this at the sagemath form
https://ask.sagemath.org just in case there is way.
Is it possible to build Fricas on Linux with this flag true? If so, how?
Otherwise, many integrals will timeout because of this and I could not use
sage to test fricas using this method.
Thanks
--Nasser
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
'Nasser M. Abbasi' via FriCAS - computer algebra system
2018-06-18 07:48:55 UTC
Permalink
Thanks. I did not know one can do this from sage sage:
fricas.setSimplifyDenomsFlag(fricas.true)

It seems to have helped in so far the integrals that used to hang do not
know in sage.
But as you said, number of integrals which evaluate in fricas itself. now
fail from sage calling fricas, with

NotImplementedError: The translation of the FriCAS
Expression

I just tried this one integrate(sqrt(x + sqrt(x + 1))/((x^2 + 1)*sqrt(x +
1)),x) and it works inside fricas
but gives an error from sage.

So it looks like trying to use Fricas from sage is still not 100% working.
Post by 'Martin R' via FriCAS - computer algebra system
You can use
sage: fricas.setSimplifyDenomsFlag(fricas.true)
rootOf has no translation to sage yet.
https://trac.sagemath.org/ticket/25597 might be necessary, I don't know.
Martin
Post by 'Nasser M. Abbasi' via FriCAS - computer algebra system
I am using sagemath to call fricas integrate, as in
sage: integrate((x+(1+x)^(1/2))^(1/2)/(x^2+1)/(1+x)^(1/2),x,
algorithm="fricas")
The problem is that I need to setSimplifyDenomsFlag(true) before, which I
do not know how to do this from sage, since it only supports the above call
as far as I know. But I also just asked about this at the sagemath form
https://ask.sagemath.org just in case there is way.
Is it possible to build Fricas on Linux with this flag true? If so, how?
Otherwise, many integrals will timeout because of this and I could not use
sage to test fricas using this method.
Thanks
--Nasser
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
'Martin R' via FriCAS - computer algebra system
2018-06-18 08:32:40 UTC
Permalink
Well, the thing wich is not working is the translation back to sage. You
can do fricas.integrate(expression, var) to skip the translation back to
sage, but that's probably not so useful. It should not be too hard to
translate rootOf, once I know what it should translate to...

Martin
Post by 'Martin R' via FriCAS - computer algebra system
fricas.setSimplifyDenomsFlag(fricas.true)
It seems to have helped in so far the integrals that used to hang do not
know in sage.
But as you said, number of integrals which evaluate in fricas itself. now
fail from sage calling fricas, with
NotImplementedError: The translation of the FriCAS
Expression
I just tried this one integrate(sqrt(x + sqrt(x + 1))/((x^2 + 1)*sqrt(x +
1)),x) and it works inside fricas
but gives an error from sage.
So it looks like trying to use Fricas from sage is still not 100% working.
Post by 'Martin R' via FriCAS - computer algebra system
You can use
sage: fricas.setSimplifyDenomsFlag(fricas.true)
rootOf has no translation to sage yet.
https://trac.sagemath.org/ticket/25597 might be necessary, I don't know.
Martin
Post by 'Nasser M. Abbasi' via FriCAS - computer algebra system
I am using sagemath to call fricas integrate, as in
sage: integrate((x+(1+x)^(1/2))^(1/2)/(x^2+1)/(1+x)^(1/2),x,
algorithm="fricas")
The problem is that I need to setSimplifyDenomsFlag(true) before, which
I do not know how to do this from sage, since it only supports the above
call as far as I know. But I also just asked about this at the sagemath
form https://ask.sagemath.org just in case there is way.
Is it possible to build Fricas on Linux with this flag true? If so, how?
Otherwise, many integrals will timeout because of this and I could not use
sage to test fricas using this method.
Thanks
--Nasser
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Waldek Hebisch
2018-06-18 13:03:33 UTC
Permalink
Post by 'Martin R' via FriCAS - computer algebra system
Hi again,
what is the semantics of the InputForm of rootOf precisely? Is it as
(rootOf p v)
"defines" v to be one of (???) the roots of the polynomial p?
Isn't it important which root?
I should not matter which one -- if it matters, then use of
'rootOf' is incorrect. To be more precise: polynomial 'p'
should be irreducible and in such case for algebraic computations
each root have equal rights (they are indistinguishable).

ATM it happens that FriCAS uses 'rootOf' in cases where it should
not -- we are fixing such things, but fixes usually involve
a lot of work so this is slow process.
--
Waldek Hebisch
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
'Martin R' via FriCAS - computer algebra system
2018-06-19 13:18:48 UTC
Permalink
Thank you, this was very helpful!

I hope that the improved interface will also draw some attention of
developers towards FriCAS!

Martin
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...