From: Robert D. <rob...@gm...> - 2023-10-29 01:13:19
|
On Sat, Oct 28, 2023 at 12:36 PM Eduardo Ochs <edu...@gm...> wrote: > o1 : a^k*b^k = (a*b)^k; > o2 : a^k*b^k + a^k*c^k = a^k*(b^k+c^k); > is(o1); /* false */ > is(o2); /* false */ > is(ratsimp(o1)); /* false */ > is(ratsimp(o2)); /* true */ > is(ratexpand(o1)); /* false */ > is(ratexpand(o2)); /* true */ Bear in mind that is(foo = bar) only looks at whether foo and bar are just copies of the same thing; that is, whether foo and bar are identical, and not whether foo and bar are equivalent. On the other hand, is(equal(foo, bar)) looks at whether foo and bar are equivalent, specifically in the sense that ratsimp(foo - bar) is 0. E.g. is(x*(x + 1) = x^2 + x) yields false, while is(equal(x*(x + 1), x^2 + x)) yields true. For what it's worth, Robert |