Message Boards Message Boards

0
|
1848 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Use Resolve over custom domain?

Posted 5 years ago

Consider the following code:

A = {1,2,3,4}

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

The code above gives me this error: Unable to resolve the domain or region membership condition {1,2,3,4}[Element]x.

Thank you for your time

POSTED BY: Phuoc Do

There are two issues. One is that the arguments to Element are reversed from what they should be. The other issue (if I am not mistaken) is that Element only understands certain domains. SInce Integers is one such domain, the constraint could be redone as below.

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

(* Out[418]= True *)
POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract