11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.6 Interfaces and Implementations • 151> G := Group();> G:-id := [ A:-id, B:-id ];> G:-‘.‘ := ( u, v ) -> [ A:-‘.‘( u[1], v[1] ),> B:-‘.‘( u[2], v[2] ) ];> G:-mul := () -> foldl( G:-‘.‘, G:-id, args );> G:-inv := v -> [ A:-inv( v[ 1 ] ),> B:-inv( v[ 2 ] ) ];> G:-gens := [ seq( seq( [ a, b ],> a = A:-gens ), b = B:-gens ) ];> G:-eq := ( u, v ) -> A:-eq( u[ 1 ], v[ 1 ] )> and B:-eq( u[ 2 ], v[ 2 ] );> G:-order := () -> GroupOrder( A ) * GroupOrder( B );> G:-member := proc( g, S, pos::name )> if nargs = 1 then> A:-member( g[ 1 ] )> and B:-member( g[ 2 ] )> else> gmember( G:-eq, args )> end if> end proc;> G:-elements := () -> [ seq( seq( [ a, b ],> a = GroupElements( A ) ), b = GroupElements( B ) ) ];> eval( G, 1 )> else> ’procname’( args )> end if> end proc:Most of the group methods are straightforward, but use the known groupstructure to reduce the complexity of some computations such as thosefor the order and elements exports.> A := Symmetric( 3 ):> G := DirectProduct( A, B ):> GroupOrder( G );72> nops( GroupElements( G ) );72Homomorphisms In all algebraic theories, homomorphisms play a keyrole. A group homomorphism is a mapping from a group to another(possibly the same) group which commutes with the group operations.That is, a map ϕ : A −→ B of groups A and B is a homomorphism ifϕ(ab) = ϕ(a)ϕ(b), for all a and b in A. A homomorphism is determineduniquely by its effect on a generating set for its domain, so to define a

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!