12
$\begingroup$

Bug introduced in 11.1 or earlier and fixed in 11.3.0


Just a simple expression in version 11.2, Windows 10

Reduce[(-2)^n > 1, n, Integers]

returns

n ∈ Integers && n >= 2

But this result is not correct because it should be

n / 2 ∈ Integers && n >= 2

Furthermore, I remember that in previous version, e.g. 10.x, Reduce works properly.


Update

Wolfram Alpha behaves inconsistently.

$\endgroup$
  • 2
    $\begingroup$ Versions 5.2 and 8.0.4 solve this problem correctly, too. $\endgroup$ – innaiz Dec 5 '17 at 19:55
  • $\begingroup$ I'm voting to close this question as off-topic because there is no question in the post. This is just a bug report to which an answer cannot be supplied. $\endgroup$ – QuantumDot Dec 12 '17 at 17:02
  • 1
    $\begingroup$ Have you reported it to WRI Support? $\endgroup$ – Kuba Dec 13 '17 at 14:37
  • 1
    $\begingroup$ @AliHashmi So, if necessary, maybe you can report it instead. $\endgroup$ – Αλέξανδρος Ζεγγ Dec 16 '17 at 11:48
  • 2
    $\begingroup$ seems to be fixed in 11.3 $\endgroup$ – 1110101001 Mar 22 '18 at 5:16
5
$\begingroup$

Strangely, adding a pointless equation causes the bug to be avoided:

aux = Reduce[(-2)^n > 1 && n == m, n, Integers]
(*  (m | n | C[1]/2) ∈ Integers && C[1] >= 2 && m == C[1] && n == C[1]  *)

I found it tricky to eliminate the unwanted variables programmatically. Eliminate does not work on inequalities, nor will Reduce or Solve eliminate a variable from aux probably for the same reason.

Or @@ (aux /. Solve[
     Cases[aux, eq_Equal],
     DeleteCases[n]@ Variables@ Cases[aux, Equal[x_, y_] :> {x, y}]
     ]) // Reduce
(*  n/2 ∈ Integers && n >= 2  *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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