Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I came across a behavior that doesn't make sense to me when I tried to use Exists in Reduce.

If I run commands:

l = {a0, a1, x};
Reduce[Exists[l , a1 != 0 && a0 + a1 x == 0 && a1 < 0], Reals]

I get output:

a1 < 0 && a0 == -a1 x

But if I run command:

Reduce[Exists[{a0, a1, x} , a1 != 0 && a0 + a1 x == 0 && a1 < 0], Reals]

I get output:

True

I think the problem is in exists part:

Exists[l, a1 != 0 && a0 + a1 x == 0 && a1 < 0]

Gives output

a1 != 0 && a0 + a1 x == 0 && a1 < 0

And

Exists[{a0, a1, x} , a1 != 0 && a0 + a1 x == 0 && a1 < 0]

Gives output (which I think is correct):

\!\(\*SubscriptBox[\(\[Exists]\), \({a0, a1, x}\)]\((a1 != 0 && a0 + a1\ x == 0 && a1 < 0)\)\)

Can somebody explain what is going on there and how could I use variable in Exists if this not the correct way?

share|improve this question
2  
probably related to the holding attribute. Compare Reduce[Exists[Evaluate@l, a1 != 0 && a0 + a1 x == 0 && a1 < 0]] with Reduce[Exists[l, a1 != 0 && a0 + a1 x == 0 && a1 < 0]] –  belisarius May 11 at 18:36
    
@belisarius You reply or Community Wiki or something? ;o) Soon I will need to save that quote. –  Öskå May 12 at 10:00
    
@Öskå :) It is just a hunch. I don't have time right now to investigate further. Be my guest to post an answer ... or something :) –  belisarius May 12 at 12:02
    
@belisarius What you suggested made it work. Thank you very much.I don't think it is related to Hold though. Shouldn't ´ReleaseHold[l]´ have to also work in that case (which it didn't)? –  user1335014 May 12 at 12:34
    
@user1335014 If what belisarius proposed you fixed your issue please answer your own question :) –  Öskå May 12 at 12:37

1 Answer 1

As belisarius pointed out the strange behavior disappears when using Evaluate.

Reduce[Exists[Evaluate[l] , a1 != 0 && a0 + a1 x == 0 && a1 < 0], Reals]

Gives output:

True
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.