usemakro("idpot_tools"); Group:=listprompt("Select a structure", structures); binary_operations:=emptyset; for op in operations(Group) do if equal(arity(op),2) then additem(binary_operations, op) else noop endif endfor; if >(card(binary_operations),0) then op:=listprompt("Select a binary operation", binary_operations); write("Idempotent unary polynoms a*x^n in <"); write(Group); write(",");write(op);writeln(">"); for n in card(Group) do if >(n,0) then for g in Group do poly:=lambda(x) op(g,power_op(op,n,x)) endlambda; if idempotent(poly,Group) then write("a:=");write(g);write(" n:=");writeln(n) else noop endif endfor else noop endif endfor else writeln("No binary operations!") endif;