12

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.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574

1 Answers1

5

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  *)
Michael E2
  • 235,386
  • 17
  • 334
  • 747