There are more misleading issues :

```
FindInstance[EvenQ[n] && PrimeQ[n], n, Integers]
(*
==> {}
*)
```

These both results are in v. 7.0.1 as well as in v. 8.0.4

**Edit**

Even much worse :

```
FindInstance[OddQ[n] && PrimeQ[n], n, Integers]
(*
==> {}
*)
```

In general, `Exists`

and `FindInstance`

work unexpectedly with `OddQ`

, `EvenQ`

, `PrimeQ`

, e.g. :

```
Exists[n, n^2 == 9 && PrimeQ[n]] // Resolve
(*
==> False
*)
Exists[n, n^2 == 9 && OddQ[n]] // Resolve
(*
==> False
*)
Exists[n, PrimeQ[n] && n < 20] // Resolve
(*
==> False
*)
FindInstance[EvenQ[n] && n > 10, n, Integers]
(*
==>{}
*)
```

However

```
FindInstance[n > 10 && n < 20, n, Integers]
(*
==> {{n -> 11}}
*)
Exists[n, n^2 == 9 && n < 0] // Resolve
(*
==> True
*)
Exists[n, 10 < n && n < 20] // Resolve
(*
==> True
*)
```

**Edit 2**

Since those issues rather souldn't be called bugs while they still can be misleading, one may blame them on misusing of predicates inside `FindInstance`

and `Exists`

and we could expect more detailed documentation.

Note that e.g.

`FindInstance[EvenQ[n] && n > 10, n, Integers]`

yields`{}`

. One can carefully say as you did "an instance of a clash of programming and mathematical functionality", but basically that is an incorrect result, so a proper term for this kind of issue is a bug. – Artes – 2012-01-24T14:01:59.527Or maybe just that

`Exists[n, n^2 == 9 && OddQ[n]] // Resolve`

returns`False`

if we cannot expect for too much from`FindInstance`

– Artes – 2012-01-24T14:08:18.0504@Artes I disagree. I think this is not an incorrect result, it is an incorrect usage. One should not use predicates for algebraic manipulations and the like. I think I formulated my view on this pretty clearly. I'd agree that the documentation could be more clear about this though. – Leonid Shifrin – 2012-01-24T15:26:24.973

@Mr.Wizard lol :) – Leonid Shifrin – 2012-01-24T16:00:43.160

4@Artes I think considering this a bug is similar to considering this

`Replace[z^4, z^2 -> x]`

not returning`x^2`

a bug (although the two situations are not equivalent). The documentation says that`EvenQ`

"gives`True`

if expr is an even integer, and`False`

otherwise." (and this is elaborated in "More information": it must have head`Integer`

and be even). So it's actually doing exactly what it's claimed to do. – acl – 2012-01-24T16:57:56.730Thanks. I wasn't aware that functions like

`EvenQ`

and`PrimeQ`

have this always-evaluate semantics (and frankly, I cannot think of an instance where I'd need the semantics of`PrimeQ`

). – celtschk – 2012-01-24T17:24:08.953@acl Ok, I corrected the statement. But these situations are far far not equivalent. When

`Exists[n, EvenQ[n] && PrimeQ[n]]`

yields`False`

this is clearly misleading and the system does return neither warning nor error. – Artes – 2012-01-24T17:36:38.870The way Mathematica overloads the same function with both mathematical and programming meaning has always made me a bit uncomfortable. It is very common to see this, I'd say the majority of common functions are like this (e.g.

`Sum`

,`Max`

,`Abs`

, ...). But admittedly this approach also makes simple usage more convenient. – Szabolcs – 2012-01-24T17:44:57.0172FindInstance requires a system of equations and inequalites. The only reason it doesn't issue a message with predicates is that they evaluate to False (a valid result from an inequality) before being passed to FindInstance. The documentation clearly states that "expr can contain equations, inequalities, domain specifications and quantifiers, in the same form as in Reduce." – Rojo – 2012-01-24T18:02:47.367