Ralf, I am aware of your altitude to Expression(Integer), moreover I am familiar with what are expressions in FriCAS, basically they are what one encounters in the theory of symbolic integration.
I don't normally do all the computations in a CAS, sometimes I resort to a pen and a paper or pass formulas from a CAS to another program, like plotting one. In order to perform such tasks I often wish to have a more compact dispay of formulas, I was speaking consciously about ouputted form, not the expression itself. On Monday, December 24, 2012 9:18:50 PM UTC+4, Ralf Hemmecke wrote: > > On 12/24/2012 05:05 AM, Grigory Sarnitsky wrote: > > And what if I have Expression(Integer) ? Say, > > > > (5) -> (sin x + y)^3 / ((sin x)^2 + (sin x + z)^3) > > By now I should be known on this mailing list as the person who doesn't > like Expression(Integer). Seemingly, everyone thinks that an element of > type Expression(Integer) is the same as an expression in Mathematica or > Maple. No, it is not! > > In FriCAS, Expression(Integer) is represented as a rational function > where the variables are "kernels". Look deeper into the representation. > > > https://github.com/hemmecke/fricas-svn/blob/master/src/algebra/expr.spad.pamphlet#L113 > > > That's the standard representation with all its consequences. If you > want something else, you need something else, not Expression(Integer). > > What in other CAS is done by a simplify function (with unclear > semantics) is actually not existent in FriCAS. In FriCAS an element > (expression) x of type X is always turned into whatever the type X > thinks is appropriate. If you want x to show differently, you'd usually > have to coerce it into an appropriate type. > > Look for example at this, maybe it gives you an idea how things would > have to be done. The trick is to make your types more specific, not the > "all including" Expression(Integer). > > Since you haven't made exactly clear what you actually want to achieve > and whether you could perhaps temporarily work with a symbol sx instead > of the kernel sin(x), I'm unable to help any further. > > Ralf > > > (3) -> a:=(2+%i)/(3+x+%i) > > 2 + %i > (3) ---------- > x + 3 + %i > Type: Fraction(Polynomial(Complex(Integer))) > (4) -> a::Complex(Fraction Polynomial Integer) > > 2x + 7 x + 1 > (4) ------------ + ------------ %i > 2 2 > x + 6x + 10 x + 6x + 10 > Type: Complex(Fraction(Polynomial(Integer))) > -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To view this discussion on the web visit https://groups.google.com/d/msg/fricas-devel/-/uE6BOdwnmB8J. 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.
