Resolve[ForAll[n,Element[n,Integers],!IntegerQ[Sqrt[n^2-7 n-1]]]]
True
But as I know,when the n
is $17$,Sqrt[n^2 - 7 n - 1]
is $13$(integer).What's happen of this function?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityAll functions ending in Q
evaluate to True
or False
immediately. Therefore IntegerQ[x]
is False
if x
has no value.
You are essentially writing
Resolve[ForAll[n, Element[n, Integers], True]]
so you get True
.
IntegerQ
is a "programming function" that tests the data type of the argument. It is not a "mathematical function" that will stay unevaluated with symbolic arguments and can represent a mathematical statement.
Use something \[Element] Integers
instead.
Element
or NotElement
, as I said in the last line of the answer. Mathematica will not be able to solve this problem though.
$\endgroup$
ForAll[]
doesn't work that way.Resolve[ForAll[n, Element[n, Integers], ! IntegerQ[n]]]
also evaluates toTrue
. $\endgroup$ForAll[n, ! IntegerQ[n]]
will giveTrue
,too.Why? $\endgroup$