Previous Page Next Page Contents

Type::Residue -- a property representing a residue class

Introduction

Type::Residue(rem, class) represents the integers n for which n-rem is divisible by class.

Call(s)

assume(x, Type::Residue(rem, class <, subset>))
is(ex, Type::Residue(rem, class <, subset>))
testtype(obj, Type::Residue(rem, class <, subset>))

Parameters

x - an identifier or one of the expressions Re(u) or Im(u) with an identifier u
rem - remainder as integer number between 0 and class - 1; an integer larger than class - 1 will be divided by class and rem gets the remainder of this division
class - the divider as positive integer
subset - a subset of the integers (e.g., Type::PosInt); otherwise Type::Integer is used
ex - an arithmetical expression
obj - any MuPAD object

Returns

see assume, is and testtype

Related Functions

assume, is, testtype, Type::Even, Type::Integer, Type::Odd

Details

Example 1

Type::Residue can be used in testtype:

>> testtype(6, Type::Residue(2, 4)),
   testtype(13, Type::Residue(1, 20))
                                TRUE, FALSE

Example 2

x is assumed to be divisible by 3 with remainder 1:

>> assume(x, Type::Residue(1, 3))
                            3 Type::Integer + 1

Which properties has x + 2 got?

>> getprop(x + 2)
                              3 Type::Integer

x is an integer, but it may be odd or not:

>> is(x, Type::Integer), is(x, Type::Odd)
                               TRUE, UNKNOWN

The optional subset of the integers restricts the possible values of x:

>> assume(x, Type::Residue(2, 4, Type::PosInt)):
   is(x > 0),
   is(x^2 >= 4)
                                TRUE, TRUE

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000