random n -- for n an integer, yields a random integer in the range 0 .. n-1.
random x -- for real x, yields a random real number in the range 0 .. x.
random R -- yields a random element of the ring R.
random(n,R) -- yields a random homogeneous element of degree n
in the ring R, where n is an integer or a list of integers.
random(F,G) -- yields a random graded, degree 0, map from the free
module G to the free module F.
Warning: doesn't correctly handle the case when n an integer is larger
than 2^31-1.