Accelerating the pace of engineering and science

# Type::PosInt

Type and property representing positive integers

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```testtype(obj, Type::PosInt)
assume(x, Type::PosInt)
is(ex, Type::PosInt)
```

## Description

Type::PosInt represents positive integers. Type::PosInt is a property, too, which can be used in an assume call.

The call testtype(obj, Type::PosInt) checks, whether obj is a positive integer number and returns TRUE, if it holds, otherwise FALSE.

testtype only performs a syntactical test identifying MuPAD® objects of type DOM_INT and checks, if bool(obj > 0) holds.

The call assume(x, Type::PosInt) marks the identifier x as a positive integer number.

The call is(ex, Type::PosInt) derives, whether the expression ex is a positive integer number (or this property can be derived).

This type represents a property that can be used in assume and is.

## Examples

### Example 1

The following numbers are of type Type::PosInt:

```testtype(2, Type::PosInt),
testtype(3, Type::PosInt),
testtype(55, Type::PosInt),
testtype(1, Type::PosInt),
testtype(111, Type::PosInt)```

### Example 2

Assume an identifier is positive integer:

```assume(x, Type::PosInt):
is(x, Type::PosInt)```

Also positive integers are integers:

```assume(x, Type::PosInt):
is(x, Type::Integer)```

However, integers can be positive or not:

```assume(x, Type::Integer):
is(x, Type::PosInt)```

`delete x:`

## Parameters

 obj Any MuPAD object x An identifier or a mathematical expression containing identifiers ex

## Return Values

See testtype, assume and is