Hello. kubuntu linux, sage 5.5 I want to define a function that takes argument 'x' and returns 'x^2'. But I cannot make this idea work when 'x' is an element of a permutation group. As per the snippet below, 'u^2' is perfectly well defined, but f(u) returns an error.
How do I define a function f() such that f(x) returns x^2 even when x is a peculiar object such as an element of a permutation group? sage: f(x) = x^2 sage: f(3) 9 sage: u = CubeGroup().U() sage: u^2 (1,8)(2,7)(3,6)(4,5)(9,25)(10,26)(11,27)(17,33)(18,34)(19,35) sage: f(u) --------------------------------------------------------------------------- TypeError -- Robin Hankin Uncertainty Analyst hankin.ro...@gmail.com -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.