represents the domain of strictly negative integers, as in x∈NegativeIntegers.
NegativeIntegers
represents the domain of strictly negative integers, as in x∈NegativeIntegers.
Details
- x∈NegativeIntegers evaluates immediately if x is a numeric quantity.
- Simplify[expr∈NegativeIntegers,assum] can be used to try to determine whether an expression is a negative integer under the given assumptions.
- (x1|x2|…)∈NegativeIntegers and {x1,x2,…}∈NegativeIntegers test whether all xi are negative integers.
- NegativeIntegers is output in StandardForm or TraditionalForm as
. This typeset form can be input using
nints
.
Examples
open all close allBasic Examples (3)
Minus seven is a negative integer:
Element[-7, NegativeIntegers]If
is an integer,
is a negative integer:
Simplify[-EulerPhi[n]^2 - 1∈NegativeIntegers, n∈ℤ]Find negative integer solutions of a Pell equation:
Reduce[x ^ 2 - 2y ^ 2 == 1, {x, y}, NegativeIntegers]Scope (6)
Test domain membership of a numeric expression:
1234567∈NegativeIntegersMake domain membership assumptions:
Refine[n ^ 3 ≤ n, n∈NegativeIntegers]FullSimplify[x ^ n + y ^ n == z ^ n, (x | y | z)∈NegativeIntegers && n∈ℤ && n > 3]Specify the default domain over which a function should work:
Reduce[(x ^ 999997 - 25x ^ 12345 + 24x)(x - 7)(x ^ 2 - 9) == 0, x, NegativeIntegers]FindInstance[x ^ 2 + y ^ 2 + z ^ 2 + t ^ 2 + u ^ 2 + v ^ 2 + w ^ 2 == 1234567890987654321, {x, y, z, t, u, v, w}, NegativeIntegers]Solve an optimization problem over the negative integers:
Minimize[{x ^ 2 + x y}, {x, y}, NegativeIntegers]Test whether several numbers are negative integers:
(x | y | -1)∈NegativeIntegersIf any number is explicitly not a negative integer, the result is False:
{x, y, 1}∈NegativeIntegersTraditionalForm formatting:
NegativeIntegers//TraditionalFormApplications (1)
Testing membership in the negative integers is a fast way to verify negativity of a large list of integers:
list = RandomInteger[{-100, -1}, 1000000];AbsoluteTiming[list∈NegativeIntegers]AbsoluteTiming[MatchQ[list, {__Integer ? Negative}]]Properties & Relations (3)
Membership in NegativeIntegers is equivalent to membership in Integers along with negativity:
x∈NegativeIntegersNegativeIntegers is contained in NegativeReals and NegativeRationals:
Refine[x∈NegativeReals, x∈NegativeIntegers]Refine[x∈NegativeRationals, x∈NegativeIntegers]NegativeIntegers is disjoint from NonPositiveIntegers and PositiveIntegers:
Refine[x∈NonNegativeIntegers, x∈NegativeIntegers]Refine[x∈PositiveIntegers, x∈NegativeIntegers]Related Guides
History
Text
Wolfram Research (2019), NegativeIntegers, Wolfram Language function, https://reference.wolfram.com/language/ref/NegativeIntegers.html.
CMS
Wolfram Language. 2019. "NegativeIntegers." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NegativeIntegers.html.
APA
Wolfram Language. (2019). NegativeIntegers. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NegativeIntegers.html
BibTeX
@misc{reference.wolfram_2026_negativeintegers, author="Wolfram Research", title="{NegativeIntegers}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/NegativeIntegers.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_negativeintegers, organization={Wolfram Research}, title={NegativeIntegers}, year={2019}, url={https://reference.wolfram.com/language/ref/NegativeIntegers.html}, note=[Accessed: 12-June-2026]}