This is probably not the appropriate forum for technical questions about computer algebra systems, but to restrict representation R to subgroup H

RH := map< H->Codomain(R) | x :-> R(x) >;

should work.