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