## `Type::Integer` -- a type and a property representing integers

#### Introduction

`Type::Integer` represents integers. This type can also be used as a property to mark identifiers as integers.

#### Call(s)

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

#### Parameters

`obj` | - | any MuPAD object
`x` | - | an identifier or one of the expressions `Re(u)` or `Im(u)` with an identifier `u`
`ex` | - | an arithmetical expression

#### Returns

see `assume`, `is` and `testtype`

#### Related Functions

`assume`, `is`, `testtype`, `Type::Real`, `Type::Property`

#### Details

- The call `testtype(obj,` Type::Integer) checks, whether `obj` is an integer number and returns `TRUE`, if it holds, otherwise `FALSE`.
- `testtype` only performs a syntactical test identifying MuPAD objects of type `DOM_INT`.
- The call `assume(x,` Type::Integer) marks the identifier `x` as an integer number.

  The call `is(ex,` Type::Integer) derives, whether the expression `ex` is an integer number (or this property can be derived).

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

#### Example 1

The following numbers are of type `Type::Integer`:

    >> testtype(0, Type::Integer), testtype(55, Type::Integer),
       testtype(-111, Type::Integer)

                                 TRUE, TRUE, TRUE

#### Example 2

We use this type as a property:

    >> assume(x, Type::Integer):

The following calls to `is` derive the properties of a composite expression from the properties of its indeterminates:

    >> is(3*x, Type::Real), is(2*x, Type::Even), is(x/2, Type::Integer)

                                TRUE, TRUE, UNKNOWN

    >> assume(y, Type::Integer): is(x + y^2, Type::Integer)

                                       TRUE

    >> unassume(x), unassume(y):

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000