ProjSummands:=function(H,M) //removes indecomposable //projective direct summands from //the H-module M; //H needs to be a group of prime //power order q:=M; h:=true; ord:=Order(H); while h eq true do if Dimension(q) gt 0 then i:=0; bool:=false; while bool eq false do vec:=Random(q); test:=sub; if Dimension(test) eq ord then q:=quo; Dimension(q); bool:=true; elif i lt 10 then i:= i+1; else h:=false; bool:=true; end if; end while; else h:=false; end if; end while; return q; end function;