[sage-combinat-devel] About the Permutation class, and support for permutation over non-intergers
Hello everybody ! I just wanted to share my recent discovery : a class named PermutationGroupElement which represents permutations over... anything. Which has far fewer method than combinat's Permutations, though Though if Permutations ever get rewitten, we will need to share code between those two classes. Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] Re: a problem in the new permutation groups code (and a solution ?)
I think its unambiguous to define the orbit of x recursively as 1. use the action on domain elements if x is a domain element 2. otherwise, assume that the x is a list/set/... of domain elements On Thursday, March 21, 2013 3:10:38 PM UTC+1, Dima Pasechnik wrote: While working on http://trac.sagemath.org/sage_trac/ticket/14291, it came to my attention that one can now have permutation groups acting on quite arbitrary domains (the only requirement for the domain elements seems to be them being hashable). This leads to the following kind of confusing situations: suppose our permutation group G acts on, say, (1,2,3,4,(1,2),(2,3)). Then things like the orbit (1,2) under G can be interpreted in two different incompatible ways: * the images under G of the pair of domain elements 1 and 2. * the images under G of of the domain element (1,2). I can see two ways to remedy this: 1) a framework with parents, etc 2) boxing the most primitive elements of the domain, i.e. as in our example, using ((1),(2),(3),(4),(1,2),(2,3)) instead of (1,2,3,4,(1,2),(2,3)); then certainly ((1),(2)) and (1,2) are different things, problem solved. (and certainly you can tell me that actually it's OK as it is... :)) IMHO, 2) is relatively easy to put into place, and 1) is tricky and quite a bit of work. Dima -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] Re: [sage-devel] Re: a problem in the new permutation groups code (and a solution ?)
Helloo !!! I think its unambiguous to define the orbit of x recursively as 1. use the action on domain elements if x is a domain element 2. otherwise, assume that the x is a list/set/... of domain elements Well. It is when you know what you are doing and work on a spcific group. When you write a Sage method, though, it is embarassing if you do not know wheter the orbit of a pair of elements is a set of element (input considered as element) or a set of pairs of elements (input considered as a se of elements). Really there is no problem with this patch except that Dima does not like that the elements of a group could be things like 1,2,{1,2}, which makes {1,2} ambiguous (element? set of two elements?) ... What we did before is guess the type of INPUT according to a keyword named action (that we need anyway, if only to differentiate between OnTuples and OnSets) and everything works fine Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] Re: [sage-devel] Re: a problem in the new permutation groups code (and a solution ?)
And PLEASE if you answer this thread please also send your answer to sage-devel, not only sage-combinat. Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] Re: [sage-devel] Re: a problem in the new permutation groups code (and a solution ?)
On Friday, March 22, 2013 2:51:05 PM UTC+1, Nathann Cohen wrote: I think its unambiguous to define the orbit of x recursively as 1. use the action on domain elements if x is a domain element 2. otherwise, assume that the x is a list/set/... of domain elements Well. It is when you know what you are doing and work on a spcific group. For non-interactive you either perform argument validation yourself or use the optional parameter G.orbit(foo, action='OnTuples'). -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-combinat-devel] Re: [sage-devel] Re: a problem in the new permutation groups code (and a solution ?)
For non-interactive you either perform argument validation yourself or use the optional parameter G.orbit(foo, action='OnTuples'). Oh. Ok, this is fine ! So Dima, do we guess the value of action when it is set to None, then translate the output according to the value of action ? That's a good answer ! Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] Re: [sage-devel] Re: a problem in the new permutation groups code (and a solution ?)
On 2013-03-22, Nathann Cohen nathann.co...@gmail.com wrote: --bcaec5430e1288051e04d883f5b8 Content-Type: text/plain; charset=ISO-8859-1 For non-interactive you either perform argument validation yourself or use the optional parameter G.orbit(foo, action='OnTuples'). Oh. Ok, this is fine ! So Dima, do we guess the value of action when it is set to None, then translate the output according to the value of action ? That's a good answer ! We need to fix the domain design first, and here is why (I already wrote this on the ticket, so I repeat myself): Take, say, directed 3-cycle, and label its vertices, in the cyclic order, 1, 2, (1,2). So you get G=Z_3, the automorphism group of this digraph, acting on the domain V=(1,2,(1,2)). Next, ask for the orbit of the arc (1,2) of the digraph under G. OK, fine, it is A=((1,2),(2,(1,2)),((1,2),1). Now, note that the intersection of V and A equals {(1,2)}. The intersection of two distinct orbits of a group is not empty... Would Evariste Galois raise from his grave and chase the designer of this? :-) Dima Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-combinat-devel] Re: [sage-devel] Re: a problem in the new permutation groups code (and a solution ?)
Would Evariste Galois raise from his grave and chase the designer of this? I answered on the ticket, and said that I would help him if he did. But Dima you know that this thing will take ime if somebody actually ends up doing it and it's not related to this ticket. Why do you want to block it over that ? Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] Re: [sage-devel] Re: a problem in the new permutation groups code (and a solution ?)
On 2013-03-22, Nathann Cohen nathann.co...@gmail.com wrote: --f46d040f9ba4da0f5504d8848510 Content-Type: text/plain; charset=ISO-8859-1 Would Evariste Galois raise from his grave and chase the designer of this? I answered on the ticket, and said that I would help him if he did. But Dima you know that this thing will take ime if somebody actually ends up doing it and it's not related to this ticket. Why do you want to block it over that ? as I explained, the code you don't like there (cause it does not work on insane inputs) would work fine on sane inputs. And the uglier code you prefer would break things on insane inputs, too, although at some other point, e.g. at the one I outlined above in this thread. Dima Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-combinat-devel] Re: [sage-devel] Re: a problem in the new permutation groups code (and a solution ?)
as I explained, the code you don't like there (cause it does not work on insane inputs) would work fine on sane inputs. And the uglier code you prefer would break things on insane inputs, too, although at some other point, e.g. at the one I outlined above in this thread. It does not break things on insane input -- let's decide where we discuss this, I just answered that on the ticket -- for you are (from Sage's point of view) perfectly aware of what you are doing when you intersect : - The orbit of a vertex which you obtained by doing g.action( x, action = OnPoints ) - The orbit of an edge which you obtained by doing g.action( (x,y), action = OnSets) Hence you KNOW that you are intersecting things of different types. We might as well say that the output of g.action( x, action = OnPoints ) is of type OrbitOfPoint and g.action( (x,y), action = OnSets) of type OrbitOfSet. You actually know this information because you filled the action argument yourself. You can infer the type of what is being returned just from the value of action. Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-devel] Re: [sage-combinat-devel] Re: Re: a problem in the new permutation groups code (and a solution ?)
No, this won't really fly. Indeed, we can follow your design, and implement, explictly, action on tuples of tuples. And then, on my example with the Z_3 action, ask for the orbit on ((1,2),(1,2)). And then we are in trouble, cause there is no way to figure out whether (1,2) is a domain element or not! You can decide this from the value of action. Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] Re: [sage-devel] Re: Re: Re: a problem in the new permutation groups code (and a solution ?)
On 2013-03-22, Nathann Cohen nathann.co...@gmail.com wrote: No, this won't really fly. Indeed, we can follow your design, and implement, explictly, action on tuples of tuples. And then, on my example with the Z_3 action, ask for the orbit on ((1,2),(1,2)). And then we are in trouble, cause there is no way to figure out whether (1,2) is a domain element or not! You can decide this from the value of action. Do you mean to say that we check that (1,2) is in the domain, and utilize this info? So, here are the choices: If we reject the input as invalid, then there is no way to find the orbit on the real tuple of tuples ((1,2),(1,2)). (and so all of a sudden you forbid perfectly sensible inputs) If we accept the input, and treat (1,2) as a domain element, our orbit would be {(1,2),(1,2)), (1,1), (2,2)} --- but neither (1,1) nor (2,2) are tuples of tuples! And if we do not treat (1,2) as a domain element, it's even more fun: we get an INFNITE orbit: {((1,2),(1,2)), ((2,(1,2)),(2,(1,2)), (((1,2),(2,(2,(1,2,((1,2),(2,(2,(1,2),...} No, this doesn't fly... Dima Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-combinat-devel] Re: [sage-devel] Re: Re: Re: a problem in the new permutation groups code (and a solution ?)
Do you mean to say that we check that (1,2) is in the domain, and utilize this info? O_O Are you doing this on purpose ? If you want to find the orbit of ((1,2),(1,2)) with Sage and if we implement this action thing, then : - When you write g.action( ((1,2),(1,2)), action=OnPoints) Sage refuses what you give it for ((1,2),(1,2)) does not belong to the domain - When you write g.action( ((1,2),(1,2)), action=OnTuples) then Sage checks that (1,2) is indeed in the doman (it is a vertex of your circuit) and returns [((1,2),(1,2)), (1,1), (2,2)], that is a set of pairs (vertex, vertex) - When you write g.action( ((1,2),(1,2)), action=OnSets) Then Sage either refuses to work because your set contains twice the same element, or reduces your set to ((1,2)) in which case it returns a list of sets equal to [((1,2)), (1), (2)] When is it ambiguous ? Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-combinat-devel] Re: [sage-devel] Re: Re: Re: a problem in the new permutation groups code (and a solution ?)
If your only problem is Volker's proposition that we guess the value of action according to the input I do not mind forgetting about it just to simplify this discussion, even though I think his idea is good. Then you would not be able to call orbit without specifying the value of action, and this terminates all doubts about the interpretation of input and output. Nathann -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] Re: [sage-devel] Re: Re: Re: a problem in the new permutation groups code (and a solution ?)
Under my proposal, the orbit of ((1,2),(1,2)) would be the orbit of a pair, i.e. {((1,2),(1,2)), (1,1), (2,2)}. If you want the orbit of pairs of pairs, you can get it as orbit(..., action=OnTuplesTuples). There is of course a limit of how nested the action is. If you really need orbits of tuples of sets of tuples of sets of tuples then you'll have to relabel the permutation group so that its domain doesn't have tuples or sets. -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] Re: [sage-devel] Re: Re: Re: a problem in the new permutation groups code (and a solution ?)
On 2013-03-22, Volker Braun vbraun.n...@gmail.com wrote: --=_Part_418_31291271.1363974902177 Content-Type: text/plain; charset=ISO-8859-1 Under my proposal, the orbit of ((1,2),(1,2)) would be the orbit of a pair, i.e. {((1,2),(1,2)), (1,1), (2,2)}. If you want the orbit of pairs of pairs, you can get it as orbit(..., action=OnTuplesTuples). And how would you deal with orbit(((1,2),(1,2)), action=OnTuplesTuples), where one means by (1,2) the real tuple of points in the domain? (see my other message in this thread, where I argue that there is no good way out here) There is of course a limit of how nested the action is. If you really need orbits of tuples of sets of tuples of sets of tuples then you'll have to relabel the permutation group so that its domain doesn't have tuples or sets. Even if you manage to answer the question above satisfactory, I still hold that it's not acceptable in the first place to have such design, forcing one to jump through hoops for no good reason, in an extendable system like Sage. -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] Re: sage.math down?
Dima Pasechnik dimp...@gmail.com writes: On Wed, 20 Mar 2013 at 08:28AM -0400, Anne Schilling wrote: Is http://sage.math.washington.edu/ down? For the past couple of days I tried to download from there and have not been able to connect. I'd say http://boxen.math.washington.edu/ is your best bet now (it shares most things with sage.math, IMHO) Even shorter, you can use http://wstein.org/home/ to replace http://boxen.math.washington.edu/home/ :) -Keshav -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-combinat-devel] Re: sage.math down?
Now sage.math = boxen.math. On Mar 22, 2013 6:36 PM, Keshav Kini keshav.k...@gmail.com wrote: Dima Pasechnik dimp...@gmail.com writes: On Wed, 20 Mar 2013 at 08:28AM -0400, Anne Schilling wrote: Is http://sage.math.washington.edu/ down? For the past couple of days I tried to download from there and have not been able to connect. I'd say http://boxen.math.washington.edu/ is your best bet now (it shares most things with sage.math, IMHO) Even shorter, you can use http://wstein.org/home/ to replace http://boxen.math.washington.edu/home/ :) -Keshav -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.