On Monday, February 23, 2015 at 1:35:16 AM UTC-8, Dima Pasechnik wrote: > > This is easy at least in the sense that this is the stabiliser of > a set of subsets of the variables in the symmetric group S_n (assuming > you have n variables). And GAP does this for you. >
You'd need to be a little more careful than that. The coefficients do matter: a*b+c*d is invariant under more permutations than a*b-c*d is. A brain-dead way is to just iterate through all permutations, which is entirely reasonable for 4 variables and infeasible by the time you hit 14 variables or so: sage: P.<a,b,c,d>=QQ[] sage: G=SymmetricGroup([a,b,c,d]) sage: f=a*b+c*d sage: [g for g in G if f(g(a),g(b),g(c),g(d)) == f] [(), (c,d), (a,b), (a,b)(c,d), (a,c)(b,d), (a,c,b,d), (a,d,b,c), (a,d)(b,c)] -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
