Re: Re: Simplification problem
I made a hash of my previous reply due to not looking carefully at the
question (which was wrongly formed anyway) and the answer that I
posted. More precisely, I did not notice that what you really wanted
to do is to get rid of a part of a disjunction that implies the other
part (so is logically unnecessary).
So here is a second go:
Reduce[(z1 == z2 && x1*t1 == x2*t2) ||
z1 + x1*t1 == z2 + x2*t2, Reals]
z1 == -(t1*x1) + t2*x2 + z2
which is exactly what you wanted (except that one term is on the
opposite side of the equation). Unfortunately this happens really just
by luck, and does not work in your second case.
Reduce[(y1 == y2 && t1 == t2) || t1/2^y1 == t2/2^y2, Reals]
(y1 == y2 && t1 == t2) || (t1 == 0 && t2 == 0) ||
(t1 < 0 && t2 < 0 &&
y2 == y1 - Log[t1/t2]/Log) ||
(t1 > 0 && t2 > 0 && y2 == y1 - Log[t1/t2]/Log)
I am pretty sure there is no way to do in Mathematica (or any other
symbolic algebra program) what you want in general (that is, except in
lucky cases like the first one). The reason is that functions like
BooleanMinimize operate on expression belonging to the Boolean algebra
of logical sentences (first order logic or predicate logic etc), while
your expression is what is known as a first order formula in the
language of ordered fields. Reduce and FullSimplify will transform
such first order formulas into certain canonical forms (for example,
by removing quantifiers and expanding), but no attempt is made to
transform them into the simplest "semantically" equivalent form (where
"semantic equivalence" involves both the "logical" and the "algebraic"
structure) because no such algorithms are known (in general).
If I recall correctly most of your posts I have seen addressed some
version of this problem and, I am pretty sure, the answer is, it can't
On 9 Nov 2009, at 19:44, Andrzej Kozlowski wrote:
> On 8 Nov 2009, at 20:51, olfa wrote:
>> Hello mathematica community
>> Having this system of equations:
>> (z1==z2 && x*t==x1*t1)||(z1+x1*t1==z2+x2*t2)
>> why a function like fullsimplify or booleanminimize doesn't simplify
>> it into z1+x1*t1==z2+x2*t2?
>> same question for (y1==y2 && t1== t2)||(t1/2^y1==t2/2^y2) why it is
>> not simplified into t1/2^y1==t2/2^y2.
>> is there another function that I can use?
>> thank you.
> I think I have answered very similar questions from you several times
> but you just ignore the answers and keep asking the same thing all
> over again.
> The function to use is Reduce over the Reals (even if the result is
> more general, the algorithms used by Mathematica for such situations
> work over the reals). You will get a more complicated looking answer,
> but it actually "contains yours".
> Reduce[(z1 == z2 && x*t == x1*t1) || z1 + x1*t1 == z2 + x2*t2,
> (x2 ==
> 0 && ((z1 ==
> z2 && (x1 ==
> 0 || (x != 0 && (t1 == 0 || t == (t1*x1)/x)))) ||
> (x1 != 0 && t1*x1 + z1 == z2 && (t1 != 0 || x == 0)))) ||
> (x2 != 0 && ((((t1*x1 + z1 ==
> t2*x2 + z2 && (x != 0 || (t1 != 0 && t2 != 0))) ||
> (t2 == 0 && x == 0 && t1*x1 + z1 == z2) || (x != 0 &&
> t == (t1*x1)/x &&
> t1 != (t2*x2)/x1 && z1 == z2)) && x1 != 0) ||
> (x1 == 0 && ((t2 != 0 && t2*x2 + z2 == z1) ||
> (z1 == z2 && (t == 0 || t2 == 0 || x == 0)))) ||
> (t1 == 0 && t2 != 0 &&
> x == 0 && (z1 == z2 || t2*x2 + z2 == z1))))
> The answer you see is a disjunction, corresponding to various terms
> being zero or non-zero. If you look at this carefully you will see
> that it does contain what you want:
> x2 != 0 && ((((t1*x1 + z1 == t2*x2 + z2 && (x != 0 || (t1 != 0 &&
> t2 !
> = 0)))
> Similarly in the second case:
> Reduce[(y1 == y2 && t1 == t2) || t1/2^y1 == t2/2^y2, Reals]]
> (t1 == 0 && t2 == 0) || (t1 == t2 && y1 == y2) ||
> (Log*(y1 - y2) == Log[t1/t2] &&
> ((t1 < 0 && t2 < 0) || (t1 > 0 && t2 > 0)))
> This is again essentially equivalent to the answer you wanted. You
> can't expect to get exactly what you wanted as the algorithms
> Mathematica uses are entirely different form the way you do this by
> Andrzej Kozlowski
Prev by Date:
Re: Re: Text on a curve
Next by Date:
Re: Re: Mathematica skill level snippet(s)
Previous by thread:
Re: Simplification problem
Next by thread:
Piecewise with ODE and constant