[sage-combinat-devel] Re: [sage-devel] Re: a problem in the new permutation groups code (and a solution ?)

2013-03-23 Thread Nathann Cohen
 Say, you have 1, 2, (1,2), (2,(1,2)), and perhaps other stuff in the domain.
 How many different meanings does the orbit of ((2,(1,2)),((2,(1,2))) have?
 How can you guess the right action for it?

Dima it's getting boring. Let's say that I do not try to guess
anything if that's a problem, do we agree that a function named
orbit which knows the type of its input from the value of action
wiill never encounter a ambiguous input nor return an ambiguous 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: a problem in the new permutation groups code (and a solution ?)

2013-03-22 Thread Nathann Cohen
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 ?)

2013-03-22 Thread Nathann Cohen
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 ?)

2013-03-22 Thread Volker Braun
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 ?)

2013-03-22 Thread Nathann Cohen
 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 ?)

2013-03-22 Thread Dima Pasechnik
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 ?)

2013-03-22 Thread Nathann Cohen
 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 ?)

2013-03-22 Thread Dima Pasechnik
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 ?)

2013-03-22 Thread Nathann Cohen
 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.