In Z3 (Python), I solved the following:
y1,y2,x = Ints('y1 y2 x')
univ = ForAll([x], (y1<y2+x*x))
phi = Exists([y1,y2], univ)
solve(phi)
Note that the encoding does not make sense, just playing.
The point is that the result totally blew my mind, since it returned a result! This was surprising since I have been studying first order theories and, as far as I knew, LIA is decidable, whereas NIA was not (the same happens with rationals). The result was []
, by the way: i.e. valid.
So I searched about this problem in this side and found (How does Z3 handle non-linear integer arithmetic?), where it is Leonardo de Moura himself who responds the following: if a formula has a solution, we can always find it by brute force. That is, we keep enumerating all possible assignments, and testing whether they satisfy the formula or not. This is not that different from trying to solve the Halting problem by just running the program and checking whether it terminates after a given number of steps.
Okay, so I understand NIA is semi-decidable. Is it right? However...
In (https://hal.archives-ouvertes.fr/hal-00924646/document) the following is stated: Gödel showed that (NIA) is an undecidable problem.
Also, in (Quantifier Elimination - More questions), the same is stated: NIA does not admit quantifier elimination. Moreover, the decision problem for NIA is undecidable.
Then, is NIA undecidable or semi-decidable? Obviously, I see there can be some solutions. So does Gödel mean undecidable in the sense that is not decidable (but saying nothing about semi-decidability)?
Are there fully undecidable LIA fragments? For instance, in NRA, in (Z3 support for nonlinear arithmetic) it is stated that only Nonlinear polynomials are decidable (for Z3).
Can anyone provide some clarification?