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$
15
  • 2
    $\begingroup$ Versions 5.2 and 8.0.4 solve this problem correctly, too. $\endgroup$ Commented Dec 5, 2017 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$ Commented Dec 12, 2017 at 17:02
  • 1
    $\begingroup$ Have you reported it to WRI Support? $\endgroup$ Commented Dec 13, 2017 at 14:37
  • 1
    $\begingroup$ @AliHashmi So, if necessary, maybe you can report it instead. $\endgroup$ Commented Dec 16, 2017 at 11:48
  • 2
    $\begingroup$ seems to be fixed in 11.3 $\endgroup$ Commented Mar 22, 2018 at 5:16

1 Answer 1

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$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.