Previous Page Next Page Contents

Dom::IntegerMod -- residue class rings modulo integers

Introduction

Dom::IntegerMod(n) creates the residue class ring of integers modulo n.

Domain

Dom::IntegerMod(n)

Parameters

n - positive integer greater than 1

Introduction

Dom::IntegerMod(n)(a) creates the residue class of a modulo n.

Creating Elements

Dom::IntegerMod(n)(a)

Parameters

a - any integer or a rational number whose denominator is coprime to n

Categories

if n has Type::Prime
Cat::Field
else
Cat::CommutativeRing

Related Domains

Dom::Integer, Dom::GaloisField

Entries

characteristic

the characteristic of the residue class ring, n

one

the unit element, 1 mod n

zero

the zero element, 0 mod n

Method _divide: division of two elements

Method _invert: invert elements

Method _mult: multiply elements

Method _negate: negate elements

Method _plus: add elements

Method _power: power of elements

Method _subtract: subtraction of two elements

Method isSquare: test for being a square

Method iszero: zero test

Method ln: discrete logarithm

Method order: order

Method TeX: TeX output

Method convert: conversion

Method convert_to: conversion

Method expr: convert an element to an expression

Method print: printing elements

Method random: random element

Example 1

We define the residue class ring Z7:

>> Z7:= Dom::IntegerMod(7)
                            Dom::IntegerMod(7)

Next, we create some elements:

>> a:= Z7(1); b:= Z7(2); c:= Z7(3)
                                  1 mod 7
      
                                  2 mod 7
      
                                  3 mod 7

We may use infix notation for arithmetical operations since the operators have been overloaded:

>> a + b, a*b*c, 1/c, b/c/a/c
                    3 mod 7, 6 mod 7, 5 mod 7, 1 mod 7

a and b are squares while c is not:

>> Z7::isSquare(a), Z7::isSquare(b), Z7::isSquare(c)
                             TRUE, TRUE, FALSE

Indeed, c is a generator of the group of units:

>> Z7::order(a), Z7::order(b), Z7::order(c)
                                  1, 3, 6

Super-Domain

Dom::BaseDomain

Axioms

Ax::normalRep

, Ax::canonicalRep, Ax::noZeroDivisors, Ax::closedUnitNormals, Ax::canonicalUnitNormal, Ax::efficientOperation("_invert"), Ax::efficientOperation("_divide"), Ax::efficientOperation("_mult")

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000