represents the domain of strictly positive integers, as in xPositiveIntegers.


  • xPositiveIntegers evaluates immediately if x is a numeric quantity.
  • Simplify[exprPositiveIntegers,assum] can be used to try to determine whether an expression is a positive integer under the given assumptions.
  • (x1|x2|)PositiveIntegers and {x1,x2,}PositiveIntegers test whether all xi are positive integers.
  • PositiveIntegers is output in StandardForm or TraditionalForm as TemplateBox[{}, PositiveIntegers]. This typeset form can be input using pints.


open allclose all

Basic Examples  (3)

Seven is a positive integer:

If is an integer, then is a positive integer:

Find positive integer solutions of a Pell equation:

Scope  (6)

Test domain membership of a numeric expression:

Make domain membership assumptions:

Specify the default domain over which a function should work:

Solve an optimization problem over the positive integers:

Test whether several numbers are positive integers:

If any number is explicitly not a positive integer, the result is False:

TraditionalForm formatting:

Applications  (1)

Testing membership in the positive integers is a fast way to verify positivity of a large list of integers:

Properties & Relations  (3)

Membership in PositiveIntegers is equivalent to membership in Integers along with positivity:

PositiveIntegers is contained in PositiveReals and PositiveRationals:

PositiveIntegers is disjoint from NonPositiveIntegers and NegativeIntegers:

Introduced in 2019