PositiveIntegers

PositiveIntegers

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

Details

  • 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.

Examples

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:

Wolfram Research (2019), PositiveIntegers, Wolfram Language function, https://reference.wolfram.com/language/ref/PositiveIntegers.html.

Text

Wolfram Research (2019), PositiveIntegers, Wolfram Language function, https://reference.wolfram.com/language/ref/PositiveIntegers.html.

CMS

Wolfram Language. 2019. "PositiveIntegers." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PositiveIntegers.html.

APA

Wolfram Language. (2019). PositiveIntegers. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PositiveIntegers.html

BibTeX

@misc{reference.wolfram_2024_positiveintegers, author="Wolfram Research", title="{PositiveIntegers}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/PositiveIntegers.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_positiveintegers, organization={Wolfram Research}, title={PositiveIntegers}, year={2019}, url={https://reference.wolfram.com/language/ref/PositiveIntegers.html}, note=[Accessed: 22-November-2024 ]}