> < ^ Date: Mon, 01 Mar 1993 20:55:05 +0100
> < ^ From: Martin Schoenert <martin.schoenert@math.rwth-aachen.de >
< ^ Subject: Re: integer vector mod integer

In his e-mail message of 1993/02/16, Werner Nickel writes
in writing some routines to deal with integer vectors modulo a positive
integer I discovered that the operation vec mod scalar in GAP 3.1 is
not possible:

gap> [1,2,3,4,5,6] mod 2;
Error, operations: remainder of list and integer is not defined

...

It would be useful to have the operation vec mod scaler available
for those cases where taking the remainder makes sense. For a similar
reason the operation vec mod vec for integer vectors is useful.
The operation would be defined componentwise. In this way one could
easily do computations in finite abelian groups. For example, adding
two vectors in the group C_2 x C_4 x C_12 could be done as follows:

gap> ([1,2,3] + [4,5,6]) mod [2,4,12];
[1,3,9]

I never implemented this, because it didn't appear very usefull to me.
But your last example is very nice (reminds me of the first program I
ever worked on at the Lehrstuhl D ;-). As a matter of fact the manual
for GAP 3.1 contains one example where the ability to compute '<vec> mod
<int>' is used (of course this example never actually worked).

Expect this to come soon.

Martin.

-- .- .-. - .. -.  .-.. --- ...- . ...  .- -. -. .. -.- .-
Martin Sch"onert,   Martin.Schoenert@Math.RWTH-Aachen.DE,  +49 241 804551
Lehrstuhl D f"ur Mathematik, Templergraben 64, RWTH, D 51 Aachen, Germany

> < [top]