41.4 Module

Module( R, gens )
Module( R, gens, zero )
Module( R, gens, "basis" )

returns the module for the ring R that is generated by the elements in the list gens. If gens is empty then the zero element zero of the module must be entered.

If the third argument is the string "basis" then the generators gens are assumed to form a vector space basis.

    gap> a:= UnitalAlgebra( GF(2), GL(2,2).generators );;
    gap> a.name:="a";;
    gap> m1:= Module( a, [ a.1[1] ] );
    Module( a, [ [ Z(2)^0, Z(2)^0 ] ] )
    gap> Dimension( m1 );
    2
    gap> Basis( m1 );
    SemiEchelonBasis( Module( a, [ [ Z(2)^0, Z(2)^0 ] ] ), 
    [ [ Z(2)^0, Z(2)^0 ], [ 0*Z(2), Z(2)^0 ] ] )
    gap> m2:= Module( a, a.2, "basis" );;
    gap> Basis( m2 );
    Basis( Module( a, [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ] ),
    [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ] )
    gap> a.2;
    [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ]
    gap> m1 = m2;
    true 

Previous Up Top Next
Index

GAP 3.4.4
April 1997