# Vectors with integer mod $$n$$ entries, with small $$n$$#

EXAMPLES:

sage: v = vector(Integers(8),[1,2,3,4,5])
sage: type(v)
<class 'sage.modules.vector_modn_dense.Vector_modn_dense'>
sage: v
(1, 2, 3, 4, 5)
sage: 3*v
(3, 6, 1, 4, 7)
sage: v*7
(7, 6, 5, 4, 3)
sage: -v
(7, 6, 5, 4, 3)
sage: v - v
(0, 0, 0, 0, 0)
sage: v + v
(2, 4, 6, 0, 2)
sage: v * v
7

sage: v = vector(Integers(8),[1,2,3,4,5])
sage: u = vector(Integers(8),[1,2,3,4,4])
sage: v - u
(0, 0, 0, 0, 1)
sage: u - v
(0, 0, 0, 0, 7)

sage: v = vector((Integers(5)(1),2,3,4,4))
sage: u = vector((Integers(5)(1),2,3,4,3))
sage: v - u
(0, 0, 0, 0, 1)
sage: u - v
(0, 0, 0, 0, 4)


We make a large zero vector:

sage: k = Integers(8)^100000; k
Ambient free module of rank 100000 over Ring of integers modulo 8
sage: v = k(0)
sage: v[:10]
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)


We multiply a vector by a matrix:

sage: a = (GF(97)^5)(range(5))
sage: m = matrix(GF(97), 5, range(25))
sage: a*m
(53, 63, 73, 83, 93)


AUTHOR:

• William Stein (2007)

class sage.modules.vector_modn_dense.Vector_modn_dense#
sage.modules.vector_modn_dense.unpickle_v0(parent, entries, degree, p)#
sage.modules.vector_modn_dense.unpickle_v1(parent, entries, degree, p, is_mutable)#