ThisIf your representation R is probably not the appropriate forumof type Map (which it will be if you defined it as Representation(M) for technical questions about computer algebra systemsa G-module M), butthen to restrict representation R to subgroup H
RH := map< H->Codomain(R) | x :-> R(x) >;
should work.
If you have defined R as a group homomorphism G -> GL(n,K) for some field K, then you could instead use
RH := hom< H->Codomain(R) | x :-> R(x) >;