Previous Page Next Page Contents

Type::PosInt -- a type and a property representing positive integers

Introduction

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

Call(s)

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

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 testtype, assume and is

Related Functions

testtype, is, assume, Type::Property

Details

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)
                       TRUE, TRUE, TRUE, TRUE, TRUE

Example 2

Assume an identifier is positive integer:

>> assume(x, Type::PosInt):
   is(x, Type::PosInt)
                                   TRUE

Also positive integers are integers:

>> assume(x, Type::PosInt):
   is(x, Type::Integer)
                                   TRUE

However, integers can be positive or not:

>> assume(x, Type::Integer):
   is(x, Type::PosInt)
                                  UNKNOWN
>> delete x:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000