0
A = {1,2,3,4}

ForAll[x, Element[A,x], x+1>0 ]

Resolve[%]

The above code gives me the following error:

Unable to resolve the domain or region membership condition {1,2,3,4}[Element]x.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291

1 Answers1

0

I think you have the arguments to Element[A,x] backwards, because A is your domain and x is an element of that domain. Just reversing those is not sufficient to eliminate the error message, but this appears to be enough.

A = {1,2,3,4};
ForAll[x, Element[x,Integers]&&0<x<5, x+1>0 ];
Resolve[%]

which returns True

Bill
  • 3,664
  • 1
  • 12
  • 9
  • Thank you for your response @Bill. I see that you mean; however the problem that I have is that I need it to be within a specific domain. For example what if the domain has unsorted numbers like -1,3,5,10,49,35,-84. I tried For[x, MemberQ[A,x], x+1<0 ] but it does not work – Salvador Franco Nov 27 '18 at 17:56
  • I other words, I need the value x to be an element of the set A not a member of all integers – Salvador Franco Nov 27 '18 at 18:07
  • I believe I understood what you want. It is possible that you can't get what you want using `ForAll[x, Element[x,A],...]`. Perhaps you can get what you want in another way. – Bill Nov 27 '18 at 18:58
  • This `Resolve[ForAll[x,x==-1||x==3||x==5||x==10||x==49||x==35||x==-84,x+1>0]]` does correctly return `False`. This `Resolve[ForAll[x,x==1||x==3||x==5||x==10||x==49||x==35||x==84,x+1>0]]` does correctly return `True`. This `Resolve[ForAll[x,x==-1||x==3||x==5||9<=x<=10,x+1>=0]]` cannot be decided. – Bill Nov 27 '18 at 20:12