[sage-combinat-devel] Re: [sage-trac] #8963: Make tableau row_stabilizer return group of perms involving all elements of the tableau

2023-01-14 Thread sage-trac
#8963: Make tableau row_stabilizer return group of perms involving all elements 
of
the tableau
---+-
   Reporter:  Dan Christensen  |Owner:  Sage Combinat CC user
   Type:  defect   |   Status:  closed
   Priority:  minor|Milestone:  sage-4.5.2
  Component:  combinatorics|   Resolution:  fixed
   Keywords:   |Merged in:  sage-4.5.2.alpha0
Authors:  Dan Christensen  |Reviewers:  Franco Saliola
Report Upstream:  N/A  |  Work issues:
 Branch:   |   Commit:
   Dependencies:   | Stopgaps:
---+-
Changes (by Frédéric Chapoton):

 * cc: sage-combinat-devel@… (removed)
 * cc: Sage Combinat CC user (added)


--
Ticket URL: 
Sage 
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/054.9a4d6795610743c805f6dd885fafa5a7%40sagemath.org.


[sage-combinat-devel] Re: Bijection between King tableaux and Semistandard oscillating tableaux

2020-03-31 Thread Bruce
This is an interesting paper. However this is not the right place for your 
question.
You could try https://math.stackexchange.com/ instead.

On Monday, 30 March 2020 02:43:55 UTC+1, Soheli Das wrote:
>
> Hello,
>
> Can someone help me understand the construction (rules 1 & 2) with an 
> example given in the theorem? 
> Thanks in advance!
>
> [image: Theorem.png]
> P.S.: Pg 12 of https://arxiv.org/pdf/1910.04459.pdf
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/55844ca0-c513-4fc9-918d-ea714dfedde2%40googlegroups.com.


Re: [sage-combinat-devel] Re: King Tableaux

2020-03-13 Thread Soheli Das
Hello all,
I wanted to thank everyone who helped me with the King Tableau functions. 
I've everything figured out now. I debugged all the functions and all are 
working properly. I'm getting my desired output, the functions are 
outputting the correct king tableaux.
Once again, thank you for all your help!

Regards,
Soheli

On Wednesday, March 11, 2020 at 7:02:04 PM UTC-4, Nicolas M. Thiery wrote:
>
>
> Right I forgot about it. 
>
> Take a semi standard tableau that is in the resulting list and should 
> not be there (or the converse). Apply is_king_tableau. If the result 
> is not as expected, then it's time to debug is_king_tableau. If the 
> result is as expected, then something went wrong with how you used it. 
>
> In both cases, if you need further help, report precise sequences of 
> commands you typed in so that it can be reproduced and analyzed. 
>
> Cheers, 
> Nicolas 
>
>
> On Wed, Mar 11, 2020 at 03:44:35PM -0700, Soheli Das wrote: 
> > But now I'm using the tidied function given by Bruce: 
> > 
> > def is_king_tableau(t): 
> > """A function which tests if a semistandard tableau is a King 
> > tableau.""" 
> > 
> > if t[0][0] != 1: 
> > return False   
> > for i, row in enumerate(t): 
> > if row[0] <= 2*i: 
> > return False 
> > return True 
> > 
> > 
> > On Wednesday, March 11, 2020 at 5:59:43 PM UTC-4, Nicolas M. Thiery 
> wrote: 
> > > 
> > > 
> > > 
> > > > I have checked out the iterators thematic tutorial and I must say, 
> it's 
> > > > really helpful. Thank you for recommending that. 
> > > 
> > > Glad to hear :-) 
> > > 
> > > > Seems like the is_king_tableau throws away the tableaux that have 2 
> > > > in the 2nd-row 1st column. After that, it displays all other 
> > > > tableaux. I tried implementing a condition that goes over the list 
> > > > and throws away the undesired tableaux but haven't been successful 
> > > > yet. 
> > > 
> > > If something is fishy, it's in the is_king_tableau. Make sure that 
> > > function does what you want. 
> > > 
> > > sage: def is_king_tableau(t,no_of_rows): 
> > > : for i in range(no_of_rows): 
> > > : if t[0][0] != 1: 
> > > : return False 
> > > : elif t[i][0] <= 2*i: 
> > > : return False 
> > > : else: 
> > > : i=i+1 
> > > : return True 
> > > 
> > > The i=i+1 is suspicious. If you really want to consider rows of even 
> > > index, it's more explicit to use range(0, no_of_rows, 2). 
> > > 
> > > Also the t[0][0] might as well be outside of the loop since it does 
> > > not depend on i. 
> > > 
> > > Cheers, 
> > > Nicolas 
> > > -- 
> > > Nicolas M. Thiéry "Isil" > 
> > > http://Nicolas.Thiery.name/ 
> > > 
> > 
> > -- 
> > 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-combinat-devel/a09b94cb-4b98-4e23-982e-6cdee5fa8557%40googlegroups.com.
>  
>
>
> Nicolas 
> -- 
> Nicolas M. Thiéry "Isil" > 
> http://Nicolas.Thiery.name/ 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/44e19ce8-dcac-422d-bdb6-4803851d3460%40googlegroups.com.


Re: [sage-combinat-devel] Re: King Tableaux

2020-03-12 Thread Soheli Das
You were right. I debugged is_king_tableau and found a minor fault in it. I 
fixed it like this:

def is_king_tableau(t):
"""A function which tests if a semistandard tableau is a King 
tableau."""
if SemistandardTableau(t):
if t[0][0] < 1:
return False
"""checks tableaux of shape (2,1)"""
elif (t[1][0]%2)==0:
return False   
for i, row in enumerate(t):
if row[0] <= 2*i:
return False
return True

I ran a couple of test cases and got my desired output. Is there a better 
way to check the above condition or what I did is fine?

Thanks,
Soheli

On Wednesday, March 11, 2020 at 7:02:04 PM UTC-4, Nicolas M. Thiery wrote:
>
>
> Right I forgot about it. 
>
> Take a semi standard tableau that is in the resulting list and should 
> not be there (or the converse). Apply is_king_tableau. If the result 
> is not as expected, then it's time to debug is_king_tableau. If the 
> result is as expected, then something went wrong with how you used it. 
>
> In both cases, if you need further help, report precise sequences of 
> commands you typed in so that it can be reproduced and analyzed. 
>
> Cheers, 
> Nicolas 
>
>
> On Wed, Mar 11, 2020 at 03:44:35PM -0700, Soheli Das wrote: 
> > But now I'm using the tidied function given by Bruce: 
> > 
> > def is_king_tableau(t): 
> > """A function which tests if a semistandard tableau is a King 
> > tableau.""" 
> > 
> > if t[0][0] != 1: 
> > return False   
> > for i, row in enumerate(t): 
> > if row[0] <= 2*i: 
> > return False 
> > return True 
> > 
> > 
> > On Wednesday, March 11, 2020 at 5:59:43 PM UTC-4, Nicolas M. Thiery 
> wrote: 
> > > 
> > > 
> > > 
> > > > I have checked out the iterators thematic tutorial and I must say, 
> it's 
> > > > really helpful. Thank you for recommending that. 
> > > 
> > > Glad to hear :-) 
> > > 
> > > > Seems like the is_king_tableau throws away the tableaux that have 2 
> > > > in the 2nd-row 1st column. After that, it displays all other 
> > > > tableaux. I tried implementing a condition that goes over the list 
> > > > and throws away the undesired tableaux but haven't been successful 
> > > > yet. 
> > > 
> > > If something is fishy, it's in the is_king_tableau. Make sure that 
> > > function does what you want. 
> > > 
> > > sage: def is_king_tableau(t,no_of_rows): 
> > > : for i in range(no_of_rows): 
> > > : if t[0][0] != 1: 
> > > : return False 
> > > : elif t[i][0] <= 2*i: 
> > > : return False 
> > > : else: 
> > > : i=i+1 
> > > : return True 
> > > 
> > > The i=i+1 is suspicious. If you really want to consider rows of even 
> > > index, it's more explicit to use range(0, no_of_rows, 2). 
> > > 
> > > Also the t[0][0] might as well be outside of the loop since it does 
> > > not depend on i. 
> > > 
> > > Cheers, 
> > > Nicolas 
> > > -- 
> > > Nicolas M. Thiéry "Isil" > 
> > > http://Nicolas.Thiery.name/ 
> > > 
> > 
> > -- 
> > 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-combinat-devel/a09b94cb-4b98-4e23-982e-6cdee5fa8557%40googlegroups.com.
>  
>
>
> Nicolas 
> -- 
> Nicolas M. Thiéry "Isil" > 
> http://Nicolas.Thiery.name/ 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/5a916564-2497-4455-84d8-84f6f85d11c3%40googlegroups.com.


Re: [sage-combinat-devel] Re: King Tableaux

2020-03-11 Thread Nicolas M. Thiery


Right I forgot about it.

Take a semi standard tableau that is in the resulting list and should
not be there (or the converse). Apply is_king_tableau. If the result
is not as expected, then it's time to debug is_king_tableau. If the
result is as expected, then something went wrong with how you used it.

In both cases, if you need further help, report precise sequences of
commands you typed in so that it can be reproduced and analyzed.

Cheers,
Nicolas


On Wed, Mar 11, 2020 at 03:44:35PM -0700, Soheli Das wrote:
> But now I'm using the tidied function given by Bruce:
> 
> def is_king_tableau(t):
> """A function which tests if a semistandard tableau is a King 
> tableau."""
> 
> if t[0][0] != 1:
> return False   
> for i, row in enumerate(t):
> if row[0] <= 2*i:
> return False
> return True
> 
> 
> On Wednesday, March 11, 2020 at 5:59:43 PM UTC-4, Nicolas M. Thiery wrote:
> >
> >
> >
> > > I have checked out the iterators thematic tutorial and I must say, it's 
> > > really helpful. Thank you for recommending that. 
> >
> > Glad to hear :-) 
> >
> > > Seems like the is_king_tableau throws away the tableaux that have 2 
> > > in the 2nd-row 1st column. After that, it displays all other 
> > > tableaux. I tried implementing a condition that goes over the list 
> > > and throws away the undesired tableaux but haven't been successful 
> > > yet. 
> >
> > If something is fishy, it's in the is_king_tableau. Make sure that 
> > function does what you want. 
> >
> > sage: def is_king_tableau(t,no_of_rows): 
> > : for i in range(no_of_rows): 
> > : if t[0][0] != 1: 
> > : return False 
> > : elif t[i][0] <= 2*i: 
> > : return False 
> > : else: 
> > : i=i+1 
> > : return True 
> >
> > The i=i+1 is suspicious. If you really want to consider rows of even 
> > index, it's more explicit to use range(0, no_of_rows, 2). 
> >
> > Also the t[0][0] might as well be outside of the loop since it does 
> > not depend on i. 
> >
> > Cheers, 
> > Nicolas 
> > -- 
> > Nicolas M. Thiéry "Isil" > 
> > http://Nicolas.Thiery.name/ 
> >
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-combinat-devel/a09b94cb-4b98-4e23-982e-6cdee5fa8557%40googlegroups.com.

Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/20200311230203.GW3535%40mistral.


Re: [sage-combinat-devel] Re: King Tableaux

2020-03-11 Thread Soheli Das
But now I'm using the tidied function given by Bruce:

def is_king_tableau(t):
"""A function which tests if a semistandard tableau is a King 
tableau."""

if t[0][0] != 1:
return False   
for i, row in enumerate(t):
if row[0] <= 2*i:
return False
return True


On Wednesday, March 11, 2020 at 5:59:43 PM UTC-4, Nicolas M. Thiery wrote:
>
>
>
> > I have checked out the iterators thematic tutorial and I must say, it's 
> > really helpful. Thank you for recommending that. 
>
> Glad to hear :-) 
>
> > Seems like the is_king_tableau throws away the tableaux that have 2 
> > in the 2nd-row 1st column. After that, it displays all other 
> > tableaux. I tried implementing a condition that goes over the list 
> > and throws away the undesired tableaux but haven't been successful 
> > yet. 
>
> If something is fishy, it's in the is_king_tableau. Make sure that 
> function does what you want. 
>
> sage: def is_king_tableau(t,no_of_rows): 
> : for i in range(no_of_rows): 
> : if t[0][0] != 1: 
> : return False 
> : elif t[i][0] <= 2*i: 
> : return False 
> : else: 
> : i=i+1 
> : return True 
>
> The i=i+1 is suspicious. If you really want to consider rows of even 
> index, it's more explicit to use range(0, no_of_rows, 2). 
>
> Also the t[0][0] might as well be outside of the loop since it does 
> not depend on i. 
>
> Cheers, 
> Nicolas 
> -- 
> Nicolas M. Thiéry "Isil" > 
> http://Nicolas.Thiery.name/ 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/a09b94cb-4b98-4e23-982e-6cdee5fa8557%40googlegroups.com.


Re: [sage-combinat-devel] Re: King Tableaux

2020-03-11 Thread Nicolas M. Thiery



> I have checked out the iterators thematic tutorial and I must say, it's 
> really helpful. Thank you for recommending that.

Glad to hear :-)

> Seems like the is_king_tableau throws away the tableaux that have 2
> in the 2nd-row 1st column. After that, it displays all other
> tableaux. I tried implementing a condition that goes over the list
> and throws away the undesired tableaux but haven't been successful
> yet.

If something is fishy, it's in the is_king_tableau. Make sure that
function does what you want.

sage: def is_king_tableau(t,no_of_rows):
: for i in range(no_of_rows):
: if t[0][0] != 1:
: return False
: elif t[i][0] <= 2*i:
: return False
: else:
: i=i+1
: return True

The i=i+1 is suspicious. If you really want to consider rows of even
index, it's more explicit to use range(0, no_of_rows, 2).

Also the t[0][0] might as well be outside of the loop since it does
not depend on i.

Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/20200311215941.GO3535%40mistral.


Re: [sage-combinat-devel] Re: King Tableaux

2020-03-11 Thread Soheli Das
I have checked out the iterators thematic tutorial and I must say, it's 
really helpful. Thank you for recommending that.
Seems like the is_king_tableau throws away the tableaux that have 2 in the 
2nd-row 1st column. After that, it displays all other tableaux. I tried 
implementing a condition that goes over the list and throws away the 
undesired tableaux but haven't been successful yet.


On Tuesday, March 10, 2020 at 1:59:23 AM UTC-4, Nicolas M. Thiery wrote:
>
>
> On Mon, Mar 09, 2020 at 05:20:02PM -0700, Soheli Das wrote: 
> > I was trying to list the King tableaux of a particular shape. Here's the 
> > function: 
> > 
> > def list_of_king_tableaux(t_shape, t_max_entry): 
> > """A function which finds the list of King tableaux of given 
> shape.""" 
> > return list([t for t in SemistandardTableaux(t_shape, 
> > max_entry=t_max_entry) if is_king_tableau(t)]) 
> > 
> > And this is the output I got: 
> > 
> > sage: list_of_king_tableaux([2,2],4) 
> > [[[1, 1], [3, 3]], 
> >  [[1, 1], [3, 4]], 
> >  [[1, 1], [4, 4]], 
> >  [[1, 2], [3, 3]], 
> >  [[1, 2], [3, 4]], 
> >  [[1, 2], [4, 4]], 
> >  [[1, 3], [3, 4]], 
> >  [[1, 3], [4, 4]]] 
> > 
> > The list shows the tableaux that are not king tableaux. How do I choose 
> the 
> > ones that obey the king tableaux condition? 
>
> The way you use is_king_tableau in list_of_king_tableaux looks 
> correct. So test that is_king_tableau indeed return false on the 
> undesired tableau. 
>
> Btw: list([...]) is redundant; [...] is equivalent. In addition, 
> iterators are most of the time better than lists. If you haven't done 
> so yet, I really recommend the iterators thematic tutorial. 
>
> Cheers, 
> Nicolas 
> -- 
> Nicolas M. Thiéry "Isil" > 
> http://Nicolas.Thiery.name/ 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/be4a8d0c-e9e3-4771-b5a5-edce3e806812%40googlegroups.com.


Re: [sage-combinat-devel] Re: King Tableaux

2020-03-09 Thread Nicolas M. Thiery


On Mon, Mar 09, 2020 at 05:20:02PM -0700, Soheli Das wrote:
> I was trying to list the King tableaux of a particular shape. Here's the 
> function:
> 
> def list_of_king_tableaux(t_shape, t_max_entry):
> """A function which finds the list of King tableaux of given shape."""
> return list([t for t in SemistandardTableaux(t_shape, 
> max_entry=t_max_entry) if is_king_tableau(t)])
> 
> And this is the output I got:
> 
> sage: list_of_king_tableaux([2,2],4)
> [[[1, 1], [3, 3]],
>  [[1, 1], [3, 4]],
>  [[1, 1], [4, 4]],
>  [[1, 2], [3, 3]],
>  [[1, 2], [3, 4]],
>  [[1, 2], [4, 4]],
>  [[1, 3], [3, 4]],
>  [[1, 3], [4, 4]]]
> 
> The list shows the tableaux that are not king tableaux. How do I choose the 
> ones that obey the king tableaux condition?

The way you use is_king_tableau in list_of_king_tableaux looks
correct. So test that is_king_tableau indeed return false on the
undesired tableau.

Btw: list([...]) is redundant; [...] is equivalent. In addition,
iterators are most of the time better than lists. If you haven't done
so yet, I really recommend the iterators thematic tutorial.

Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/20200310055921.GN3535%40mistral.


[sage-combinat-devel] Re: King Tableaux

2020-03-09 Thread Soheli Das
I was trying to list the King tableaux of a particular shape. Here's the 
function:

def list_of_king_tableaux(t_shape, t_max_entry):
"""A function which finds the list of King tableaux of given shape."""
return list([t for t in SemistandardTableaux(t_shape, 
max_entry=t_max_entry) if is_king_tableau(t)])

And this is the output I got:

sage: list_of_king_tableaux([2,2],4)
[[[1, 1], [3, 3]],
 [[1, 1], [3, 4]],
 [[1, 1], [4, 4]],
 [[1, 2], [3, 3]],
 [[1, 2], [3, 4]],
 [[1, 2], [4, 4]],
 [[1, 3], [3, 4]],
 [[1, 3], [4, 4]]]

The list shows the tableaux that are not king tableaux. How do I choose the 
ones that obey the king tableaux condition?



On Monday, March 9, 2020 at 4:54:48 AM UTC-4, Bruce wrote:
>
> The king_tableaux is an iterator not a function.
> it is used in the last three lines.
>
> if you want a list look inside no_of_king_tableaux
>
> On Sunday, 8 March 2020 21:41:34 UTC, Soheli Das wrote:
>>
>> Thank you Bruce!! Indeed the function looks tidier. 
>> The third function gives me this message: "> king_tableaux at 0x6ffea35729a8>". The 'p' is supposed to mean the 
>> partition right?
>>
>> Once again thank you for your help. I really appreciate it!
>>
>> -Soheli
>>
>> On Sunday, March 8, 2020 at 5:26:41 AM UTC-4, Bruce wrote:
>>>
>>> Thank you for helping me. I created the function:
>>>
>>> sage: def is_king_tableau(t,no_of_rows):
>>> : for i in range(no_of_rows):
>>> : if t[0][0] != 1:
>>> : return False
>>> : elif t[i][0] <= 2*i:
>>> : return False
>>> : else:
>>> : i=i+1
>>> : return True
>>>
>>>
>>> I have tidied up your function and written some simple functions to show 
>>> how it is used.
>>> I hope this will encourage you to learn more about Python, make further 
>>> improvements and write your own functions.
>>>
>>> The last three lines are not a function but use the iterator to show the 
>>> motivation for the definition of a King tableau.
>>>
>>> def is_king_tableau(t):
>>> """A function which tests if a semistandard tableau is a King 
>>> tableau."""
>>> if t[0][0] != 1:
>>> return False
>>> for i, row in enumerate(t):
>>> if row[0] <= 2*i:
>>> return False
>>> return True
>>>
>>> def no_of_king_tableaux(p):
>>> """A function which finds the number of King tableaux of given 
>>> shape."""
>>> return len([t for t in SemistandardTableaux(p) if 
>>> is_king_tableau(t)])
>>>
>>> def king_tableaux(p):
>>> """An iterator for the set of King tableaux of given shape."""
>>> for t in SemistandardTableaux(p):
>>> if is_king_tableau(t):
>>> yield t
>>>
>>> for t in king_tableaux([2,2]):
>>> t.to_Gelfand_Tsetlin_pattern().pp()
>>> print "\n"
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/ed8d2d66-6f26-4f69-8f69-8beee43e0161%40googlegroups.com.


[sage-combinat-devel] Re: King Tableaux

2020-03-09 Thread Soheli Das
Alright, now I get it. Thanks for your help!

On Monday, March 9, 2020 at 4:54:48 AM UTC-4, Bruce wrote:
>
> The king_tableaux is an iterator not a function.
> it is used in the last three lines.
>
> if you want a list look inside no_of_king_tableaux
>
> On Sunday, 8 March 2020 21:41:34 UTC, Soheli Das wrote:
>>
>> Thank you Bruce!! Indeed the function looks tidier. 
>> The third function gives me this message: "> king_tableaux at 0x6ffea35729a8>". The 'p' is supposed to mean the 
>> partition right?
>>
>> Once again thank you for your help. I really appreciate it!
>>
>> -Soheli
>>
>> On Sunday, March 8, 2020 at 5:26:41 AM UTC-4, Bruce wrote:
>>>
>>> Thank you for helping me. I created the function:
>>>
>>> sage: def is_king_tableau(t,no_of_rows):
>>> : for i in range(no_of_rows):
>>> : if t[0][0] != 1:
>>> : return False
>>> : elif t[i][0] <= 2*i:
>>> : return False
>>> : else:
>>> : i=i+1
>>> : return True
>>>
>>>
>>> I have tidied up your function and written some simple functions to show 
>>> how it is used.
>>> I hope this will encourage you to learn more about Python, make further 
>>> improvements and write your own functions.
>>>
>>> The last three lines are not a function but use the iterator to show the 
>>> motivation for the definition of a King tableau.
>>>
>>> def is_king_tableau(t):
>>> """A function which tests if a semistandard tableau is a King 
>>> tableau."""
>>> if t[0][0] != 1:
>>> return False
>>> for i, row in enumerate(t):
>>> if row[0] <= 2*i:
>>> return False
>>> return True
>>>
>>> def no_of_king_tableaux(p):
>>> """A function which finds the number of King tableaux of given 
>>> shape."""
>>> return len([t for t in SemistandardTableaux(p) if 
>>> is_king_tableau(t)])
>>>
>>> def king_tableaux(p):
>>> """An iterator for the set of King tableaux of given shape."""
>>> for t in SemistandardTableaux(p):
>>> if is_king_tableau(t):
>>> yield t
>>>
>>> for t in king_tableaux([2,2]):
>>> t.to_Gelfand_Tsetlin_pattern().pp()
>>> print "\n"
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/1db1f334-abc7-49d5-8b6c-68cb69e658c8%40googlegroups.com.


[sage-combinat-devel] Re: King Tableaux

2020-03-09 Thread Bruce
The king_tableaux is an iterator not a function.
it is used in the last three lines.

if you want a list look inside no_of_king_tableaux

On Sunday, 8 March 2020 21:41:34 UTC, Soheli Das wrote:
>
> Thank you Bruce!! Indeed the function looks tidier. 
> The third function gives me this message: " at 0x6ffea35729a8>". The 'p' is supposed to mean the partition right?
>
> Once again thank you for your help. I really appreciate it!
>
> -Soheli
>
> On Sunday, March 8, 2020 at 5:26:41 AM UTC-4, Bruce wrote:
>>
>> Thank you for helping me. I created the function:
>>
>> sage: def is_king_tableau(t,no_of_rows):
>> : for i in range(no_of_rows):
>> : if t[0][0] != 1:
>> : return False
>> : elif t[i][0] <= 2*i:
>> : return False
>> : else:
>> : i=i+1
>> : return True
>>
>>
>> I have tidied up your function and written some simple functions to show 
>> how it is used.
>> I hope this will encourage you to learn more about Python, make further 
>> improvements and write your own functions.
>>
>> The last three lines are not a function but use the iterator to show the 
>> motivation for the definition of a King tableau.
>>
>> def is_king_tableau(t):
>> """A function which tests if a semistandard tableau is a King 
>> tableau."""
>> if t[0][0] != 1:
>> return False
>> for i, row in enumerate(t):
>> if row[0] <= 2*i:
>> return False
>> return True
>>
>> def no_of_king_tableaux(p):
>> """A function which finds the number of King tableaux of given 
>> shape."""
>> return len([t for t in SemistandardTableaux(p) if is_king_tableau(t)])
>>
>> def king_tableaux(p):
>> """An iterator for the set of King tableaux of given shape."""
>> for t in SemistandardTableaux(p):
>> if is_king_tableau(t):
>> yield t
>>
>> for t in king_tableaux([2,2]):
>> t.to_Gelfand_Tsetlin_pattern().pp()
>> print "\n"
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/197f4260-41cb-4a90-907c-ab477555624d%40googlegroups.com.


[sage-combinat-devel] Re: King Tableaux

2020-03-08 Thread Soheli Das
Thank you Bruce!! Indeed the function looks tidier. 
The third function gives me this message: "". The 'p' is supposed to mean the partition right?

Once again thank you for your help. I really appreciate it!

-Soheli

On Sunday, March 8, 2020 at 5:26:41 AM UTC-4, Bruce wrote:
>
> Thank you for helping me. I created the function:
>
> sage: def is_king_tableau(t,no_of_rows):
> : for i in range(no_of_rows):
> : if t[0][0] != 1:
> : return False
> : elif t[i][0] <= 2*i:
> : return False
> : else:
> : i=i+1
> : return True
>
>
> I have tidied up your function and written some simple functions to show 
> how it is used.
> I hope this will encourage you to learn more about Python, make further 
> improvements and write your own functions.
>
> The last three lines are not a function but use the iterator to show the 
> motivation for the definition of a King tableau.
>
> def is_king_tableau(t):
> """A function which tests if a semistandard tableau is a King 
> tableau."""
> if t[0][0] != 1:
> return False
> for i, row in enumerate(t):
> if row[0] <= 2*i:
> return False
> return True
>
> def no_of_king_tableaux(p):
> """A function which finds the number of King tableaux of given 
> shape."""
> return len([t for t in SemistandardTableaux(p) if is_king_tableau(t)])
>
> def king_tableaux(p):
> """An iterator for the set of King tableaux of given shape."""
> for t in SemistandardTableaux(p):
> if is_king_tableau(t):
> yield t
>
> for t in king_tableaux([2,2]):
> t.to_Gelfand_Tsetlin_pattern().pp()
> print "\n"
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/b8bcad0c-2683-4378-b93c-83be180877dd%40googlegroups.com.


Re: [sage-combinat-devel] Re: Image of a permutation

2020-03-08 Thread Nicolas M. Thiery


> Oops. Certainly 2 is fixed, so, doesn't belong to the support.
> Deserves a ticket, IMHO.

Ouch. Indeed!
Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/20200308172221.GG3535%40mistral.


[sage-combinat-devel] Re: Image of a permutation

2020-03-08 Thread Simon King
On 2020-03-08, David Joyner  wrote:
> On a tangential matter, I'd like to add that
> according to Dan Bump's notes "Group Representation
> Theory" (http://sporadic.stanford.edu/bump/group/gr1_4.html),
> this set of elements that the permutations does not
> fix is called the support.

Exactly.

> If that is true then the SageMath
> support does not seem to be implemented correctly:
>
> sage: G = SymmetricGroup(10)
> sage: g = G.random_element(); g
> (1,3,6,7,4)(5,8,9)
> sage: g.support()
> {1, 2, 3, 4, 5, 6, 7, 8}

Oops. Certainly 2 is fixed, so, doesn't belong to the support.

Deserves a ticket, IMHO.

Best regards,
Simon

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/r42jc7%24387h%242%40ciao.gmane.io.


[sage-combinat-devel] Re: Image of a permutation

2020-03-08 Thread Simon King
On 2020-03-08, David Joyner  wrote:
> I agree with Michael O, a permutation is a bijection,
> so the image is the domain is the codomain.

+1

> For a patch to "define the image of a permutation
> to be the set of elements that it does not fix" is a
> mistake, IMHO. Maybe the set computed could be
> called  "moved_points" or something like that?

Isn't that called the "support" of the permutation?

Best regards,
Simon

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/r42j8j%24387h%241%40ciao.gmane.io.


[sage-combinat-devel] Re: King Tableaux

2020-03-08 Thread Bruce
Thank you for helping me. I created the function:

sage: def is_king_tableau(t,no_of_rows):
: for i in range(no_of_rows):
: if t[0][0] != 1:
: return False
: elif t[i][0] <= 2*i:
: return False
: else:
: i=i+1
: return True


I have tidied up your function and written some simple functions to show 
how it is used.
I hope this will encourage you to learn more about Python, make further 
improvements and write your own functions.

The last three lines are not a function but use the iterator to show the 
motivation for the definition of a King tableau.

def is_king_tableau(t):
"""A function which tests if a semistandard tableau is a King 
tableau."""
if t[0][0] != 1:
return False
for i, row in enumerate(t):
if row[0] <= 2*i:
return False
return True

def no_of_king_tableaux(p):
"""A function which finds the number of King tableaux of given shape."""
return len([t for t in SemistandardTableaux(p) if is_king_tableau(t)])

def king_tableaux(p):
"""An iterator for the set of King tableaux of given shape."""
for t in SemistandardTableaux(p):
if is_king_tableau(t):
yield t

for t in king_tableaux([2,2]):
t.to_Gelfand_Tsetlin_pattern().pp()
print "\n"

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/9bda4593-6717-4b51-a5a4-1aa2bfc00e0c%40googlegroups.com.


Re: [sage-combinat-devel] Re: King Tableaux

2020-03-07 Thread Nicolas M. Thiery
> Thank you for helping me. I created the function ...
>
> What do you think? Were you suggesting something like this?

Yes indeed something like this (I did not check the exact conditions
you used, but that's your expertise :-)). Now you should just have to
come back to the template I sent you for the iterator and insert a
call to your function there.

Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/20200308064634.GC3535%40mistral.


Re: [sage-combinat-devel] Re: King Tableaux

2020-03-07 Thread Soheli Das
Dear Nicolas,

Thank you for helping me. I created the function:

sage: def is_king_tableau(t,no_of_rows):
: for i in range(no_of_rows):
: if t[0][0] != 1:
: return False
: elif t[i][0] <= 2*i:
: return False
: else:
: i=i+1
: return True
:
sage: t=SemistandardTableau([[1,1,2],[3,4],[5,8],[6,9]]);t
[[1, 1, 2], [3, 4], [5, 8], [6, 9]]
sage: is_king_tableau(t,4)
False
sage: t=SemistandardTableau([[1,1,2],[3,4],[5,8],[7,9]]);t
[[1, 1, 2], [3, 4], [5, 8], [7, 9]]
sage: is_king_tableau(t,4)
True

What do you think? Were you suggesting something like this?

Thanks,
Soheli

On Friday, March 6, 2020 at 1:16:57 PM UTC-5, Nicolas M. Thiery wrote:
>
>Dear Soheli, 
>
> Thanks for the extra info. As a first step I suggest that you write a 
> little function that takes a semi standard tableau and test whether 
> it's a king tableau. 
>
> def is_king_tableau(t): 
> ... 
>
> Cheers, 
> Nicolas 
>
> On Fri, Mar 06, 2020 at 08:29:33AM -0800, Soheli Das wrote: 
> > I'm working on King Tableaux along with my Professor. We came up with 
> this 
> > algorithm to generate king tableaux from semistandard tableaux. If you 
> > could suggest a better algorithm, that would be great. Either way, I 
> need 
> > help with writing the code. I'm new to Sage and Python as well. 
> > I hope that clears your confusion(apologies for that). Your help would 
> be 
> > greatly appreciated. 
> > 
> > Thanks, 
> > Soheli 
> > 
> > On Friday, March 6, 2020 at 3:06:35 AM UTC-5, Bruce wrote: 
> > > 
> > > Dear Soheli, 
> > > 
> > > Your post does not have a question so I am not sure if you are asking 
> for 
> > > help on getting started with writing code or whether you are asking 
> for a 
> > > better algorithm. 
> > > 
> > > I am really following up on Nicolas' post and discussing the 
> algorithm. 
> > > 
> > > The history is that crystal operators on King tableaux are not obvious 
> > > (and maybe not known), De Concini came up with a different definition 
> which 
> > > does accomodate crystal operators. 
> > > A bijection between these two tableaux was given by Sheats. 
> > > 
> > > I believe (but don't have details) that the motivation for Ron King 
> was 
> > > that his definition corresponds to symmetric (or antisymmetric) 
> > > Gelfand-Tsetlin patterns. 
> > > This suggests that you could approach this by constructing an iterator 
> for 
> > > (anti?)-symmetric Gelfand-Tsetlin patterns. 
> > > 
> > > Best, 
> > > Bruce 
> > > 
> > > On Tuesday, 3 March 2020 23:13:51 UTC, Soheli Das wrote: 
> > >> 
> > >> I'm trying to generate a function that produces King tableaux. My 
> idea is 
> > >> to first generate Semi-standard tableaux and then select the ones 
> that obey 
> > >> the conditions of a King tableaux. I'm thinking of the entries i and 
> -i for 
> > >> i=1,,n as entries 1,,2n. So, basically I want the rows to be 
> weakly 
> > >> increasing and the columns to be strictly increasing like 
> 1<3<5<.<2n-1. 
> > >> The following is what I have so far, it simply generates semistandard 
> > >> tableaux. 
> > >> 
> > >> def generate_kingTableaux(size,max_entry_val,to_generate): 
> > >> :  v=[ ] 
> > >> :  for k in range(to_generate): 
> > >> : 
> > >>  v.append(SemistandardTableaux(size,max_entry=max_entry_val).list()) 
> > >> :  return v 
> > >> 
> > >> I want to implement a condition which is somewhat like: if v[i][1] < 
> 2i-1 
> > >> then not a king tableaux; else i=i+1. 
> > >> I'm not sure how to implement this in sage. I would really appreciate 
> if 
> > >> someone could guide/help me! 
> > >> 
> > > 
> > 
> > -- 
> > 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-combinat-devel/bbdc787b-a742-45e0-a6b6-359fcca0ad5f%40googlegroups.com.
>  
>
>
> Nicolas 
> -- 
> Nicolas M. Thiéry "Isil" > 
> http://Nicolas.Thiery.name/ 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/ca7fbb7b-41ef-4f7b-bfe8-9d4c90bb25e1%40googlegroups.com.


Re: [sage-combinat-devel] Re: King Tableaux

2020-03-06 Thread Nicolas M. Thiery
Dear Soheli,

Thanks for the extra info. As a first step I suggest that you write a
little function that takes a semi standard tableau and test whether
it's a king tableau.

def is_king_tableau(t):
...

Cheers,
Nicolas

On Fri, Mar 06, 2020 at 08:29:33AM -0800, Soheli Das wrote:
> I'm working on King Tableaux along with my Professor. We came up with this 
> algorithm to generate king tableaux from semistandard tableaux. If you 
> could suggest a better algorithm, that would be great. Either way, I need 
> help with writing the code. I'm new to Sage and Python as well.
> I hope that clears your confusion(apologies for that). Your help would be 
> greatly appreciated.
> 
> Thanks,
> Soheli
> 
> On Friday, March 6, 2020 at 3:06:35 AM UTC-5, Bruce wrote:
> >
> > Dear Soheli,
> >
> > Your post does not have a question so I am not sure if you are asking for 
> > help on getting started with writing code or whether you are asking for a 
> > better algorithm.
> >
> > I am really following up on Nicolas' post and discussing the algorithm.
> >
> > The history is that crystal operators on King tableaux are not obvious 
> > (and maybe not known), De Concini came up with a different definition which 
> > does accomodate crystal operators.
> > A bijection between these two tableaux was given by Sheats.
> >
> > I believe (but don't have details) that the motivation for Ron King was 
> > that his definition corresponds to symmetric (or antisymmetric) 
> > Gelfand-Tsetlin patterns.
> > This suggests that you could approach this by constructing an iterator for 
> > (anti?)-symmetric Gelfand-Tsetlin patterns.
> >
> > Best,
> > Bruce
> >
> > On Tuesday, 3 March 2020 23:13:51 UTC, Soheli Das wrote:
> >>
> >> I'm trying to generate a function that produces King tableaux. My idea is 
> >> to first generate Semi-standard tableaux and then select the ones that 
> >> obey 
> >> the conditions of a King tableaux. I'm thinking of the entries i and -i 
> >> for 
> >> i=1,,n as entries 1,,2n. So, basically I want the rows to be 
> >> weakly 
> >> increasing and the columns to be strictly increasing like 
> >> 1<3<5<.<2n-1. 
> >> The following is what I have so far, it simply generates semistandard 
> >> tableaux.
> >>
> >> def generate_kingTableaux(size,max_entry_val,to_generate):
> >> :  v=[ ]
> >> :  for k in range(to_generate):
> >> :
> >>  v.append(SemistandardTableaux(size,max_entry=max_entry_val).list())
> >> :  return v
> >>
> >> I want to implement a condition which is somewhat like: if v[i][1] < 2i-1 
> >> then not a king tableaux; else i=i+1.
> >> I'm not sure how to implement this in sage. I would really appreciate if 
> >> someone could guide/help me!
> >>
> >
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-combinat-devel/bbdc787b-a742-45e0-a6b6-359fcca0ad5f%40googlegroups.com.

Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/20200306181655.GU3535%40mistral.


[sage-combinat-devel] Re: King Tableaux

2020-03-06 Thread Soheli Das
Hi Bruce,

I'm working on King Tableaux along with my Professor. We came up with this 
algorithm to generate king tableaux from semistandard tableaux. If you 
could suggest a better algorithm, that would be great. Either way, I need 
help with writing the code. I'm new to Sage and Python as well.
I hope that clears your confusion(apologies for that). Your help would be 
greatly appreciated.

Thanks,
Soheli

On Friday, March 6, 2020 at 3:06:35 AM UTC-5, Bruce wrote:
>
> Dear Soheli,
>
> Your post does not have a question so I am not sure if you are asking for 
> help on getting started with writing code or whether you are asking for a 
> better algorithm.
>
> I am really following up on Nicolas' post and discussing the algorithm.
>
> The history is that crystal operators on King tableaux are not obvious 
> (and maybe not known), De Concini came up with a different definition which 
> does accomodate crystal operators.
> A bijection between these two tableaux was given by Sheats.
>
> I believe (but don't have details) that the motivation for Ron King was 
> that his definition corresponds to symmetric (or antisymmetric) 
> Gelfand-Tsetlin patterns.
> This suggests that you could approach this by constructing an iterator for 
> (anti?)-symmetric Gelfand-Tsetlin patterns.
>
> Best,
> Bruce
>
> On Tuesday, 3 March 2020 23:13:51 UTC, Soheli Das wrote:
>>
>> I'm trying to generate a function that produces King tableaux. My idea is 
>> to first generate Semi-standard tableaux and then select the ones that obey 
>> the conditions of a King tableaux. I'm thinking of the entries i and -i for 
>> i=1,,n as entries 1,,2n. So, basically I want the rows to be weakly 
>> increasing and the columns to be strictly increasing like 1<3<5<.<2n-1. 
>> The following is what I have so far, it simply generates semistandard 
>> tableaux.
>>
>> def generate_kingTableaux(size,max_entry_val,to_generate):
>> :  v=[ ]
>> :  for k in range(to_generate):
>> :
>>  v.append(SemistandardTableaux(size,max_entry=max_entry_val).list())
>> :  return v
>>
>> I want to implement a condition which is somewhat like: if v[i][1] < 2i-1 
>> then not a king tableaux; else i=i+1.
>> I'm not sure how to implement this in sage. I would really appreciate if 
>> someone could guide/help me!
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/bbdc787b-a742-45e0-a6b6-359fcca0ad5f%40googlegroups.com.


[sage-combinat-devel] Re: King Tableaux

2020-03-06 Thread Bruce
Dear Soheli,

Your post does not have a question so I am not sure if you are asking for 
help on getting started with writing code or whether you are asking for a 
better algorithm.

I am really following up on Nicolas' post and discussing the algorithm.

The history is that crystal operators on King tableaux are not obvious (and 
maybe not known), De Concini came up with a different definition which does 
accomodate crystal operators.
A bijection between these two tableaux was given by Sheats.

I believe (but don't have details) that the motivation for Ron King was 
that his definition corresponds to symmetric (or antisymmetric) 
Gelfand-Tsetlin patterns.
This suggests that you could approach this by constructing an iterator for 
(anti?)-symmetric Gelfand-Tsetlin patterns.

Best,
Bruce

On Tuesday, 3 March 2020 23:13:51 UTC, Soheli Das wrote:
>
> I'm trying to generate a function that produces King tableaux. My idea is 
> to first generate Semi-standard tableaux and then select the ones that obey 
> the conditions of a King tableaux. I'm thinking of the entries i and -i for 
> i=1,,n as entries 1,,2n. So, basically I want the rows to be weakly 
> increasing and the columns to be strictly increasing like 1<3<5<.<2n-1. 
> The following is what I have so far, it simply generates semistandard 
> tableaux.
>
> def generate_kingTableaux(size,max_entry_val,to_generate):
> :  v=[ ]
> :  for k in range(to_generate):
> :
>  v.append(SemistandardTableaux(size,max_entry=max_entry_val).list())
> :  return v
>
> I want to implement a condition which is somewhat like: if v[i][1] < 2i-1 
> then not a king tableaux; else i=i+1.
> I'm not sure how to implement this in sage. I would really appreciate if 
> someone could guide/help me!
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/634a89f6-4fb9-4010-89b5-3ad784d81b8f%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-22 Thread Denis Sunko


On Thursday, February 20, 2020 at 2:13:23 PM UTC+1, Denis Sunko wrote:
>
>
>
> On Thursday, February 20, 2020 at 2:46:37 AM UTC+1, Travis Scrimshaw wrote:
>>
>>
>>
>>> there is nothing wrong with pushing a non-working branch somewhere.
>>> This way it's very easy to see what's going wrong there.
>>> (I guess it's something to do with importing things)
>>>
>>
>> Also linking it to the ticket by filling out the branch field there.
>>
>> Best,
>> Travis
>>
>
> Did all that, thanks to everyone for the quick replies.
>
> Looking forward to comments on the code,
>
> Denis
>
>
Code has progressed very much, thanks to the help I got on the ticket. Now 
something funny is happening with the patchbots, can anyone have a quick 
look and maybe comment?

Thanks in advance,

Denis

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/722b6e55-714f-4056-99b7-90c6c35856b4%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-20 Thread Denis Sunko


On Thursday, February 20, 2020 at 2:46:37 AM UTC+1, Travis Scrimshaw wrote:
>
>
>
>> there is nothing wrong with pushing a non-working branch somewhere.
>> This way it's very easy to see what's going wrong there.
>> (I guess it's something to do with importing things)
>>
>
> Also linking it to the ticket by filling out the branch field there.
>
> Best,
> Travis
>

Did all that, thanks to everyone for the quick replies.

Looking forward to comments on the code,

Denis


 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/006f9bb2-2c60-48c5-b6b1-92c8dddcc3a4%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-19 Thread Travis Scrimshaw


>
>> I have opened a trac ticket  
>> now. Unfortunately something weird is happening with my local git branch. I 
>> have copied a file fast_vector_partitions.py with all the source code (it 
>> works in ordinary Python with 'import fast_vector_partitions') and 
>> recompiled Sage under this branch, which I call fast_vector_partitions (the 
>> head is local, no connection to the trac server yet). 
>>
>> Problem: after rebuilding Sage under this branch I cannot use the 
>> functions in the file under the sage prompt - the function name is 
>> "undefined". I did both ./sage -br and make, several times.
>>
>> I can see that something happened in the build because the file has 
>> migrated from src/sage (where I put it) to src/build and local/lib, and 
>> a .pyc file has appeared:
>>
>> $ find . -name "*fast_vector*"
>> ./src/build/lib.linux-x86_64-3.7/sage/combinat/fast_vector_partitions.py
>> ./src/sage/combinat/fast_vector_partitions.py
>>
>> ./local/lib/python3.7/site-packages/sage/combinat/fast_vector_partitions.py
>>
>> ./local/lib/python3.7/site-packages/sage/combinat/__pycache__/fast_vector_partitions.cpython-37.pyc
>> ./.git/logs/refs/heads/fast_vector_partitions
>> ./.git/refs/heads/fast_vector_partitions
>>
>> I hesitate to connect this branch with the trac server before figuring 
>> out what is going on. In any case I think I should try the build locally 
>> first.
>>
>
> there is nothing wrong with pushing a non-working branch somewhere.
> This way it's very easy to see what's going wrong there.
> (I guess it's something to do with importing things)
>

Also linking it to the ticket by filling out the branch field there.

Best,
Travis

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/de04b8ee-a78f-44d3-b087-f37c61286da4%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-19 Thread Dima Pasechnik


On Wednesday, February 19, 2020 at 5:50:46 PM UTC+1, Denis Sunko wrote:
>
>
> I have opened a trac ticket  now. 
> Unfortunately something weird is happening with my local git branch. I have 
> copied a file fast_vector_partitions.py with all the source code (it works 
> in ordinary Python with 'import fast_vector_partitions') and recompiled 
> Sage under this branch, which I call fast_vector_partitions (the head is 
> local, no connection to the trac server yet). 
>
> Problem: after rebuilding Sage under this branch I cannot use the 
> functions in the file under the sage prompt - the function name is 
> "undefined". I did both ./sage -br and make, several times.
>
> I can see that something happened in the build because the file has 
> migrated from src/sage (where I put it) to src/build and local/lib, and a 
> .pyc file has appeared:
>
> $ find . -name "*fast_vector*"
> ./src/build/lib.linux-x86_64-3.7/sage/combinat/fast_vector_partitions.py
> ./src/sage/combinat/fast_vector_partitions.py
> ./local/lib/python3.7/site-packages/sage/combinat/fast_vector_partitions.py
>
> ./local/lib/python3.7/site-packages/sage/combinat/__pycache__/fast_vector_partitions.cpython-37.pyc
> ./.git/logs/refs/heads/fast_vector_partitions
> ./.git/refs/heads/fast_vector_partitions
>
> I hesitate to connect this branch with the trac server before figuring out 
> what is going on. In any case I think I should try the build locally first.
>

there is nothing wrong with pushing a non-working branch somewhere.
This way it's very easy to see what's going wrong there.
(I guess it's something to do with importing things)
 

>
> Can anyone please help?
>
> Thanks,
>
> Denis
>
> On Monday, February 10, 2020 at 12:34:40 PM UTC+1, Denis Sunko wrote:
>
>> I have translated the Haskell code for vector partitions 
>> ...
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/632c859b-362a-4c8e-b212-45b69ff90e07%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-19 Thread Denis Sunko

I have opened a trac ticket  now. 
Unfortunately something weird is happening with my local git branch. I have 
copied a file fast_vector_partitions.py with all the source code (it works 
in ordinary Python with 'import fast_vector_partitions') and recompiled 
Sage under this branch, which I call fast_vector_partitions (the head is 
local, no connection to the trac server yet). 

Problem: after rebuilding Sage under this branch I cannot use the functions 
in the file under the sage prompt - the function name is "undefined". I did 
both ./sage -br and make, several times.

I can see that something happened in the build because the file has 
migrated from src/sage (where I put it) to src/build and local/lib, and a 
.pyc file has appeared:

$ find . -name "*fast_vector*"
./src/build/lib.linux-x86_64-3.7/sage/combinat/fast_vector_partitions.py
./src/sage/combinat/fast_vector_partitions.py
./local/lib/python3.7/site-packages/sage/combinat/fast_vector_partitions.py
./local/lib/python3.7/site-packages/sage/combinat/__pycache__/fast_vector_partitions.cpython-37.pyc
./.git/logs/refs/heads/fast_vector_partitions
./.git/refs/heads/fast_vector_partitions

I hesitate to connect this branch with the trac server before figuring out 
what is going on. In any case I think I should try the build locally first.

Can anyone please help?

Thanks,

Denis

On Monday, February 10, 2020 at 12:34:40 PM UTC+1, Denis Sunko wrote:

> I have translated the Haskell code for vector partitions 
> ...
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/26c8ac8e-f505-496f-921c-0935be237f41%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-16 Thread Samuel Lelievre
I forgot to say you need to work on the "develop" branch.

So the steps would be:
 
- open an account on gitlab.com
- connect to gitlab.com
- fork this project:

https://gitlab.com/sagemath/sage/

- modify the "develop" branch in your fork
- send a merge request against the
  "develop" branch of

https://gitlab.com/sagemath/sage/

This will automatically create an associated ticket
on Sage's Trac server, with a branch that has the
changes from your GitLab merge request.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/984dde19-a629-424d-98b5-45d5e4e507ed%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-16 Thread Samuel Lelievre
Thu 2020-02-13 19:29:57 UTC, Denis Sunko:
>
> I read some of the developer's guide but it all seemed
> rather intimidating, especially for a small change.

Alternatively to pushing a branch to Sage's Trac server,
you can 

- open an account on gitlab.com
- fork this project on GitLab

https://gitlab.com/sagemath/sage/

- modify your fork and send a merge request.

This will automatically create an associated ticket
on Sage's Trac server.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/0854aad7-940a-4568-b7f3-ecbc62b3bd26%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-13 Thread Travis Scrimshaw


Thanks to everybody for the friendly replies.
>
> I could paste the code right here, is that the proper way to do it? How is 
> the license transferred to Sage?
>

The way to submit code is to push a git branch to our trac server and then 
update the ticket to include that branch name under the branch field. For 
more, see

http://doc.sagemath.org/html/en/developer/manual_git.html


> I have a trac account because I once contributed a small bugfix 
>  but nothing happened with it, so 
> it seems like i don't understand how the system works.
>

You need someone to see the ticket, and from the title and status, it was 
not clear that there is a fix proposed. Your proposed fix should be turned 
into a git branch as well, and you should also add a doctest showing it is 
fixed (specifically, the example in the description).

>
> I read some of the developer's guide but it all seemed rather 
> intimidating, especially for a small change. I have been programming as 
> part of research, but only my own code, never collaborative projects.
>
> I will repost to sage-devel. Any further advice is welcome.
>

I don't see the need to do that here since you have gotten some attention 
for your proposal. However, future posts might be better relegated to 
sage-devel as this is not as active of a mailing list as it used to be. 
Feel free to ask here or on sage-devel (maybe sage-support?) or on the 
tickets if you have any questions. You can cc me "tscrim" on them as well.

Best,
Travis

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/d9eb60de-b00a-43a5-a84d-7a51dbcaaf59%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-13 Thread Denis Sunko
Thanks to everybody for the friendly replies.

I could paste the code right here, is that the proper way to do it? How is 
the license transferred to Sage?

I have a trac account because I once contributed a small bugfix 
 but nothing happened with it, so 
it seems like i don't understand how the system works.

I read some of the developer's guide but it all seemed rather intimidating, 
especially for a small change. I have been programming as part of research, 
but only my own code, never collaborative projects.

I will repost to sage-devel. Any further advice is welcome.

Denis

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/bf4ee717-661b-49fb-b036-f70eb80ef14f%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-13 Thread Travis Scrimshaw
Hi Denis,
   That is great that it can have a faster implementation. Do you have the 
code available for us somewhere? Some thing to also note is that 
VectorPartitions creates a Sage Element instance instead of a simple Pyhton 
list, which has extra overhead. However, this should not account for most 
of the difference between the two timings I believe. Dealing with the min 
should be straight-forward; worst case is we just fallback to the current 
implementation. We might even be able to get it faster with Cythonizing it.

As Simon said, I would just insert it directly into the Sage source code.

Best,
Travis


On Monday, February 10, 2020 at 9:34:40 PM UTC+10, Denis Sunko wrote:
>
> I have translated the Haskell code for vector partitions by M. C. Er, The 
> Computer Journal, Vol. 31, 1988, 283-284, into Python (2 or 3, stand-alone 
> file with 60 lines total).
>
> The code works significantly faster than the Sage implementation:
>
> ┌┐
> │ SageMath version 9.0, Release Date: 2020-01-01 │
> │ Using Python 3.7.3. Type "help()" for help.│
> └┘
> sage: import vpartitions
> sage: %time myvparts=vpartitions.vPartitionso([6,6,6])
> CPU times: user 9.13 s, sys: 89.8 ms, total: 9.22 s
> Wall time: 9.22 s
> sage: %time sagevparts=list(VectorPartitions([6,6,6]))
> CPU times: user 2min 10s, sys: 177 ms, total: 2min 10s
> Wall time: 2min 10s
> sage: myvparts[::-1]==sagevparts
> True
>
> If someone would take over the job of contributing this code to Sage, I 
> would be glad to help. There are a few caveats:
>
> 1) the code is recursive;
> 2) there is no "min" option like in the Sage implementation.
>
> I do not know how difficult (or necessary) it would be to address these 
> points.
>
> Of course, anyone can take it up straight from Er's paper instead, I won't 
> be jealous:)
>
> Cheers,
>
> Denis
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/45509e06-9672-47c8-be92-7a1a52d36287%40googlegroups.com.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-13 Thread Simon King
PS:

Sorry, I just notice that you did answer my question: It is 60 lines of
python code. That shouldn't be a problem to include in the Sage library
(i.e., in relevant parts of src/sage/..., maybe in the same location
than the current implementation.

Do you have a trac account?

Best regards,
Simon

On 2020-02-13, Simon King  wrote:
> Hi Denis,
>
> in the past, sage-combinat-devel was a very active list and certainly
> the topic of your post fits well, but it seems to me that it would be a
> good idea to re-post on sage-devel.
>
> Did you read the developer's guide?
>  
> Certainly people could help you contributing the code. In particular if
> the code is written in Python or Cython, it would probably be easy to
> fit it into src/sage/...
>
> Or is it an external package? Then it would of course be nice to have
> code in the sage library that makes use of the external package. Note
> that at least in the beginning, a new package would be optional.
>
> Concerning the "min" option: At least for now, the old code in Sage
> would not be removed. So, even with your package installed, one could
> easily make it so that the old code is used when the user requests the
> "min" option.
>
> Best regards,
> Simon
>
> On 2020-02-10, Denis Sunko  wrote:
>> I have translated the Haskell code for vector partitions by M. C. Err, The 
>> Computer Journal, Vol. 31, 1988, 283-284, into Python (2 or 3, stand-alone 
>> file with 60 lines total).
>>
>> The code works significantly faster than the Sage implementation:
>>
>> ┌┐
>> │ SageMath version 9.0, Release Date: 2020-01-01 │
>> │ Using Python 3.7.3. Type "help()" for help.│
>> └┘
>> sage: import vpartitions
>> sage: %time myvparts=vpartitions.vPartitionso([6,6,6])
>> CPU times: user 9.13 s, sys: 89.8 ms, total: 9.22 s
>> Wall time: 9.22 s
>> sage: %time sagevparts=list(VectorPartitions([6,6,6]))
>> CPU times: user 2min 10s, sys: 177 ms, total: 2min 10s
>> Wall time: 2min 10s
>> sage: myvparts[::-1]==sagevparts
>> True
>>
>> If someone would take over the job of contributing this code to Sage, I 
>> would be glad to help. There are a few caveats:
>>
>> 1) the code is recursive;
>> 2) there is no "min" option like in the Sage implementation.
>>
>> I do not know how difficult (or necessary) it would be to address these 
>> points.
>>
>> Of course, anyone can take it up straight from Err's paper instead, I won't 
>> be jealous:)
>>
>> Cheers,
>>
>> Denis
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/r23999%24ph9%241%40ciao.gmane.io.


[sage-combinat-devel] Re: fast vector partitions algorithm

2020-02-13 Thread Simon King
Hi Denis,

in the past, sage-combinat-devel was a very active list and certainly
the topic of your post fits well, but it seems to me that it would be a
good idea to re-post on sage-devel.

Did you read the developer's guide?
 
Certainly people could help you contributing the code. In particular if
the code is written in Python or Cython, it would probably be easy to
fit it into src/sage/...

Or is it an external package? Then it would of course be nice to have
code in the sage library that makes use of the external package. Note
that at least in the beginning, a new package would be optional.

Concerning the "min" option: At least for now, the old code in Sage
would not be removed. So, even with your package installed, one could
easily make it so that the old code is used when the user requests the
"min" option.

Best regards,
Simon

On 2020-02-10, Denis Sunko  wrote:
> I have translated the Haskell code for vector partitions by M. C. Err, The 
> Computer Journal, Vol. 31, 1988, 283-284, into Python (2 or 3, stand-alone 
> file with 60 lines total).
>
> The code works significantly faster than the Sage implementation:
>
> ┌┐
> │ SageMath version 9.0, Release Date: 2020-01-01 │
> │ Using Python 3.7.3. Type "help()" for help.│
> └┘
> sage: import vpartitions
> sage: %time myvparts=vpartitions.vPartitionso([6,6,6])
> CPU times: user 9.13 s, sys: 89.8 ms, total: 9.22 s
> Wall time: 9.22 s
> sage: %time sagevparts=list(VectorPartitions([6,6,6]))
> CPU times: user 2min 10s, sys: 177 ms, total: 2min 10s
> Wall time: 2min 10s
> sage: myvparts[::-1]==sagevparts
> True
>
> If someone would take over the job of contributing this code to Sage, I 
> would be glad to help. There are a few caveats:
>
> 1) the code is recursive;
> 2) there is no "min" option like in the Sage implementation.
>
> I do not know how difficult (or necessary) it would be to address these 
> points.
>
> Of course, anyone can take it up straight from Err's paper instead, I won't 
> be jealous:)
>
> Cheers,
>
> Denis
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/r23952%243jri%241%40ciao.gmane.io.


[sage-combinat-devel] Re: GSoC 2020

2020-02-04 Thread Samuel Lelievre
Tue 2020-02-04 17:38:18 UTC, Sagnik Dey:
>
>
> I was a GSoC participant last year working on a C++ library.
>
I am interested in contributing to Sage Math repositories this year.
>
Can someone please direct me to where I can get started?
>
> PS: I hope this isn't the wrong place to post this. If so,
>
please inform me about the right forum.
>

It's more usual to post to the sage-gsoc mailing list:

  https://groups.google.com/forum/#!forum/sage-gsoc

Is there some specific area of math or of SageMath that
you would like to work on?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/5db7dce3-bbcb-4231-a61c-5fc69fb96f3f%40googlegroups.com.


[sage-combinat-devel] Re: Discreture library: iterate through combinations, permutations, partitions...

2018-08-07 Thread Travis Scrimshaw
It definitely could help with some things. However, I am a bit turned off 
on using it considering statements about comparing a highly optimized 
special purpose library with SageMath:

This comparison isn't very fair (C++ vs python). On the same system, 
> iterating over all (24 choose 12) combinations, sage takes 12.2 seconds. 
> Discreture takes approximately 0.005 seconds. No point in graphing that.
>

Also, that is somewhat of a poor choice to do a benchmark against as that 
is a recursive python iteration as opposed to, say, Partitions. A proper 
benchmark instead of immediate dismissal and needless editorial would have 
been much better (and useful).

On a more technical aspect, the boost dependency might be a problem. We 
have a slimmed down boost, but if it requires the full boost, then that 
might be a problem. I'm also not sure how Sage will work with a header only 
library.

Best,
Travis


On Monday, August 6, 2018 at 9:03:29 PM UTC+10, Samuel Lelievre wrote:
>
> Dear sage-combinat-devel,
>
> Discreture is a C++ library for iterating through various combinatorial
> structures such as combinations, permutations, partitions, etc.
>
> https://github.com/mraggi/discreture
>
> Could it bring speedups to any of Sage's combinatorics?
>
> Kind regards,
> Samuel
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: ABC

2018-06-13 Thread Bruce


On Wednesday, 13 June 2018 14:48:23 UTC+1, Andrew wrote:
>
> Hi Bruce,
>
> I think that what you  have is fine: 
>

Yes, I agree. It was not working earlier. I found a mistake but didn't 
realise I had fixed it.
Thanks for your support.

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: ABC

2018-06-13 Thread Andrew
Hi Bruce,

I think that what you  have is fine. Compare with:

{{{
sage: mu=Partition([3,2])
sage: type(mu)

}}}

If you try adding a method to `PathTableau`, such as with
{{{
 class PathTableau(ClonableList):

@abstract_method(optional=False)
def check(self):
pass

def test(self):
print('a test')
}}}
then you will see that it is inherited:
{{{sage: c=CatalanTableau([0,1,2])
sage: c
[0, 1, 2]
sage: c.test()
}}}


On Wednesday, 13 June 2018 14:08:55 UTC+2, Bruce wrote:
>
> I am trying to implement an Abstract Base Class, but have hit something I 
> don't understand.
>
> I have attached a file with a minimal example of what I am trying to do.
> There is an Element ABC PathTableau and a Parent ABC PathTableaux.
> I then inherit from these with Element CatalanTableau and Parent 
> CatalanTableaux.
>
> PathTableau inherits from CloneableList so I want to do some preprocessing 
> on the
> argument before creating the object. For this minimal example I have 
> removed the
> methods in PathTableau.
>
> My problem is that when I run this I get:
>
> sage: c = CatalanTableau([0,1,0])
> sage: type(c)
> 
>
> This is not what I want. I want c to be an instance of CatalanTableau
> and therefore to inherit the (missing) methods from PathTableau.
>
> I suspect it will only take a minor adjustment to get what I want but I 
> don't
> know what that would be.
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: SkewTableaux

2018-06-03 Thread Travis Scrimshaw


On Friday, June 1, 2018 at 7:25:21 PM UTC+10, Bruce wrote:
>
> I am confused about the interface between SkewTableaux and Tableaux.
> I suspect this is something people are aware of.
>
> The points I have come across (and I doubt these are the only ones) are:
>
> A SkewTableau can be created from a chain of partitions using the keyword 
> chain.
> This does not work for Tableau. There is a work around:
> given a chain of partitions which starts with the empty partition,
> create the skew tableau using the chain keyword,
> convert to a list,
> use this to construct a tableau.
>

Most likely because nobody implemented it. Please add.

>
> Evacuation and promotion are not defined for skew tableaux.
> Is this because the definition does not make sense or because
> no-one has yet included them?
>

IDK. My initial thought is that these are well-defined, but I don't know if 
you get the usual properties for skew tableaux (and hence, are 
"uninteresting"). Yet, it is most likely the latter case.

>
> Mathematically, a tableau is a skew tableau with empty inner shape.
> Many (most?) methods make sense for skew tableaux.
> Ideally, these methods would be defined for skew tableaux
> and made available to straight tableaux. I don't know the
> appropriate mechanism for doing this in sage but I expect
> people have ideas or even plans on this.
>

I believe part of the reason for this is that it takes a bit of extra 
processing power (not to mention code) to check for the None's that can 
appear in a skew tableau. Plus the general class hierarchy for the (skew) 
tableau code needs some cleanup (there is at least one stalled ticket 
toward this effect). 

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Lie algebra representations and Crystals

2018-06-01 Thread Bruce
Hi Nicolas,

Travis has already answered Q1. I was going to say Yes because; if it holds 
in one basis then it holds in all bases (which I suspect you had in mind 
when you formulated the question); then it holds in the canonical basis in 
the strong sense that applying a lowering operator gives 0 or another basis 
element.

If I understand you correctly, you are studying the coordinate ring on n x 
r matrices. If so, then you may want to use the basis of bideterminants.

Invariant theory, Young bitableaux and combinatorics Advances in Math. (27) 
1978

Best,
Bruce

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Lie algebra representations and Crystals

2018-05-31 Thread Travis Scrimshaw
Hi Nicolas,

>
> I am doing computations in a Lie algebra representation V; actually a 
> pretty simple one, though huge (in case this is relevant, V is a 
> subspace of the ring of polynomials in r sets of n variables, under 
> the action of gl_r. The nice feature is that weight spaces are 
> directly given by the multigrading, and the e and f operators are 
> given by polarization). 
>
> Question I: assume that I have a highest weight vector v for a simple 
> submodule of V. Consider the crystal of tableaux of the same weight. 
> Take a set S of tableaux T; for each of them, pick a string of e 
> crystal operators going from the highest weight tableau to T. 
>
> Can I by any chance assume that, if the corresponding strings of e 
> operators in gl_r are applied on v, I get linearly independent 
> elements in V? 
>

Yes you can (assuming you have 1 vector for each path in the crystal). It 
is essentially by construction from the Verma module with the PBW basis but 
thinking of the vectors f_* v. Although I think the good way to do this is 
by the "adapted strings" method that de Graaf attributes to Littelmann in 
his "Constructing canonical bases of quantized enveloping algebras". I am 
pretty sure you can also tease this out directly from the definition of the 
Kashiwara operators.

>
> Question II: assume that I have a weight space V_\lambda; I can easily 
> compute the subspace HV_\lambda of highest weight vectors in V_\lambda 
> by taking the joint kernel of the e operators. But for my computation 
> I would need to instead have a *projection* from V_\lambda to 
> HV_\lambda. Is there a way to construct such a projection, e.g. in 
> term of the operators of the Lie algebra? 
>
>
So if you have a polarization and a basis for your submodule, you can use 
that to do your projection. In particular, the crystal basis is the set b 
\in V such that (b, b')_0 = \delta_{m,m'}, where m is the index of the 
element b. However, that assumes you are working with coefficients in the 
0-regular (functions f/g such that g(0) \neq 0) sublattice.

The more brute-force way of doing this is to construct a basis for 
HV_{\lambda} using the gl_r action and extend that to V_{\lambda} using a 
Gram-Schmidt-type approach to get a full basis of V_{\lambda} that 
naturally has the projection, then conjugating that natural projection 
matrix with the corresponding COB matrix to obtain your projection.

(I've done similar computations to compute highest weight elements, and I 
found that stacking the e matrices and taking the kernel of that to be much 
faster than taking the intersections of the kernels in Sage.)

>
> In general, refs about this type of computations in Lie algebras are 
> very welcome ... 
>
> de Graaf is the person who has done the most with these types of 
computations (a number of which are implemented in GAP4).

http://www.science.unitn.it/~degraaf/pub.html
This paper of his 

 
is probably a good starting point as well.

Best,
Travis


-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-22 Thread 'Martin R' via sage-combinat-devel
See also https://trac.sagemath.org/ticket/25173

(please ping if I the code is of interest)

Martin

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-21 Thread Bruce


> Also, have a look at the implementation of k-tableaux in 
> combinat/k_tableau.py. That should give an idea how to implement other 
> kinds of tableaux.
>
>
Hi Anne, Thanks, that is useful. I notice that you an abstract class 
WeakTableau_abstract and three classes that inherit from this.
All of these inherit from UniqueRepresentation and have the incantations 
needed for preprocessing including __classcall_private__ and
__init__. When do these methods in the abstract class get called? I was 
trying something like this this morning but I couldn't get it
to work.

A minor question. On lines 1624 and 2069 you have the decorator 
@classmethod. These are not in an abstract class so I was
wondering what they do?

Best,
Bruce

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-21 Thread Anne Schilling
Hi Bruce,
 

> For most combinatorial objects, the main things you want to implement are:
>
> - An __init__ for the parent that calls Parent.__init__(self, 
> category=cat), with cat either Sets(), EnumeratedSets(), 
> EnumeratedSets().Finite(), EnumeratedSets().Infinite(), etc.
> - An __init__ for the element that takes the parent as the first argument 
> that calls Element.__init__(self, parent) or whatever the reasonable base 
> class is.
> - Set the parent "Element" class level *attribute* to the corresponding 
> element class.
> - All elements with data D of a parent P you construct should be though 
> either P(D) or the more direct P.element_class(P, D).
> - An __iter__ for the parent if you know how to iterate over objects.
>
> The default _element_constructor_ is sufficient to handle the rest unless 
> you need some extra preprocessing that cannot be done in the element 
> class's __init__. However, see Simon's very good response for more specific 
> details.
>

Also, have a look at the implementation of k-tableaux in 
combinat/k_tableau.py. That should give an idea how to implement other 
kinds of tableaux.

Best,

Anne 

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-20 Thread Mike Zabrocki
Hi Bruce,

The research on these objects is still a bit ongoing so the conventions 
have not yet settled down which is why I hesitate to submit it to Sage 
until there is clean expository material to refer to.  They will go into 
Sage eventually, but I think that they are closely related to plethysm, 
Kronecker and the restriction problem from Gl_n to S_n, so I think it is a 
very good idea to be careful about choosing the right notation and 
conventions. 

Let me try to give you some references.

For instance Halverson, Benkart and Harman wrote:
https://arxiv.org/abs/1605.06543
see section 5.  Do you see set valued tableaux?  No, what you see is 
expressions involving set partitions and column strict tableaux (same 
difference if you know what you are looking at).  You also have to know 
that the dimensions of these modules are the number of vascillating 
tableaux.

However a year later Halverson and Benkart wrote some follow up expository 
work, they made the connection more explicit:
https://arxiv.org/pdf/1709.07751.pdf
And here they have the bijection between the vascillating tableaux and the 
set valued tableaux in Section 3.2.

and the reason I am familiar with these connections is because Rosa 
Orellana and I wrote this paper:
https://arxiv.org/abs/1605.06672
Section 6 gives the relationship between the partition algebra character 
values and the coefficients of the character basis in the power sum.  The 
dimension (the number of vascillating tableaux of shape 
(n-|\lambda|,\lambda)) will be the coefficient of {\tilde s}_\lambda in 
p_{1^k} (and this is in Sage).

For instance the example that I gave with the vascillating tableaux of size 
2 (and n>4) are encoded in the coefficients of p_{11}:
sage: SymmetricFunctions(QQ).inject_shorthands('all', verbose=False)
sage: st(p[1,1])

2*st[] + 3*st[1] + st[1, 1] + st[2]
sage: s(p[1,1]).character_to_frobenius_image(5)
s[3, 1, 1] + s[3, 2] + 3*s[4, 1] + 2*s[5]

-Mike

On Sunday, 20 May 2018 09:47:39 UTC-4, Bruce wrote:
>
> This is intriguing but I need some help as I am not familiar with these.
> Can you give me some references on the background?
>
> In my setup, a "tableau" is a sequence of "partitions" with constraints
> on neighbouring partitions. Do set valued tableaux, or multiset valued 
> tableaux,
> fit this framework?
>
> P.S. Are you planning on submitting this code to sage? It seems that you
> should, particularly as it is now in the public domain.
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-20 Thread Bruce
This is intriguing but I need some help as I am not familiar with these.
Can you give me some references on the background?

In my setup, a "tableau" is a sequence of "partitions" with constraints
on neighbouring partitions. Do set valued tableaux, or multiset valued 
tableaux,
fit this framework?

P.S. Are you planning on submitting this code to sage? It seems that you
should, particularly as it is now in the public domain.

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-20 Thread Mike Zabrocki
Hi Bruce,
 

> Just to clarify; I refer to tableaux because I am taking constructions 
> that are well know for tableaux
> and generalising. One example is oscillating tableaux; these are sequences 
> of partitions where you
> add or remove a single box at each step. One example I want to experiment 
> with is vacillating tableaux.
> Then we have alternating tableaux, ribbon tableaux, ...
>

Just a comment about the object that you are proposing to work with.  
Vascillating tableaux are in bijection with set valued tableaux and that 
might be a simpler object to work with and manipulate in sage (because you 
could represent it as a pair of a standard tableau and a list of sets).

For example the vascillating tableaux of semi-length 2 and size 5 are:
((5), (4), (5), (4), (5))
((5), (4), (4,1), (4), (5))
((5), (4), (5), (4), (4,1)) 
((5), (4), (4,1), (4), (4,1)) 
((5), (4), (4,1), (3,1), (4,1)) 
((5), (4), (4,1), (3,1), (3,2)) 
((5), (4), (4,1), (3,1), (3,1,1)) 

[[.,.,.,.,12]]
[[.,.,.,1,2]]
[[.,.,.,1],[2]]
[[.,.,.,2],[1]]
[[.,.,.,.],[12]]
[[.,.,.],[1,2]]
[[.,.,.],[1],[2]]

The reason I mention this is because I have written code to work with set 
valued tableaux.  It isn't super robust because I kept changing 
conventions, but if you want to try it out, copy or modify it, I put it on 
a web page.  This way you can load it by executing the commands (or just 
view the code by following the links):
load("http://garsia.math.yorku.ca/~zabrocki/multisetpartition.py;)
load("http://garsia.math.yorku.ca/~zabrocki/multisettableau.py;)

-Mike

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-20 Thread Bruce


I am not sure: Is it fair to say that the category framework was invented 
> with 
> the intention to provide mixin abstract base classes for parents and 
> elements, 
> but based on mathematical notions instead of just in terms of python 
> classes 
> (as in Python's abc module)? 
>
 
My understanding of the history is that William Stein was using Magma and 
found it frustrating so he produced Sage. Magma already had something
like parents and William Stein developed this idea for Sage.

I believe the motivation for both Magma and Sage was what you call the
"algebraic stuff". Namely, the facility to create classes dynamically
and coerce between them.


> Anyway, it was always my impression that the category framework is very 
> useful for implementing algebraic stuff -- but one should still combine 
> it with a hard coded classical hierarchy of Python/Cython types. It is 
> flexible enough that two instances P1, P2 of a concrete parent class can 
> belong to different categories, and thus eventually provide different 
> functionality (and in fact type(P1) and type(P2) will then be two 
> different types that Sage creates dynamically). A classical example is 
> MatrixSpace(QQ,2) (which is object in Algebras(QQ)) and 
> MatrixSpace(QQ,2,3) (which is object in VectorSpaces(QQ)).
>

Yes, definitely. I am in no way objecting to using the Category framework
for these applications. This is an essential part of Sage. All I am saying
is that I (and the sage-combinat community) are doing something different.

>
> Nonetheless: At least ostensibly it is possible to create categories in 
> Sage that are no sub-categories of Sets(). After all, there is 
> sage.structure.category_object.CategoryObject, which is even more basic 
> than 
> sage.structure.parent.Parent, and whose instances are not necessarily 
> having 
> elements.
>
 
I don't have any experience of this and have not looked into it. My 
understanding
is that even if it is possible (which I don't doubt) it is difficult. One 
example is schemes
which have been implemented in Sage. Is this what CategoryObject was 
invented for?

My point was that if I was asked what Categories/Parents/Elements were I 
would say
that "a sage category is a subcategory of sets". I would mean this as a 
starting point
and not as a conclusion.

In summary, I am not questioning the Category framework or the way it is 
currently used.
I am just trying to understand it so I can implement some constructions I 
am interested in.

Best Regards,
Bruce

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-19 Thread Simon King
Hi Bruce,

On 2018-05-19, Bruce  wrote:
> Can I make two comments?
> i. I think it would be better to say that (to a first approximation) a sage 
> category is a subcategory of Sets.
> When you are taught category theory it is drilled into you not to think of 
> an object as a set.

You are certainly right that the category framework in Sage was created with
sets in mind. And in fact, historically, the parent-element stuff that one
can find in sage.structure preceded the category framework.

I am not sure: Is it fair to say that the category framework was invented with
the intention to provide mixin abstract base classes for parents and elements,
but based on mathematical notions instead of just in terms of python classes
(as in Python's abc module)?

Anyway, it was always my impression that the category framework is very
useful for implementing algebraic stuff -- but one should still combine
it with a hard coded classical hierarchy of Python/Cython types. It is
flexible enough that two instances P1, P2 of a concrete parent class can
belong to different categories, and thus eventually provide different
functionality (and in fact type(P1) and type(P2) will then be two
different types that Sage creates dynamically). A classical example is
MatrixSpace(QQ,2) (which is object in Algebras(QQ)) and
MatrixSpace(QQ,2,3) (which is object in VectorSpaces(QQ)).

Nonetheless: At least ostensibly it is possible to create categories in
Sage that are no sub-categories of Sets(). After all, there is
sage.structure.category_object.CategoryObject, which is even more basic than
sage.structure.parent.Parent, and whose instances are not necessarily having
elements.

Best regards,
Simon

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-19 Thread Bruce

I have followed Travis' suggestion and been inspired by both answers and 
now have a working first version.
This is wonderful!

Can I make two comments?
i. I think it would be better to say that (to a first approximation) a sage 
category is a subcategory of Sets.
When you are taught category theory it is drilled into you not to think of 
an object as a set.

ii. I think this highlights the difference in the way the 
category/parent/framework is thought about and
used in the two communities of algebraic geometry/commutative algebra and 
combinatorics.

Just to clarify; I refer to tableaux because I am taking constructions that 
are well know for tableaux
and generalising. One example is oscillating tableaux; these are sequences 
of partitions where you
add or remove a single box at each step. One example I want to experiment 
with is vacillating tableaux.
Then we have alternating tableaux, ribbon tableaux, ...

I have a Tableaux parent and an element is a Tableau. A Tableau is 
mathematically a list of partitions
and the class derives from CloneableArray (which has Element buried in it). 
I don't know how Morphisms, 
coercions etc. fit in here. So far, I have not had any use for them and I 
don't see them in examples.

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-19 Thread Simon King
Hi Travis,

On 2018-05-19, Travis Scrimshaw  wrote:
>> And "parent" is just another word for "object of a sub-cateogory of the 
>> category of sets". So, if there is a category of tableaux and if each 
>> tableau has elements, then a tableau is a parent and its elements are, 
>> well, its elements. 
>>
> This is the wrong viewpoint. The set of Tableaux should be the parent in 
> the category of (enumerated?) sets since the elements are a Tableau.

I see. So, just to confirm: It is NOT the case that if you take two
tableaux satisfying a certain condition then there is a map from the
first tableaux to the second tableaux? And it is NOT the case that
tableaux form a category?

For the OP, I guess Travis' answer means that the category framework is
not suitable for providing a method that is generic for all tableaux: He
says that the set of all tableaux is just an object in Sets(), and thus
Sets.ElementMethods will be available to each tableau, but of course one
must not add a generic tableau method .foo() to Sets.ElementMethods unless
.foo() makes sense to ALL elements of sets.

I still wonder: Is the OP's notion of a tableau already implemented in
Sage?

Kind regards,
Simon

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-18 Thread Travis Scrimshaw

>
> > Then I can think of the set of Tableaux as the parent and lists of 
> objects 
> > as elements. 
>
> You say that you "think of the *set* of Tableaux" as the parent? That 
> doesn't 
> sound promising at all. Although I don't know which notion you are using, 
> it seems likely to me that rather the *set* of all tableaux forms a 
> category, 
> which means that each individual tableau is an object in that category. 
> And "parent" is just another word for "object of a sub-cateogory of the 
> category of sets". So, if there is a category of tableaux and if each 
> tableau has elements, then a tableau is a parent and its elements are, 
> well, its elements. 
>
> This is the wrong viewpoint. The set of Tableaux should be the parent in 
the category of (enumerated?) sets since the elements are a Tableau. Most 
combinatorial objects should not be categories because the morphisms that 
people are typically interested in are bijections. A good smallish example 
to look at is the implementation of Gelfand-Tsetlin patterns (see 
src/sage/combinat/gelfand_tsetlin_patterns.py).

Do *NOT* use Posets as an example. Those are special because of the extra 
structure with the < and are naturally sets (hence parents). Posets are 
naturally a category because the morphisms have to preserve the structure.

> I have struggled to find complete examples in the 
> > combinat source code. As I understand it the key 
> > components are Parent.__init__  Element.__init__ _element_constructor_ 
> but 
> > I don't understand what these do or how they 
> > work together. 
>
> In a nutshell: 
>
> - If you implement a parent FOO, then FOO will be a subclass of 
>   sage.structure.parent.Parent, and at some point during FOO.__init__ the 
>   .__init__ methods of the base classes of FOO should of course be called. 
>   Hence, at some point, Parent.__init__(self, ...) will be called (maybe 
>   indirectly), and this is where the category of your new instance of FOO 
>   has to be declared. 
> - Similarly, if you are implementing the elements of FOO instance in a 
>   class BAR, then of course BAR will be a subclass of 
>   sage.structure.element.Element, and at some point during BAR.__init__ 
>   also Element.__init__(self, P) has to be called (maybe indirectly), 
>   where P is the instance of FOO which `self` will be element of. 
>   Nothing more specific needs to be done in BAR.__init__ regarding the 
>   category framework. 
> - You did not mention another key component: Your class FOO has to have 
>   BAR assigned to a class attribute called "Element". 
> - FOO._element_constructor_ is a method that takes some arguments and 
>   returns an element of FOO. If P is an instance of FOO, then it ought 
>   to return an instance of P.element_class. Here, P.element_class is 
>   automatically created by Sage's category framework: It is a sub-class 
>   of both P.Element (i.e., BAR) and of P.category().parent_class (which 
>   is why FOO.__init__ needs to declare which category is to be used). 
>   It is in fact not always needed to implement FOO._element_constructor_ 
>   explicitly: There is a default implementation, and having 
> `FOO.Element=BAR` 
>   may be sufficient to make it work. But if there is particular input that 
>   BAR.__init__ won't handle then FOO._element_constructor_ is where you 
>   would implement a conversion. 
>   In that sense, _element_constructor_ is less of a key component than 
>   the `Element` attribute. 
> - Also, if your element class BAR implements arithmetic operations 
>   then you should be aware that some of Python's magic arithmetic 
>   methods such as __add__ or __mul__ have default implementations in 
>   Sage's base classe (sage.rings.ring.Ring etc), and these should *not* 
>   be overridden! Instead, you may implement the corresponding single 
>   underscore method (_add_, _mul_, _lmul_). The same holds for __repr__ 
>   versus _repr_. Moreover, _add_ and _mul_ shouldn't just return instances 
>   of BAR, but of P.element_class (if P is the parent of the result of the 
>   arithmetic operation). 
> - Another key component: If there are canonical morphisms from other 
>   algebraic structures to your tableaux, then you may want to use them 
>   for automatic conversions (also known as "coercion map"). If a canonical 
>   morphism from `S` to `P` exists, then `P._coerce_map_from_(S)` should 
>   return True (it is also possible that it return the morphism to be used 
>   for automatic conversion). But be aware that this is only possible if 
>   the system of canonical morphisms is consistent: The identity map from 
>   P to P is a coercion map; there is at most one coercion map from S to 
>   P; and the composition of two coercion maps is a coercion map. 
>
> You can find a more detailed account on the category and coercion 
> framework including parents and elements in 
>
> http://doc.sagemath.org/html/en/thematic_tutorials/coercion_and_categories.html
>  
>
> For most combinatorial objects, 

[sage-combinat-devel] Re: Categories, Parents, Elements

2018-05-18 Thread Simon King
Hi Bruce,

On 2018-05-18, Bruce  wrote:
> As I understand it, in sage, the way to implement this is to have a 
> category.

Provided that what you are implementing does in fact form a mathematical
category (https://en.wikipedia.org/wiki/Category_(mathematics))

> However it seems there are two possibilities;
> I could put these methods in either ParentMethods or ElementMethods. I can 
> confused about which of these is preferable.

If you are talking about a method shared by all objects of the category:
It is ParentMethods. If you are talking about a method shared by
elements of objects of the category: It is ElementMethods.

> Let me be more specific. In mathematical terms I have things which I call 
> Tableaux.

When you say that *you* call it "Tableaux": Are you talking about a new
notion? Otherwise, you may find that what you want to implementing does
already exist in Sage. After all,

  sage: search_def("tableau")

gives plenty of things in Sage that have the word "tableau" in them.

> Then I can think of the set of Tableaux as the parent and lists of objects 
> as elements.

You say that you "think of the *set* of Tableaux" as the parent? That doesn't
sound promising at all. Although I don't know which notion you are using,
it seems likely to me that rather the *set* of all tableaux forms a category,
which means that each individual tableau is an object in that category.
And "parent" is just another word for "object of a sub-cateogory of the
category of sets". So, if there is a category of tableaux and if each
tableau has elements, then a tableau is a parent and its elements are,
well, its elements.

Is there a meaningful notion of a "morphism of tableaux" in your setting, so
that a morphism between two tableaux can be described as a mapping of
its elements? If there is, then it may certainly be reasonable to implement a
category of tableaux, with ParentMethods for generic implementations of
methods of tableaux and ElementMethods for generic implementations of
methods of elements of tableaux.

However, I think that this approach should really only be taken for
*generic* stuff that isn't time critical. The category framework should
not be used for specific implementations that depend on particular data
structures. These should rather be implemented in proper base classes.
And generic implementations tend to be slow, so if speed matters then it
should be implemented using special data structures and perhaps written
in Cython.

> The other problem I have is that I don't understand the Category, Parent, 
> Element structure. I have read the sage documentation
> and looked at the sage source code. The sage documentation seems more 
> focused on the needs of algebraic geometry than of combinatorics.

No surprise, since the mathematical notion of a category is intensely
used in algebra.

> I have struggled to find complete examples in the 
> combinat source code. As I understand it the key
> components are Parent.__init__  Element.__init__ _element_constructor_ but 
> I don't understand what these do or how they
> work together.

In a nutshell:

- If you implement a parent FOO, then FOO will be a subclass of
  sage.structure.parent.Parent, and at some point during FOO.__init__ the
  .__init__ methods of the base classes of FOO should of course be called.
  Hence, at some point, Parent.__init__(self, ...) will be called (maybe
  indirectly), and this is where the category of your new instance of FOO
  has to be declared.
- Similarly, if you are implementing the elements of FOO instance in a
  class BAR, then of course BAR will be a subclass of
  sage.structure.element.Element, and at some point during BAR.__init__
  also Element.__init__(self, P) has to be called (maybe indirectly),
  where P is the instance of FOO which `self` will be element of.
  Nothing more specific needs to be done in BAR.__init__ regarding the
  category framework.
- You did not mention another key component: Your class FOO has to have
  BAR assigned to a class attribute called "Element".
- FOO._element_constructor_ is a method that takes some arguments and
  returns an element of FOO. If P is an instance of FOO, then it ought
  to return an instance of P.element_class. Here, P.element_class is
  automatically created by Sage's category framework: It is a sub-class
  of both P.Element (i.e., BAR) and of P.category().parent_class (which
  is why FOO.__init__ needs to declare which category is to be used).
  It is in fact not always needed to implement FOO._element_constructor_
  explicitly: There is a default implementation, and having `FOO.Element=BAR`
  may be sufficient to make it work. But if there is particular input that
  BAR.__init__ won't handle then FOO._element_constructor_ is where you
  would implement a conversion.
  In that sense, _element_constructor_ is less of a key component than
  the `Element` attribute.
- Also, if your element class BAR implements arithmetic operations
  then you should 

[sage-combinat-devel] Re: Free partially commutative monoid associated to a graph

2018-04-22 Thread Travis Scrimshaw
Sorry for taking so long to answer this. In short, yes, it is. The group 
version is implemented in Sage under the name right-angled Artin group (see 
groups/raag.py). That code trivially lifts up to the monoid case. Although 
a list of the letters (rather than syllables) might be better data 
structure for the elements as there are no inverses to worry about.

Best,
Travis


On Sunday, March 25, 2018 at 11:23:35 AM UTC-5, Samuel Lelievre wrote:
>
> Dear sage-combinat-devel,
>
> Someone just asked on Ask Sage whether the
> free partially commutative monoid (or trace monoid)
> associated to a graph is implemented in Sage,
> and if not, how to do it.
>
> 
> https://ask.sagemath.org/question/41756/partially-commutative-monoid-of-a-graph/
>
> Maybe someone on this list has an answer?
>
> Searching the source seems to reveal there currently
> is no implementation in Sage, as both these commands
>
> sage: search_src("trace_monoid")
> sage: search_src("partially_commutative")
>
> return nothing.
>
> But maybe it is implemented under another name?
> Or an implementation exists in a ticket somewhere?
> Or someone here can suggest how to implement it?
>
> Thanks in advance,
> Samuel
>
>
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: End(CombinatorialFreeModule)?

2018-04-10 Thread Dima Pasechnik


On Thursday, December 6, 2012 at 12:47:53 PM UTC, Dima Pasechnik wrote:
>
> On 2012-12-06, Nicolas M. Thiery  wrote: 
> > On Thu, Dec 06, 2012 at 07:29:57AM +, Dima Pasechnik wrote: 
> >> I wonder if one can actually work in the endomorphism ring/algebra of a 
> >> CombinatorialFreeModule, and if yes, how. 
> > 
> > Not yet. I guess the closest approximation would be to take V \otimes V. 
> > But of course it is not endowed with composition, and it should really 
> > be V^* \otimes V (which makes a difference in non finite dimension). 
> > 
> >> Examples most appreciated. (Ideally, I would like to know how to 
> >> work with algebras specified by multiplication coefficients in this 
> >> framework) 
> > 
> > I am not sure what you mean. Can you be a bit more specific? 
> say, I have a permutation group acting on the basis elements of a 
> CombinatorialFreeModule, and I want to get hold of the endomorphisms 
> commuting with this action. Then it would be natural to represent 
> the ring of such endomorphisms by the multiplication coefficients. 
> (i.e. construct a regular representation of this ring). 
>
>
Another canonical example of "natural" regular representations is the 
quotient of a polynomial ring over a 0-dimensional ideal.
Frankly, it is astonishing that given all the amount of stuff one can do 
with "combinatorial algebras", this is overlooked; this is perhaps the most
basic example of use of linear algebra in computational algebraic geometry, 
after all.

https://groups.google.com/d/msg/sage-support/6Gprakjj1xQ/42E0LYfTBQAJ

 

> Best, 
> Dima 
>
>
> > 
> > Cheers, 
> > Nicolas 
> > -- 
> > Nicolas M. Thiéry "Isil"  
> > http://Nicolas.Thiery.name/ 
> > 
>
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: Crystals not displaying

2017-06-03 Thread Dima Pasechnik
also, could you please post here the logfile of dot2tex installation:
it is  SAGEROOT/logs/pkgs/dot2tex-2.9.0.p1.log

On Friday, June 2, 2017 at 11:41:50 PM UTC+1, Julie Beier wrote:
>
> This returns false.
>
> On Friday, June 2, 2017 at 4:59:39 PM UTC-4, Dima Pasechnik wrote:
>>
>>
>>
>> On Friday, June 2, 2017 at 9:01:08 PM UTC+1, Julie Beier wrote:
>>>
>>> Hi Dima,
>>>
>>> I get errors when I do this in Sagenb (which is my usual place) and when 
>>> I run it in Terminal.  (I've always installed the .dmg and not the .app 
>>> version.)  The errors are slightly different but both have to do with an 
>>> inability to compile the tex code.  This is why I am so confused.  I don't 
>>> really understand why the tex code should be different when all the builds 
>>> are the same. 
>>>
>>
>> OSX has its own unique ways to torture developers (and they keep 
>> "improving" them :-)),
>> that's why it seems that Sage suffers from lack of testing on OSX...
>>
>>
>> Could you check if
>>
>> sage: import dot2tex
>>
>> works?
>>
>> And one more sanity check:
>>
>> sage: from sage.graphs.dot2tex_utils import have_dot2tex
>> sage: have_dot2tex()
>>
>> Does this return True? (have_dot2tex() is some old function still used in 
>> that code...)
>>
>>
>>
>> With sagenb it's not working, and will not work; sagenb is 
>> deprecated---switch to jupyter notebooks
>> (one advantage is that they can be used on SMC)
>>
>>
>>  
>>
>>>
>>> I'll note that I know others who have run into this problem (I've had 
>>> this problem since I updated SAGE in 2013) and they have just given up.
>>>
>>> Thanks,
>>> Julie
>>>
>>> On Friday, June 2, 2017 at 4:55:42 AM UTC-4, Dima Pasechnik wrote:



 On Friday, June 2, 2017 at 1:16:19 AM UTC+1, Julie Beier wrote:
>
> Current version of SAGE: 7.5.1 though this happened with several 
> versions, all binary install
> Operating System: OSX 10.11.6
> Version of Tex: Version 3.14159265-2.6-1.40.17 (TeX Live 2016); All 
> packages up to date
>
> As previously mentioned, this was all what matches on the cloud for 
> SAGE and Tex.
>

 Thanks, I guess I know where the problem is - it is in Sagenb;
 one more piece of the puzzle: how do you start and run Sage?
 Possibilities are: 

 Terminal  : should work (works for me)
 OSX app : I don't know
 Sagenb (the "classical" Sage notebook) : displaying this does not work 
 for me, and most probably won't be fixed
 jupyter notebook : should work (works for me)

 Thus, I am able to get an error if I try your code in Sagenb (although 
 the error looks different...)

 One option   for you would be switching to jupyter notebook, but for 
 this you probably needed
 a newer version of Sage.
 The other option would be to run the Sage in OSX terminal - then the 
 output should get displayed in a tab of your default browser.
 Could you try the latter?
 (if this still fails, to be sure it's not OSX app problem, could you 
 install a non-app version - i.e. the filename should not end with 
 .app.dmg, 
 but just with 64.dmg)









 Could you please try this with non-app version of Sage, and run Sage in 
 terminal.
  

>
> On Thursday, June 1, 2017 at 4:49:57 PM UTC-4, Dima Pasechnik wrote:
>>
>>
>>
>> On Thursday, June 1, 2017 at 8:34:55 PM UTC+1, Julie Beier wrote:
>>>
>>> So I guess this was the point of my message.  What you just posted 
>>> does *not* work for me.  It says True for dot2tex installed, but I 
>>> get the two different tex files (doing this on my computer versus on 
>>> the 
>>> cloud) and on my computer it does not generate something that works.  
>>>
>>
>> We need more details about your computer: Sage version, operating 
>> system, whether it was compiled from source or installed as a binary, 
>> what 
>> version of TeX is installed.
>>
>>   
>>
>>
>>> On Thursday, June 1, 2017 at 3:18:04 PM UTC-4, Dima Pasechnik wrote:



 On Thursday, June 1, 2017 at 7:57:22 PM UTC+1, Julie Beier wrote:
>
> Dima,
>
> Sorry but I'm not sure I understand.  I followed the directions in 
> the sage help that say to do sage -i 'dot2tex'.  That is done.  But 
> it 
> still creates the different tex files, and I still have the problem. 
>

 the following works for me on a local Sage install (it's 8.0.beta8, 
 but it should not matter)

 sage: is_package_installed("dot2tex") # sanity check
 True
 sage: B = crystals.Tableaux(['A',2], shape=[2,1])
 sage: view(B) # opens a tab in the browser with the picture


  

>  Nicolas's work around makes the small example he posted work, but 
> 

Re: [sage-combinat-devel] Re: Crystals not displaying

2017-06-02 Thread Dima Pasechnik


On Friday, June 2, 2017 at 1:16:19 AM UTC+1, Julie Beier wrote:
>
> Current version of SAGE: 7.5.1 though this happened with several versions, 
> all binary install
> Operating System: OSX 10.11.6
> Version of Tex: Version 3.14159265-2.6-1.40.17 (TeX Live 2016); All 
> packages up to date
>
> As previously mentioned, this was all what matches on the cloud for SAGE 
> and Tex.
>

Thanks, I guess I know where the problem is - it is in Sagenb;
one more piece of the puzzle: how do you start and run Sage?
Possibilities are: 

Terminal  : should work (works for me)
OSX app : I don't know
Sagenb (the "classical" Sage notebook) : displaying this does not work for 
me, and most probably won't be fixed
jupyter notebook : should work (works for me)

Thus, I am able to get an error if I try your code in Sagenb (although the 
error looks different...)

One option   for you would be switching to jupyter notebook, but for this 
you probably needed
a newer version of Sage.
The other option would be to run the Sage in OSX terminal - then the output 
should get displayed in a tab of your default browser.
Could you try the latter?
(if this still fails, to be sure it's not OSX app problem, could you 
install a non-app version - i.e. the filename should not end with .app.dmg, 
but just with 64.dmg)









Could you please try this with non-app version of Sage, and run Sage in 
terminal.
 

>
> On Thursday, June 1, 2017 at 4:49:57 PM UTC-4, Dima Pasechnik wrote:
>>
>>
>>
>> On Thursday, June 1, 2017 at 8:34:55 PM UTC+1, Julie Beier wrote:
>>>
>>> So I guess this was the point of my message.  What you just posted does 
>>> *not* work for me.  It says True for dot2tex installed, but I get the 
>>> two different tex files (doing this on my computer versus on the cloud) and 
>>> on my computer it does not generate something that works.  
>>>
>>
>> We need more details about your computer: Sage version, operating system, 
>> whether it was compiled from source or installed as a binary, what version 
>> of TeX is installed.
>>
>>   
>>
>>
>>> On Thursday, June 1, 2017 at 3:18:04 PM UTC-4, Dima Pasechnik wrote:



 On Thursday, June 1, 2017 at 7:57:22 PM UTC+1, Julie Beier wrote:
>
> Dima,
>
> Sorry but I'm not sure I understand.  I followed the directions in the 
> sage help that say to do sage -i 'dot2tex'.  That is done.  But it still 
> creates the different tex files, and I still have the problem. 
>

 the following works for me on a local Sage install (it's 8.0.beta8, but 
 it should not matter)

 sage: is_package_installed("dot2tex") # sanity check
 True
 sage: B = crystals.Tableaux(['A',2], shape=[2,1])
 sage: view(B) # opens a tab in the browser with the picture


  

>  Nicolas's work around makes the small example he posted work, but it 
> doesn't work for the crystals.  Was I supposed to install dot2tex 
> differently?
>
 you can have more than one Sage install (well, in principle, that is)
 (Or indeed Sage version matters...)

  

>
> J
>
> On Thursday, June 1, 2017 at 2:40:04 PM UTC-4, Dima Pasechnik wrote:
>>
>>
>>
>> On Thursday, June 1, 2017 at 7:23:29 PM UTC+1, Julie Beier wrote:
>>>
>>> All,
>>>
>>> Thanks all for the help; glad to know it wasn't just something 
>>> trivial that I missed.
>>>
>>> This work around doesn't seem to work for whole crystals as there is 
>>> no set_latex_options option.  Anyway to work around the problem there?
>>>
>>
>> IMHO you should check if you indeed had installed dot2tex package, 
>> for the crystals.* example you posted as not
>> working, works for me after   I installed dot2tex (you might have to 
>> quit and start your Sage session, at least, after the
>> installation)
>>
>>
>>> Best,
>>>
>>> Julie
>>>
>>> On Thursday, June 1, 2017 at 2:01:14 PM UTC-4, Nicolas M. Thiéry 
>>> wrote:

 On Thu, Jun 01, 2017 at 12:02:19AM -0700, Dima Pasechnik wrote: 
 >How does one switch to using dot2tex for this example, too? 

 sage: t = StandardTableaux(4).random_element() 
 sage: G = DiGraph([[t,t]], loops=True) 
 sage: G.set_latex_options(format="dot2tex")   # <== 
 sage: view(G) 

 Cheers, 
 Nicolas 
 -- 
 Nicolas M. Thiéry "Isil"  
 http://Nicolas.Thiery.name/ 

>>>

-- 
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 https://groups.google.com/group/sage-combinat-devel.

Re: [sage-combinat-devel] Re: Crystals not displaying

2017-06-01 Thread Dima Pasechnik


On Thursday, June 1, 2017 at 8:34:55 PM UTC+1, Julie Beier wrote:
>
> So I guess this was the point of my message.  What you just posted does 
> *not* work for me.  It says True for dot2tex installed, but I get the two 
> different tex files (doing this on my computer versus on the cloud) and on 
> my computer it does not generate something that works.  
>

We need more details about your computer: Sage version, operating system, 
whether it was compiled from source or installed as a binary, what version 
of TeX is installed.

  


> On Thursday, June 1, 2017 at 3:18:04 PM UTC-4, Dima Pasechnik wrote:
>>
>>
>>
>> On Thursday, June 1, 2017 at 7:57:22 PM UTC+1, Julie Beier wrote:
>>>
>>> Dima,
>>>
>>> Sorry but I'm not sure I understand.  I followed the directions in the 
>>> sage help that say to do sage -i 'dot2tex'.  That is done.  But it still 
>>> creates the different tex files, and I still have the problem. 
>>>
>>
>> the following works for me on a local Sage install (it's 8.0.beta8, but 
>> it should not matter)
>>
>> sage: is_package_installed("dot2tex") # sanity check
>> True
>> sage: B = crystals.Tableaux(['A',2], shape=[2,1])
>> sage: view(B) # opens a tab in the browser with the picture
>>
>>
>>  
>>
>>>  Nicolas's work around makes the small example he posted work, but it 
>>> doesn't work for the crystals.  Was I supposed to install dot2tex 
>>> differently?
>>>
>> you can have more than one Sage install (well, in principle, that is)
>> (Or indeed Sage version matters...)
>>
>>  
>>
>>>
>>> J
>>>
>>> On Thursday, June 1, 2017 at 2:40:04 PM UTC-4, Dima Pasechnik wrote:



 On Thursday, June 1, 2017 at 7:23:29 PM UTC+1, Julie Beier wrote:
>
> All,
>
> Thanks all for the help; glad to know it wasn't just something trivial 
> that I missed.
>
> This work around doesn't seem to work for whole crystals as there is 
> no set_latex_options option.  Anyway to work around the problem there?
>

 IMHO you should check if you indeed had installed dot2tex package, for 
 the crystals.* example you posted as not
 working, works for me after   I installed dot2tex (you might have to 
 quit and start your Sage session, at least, after the
 installation)


> Best,
>
> Julie
>
> On Thursday, June 1, 2017 at 2:01:14 PM UTC-4, Nicolas M. Thiéry wrote:
>>
>> On Thu, Jun 01, 2017 at 12:02:19AM -0700, Dima Pasechnik wrote: 
>> >How does one switch to using dot2tex for this example, too? 
>>
>> sage: t = StandardTableaux(4).random_element() 
>> sage: G = DiGraph([[t,t]], loops=True) 
>> sage: G.set_latex_options(format="dot2tex")   # <== 
>> sage: view(G) 
>>
>> Cheers, 
>> Nicolas 
>> -- 
>> Nicolas M. Thiéry "Isil"  
>> http://Nicolas.Thiery.name/ 
>>
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: Crystals not displaying

2017-06-01 Thread Dima Pasechnik


On Thursday, June 1, 2017 at 7:57:22 PM UTC+1, Julie Beier wrote:
>
> Dima,
>
> Sorry but I'm not sure I understand.  I followed the directions in the 
> sage help that say to do sage -i 'dot2tex'.  That is done.  But it still 
> creates the different tex files, and I still have the problem. 
>

the following works for me on a local Sage install (it's 8.0.beta8, but it 
should not matter)

sage: is_package_installed("dot2tex") # sanity check
True
sage: B = crystals.Tableaux(['A',2], shape=[2,1])
sage: view(B) # opens a tab in the browser with the picture


 

>  Nicolas's work around makes the small example he posted work, but it 
> doesn't work for the crystals.  Was I supposed to install dot2tex 
> differently?
>
you can have more than one Sage install (well, in principle, that is)
(Or indeed Sage version matters...)

 

>
> J
>
> On Thursday, June 1, 2017 at 2:40:04 PM UTC-4, Dima Pasechnik wrote:
>>
>>
>>
>> On Thursday, June 1, 2017 at 7:23:29 PM UTC+1, Julie Beier wrote:
>>>
>>> All,
>>>
>>> Thanks all for the help; glad to know it wasn't just something trivial 
>>> that I missed.
>>>
>>> This work around doesn't seem to work for whole crystals as there is no 
>>> set_latex_options option.  Anyway to work around the problem there?
>>>
>>
>> IMHO you should check if you indeed had installed dot2tex package, for 
>> the crystals.* example you posted as not
>> working, works for me after   I installed dot2tex (you might have to quit 
>> and start your Sage session, at least, after the
>> installation)
>>
>>
>>> Best,
>>>
>>> Julie
>>>
>>> On Thursday, June 1, 2017 at 2:01:14 PM UTC-4, Nicolas M. Thiéry wrote:

 On Thu, Jun 01, 2017 at 12:02:19AM -0700, Dima Pasechnik wrote: 
 >How does one switch to using dot2tex for this example, too? 

 sage: t = StandardTableaux(4).random_element() 
 sage: G = DiGraph([[t,t]], loops=True) 
 sage: G.set_latex_options(format="dot2tex")   # <== 
 sage: view(G) 

 Cheers, 
 Nicolas 
 -- 
 Nicolas M. Thiéry "Isil"  
 http://Nicolas.Thiery.name/ 

>>>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: Crystals not displaying

2017-06-01 Thread Dima Pasechnik


On Thursday, June 1, 2017 at 7:23:29 PM UTC+1, Julie Beier wrote:
>
> All,
>
> Thanks all for the help; glad to know it wasn't just something trivial 
> that I missed.
>
> This work around doesn't seem to work for whole crystals as there is no 
> set_latex_options option.  Anyway to work around the problem there?
>

IMHO you should check if you indeed had installed dot2tex package, for the 
crystals.* example you posted as not
working, works for me after   I installed dot2tex (you might have to quit 
and start your Sage session, at least, after the
installation)


> Best,
>
> Julie
>
> On Thursday, June 1, 2017 at 2:01:14 PM UTC-4, Nicolas M. Thiéry wrote:
>>
>> On Thu, Jun 01, 2017 at 12:02:19AM -0700, Dima Pasechnik wrote: 
>> >How does one switch to using dot2tex for this example, too? 
>>
>> sage: t = StandardTableaux(4).random_element() 
>> sage: G = DiGraph([[t,t]], loops=True) 
>> sage: G.set_latex_options(format="dot2tex")   # <== 
>> sage: view(G) 
>>
>> Cheers, 
>> Nicolas 
>> -- 
>> Nicolas M. Thiéry "Isil"  
>> http://Nicolas.Thiery.name/ 
>>
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [CoCalc] Re: [sage-combinat-devel] Re: Crystals not displaying

2017-06-01 Thread Dima Pasechnik
Right, it is in fact invoking show(), which is

File: 
/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py
   Source:
   def show(*objs, **kwds):
"""
Show a 2d or 3d graphics object (or objects), animation, or
matplotlib figure, or show an
expression typeset nicely using LaTeX.

On Thu, Jun 1, 2017 at 2:06 PM, Harald Schilly  wrote:
> On Thu, Jun 1, 2017 at 2:59 PM, Dima Pasechnik  wrote:
>> right, sorry, I mean a sagews notebook running Sage.
>> I did not try other SMC Sage interfaces.
>
> Yes, there is probably somewhere this "show" function involved, which
> has the same name but a different implementation -- please don't ask
> me about any details, I'm just pretty sure that this is what's going
> on here :-)
>
> -- harald

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [CoCalc] Re: [sage-combinat-devel] Re: Crystals not displaying

2017-06-01 Thread Harald Schilly
On Thu, Jun 1, 2017 at 2:59 PM, Dima Pasechnik  wrote:
> right, sorry, I mean a sagews notebook running Sage.
> I did not try other SMC Sage interfaces.

Yes, there is probably somewhere this "show" function involved, which
has the same name but a different implementation -- please don't ask
me about any details, I'm just pretty sure that this is what's going
on here :-)

-- harald

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [CoCalc] Re: [sage-combinat-devel] Re: Crystals not displaying

2017-06-01 Thread Dima Pasechnik
On Thu, Jun 1, 2017 at 1:46 PM, Harald Schilly  wrote:
> On Thu, Jun 1, 2017 at 9:02 AM, Dima Pasechnik  wrote:
>> By the way, this example does work on SMC, so they must be doing something
>> non-standard here.
>> What is that?
>
> Hi, you need to be more precise, since CoCalc has a rather large
> feature surface. In case you mean "sagews" files, they have nothing to
> do with "sagemath", except that they use it as a back-end.

right, sorry, I mean a sagews notebook running Sage.
I did not try other SMC Sage interfaces.

>
> -- harald

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [CoCalc] Re: [sage-combinat-devel] Re: Crystals not displaying

2017-06-01 Thread Harald Schilly
On Thu, Jun 1, 2017 at 9:02 AM, Dima Pasechnik  wrote:
> By the way, this example does work on SMC, so they must be doing something
> non-standard here.
> What is that?

Hi, you need to be more precise, since CoCalc has a rather large
feature surface. In case you mean "sagews" files, they have nothing to
do with "sagemath", except that they use it as a back-end.

-- harald

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: Crystals not displaying

2017-06-01 Thread Dima Pasechnik


On Wednesday, May 31, 2017 at 2:24:55 PM UTC+1, Nicolas M. Thiéry wrote:
>
>Hi, 
>
> I am investigating this. Current status: 
>
> Remember that graphs can be latex rendered in two ways: either by 
> having Sage produce tikz manually (1), or through dot2tex (2). For 
> general graphs, the former is the default. For graphs produced from 
> crystals, the default is to use (2) if dot2tex is installed, and (1) 
> otherwise. At the end the issue is not in dot2tex: its presence just 
> hides the bug. 
>
> Here is my current minimal example, which breaks independently of 
> dot2tex: 
>
> sage: t = StandardTableaux(4).random_element() 
> sage: G = DiGraph([[t,t]], loops=True) 
> sage: latex(G) 
> **produces something** 
> sage: view(G) 
> **boom** 
>

How does one switch to using dot2tex for this example, too?

By the way, this example does work on SMC, so they must be doing something 
non-standard here.
What is that?
 

>
> On Tue, May 30, 2017 at 11:43:13PM -0700, Dima Pasechnik wrote: 
> >I can confirm that 
> >B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, tightpage=True) 
> >does not work with the latest Sage beta. 
> >It looks as if some tikz-related stuff in the TeX file header 
> >is messed up. 
> >On Wednesday, May 31, 2017 at 7:38:29 AM UTC+1, Dima Pasechnik wrote: 
> > 
> >Perhaps SMC people can explain where the discrepancy in the TeX 
> output 
> >comes from. 
> >I cc to the relevant group. 
> >On Monday, May 29, 2017 at 9:48:45 PM UTC+1, Julie Beier wrote: 
> > 
> >I have been trying to use the tableaux crystal pictures in Sage and, 
> >while it works on the cloud, it does not work on my computer.  I have 
> >updated Sage (then reverted to the version of Sage used on the 
> cloud), 
> >updated on my LaTeX packages, and installed dot2tex.  The code I'm 
> >using is from the help pages: B = crystals.Tableaux(['A',2], 
> >shape=[2,1]); view(B, tightpage=True).  The Tex files generated by 
> the 
> >cloud and by my computer are different.  The one generated by the 
> cloud 
> >compiles, but the one from my computer does not.  I've attached 
> these. 
> > Any ideas?  Thanks for your help! 
> > 
> >-- 
> >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 [1]sage-combinat-devel+unsubscr...@googlegroups.com 
> . 
> >To post to this group, send email to 
> >[2]sage-comb...@googlegroups.com . 
> >Visit this group at 
> >[3]https://groups.google.com/group/sage-combinat-devel. 
> >For more options, visit [4]https://groups.google.com/d/optout. 
> > 
> > References 
> > 
> >1. mailto:sage-combinat-devel+unsubscr...@googlegroups.com 
>  
> >2. mailto:sage-comb...@googlegroups.com  
> >3. https://groups.google.com/group/sage-combinat-devel 
> >4. https://groups.google.com/d/optout 
>
> Nicolas 
> -- 
> Nicolas M. Thiéry "Isil"  
> http://Nicolas.Thiery.name/ 
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Crystals not displaying

2017-06-01 Thread Dima Pasechnik
This was also reported here:
https://tex.stackexchange.com/questions/342983/on-drawing-a-crystal-graph-i-have-a-trouble-illegal-parameter-number-in-defi

How about we at least open a trac ticket to deal with this?


On Monday, May 29, 2017 at 9:48:45 PM UTC+1, Julie Beier wrote:
>
> I have been trying to use the tableaux crystal pictures in Sage and, while 
> it works on the cloud, it does not work on my computer.  I have updated 
> Sage (then reverted to the version of Sage used on the cloud), updated on 
> my LaTeX packages, and installed dot2tex.  The code I'm using is from the 
> help pages: B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, 
> tightpage=True).  The Tex files generated by the cloud and by my computer 
> are different.  The one generated by the cloud compiles, but the one from 
> my computer does not.  I've attached these.  Any ideas?  Thanks for your 
> help!
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: Crystals not displaying

2017-05-31 Thread Nicolas M. Thiery

Update:

- Up to trivial comments, the default latex output has not changed
  since Sage 6.7beta3 (at least). view fails similarly with that
  version.

- A slightly smaller example:

sage: t = Partition([1])
sage: G = DiGraph([[t,t]], loops=True)
sage: latex(G)
\begin{tikzpicture}
\definecolor{cv0}{rgb}{0.0,0.0,0.0}
\definecolor{cfv0}{rgb}{1.0,1.0,1.0}
\definecolor{clv0}{rgb}{0.0,0.0,0.0}
\definecolor{cv0v0}{rgb}{0.0,0.0,0.0}
%
\Vertex[style={minimum 
size=1.0cm,draw=cv0,fill=cfv0,text=clv0,shape=circle},LabelOut=false,L=\hbox{${\def\lr#1{\multicolumn{1}{|@{\hspace{.6ex}}c@{\hspace{.6ex}}|}{\raisebox{-.3ex}{$#1$}}}
\raisebox{-.6ex}{$\begin{array}[b]{*{1}c}\cline{1-1}
\lr{\phantom{x}}\\\cline{1-1}
\end{array}$}
}$},x=2.5cm,y=2.5cm]{v0}
%
\Loop[dist=3.0cm,dir=NO,style={color=cv0v0,},](v0)
%
\end{tikzpicture}
sage: view(G)
**boom**

So I suspect that either that error went undetected for a long time,
or it comes from a change in tikz which makes the above code more
fragile.

Anyone a suggestion on how to tweak the above output to make it robust?

Cheers,
Nicolas

On Wed, May 31, 2017 at 09:16:05AM -0400, Nicolas M. Thiery wrote:
> Remember that graphs can be latex rendered in two ways: either by
> having Sage produce tikz manually (1), or through dot2tex (2). For
> general graphs, the former is the default. For graphs produced from
> crystals, the default is to use (2) if dot2tex is installed, and (1)
> otherwise. At the end the issue is not in dot2tex: its presence just
> hides the bug.
> 
> Here is my current minimal example, which breaks independently of
> dot2tex:
> 
> sage: t = StandardTableaux(4).random_element()
> sage: G = DiGraph([[t,t]], loops=True)
> sage: latex(G)
> **produces something**
> sage: view(G)
> **boom**
> 
> On Tue, May 30, 2017 at 11:43:13PM -0700, Dima Pasechnik wrote:
> >I can confirm that
> >B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, tightpage=True)
> >does not work with the latest Sage beta.
> >It looks as if some tikz-related stuff in the TeX file header
> >is messed up.
> >On Wednesday, May 31, 2017 at 7:38:29 AM UTC+1, Dima Pasechnik wrote:
> > 
> >Perhaps SMC people can explain where the discrepancy in the TeX output
> >comes from.
> >I cc to the relevant group.
> >On Monday, May 29, 2017 at 9:48:45 PM UTC+1, Julie Beier wrote:
> > 
> >I have been trying to use the tableaux crystal pictures in Sage and,
> >while it works on the cloud, it does not work on my computer.  I have
> >updated Sage (then reverted to the version of Sage used on the cloud),
> >updated on my LaTeX packages, and installed dot2tex.  The code I'm
> >using is from the help pages: B = crystals.Tableaux(['A',2],
> >shape=[2,1]); view(B, tightpage=True).  The Tex files generated by the
> >cloud and by my computer are different.  The one generated by the cloud
> >compiles, but the one from my computer does not.  I've attached these.
> > Any ideas?  Thanks for your help!
> > 
> >--
> >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 [1]sage-combinat-devel+unsubscr...@googlegroups.com.
> >To post to this group, send email to
> >[2]sage-combinat-devel@googlegroups.com.
> >Visit this group at
> >[3]https://groups.google.com/group/sage-combinat-devel.
> >For more options, visit [4]https://groups.google.com/d/optout.
> > 
> > References
> > 
> >1. mailto:sage-combinat-devel+unsubscr...@googlegroups.com
> >2. mailto:sage-combinat-devel@googlegroups.com
> >3. https://groups.google.com/group/sage-combinat-devel
> >4. https://groups.google.com/d/optout
> 
>   Nicolas
> --
> Nicolas M. Thiéry "Isil" 
> http://Nicolas.Thiery.name/
> 
> -- 
> 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 https://groups.google.com/group/sage-combinat-devel.
> For more options, visit https://groups.google.com/d/optout.
Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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 

Re: [sage-combinat-devel] Re: Crystals not displaying

2017-05-31 Thread Nicolas M. Thiery
Hi,

I am investigating this. Current status:

Remember that graphs can be latex rendered in two ways: either by
having Sage produce tikz manually (1), or through dot2tex (2). For
general graphs, the former is the default. For graphs produced from
crystals, the default is to use (2) if dot2tex is installed, and (1)
otherwise. At the end the issue is not in dot2tex: its presence just
hides the bug.

Here is my current minimal example, which breaks independently of
dot2tex:

sage: t = StandardTableaux(4).random_element()
sage: G = DiGraph([[t,t]], loops=True)
sage: latex(G)
**produces something**
sage: view(G)
**boom**

On Tue, May 30, 2017 at 11:43:13PM -0700, Dima Pasechnik wrote:
>I can confirm that
>B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, tightpage=True)
>does not work with the latest Sage beta.
>It looks as if some tikz-related stuff in the TeX file header
>is messed up.
>On Wednesday, May 31, 2017 at 7:38:29 AM UTC+1, Dima Pasechnik wrote:
> 
>Perhaps SMC people can explain where the discrepancy in the TeX output
>comes from.
>I cc to the relevant group.
>On Monday, May 29, 2017 at 9:48:45 PM UTC+1, Julie Beier wrote:
> 
>I have been trying to use the tableaux crystal pictures in Sage and,
>while it works on the cloud, it does not work on my computer.  I have
>updated Sage (then reverted to the version of Sage used on the cloud),
>updated on my LaTeX packages, and installed dot2tex.  The code I'm
>using is from the help pages: B = crystals.Tableaux(['A',2],
>shape=[2,1]); view(B, tightpage=True).  The Tex files generated by the
>cloud and by my computer are different.  The one generated by the cloud
>compiles, but the one from my computer does not.  I've attached these.
> Any ideas?  Thanks for your help!
> 
>--
>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 [1]sage-combinat-devel+unsubscr...@googlegroups.com.
>To post to this group, send email to
>[2]sage-combinat-devel@googlegroups.com.
>Visit this group at
>[3]https://groups.google.com/group/sage-combinat-devel.
>For more options, visit [4]https://groups.google.com/d/optout.
> 
> References
> 
>1. mailto:sage-combinat-devel+unsubscr...@googlegroups.com
>2. mailto:sage-combinat-devel@googlegroups.com
>3. https://groups.google.com/group/sage-combinat-devel
>4. https://groups.google.com/d/optout

Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: [CoCalc] Re: Crystals not displaying

2017-05-31 Thread Harald Schilly
On Wed, May 31, 2017 at 12:02 PM, Dima Pasechnik  wrote:
> oops, it does work after I install dot2tex by doing
>
> sage -i dot2tex

Well, I can only confirm, that dot2tex is installed on CoCalc...

Better error messages and sanity checks FTW :-)

-- harald

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Crystals not displaying

2017-05-31 Thread Dima Pasechnik


On Wednesday, May 31, 2017 at 7:43:14 AM UTC+1, Dima Pasechnik wrote:
>
> I can confirm that 
> B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, tightpage=True) 
> does not work with the latest Sage beta. 
> It looks as if some tikz-related stuff in the TeX file header
> is messed up.
>

oops, it does work after I install dot2tex by doing

sage -i dot2tex

So perhaps the only issue is that without it it should signal a more 
meaningful error...


 

>
> On Wednesday, May 31, 2017 at 7:38:29 AM UTC+1, Dima Pasechnik wrote:
>>
>> Perhaps SMC people can explain where the discrepancy in the TeX output 
>> comes from.
>> I cc to the relevant group.
>>
>> On Monday, May 29, 2017 at 9:48:45 PM UTC+1, Julie Beier wrote:
>>>
>>> I have been trying to use the tableaux crystal pictures in Sage and, 
>>> while it works on the cloud, it does not work on my computer.  I have 
>>> updated Sage (then reverted to the version of Sage used on the cloud), 
>>> updated on my LaTeX packages, and installed dot2tex.  The code I'm using is 
>>> from the help pages: B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, 
>>> tightpage=True).  The Tex files generated by the cloud and by my computer 
>>> are different.  The one generated by the cloud compiles, but the one from 
>>> my computer does not.  I've attached these.  Any ideas?  Thanks for your 
>>> help!
>>>
>>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Crystals not displaying

2017-05-31 Thread Dima Pasechnik
I can confirm that 
B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, tightpage=True) 
does not work with the latest Sage beta. 
It looks as if some tikz-related stuff in the TeX file header
is messed up.

On Wednesday, May 31, 2017 at 7:38:29 AM UTC+1, Dima Pasechnik wrote:
>
> Perhaps SMC people can explain where the discrepancy in the TeX output 
> comes from.
> I cc to the relevant group.
>
> On Monday, May 29, 2017 at 9:48:45 PM UTC+1, Julie Beier wrote:
>>
>> I have been trying to use the tableaux crystal pictures in Sage and, 
>> while it works on the cloud, it does not work on my computer.  I have 
>> updated Sage (then reverted to the version of Sage used on the cloud), 
>> updated on my LaTeX packages, and installed dot2tex.  The code I'm using is 
>> from the help pages: B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, 
>> tightpage=True).  The Tex files generated by the cloud and by my computer 
>> are different.  The one generated by the cloud compiles, but the one from 
>> my computer does not.  I've attached these.  Any ideas?  Thanks for your 
>> help!
>>
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Improvements to FreeAlgebra

2017-03-31 Thread Simon King
Hi Travis,

On 2017-03-31, Travis Scrimshaw  wrote:
> I agree that this is something that should be fixed (actually 0 is not 
> recognized as being in a CFM, which is a bug IMO).

AFTER the fix from #22707?

> Well, we do have a number of CFM subclasses that explicitly have a total 
> ordering of the indices (e.g., symmetric functions and partitions by lex 
> order). However, I could see this being slower than as dicts for elements 
> with a lot of terms when you have to, e.g., add two elements: you have to 
> sort the two chains (which my interpretation of your description is a chain 
> is a singlely linked list).

Yes, addition is a problem with elements that are implemented as sorted lists,
but currently even the addition of big path algebra elements is faster than
addition of the corresponding free algebra elements:

 sage: R. = FreeAlgebra(QQ)
 sage: f = (x+y+z-1)^7
 sage: g = (x-y+z+1)^7
 sage: %timeit f+g
 1 loop, best of 3: 155 ms per loop
 sage: P = DiGraph({1:{1:['x','y','z']}}).path_semigroup().algebra(QQ)
 sage: P.inject_variables()
 Defining e_1, x, y, z
 sage: f = (x+y+z-1)^7
 sage: g = (x-y+z+1)^7
 sage: %timeit f+g
 1000 loops, best of 3: 1.35 ms per loop

Best regards,
Simon

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Improvements to FreeAlgebra

2017-03-31 Thread Travis Scrimshaw
Hey Simon,

>
> On 2017-03-29, Nicolas M. Thiery  
> wrote: 
> > It would be interesting to know specifically on which aspects the path 
> > algebra is improving on the current free algebra. The data structure 
> > of indices (i.e. words in the generators)? The data structure for 
> > representing linear combinations? The implementation of the product? 
> > 
> > Maybe some of those improvements could be lifted up to FreeModule in 
> > the first place, or provide an alternative generic implementation of 
> > it that would work better for your use case [1]. 
>
> My own use case is proper path algebras with *several* vertices. So, 
> FreeModule won't cover my own applications. 
>
> My comment was motivated by a question on sage-support. The question 
> has merely been about the fact that 1 is not recognised as an element 
> of a free algebra over ZZ, and while trying to give the user some 
> work-arounds, I played with different ways to create what mathematically 
> is a free associative algebra. 
>
> I agree that this is something that should be fixed (actually 0 is not 
recognized as being in a CFM, which is a bug IMO). I would just check to 
see if the element can be converted to the base ring, possibly putting 
something in CFM rather than FreeAlgebra which also checks if the CFM is in 
UnitalAlgebras.
 

> Why is it faster? 
> 1. Paths are implemented as BoundedIntegerSequences, which in turn 
>are implemented as bitsets. Concatenation ultimately relies on 
>bitshift operations, that are quite efficiently implemented in 
>MPR. 
> 2. Path algebra elements are implemented as ordered chain of terms 
>("chain" as in "a term is a C struct that has a pointer to 
>the next term"). 
>
> You can of course easily benefit from using 1. for the indices. 
> If you have n generators, then your indices simply are sequences 
> of integers bounded by n. 
> - Multiplication is list concatenation, which is faster than for 
>   Python tuples and (if I recall correctly) even faster than operations 
>   that are based on implementing integer sequences as C "*int".  

- CombinatorialFreeModule.Element is (IIRC) implemented as dictionary, 
>   where the indices are used as keys. BoundedIntegerSequence is 
>   faster than python tuples both in hash and comparison (in particular 
>   if the tuples have common starting sequences). 
>

We definitely could do this, and I would consider having a small 
intermediate layer of converting to/from the current indices (elements of a 
free group) for backwards compatibility.

There is also a little bit of a question of do we still want CFM to be the 
base class of FreeAlgebra since we have started to decouple the pieces of 
CFM (specifically, lifting more things to the category) and FreeAlgebra 
overrides a number of things. However, that is somewhat a separate issue 
that can be tackled once we handle speeding up the basic operations. 

>
> In fact, this is what has been done in an earlier implementation of 
> path algebras. However, 2. is still faster than an implementation that 
> expresses elements as dictionaries. But I guess you don't want 
> an implementation of CombinatorialFreeModuleElementWithMonomialOrdering. 
>
> Well, we do have a number of CFM subclasses that explicitly have a total 
ordering of the indices (e.g., symmetric functions and partitions by lex 
order). However, I could see this being slower than as dicts for elements 
with a lot of terms when you have to, e.g., add two elements: you have to 
sort the two chains (which my interpretation of your description is a chain 
is a singlely linked list).

Best,
Travis

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Improvements to FreeAlgebra

2017-03-30 Thread Simon King
Hi Nicolas,

On 2017-03-29, Nicolas M. Thiery  wrote:
> It would be interesting to know specifically on which aspects the path
> algebra is improving on the current free algebra. The data structure
> of indices (i.e. words in the generators)? The data structure for
> representing linear combinations? The implementation of the product?
>
> Maybe some of those improvements could be lifted up to FreeModule in
> the first place, or provide an alternative generic implementation of
> it that would work better for your use case [1].

My own use case is proper path algebras with *several* vertices. So,
FreeModule won't cover my own applications.

My comment was motivated by a question on sage-support. The question
has merely been about the fact that 1 is not recognised as an element 
of a free algebra over ZZ, and while trying to give the user some 
work-arounds, I played with different ways to create what mathematically 
is a free associative algebra.

Why is it faster?
1. Paths are implemented as BoundedIntegerSequences, which in turn
   are implemented as bitsets. Concatenation ultimately relies on
   bitshift operations, that are quite efficiently implemented in
   MPR.
2. Path algebra elements are implemented as ordered chain of terms
   ("chain" as in "a term is a C struct that has a pointer to
   the next term").

You can of course easily benefit from using 1. for the indices.
If you have n generators, then your indices simply are sequences 
of integers bounded by n.
- Multiplication is list concatenation, which is faster than for 
  Python tuples and (if I recall correctly) even faster than operations 
  that are based on implementing integer sequences as C "*int".
- CombinatorialFreeModule.Element is (IIRC) implemented as dictionary,
  where the indices are used as keys. BoundedIntegerSequence is
  faster than python tuples both in hash and comparison (in particular
  if the tuples have common starting sequences).

Examples:

sage: L1 = tuple(randint(0,49) for _ in range(1000))
sage: L2 = tuple(randint(0,49) for _ in range(1000))
sage: from sage.data_structures.bounded_integer_sequences import 
BoundedIntegerSequence
sage: BL1 = BoundedIntegerSequence(50, list(L1))
sage: BL2 = BoundedIntegerSequence(50, list(L2))
sage: %timeit BL1+BL2
100 loops, best of 3: 312 ns per loop
sage: %timeit L1+L2
10 loops, best of 3: 4.16 µs per loop
sage: %timeit hash(BL1)
1000 loops, best of 3: 83.5 ns per loop
sage: %timeit hash(L1)
10 loops, best of 3: 3.34 µs per loop
sage: CBL1 = BoundedIntegerSequence(50, list(L1))
sage: %timeit BL1==BL2
1000 loops, best of 3: 66.8 ns per loop
sage: %timeit BL1==CBL1
1000 loops, best of 3: 124 ns per loop
sage: CL1 = tuple(list(L1))
sage: %timeit L1==L2
1000 loops, best of 3: 53.8 ns per loop
sage: %timeit L1==CL1
10 loops, best of 3: 4.83 µs per loop

In fact, this is what has been done in an earlier implementation of
path algebras. However, 2. is still faster than an implementation that
expresses elements as dictionaries. But I guess you don't want
an implementation of CombinatorialFreeModuleElementWithMonomialOrdering.

Best regards,
Simon

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-27 Thread Harald Schilly
On Mon, Mar 27, 2017 at 5:50 PM, Matthew Rennekamp
 wrote:
> What are we going to do for the files and other publications?

publications will be on the main sagemath.org page, it's just that
there are two links in the menu missing.

-- h

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-27 Thread Matthew Rennekamp
What are we going to do for the files and other publications? Will those be
wiki pages with attachments, or redirect to something else?

On Mar 27, 2017 7:16 AM, "Nicolas M. Thiery" 
wrote:

> On Mon, Mar 27, 2017 at 01:11:24PM +0200, Harald Schilly wrote:
> > Ok, modulo some global dns changes and updates, things like this work:
> >
> > combinat.sagemath.org/Installation -> wiki.sagemath.org/combinat/
> Installation
>
> Great; working smoothly here. Finally our page is back. Thanks a lot!
>
> Cheers,
> Nicolas
> --
> Nicolas M. Thiéry "Isil" 
> http://Nicolas.Thiery.name/
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-combinat-devel" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/sage-combinat-devel/yqUlWqc4Ue4/unsubscribe.
> To unsubscribe from this group and all its topics, 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 https://groups.google.com/group/sage-combinat-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-27 Thread Matthew Rennekamp
It makes sense functionally, but I don't see why we should add more pages
for the files (combinat.sagemath.org/* redirecting to
wiki.sagemath.org/combinat/*) as opposed to only
combinat.sagemath.org/index.html redirecting.

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-27 Thread Nicolas M. Thiery
On Mon, Mar 27, 2017 at 01:11:24PM +0200, Harald Schilly wrote:
> Ok, modulo some global dns changes and updates, things like this work:
> 
> combinat.sagemath.org/Installation -> wiki.sagemath.org/combinat/Installation

Great; working smoothly here. Finally our page is back. Thanks a lot!

Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-27 Thread Harald Schilly
On Mon, Mar 27, 2017 at 12:47 PM, Harald Schilly
 wrote:
> I'll report back when this is working.

Ok, modulo some global dns changes and updates, things like this work:

combinat.sagemath.org/Installation -> wiki.sagemath.org/combinat/Installation

-- harald

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-27 Thread Harald Schilly
On Sat, Mar 25, 2017 at 2:02 AM, Anne Schilling  wrote:
>> https://github.com/sagemath/publications

> Is just pushed a couple of updates to the references to the repository.
> I hope you can see them.

Unfortunately no ... but ok, I see what's going on. What's missing is
that you go to your own clone of the publications repository [1] and
create a "pull request".

The flow is this:

1. commit and publish to your clone (what you did)
2. create a pull request
3. that sends me (and some others) an email that there is something
available for merging
4. Also "travis-CI" [2] does get a notification and will run a test
build with your changes.
5.1. If travis is happy, I'll merge it and publish the changes.
5.2 if travis is not happy, there won't be a merge. You then have to
fix your changes in your branch and the pull request updates, a new
build is triggered,etc. There is a small box in the pull request
telling you about the travis-ci status. In it is a link to see the
build log to spot the error. If there is a problem, it's usually some
bad formatting of bibtex.

[1] https://github.com/anneschilling/publications/
[2] https://travis-ci.org/sagemath/publications

-- harald

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-27 Thread Harald Schilly
On Fri, Mar 24, 2017 at 11:33 PM, Nicolas M. Thiery
 wrote:
> All we
> need is to have http://combinat.sagemath.org redirect to
> https://wiki.sagemath.org/combinat/ for "backward compatibility" with
> references in e.g. published papers.

Uhm ok, I'll try to create a redirect like this

 http://combinat.sagemath.org/$1 -> https://wiki.sagemath.org/combinat/$1

The problem is, we don't need github for that. Well, there is a
repository now, maybe at some point it will be of use, but that
redirect isn't touching it.

I'll report back when this is working.

-- harald

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-24 Thread Anne Schilling
On 3/24/17 9:32 AM, Harald Schilly wrote:
> On Fri, Mar 24, 2017 at 5:47 AM, Anne Schilling  wrote:
>>> http://www.sagemath.org/library-publications-combinat.html
>>>
>>> ?
>>
>> Yes, thank you! I see that some references are outdated and some new
>> can be added. I will add those soon.
> 
> Well, a while ago nathan cohen submitted a few patches to get rid of
> those references from sagemath.org. Maybe I should add the entries
> back?
> 
> But anyways, submissions to the publication lists go through
> https://github.com/sagemath/publications
> I think it's good to collect all of them at a central place.
> 
> The sagemath/website repo references it as a submodule and uses the
> generated html files in its templates. There is no deep magic going
> on. I'm happy if someone helps with the publications repo. there are a
> couple of open tasks, etc.

Is just pushed a couple of updates to the references to the repository.
I hope you can see them.

I encourage everyone who knows of updates to do so as well!

Anne

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-24 Thread Nicolas M. Thiery
Dear Matthew,

(thanks Anne, Harald, and William for the additional feedback)

On Tue, Mar 21, 2017 at 04:26:15PM -0700, Matthew Rennekamp wrote:
>It's been awhile since this discussion. Are there any more Combinat
>people that want these files open, or possibly the subdomain pointing
>to the SageWiki page?
>I've changed my mind to support whoever administers the GitHub account
>to move files on there, as long as there are more clear reasons for eg.
>forked repos like MathJax, which seem to be there just because they
>can. So, if there won't be a combinat.sagemath.org website, what does
>everyone on this mailing list think of putting it all on GitHub?

For the combinat website, let's stick to the original plan. Keeping
the documents on the wiki is good: there will be some further edits,
but not enough to warrant a migration to some new github pages. All we
need is to have http://combinat.sagemath.org redirect to
https://wiki.sagemath.org/combinat/ for "backward compatibility" with
references in e.g. published papers.

Can someone take care of this redirection?

I'll move the "misc" and "patches" repos to github and link them from
the wiki.

Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-24 Thread Harald Schilly
On Fri, Mar 24, 2017 at 5:47 AM, Anne Schilling  wrote:
>> http://www.sagemath.org/library-publications-combinat.html
>>
>> ?
>
> Yes, thank you! I see that some references are outdated and some new
> can be added. I will add those soon.

Well, a while ago nathan cohen submitted a few patches to get rid of
those references from sagemath.org. Maybe I should add the entries
back?

But anyways, submissions to the publication lists go through
https://github.com/sagemath/publications
I think it's good to collect all of them at a central place.

The sagemath/website repo references it as a submodule and uses the
generated html files in its templates. There is no deep magic going
on. I'm happy if someone helps with the publications repo. there are a
couple of open tasks, etc.

-- harald

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-23 Thread Anne Schilling
>> The Wiki page looks very different from before! It used to start with a list
>> of upcoming/recent events. Now it just has some links to disconnected
>> websites.
> 
> What is "the wiki page"?  https://wiki.sagemath.org/ still starts with
> a list of upcoming/recent events...

The wiki that was quoted in Nicolas' e-mail was

https://wiki.sagemath.org/Combinat/*

and it looks strange. I guess the correct address is

https://wiki.sagemath.org/combinat

Anne

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-23 Thread Anne Schilling
On 3/23/17 2:00 PM, Harald Schilly wrote:
> 
> 
> On Thursday, March 23, 2017 at 10:42:18 AM UTC+1, Anne Schilling wrote:
>> For example, we had
>> a list of all publications citing sage-combinat etc. there. This should be 
>> kept!
> 
> Do you mean these publications:
> 
> http://www.sagemath.org/library-publications-combinat.html
> 
> ?

Yes, thank you! I see that some references are outdated and some new
can be added. I will add those soon.

Are these references also incorporated into

http://www.sagemath.org/library-publications.html ?

Perhaps at some point it would be good to fuse the lists.

Anne

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-23 Thread Harald Schilly


On Thursday, March 23, 2017 at 5:48:20 PM UTC+1, Matthew Rennekamp wrote:
>
> Could we set up another repo, use it as a "project site" (as they call 
> it), and then use the www.sagemath.org/combinat as URL forwarding or 
> something else?
>
>>
>>
Yes, sure, see [1]. I think we can also have combinat.sagemath.org hosted 
there, see [2]

[1] https://github.com/sagemath/combinat
[2] https://help.github.com/articles/setting-up-a-custom-subdomain/

-- h

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-03-23 Thread Matthew Rennekamp
I assume that the main website and the www subdomain are hosted from 
GitHub. Could we set up another repo, use it as a "project site" (as they 
call it), and then use the www.sagemath.org/combinat as URL forwarding or 
something else?
The wiki page is https://wiki.sagemath.org/combinat, and hasn't been 
touched since early 2015.

On Thursday, March 23, 2017 at 11:06:52 AM UTC-4, William Stein wrote:
>
> On Wed, Mar 22, 2017 at 11:20 AM, Anne Schilling 
>  wrote: 
> > Hi! 
> > 
> > The website http://combinat.sagemath.org/ seems to be down right now. I 
> > agree with Nicolas, that it would be good to keep this website. For 
> example, 
> > we had 
> > a list of all publications citing sage-combinat etc. there. This should 
> be 
> > kept! 
>
> What is your plan for hosting this content and website?  I'm not going 
> to do it.   I am willing to point combinat.sagemath.org at an ip 
> adddress... 
>
> > The Wiki page looks very different from before! It used to start with a 
> list 
> > of upcoming/recent events. Now it just has some links to disconnected 
> > websites. 
>
> What is "the wiki page"?  https://wiki.sagemath.org/ still starts with 
> a list of upcoming/recent events... 
>
>
> > 
> > Best, 
> > 
> > Anne 
> > 
> > 
> > On Wednesday, March 22, 2017 at 6:14:47 AM UTC-7, Matthew Rennekamp 
> wrote: 
> >> 
> >> Hey, all. 
> >> It's been awhile since this discussion. Are there any more Combinat 
> people 
> >> that want these files open, or possibly the subdomain pointing to the 
> >> SageWiki page? 
> >> I've changed my mind to support whoever administers the GitHub account 
> to 
> >> move files on there, as long as there are more clear reasons for eg. 
> forked 
> >> repos like MathJax, which seem to be there just because they can. So, 
> if 
> >> there won't be a combinat.sagemath.org website, what does everyone on 
> this 
> >> mailing list think of putting it all on GitHub? 
> > 
> > -- 
> > 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-comb...@googlegroups.com 
> . 
> > Visit this group at https://groups.google.com/group/sage-combinat-devel. 
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> William (http://wstein.org) 
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: combinat.sagemath.org

2017-03-23 Thread Anne Schilling
Hi!

The website http://combinat.sagemath.org/ seems to be down right now. I 
agree with Nicolas, that it would be good to keep this website. For 
example, we had 
a list of all publications citing sage-combinat etc. there. This should be 
kept!

The Wiki page looks very different from before! It used to start with a 
list of upcoming/recent events. Now it just has some links to disconnected 
websites.

Best,

Anne

On Wednesday, March 22, 2017 at 6:14:47 AM UTC-7, Matthew Rennekamp wrote:
>
> Hey, all.
> It's been awhile since this discussion. Are there any more Combinat people 
> that want these files open, or possibly the subdomain pointing to the 
> SageWiki page?
> I've changed my mind to support whoever administers the GitHub account to 
> move files on there, as long as there are more clear reasons for eg. forked 
> repos like MathJax, which seem to be there just because they can. So, if 
> there won't be a combinat.sagemath.org website, what does everyone on 
> this mailing list think of putting it all on GitHub?
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: combinat.sagemath.org

2017-03-22 Thread Matthew Rennekamp
Hey, all.
It's been awhile since this discussion. Are there any more Combinat people 
that want these files open, or possibly the subdomain pointing to the 
SageWiki page?
I've changed my mind to support whoever administers the GitHub account to 
move files on there, as long as there are more clear reasons for eg. forked 
repos like MathJax, which seem to be there just because they can. So, if 
there won't be a combinat.sagemath.org website, what does everyone on this 
mailing list think of putting it all on GitHub?

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Constructing elements in disjoint enumerated sets that are Cartesian products

2017-02-17 Thread Andrew


On Friday, 17 February 2017 17:18:20 UTC+11, Travis Scrimshaw wrote:
>
> Hey Andrew,
>>
>>  
>>
>> Yea, it comes from the fact that it is only a simple wrapped element and 
> doesn't do anything beyond forwarding the repr/latex/ascii-art outputs. I 
> go back and forth on whether or not to pass along some (all?) extra 
> methods. Probably the easiest thing to work with is the facade with the 
> ticket (at least if you don't care if the element belongs to this specific 
> parent).
>


There's certainly an argument for passing  magic methods along but then the 
question is where to you stop. One possibility would be to do something 
like:

def __getattr__(self,attr):
"""
Any unrecognised method calls/attributes get passed on to the wrapped
element
"""
try:
return getattr(self,attr)
except AttributeError:
pass

try:
return getattr(self.value,attr)
except AttributeError:
raise AttributeError, '%s has no attribute %s\n'%(self,attr)





Not sure what untended consequences something like this would have.

Anyway, your ticket solves my problem so thanks for that! (and my wrapped 
elements know their parents so a facade is fine)

Andrew

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Constructing elements in disjoint enumerated sets that are Cartesian products

2017-02-16 Thread Travis Scrimshaw
Hey Andrew,
>
>  
> Unfortunately, now it seems that I can't access the elements of the tuple 
> directly:
>
> sage: tabs = DisjointUnionEnumeratedSets(Family(Partitions(3), lambda mu: 
> cartesian_product([mu.standard_tableaux(),mu.standard_tableaux()])), 
> facade=False)
> sage: s=StandardTableau([[1,2],[3]])
> sage: ss=tabs( (s,s) )
> sage: ss[0]
> ---
> TypeError Traceback (most recent call last
> )
>  in ()
> > 1 ss[Integer(0)]
>
> TypeError: 'sage.structure.element_wrapper.ElementWrapper' object has no 
> attribute '__getitem__'
> > (1)()
> > 1 ss[Integer(0)]
>
> On the other hand, the following works:
>
>
> sage: ss.value[0], ss.value[1]
> ([[1, 2], [3]], [[1, 2], [3]])
>
>
> Yea, it comes from the fact that it is only a simple wrapped element and 
doesn't do anything beyond forwarding the repr/latex/ascii-art outputs. I 
go back and forth on whether or not to pass along some (all?) extra 
methods. Probably the easiest thing to work with is the facade with the 
ticket (at least if you don't care if the element belongs to this specific 
parent).

Thanks for looking at the ticket too.

Best,
Travis


-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Constructing elements in disjoint enumerated sets that are Cartesian products

2017-02-15 Thread Andrew

On Thursday, 16 February 2017 15:41:37 UTC+11, Andrew wrote:
>
> Thanks Travis! Obviously I didn't read the documentation well enough as I 
> thought `Facade` was `False` by default -- so I'd tried setting 
> `Facade=True` with no joy.
>
> Cheers,
> Andrew
>
>  
Unfortunately, now it seems that I can't access the elements of the tuple 
directly:

sage: tabs = DisjointUnionEnumeratedSets(Family(Partitions(3), lambda mu: 
cartesian_product([mu.standard_tableaux(),mu.standard_tableaux()])), facade=
False)
sage: s=StandardTableau([[1,2],[3]])
sage: ss=tabs( (s,s) )
sage: ss[0]
---
TypeError Traceback (most recent call last)
 in ()
> 1 ss[Integer(0)]

TypeError: 'sage.structure.element_wrapper.ElementWrapper' object has no 
attribute '__getitem__'
> (1)()
> 1 ss[Integer(0)]

On the other hand, the following works:


sage: ss.value[0], ss.value[1]
([[1, 2], [3]], [[1, 2], [3]])

Andrew

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Constructing elements in disjoint enumerated sets that are Cartesian products

2017-02-15 Thread Andrew
Thanks Travis! Obviously I didn't read the documentation well enough as I 
thought `Facade` was `False` by default -- so I'd tried setting 
`Facade=True` with no joy.

Cheers,
Andrew

pd. I will have a look at your ticket.

On Thursday, 16 February 2017 13:52:22 UTC+11, Travis Scrimshaw wrote:
>
> Hey Andrew,
>Well, I've recently been looking at DisjointUnionEnumeratedSets (see 
> https://trac.sagemath.org/ticket/22382) and came across this problem. The 
> first issue is that DisjointUnionEnumeratedSets does not behave like an 
> actual facade parent like it claims to be (at least with default values). 
> The second is that __call__ calls a morphism, which in turn calls 
> _element_constructor_ and expects a subclass of element to be returned. 
> Thus for facade parents that want to return a tuple, this causes a problem 
> (see the ticket).
>
>Actually, looking at what you want more closely now, you want this to 
> be a proper parent, so just pass the facade=False. This works with the 
> current Sage:
>
> sage: tabs = DisjointUnionEnumeratedSets(Family(Partitions(3), lambda mu: 
> cartesian_product([mu.standard_tableaux(),mu.standard_tableaux()])), 
> facade=False)
> sage: s = StandardTableau([[1,2],[3]])
> sage: (s,s) in tabs
> True
> sage: tabs((s,s))
> ([[1, 2], [3]], [[1, 2], [3]])
>
> Best,
> Travis
>
> On Wednesday, February 15, 2017 at 6:01:17 PM UTC-6, Andrew wrote:
>>
>> I am working with disjoint enumerated sets like the following
>>
>> sage: tabs = DisjointUnionEnumeratedSets(Family(Partitions(3), lambda mu: 
>> cartesian_product([mu.standard_tableaux(),mu.standard_tableaux()])))
>> sage: tabs[:]
>> [([[1, 2, 3]], [[1, 2, 3]]),
>>  ([[1, 3], [2]], [[1, 3], [2]]),
>>  ([[1, 3], [2]], [[1, 2], [3]]),
>>  ([[1, 2], [3]], [[1, 3], [2]]),
>>  ([[1, 2], [3]], [[1, 2], [3]]),
>>  ([[1], [2], [3]], [[1], [2], [3]])]
>>
>> I need to be able to construct elements of this set from a tuple of 
>> elements in the underlying sets but I can't work out a nice way to do this. 
>> I thought that the following would work but it doesn't:
>>
>> sage: s = StandardTableau([[1,2],[3]])
>> sage: (s, s) in tabs
>> True
>> sage: tabs( (s,s) )
>>
>> ---
>> NotImplementedError   Traceback (most recent call 
>> last)
>>  in ()
>> > 1 tabs( (s,s) )
>>
>> /usr/local/src/sage/src/sage/structure/parent.pyx in sage.structure.
>> parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9584)()
>> 934 self._element_init_pass_parent = 
>> guess_pass_parent(self, self._element_constructor)
>> 935 except (AttributeError, AssertionError):
>> --> 936 raise NotImplementedError
>> 937 cdef Py_ssize_t i
>> 938 cdef R = parent_c(x)
>>
>> NotImplementedError:
>>
>> One way around this is the following, but I would guess that this is far 
>> too inefficient to use inside an element_constructor method:
>>
>> sage: ss = tabs.unrank( tabs.rank( (s,s) ) )
>> sage: type(ss)
>> > 'sage.sets.cartesian_product.CartesianProduct_with_category.element_class'
>> >
>>
>> Is there a better way to do his?
>>
>> Andrew
>>
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Constructing elements in disjoint enumerated sets that are Cartesian products

2017-02-15 Thread Travis Scrimshaw
Hey Andrew,
   Well, I've recently been looking at DisjointUnionEnumeratedSets (see 
https://trac.sagemath.org/ticket/22382) and came across this problem. The 
first issue is that DisjointUnionEnumeratedSets does not behave like an 
actual facade parent like it claims to be (at least with default values). 
The second is that __call__ calls a morphism, which in turn calls 
_element_constructor_ and expects a subclass of element to be returned. 
Thus for facade parents that want to return a tuple, this causes a problem 
(see the ticket).

   Actually, looking at what you want more closely now, you want this to be 
a proper parent, so just pass the facade=False. This works with the current 
Sage:

sage: tabs = DisjointUnionEnumeratedSets(Family(Partitions(3), lambda mu: 
cartesian_product([mu.standard_tableaux(),mu.standard_tableaux()])), facade=
False)
sage: s = StandardTableau([[1,2],[3]])
sage: (s,s) in tabs
True
sage: tabs((s,s))
([[1, 2], [3]], [[1, 2], [3]])

Best,
Travis

On Wednesday, February 15, 2017 at 6:01:17 PM UTC-6, Andrew wrote:
>
> I am working with disjoint enumerated sets like the following
>
> sage: tabs = DisjointUnionEnumeratedSets(Family(Partitions(3), lambda mu: 
> cartesian_product([mu.standard_tableaux(),mu.standard_tableaux()])))
> sage: tabs[:]
> [([[1, 2, 3]], [[1, 2, 3]]),
>  ([[1, 3], [2]], [[1, 3], [2]]),
>  ([[1, 3], [2]], [[1, 2], [3]]),
>  ([[1, 2], [3]], [[1, 3], [2]]),
>  ([[1, 2], [3]], [[1, 2], [3]]),
>  ([[1], [2], [3]], [[1], [2], [3]])]
>
> I need to be able to construct elements of this set from a tuple of 
> elements in the underlying sets but I can't work out a nice way to do this. 
> I thought that the following would work but it doesn't:
>
> sage: s = StandardTableau([[1,2],[3]])
> sage: (s, s) in tabs
> True
> sage: tabs( (s,s) )
> ---
> NotImplementedError   Traceback (most recent call last
> )
>  in ()
> > 1 tabs( (s,s) )
>
> /usr/local/src/sage/src/sage/structure/parent.pyx in sage.structure.parent
> .Parent.__call__ (build/cythonized/sage/structure/parent.c:9584)()
> 934 self._element_init_pass_parent = guess_pass_parent
> (self, self._element_constructor)
> 935 except (AttributeError, AssertionError):
> --> 936 raise NotImplementedError
> 937 cdef Py_ssize_t i
> 938 cdef R = parent_c(x)
>
> NotImplementedError:
>
> One way around this is the following, but I would guess that this is far 
> too inefficient to use inside an element_constructor method:
>
> sage: ss = tabs.unrank( tabs.rank( (s,s) ) )
> sage: type(ss)
>  'sage.sets.cartesian_product.CartesianProduct_with_category.element_class'
> >
>
> Is there a better way to do his?
>
> Andrew
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Multivariate Laurent polynomial ring with noncommutative relation y1*y2 = -y2*y1 ....and commutative relations x1*x2= x2*x1

2017-02-11 Thread Biswajit Ransingh
Dear Mike Zabrocki,

Thank you again.

Your codes are helpful after inserting
P.inject_variables()

Sincerely
Biswajit

On Saturday, 11 February 2017 17:46:17 UTC+5:30, Mike Zabrocki wrote:
>
> Is what you want something like this?:
>
> sage: P = FreeAlgebra(QQ,7,'x1,x2,x3,x4,y1,y2,y3')
>
> sage: (x1, x2, x3, x4, y1, y2, y3) = P.gens()
>
> sage: I = 
> P.ideal([y1*y2+y2*y1,y2*y3+y3*y2,y1*y3+y3*y1,x1*x2-x2*x1,x1*x3-x3*x1,x1*x4-x4*x1,x2*x3-x3*x2,x2*x4-x4*x2,x3*x4-x4*x3])
>
> sage: P.quotient_ring(I)
>
> Quotient of Free Algebra on 7 generators (x1, x2, x3, x4, y1, y2, y3) over 
> Rational Field by the ideal (y1*y2 + y2*y1, y2*y3 + y3*y2, y1*y3 + y3*y1, 
> x1*x2 - x2*x1, x1*x3 - x3*x1, x1*x4 - x4*x1, x2*x3 - x3*x2, x2*x4 - x4*x2, 
> x3*x4 - x4*x3)
>
> sage: Q = P.quotient_ring(I)
>
> sage: Q.gens()
>
> (x1bar, x2bar, x3bar, x4bar, y1bar, y2bar, y3bar)
>
> I think that the problem is that no non-commutative Grobner bases or 
> 'normal form' are implemented here:
>
> sage: (x1bar, x2bar, x3bar, x4bar, y1bar, y2bar, y3bar) = Q.gens()
>
> sage: y2bar*y1bar+y1bar*y2bar # should be 0
>
> y1bar*y2bar + y2bar*y1bar
>
> On Friday, 10 February 2017 10:45:25 UTC-5, Biswajit Ransingh wrote:
>>
>> Dear friends,
>>
>>
>> P. = LaurentPolynomialRing(QQ)
>>
>> Can we make rich algebraic structure using the above P?
>>
>> The variables *x0, x1, x2, x3, x4 are commutative *
>> and *y1, y2,y3 are non commutative.*
>>
>> if we ask for relation y1*y2 = -y2*y1 it gives 
>> SyntaxError: can't assign to operator.
>>
>> Can we get something like: sage: P multivariate Laurent polynomial Ring 
>> in x0, x1, x2, x3, x4, y1, y2,y3 over Rational Field, nc→relations: {y1*y2: 
>> -y2*y1,y2*y3:-y3*y2,y1*
>> y3:-y3*y1,x1*x2:-x2*x1}
>>
>> For example: Can we extend the below code to above  information
>>
>> sage: A. = FreeAlgebra(QQ, 3)
>> sage: P. = A.g_algebra(relations={y*x:-x*y}, order = 'lex') 
>> sage: P Noncommutative Multivariate Polynomial Ring in x, y, z over 
>> Rational Field, nc- ˓→relations: {y*x: -x*y}
>>
>>
>>
>>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Multivariate Laurent polynomial ring with noncommutative relation y1*y2 = -y2*y1 ....and commutative relations x1*x2= x2*x1

2017-02-11 Thread Biswajit Ransingh
Dear Mike Zabrocki,

Thank you for useful information.

sage: y2bar*y1bar+y1bar*y2bar # should be 0

it would be nice if we get  y2bar*y1bar+y1bar*y2bar=0. But we are not 
getting that.

Basically I am trying for supergrassmanian which has some commutative 
variable x0, x1, x2, x3, x4 and rest non commutative y1, y2,y3.

P. = LaurentPolynomialRing(QQ)

How to implement so that we get y1*y2+y2*y1 = 0  and x1*x2 = x2*x1 .

This will  help for sage  to develop* Lie superalgebras, supergrassmanian 
and Laurent polynomial of supergrassmanian*

Sincerely
Biswaji Ransingh 



On Saturday, 11 February 2017 17:46:17 UTC+5:30, Mike Zabrocki wrote:
>
> Is what you want something like this?:
>
> sage: P = FreeAlgebra(QQ,7,'x1,x2,x3,x4,y1,y2,y3')
>
> sage: (x1, x2, x3, x4, y1, y2, y3) = P.gens()
>
> sage: I = 
> P.ideal([y1*y2+y2*y1,y2*y3+y3*y2,y1*y3+y3*y1,x1*x2-x2*x1,x1*x3-x3*x1,x1*x4-x4*x1,x2*x3-x3*x2,x2*x4-x4*x2,x3*x4-x4*x3])
>
> sage: P.quotient_ring(I)
>
> Quotient of Free Algebra on 7 generators (x1, x2, x3, x4, y1, y2, y3) over 
> Rational Field by the ideal (y1*y2 + y2*y1, y2*y3 + y3*y2, y1*y3 + y3*y1, 
> x1*x2 - x2*x1, x1*x3 - x3*x1, x1*x4 - x4*x1, x2*x3 - x3*x2, x2*x4 - x4*x2, 
> x3*x4 - x4*x3)
>
> sage: Q = P.quotient_ring(I)
>
> sage: Q.gens()
>
> (x1bar, x2bar, x3bar, x4bar, y1bar, y2bar, y3bar)
>
> I think that the problem is that no non-commutative Grobner bases or 
> 'normal form' are implemented here:
>
> sage: (x1bar, x2bar, x3bar, x4bar, y1bar, y2bar, y3bar) = Q.gens()
>
> sage: y2bar*y1bar+y1bar*y2bar # should be 0
>
> y1bar*y2bar + y2bar*y1bar
>
> On Friday, 10 February 2017 10:45:25 UTC-5, Biswajit Ransingh wrote:
>>
>> Dear friends,
>>
>>
>> P. = LaurentPolynomialRing(QQ)
>>
>> Can we make rich algebraic structure using the above P?
>>
>> The variables *x0, x1, x2, x3, x4 are commutative *
>> and *y1, y2,y3 are non commutative.*
>>
>> if we ask for relation y1*y2 = -y2*y1 it gives 
>> SyntaxError: can't assign to operator.
>>
>> Can we get something like: sage: P multivariate Laurent polynomial Ring 
>> in x0, x1, x2, x3, x4, y1, y2,y3 over Rational Field, nc→relations: {y1*y2: 
>> -y2*y1,y2*y3:-y3*y2,y1*
>> y3:-y3*y1,x1*x2:-x2*x1}
>>
>> For example: Can we extend the below code to above  information
>>
>> sage: A. = FreeAlgebra(QQ, 3)
>> sage: P. = A.g_algebra(relations={y*x:-x*y}, order = 'lex') 
>> sage: P Noncommutative Multivariate Polynomial Ring in x, y, z over 
>> Rational Field, nc- ˓→relations: {y*x: -x*y}
>>
>>
>>
>>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Re: Multivariate Laurent polynomial ring with noncommutative relation y1*y2 = -y2*y1 ....and commutative relations x1*x2= x2*x1

2017-02-11 Thread Mike Zabrocki
Is what you want something like this?:

sage: P = FreeAlgebra(QQ,7,'x1,x2,x3,x4,y1,y2,y3')

sage: (x1, x2, x3, x4, y1, y2, y3) = P.gens()

sage: I = 
P.ideal([y1*y2+y2*y1,y2*y3+y3*y2,y1*y3+y3*y1,x1*x2-x2*x1,x1*x3-x3*x1,x1*x4-x4*x1,x2*x3-x3*x2,x2*x4-x4*x2,x3*x4-x4*x3])

sage: P.quotient_ring(I)

Quotient of Free Algebra on 7 generators (x1, x2, x3, x4, y1, y2, y3) over 
Rational Field by the ideal (y1*y2 + y2*y1, y2*y3 + y3*y2, y1*y3 + y3*y1, 
x1*x2 - x2*x1, x1*x3 - x3*x1, x1*x4 - x4*x1, x2*x3 - x3*x2, x2*x4 - x4*x2, 
x3*x4 - x4*x3)

sage: Q = P.quotient_ring(I)

sage: Q.gens()

(x1bar, x2bar, x3bar, x4bar, y1bar, y2bar, y3bar)

I think that the problem is that no non-commutative Grobner bases or 
'normal form' are implemented here:

sage: (x1bar, x2bar, x3bar, x4bar, y1bar, y2bar, y3bar) = Q.gens()

sage: y2bar*y1bar+y1bar*y2bar # should be 0

y1bar*y2bar + y2bar*y1bar

On Friday, 10 February 2017 10:45:25 UTC-5, Biswajit Ransingh wrote:
>
> Dear friends,
>
>
> P. = LaurentPolynomialRing(QQ)
>
> Can we make rich algebraic structure using the above P?
>
> The variables *x0, x1, x2, x3, x4 are commutative *
> and *y1, y2,y3 are non commutative.*
>
> if we ask for relation y1*y2 = -y2*y1 it gives 
> SyntaxError: can't assign to operator.
>
> Can we get something like: sage: P multivariate Laurent polynomial Ring in 
> x0, x1, x2, x3, x4, y1, y2,y3 over Rational Field, nc→relations: {y1*y2: 
> -y2*y1,y2*y3:-y3*y2,y1*
> y3:-y3*y1,x1*x2:-x2*x1}
>
> For example: Can we extend the below code to above  information
>
> sage: A. = FreeAlgebra(QQ, 3)
> sage: P. = A.g_algebra(relations={y*x:-x*y}, order = 'lex') 
> sage: P Noncommutative Multivariate Polynomial Ring in x, y, z over 
> Rational Field, nc- ˓→relations: {y*x: -x*y}
>
>
>
>

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-01-14 Thread William Stein
On Sat, Jan 14, 2017 at 12:03 PM, Nicolas M. Thiery
 wrote:
> Nevertheless, Sage-Combinat and http://combinat.sagemath.org/ are
> cited in many places, including 100+ publications. So we want this URL
> to keep working, for historical reasons and future work.
>
> Hence my advocacy for keeping the wiki pages
> http://wiki.sagemath.org/Combinat/* where they are, and making sure
> the URL http://combinat.sagemath.org/ redirects there.

Harald Schilly and I can both instantly point the DNS for
combinat.sagemath.org anywhere you want -- just tell us.

Regarding physical hardware, a lot is just turned off due to the UPS
breaking, and other issues (lack of manpower)...

William


-- 
William (http://wstein.org)

-- 
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 https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] Re: combinat.sagemath.org

2017-01-14 Thread Nicolas M. Thiery
Hi Matthew,

Thanks for your interest and request for more background to decide
what's the right thing to do.

Sage-Combinat started back in 2008, as a reincarnation of a similar
project MuPAD-Combinat (we switched the underlying platform from MuPAD
to Sage). At some point Sage-Combinat was a tightly knit group of
about 30 people working together on the core combinatorics feature;
this required tight coordination and a common location for sharing
in-development code (which was the Sage-Combinat queue). With time,
the breath of features have widened a lot, with interactions with many
other areas of Sage. Also the switch to git and the emergence of "Sage
packages" made it much easier for smaller groups of people to get
together on a subproject basis when collaborating on specific
topics. So Sage-Combinat has become a rather loose community.

All being good things.

Nevertheless, Sage-Combinat and http://combinat.sagemath.org/ are
cited in many places, including 100+ publications. So we want this URL
to keep working, for historical reasons and future work.

Hence my advocacy for keeping the wiki pages
http://wiki.sagemath.org/Combinat/* where they are, and making sure
the URL http://combinat.sagemath.org/ redirects there.

For the two repositories "misc" and "patches": as I mentioned in my
previous mail, we want to keep them around, somewhere. It's a good
occasion to migrate them to git for consistency. I don't mind where
they are hosted, git.sagemath.com, github, or elsewhere.  I was just
suggesting github because there already are many Sage-related repos
there.

As for the *machine* combinat.sagemath.org: this used to be a physical
machine, funded in 2012 or something by one of our NSF grant.

- It's ok if combinat.sagemath.org does not point to a physical
  machine or actually a machine at all.

- For the hardware: IIRC, it's been recycled to power some of the Sage
  infrastructure and SMC. All is good as long as it is put to good use
  for the Sage community until it's time to be retired.

Cheers,
  Nicolas


PS: Another factor why Sage-Combinat is somewhat quieter as such (and
in particular the wiki pages got outdated!) is that the energy I was
spending animating this community got diverted by my leading the ODK
European project. I can't wait until I get back to combinatorics
development ...


On Fri, Jan 13, 2017 at 11:04:18PM -0800, Matthew Rennekamp wrote:
>I'm not sure about pulling anything into GitHub. Adding to reasons
>here https://groups.google.com/forum/#!topic/sage-devel/j3BtPrq62kg, we
>might just go ahead and make it a repo on git.sagemath.com, or add it
>all to trac. Would a website now be useful as it had been? It seems
>like Combinat is just a name for a niche group of developers. What sort
>of history precedes and succeeds this all? Since I only got into
>[technically, returned to] Sage within the last month, I both have a
>lack of relationships with developers and a general lack of knowledge
>about the who's/what's/why's of the project. William gave me access to
>the files, so I'll be looking through them over the weekend.
>So, if GitHub wouldn't be an option, what then? Again, we could move it
>to the main git host or merge it all to one of SageWiki or trac, but we
>could simply "revive" combinat.sagemath.org. I worry that doing so will
>unnecessarily spread out available information, so it would be wise to
>be precise in what will be there. I can't comment on content when I ad
>absurdium the purpose of Combinat. (Something about trac being
>developer's information for coding, SageWiki for organizing full-scale
>projects, combinat.sagemath.org for academic research stuff, etc. Or
>something like it would be helpful in describing these relationships.)
>What about other projects? SageManifolds has their own thing going on,
>and I don't know much about it.
>Tl;dr: organisation from higher up needs to be established, in order to
>keep navigation intuitive. I say that we should just make a page,
>sagemath.org/combinat , for now.
>On Thursday, January 12, 2017 at 9:55:18 PM UTC-5, Matthew Rennekamp
>wrote:
> 
>I'm working on the [1]www.sagemath.org & SageWiki. What happened to
>[2]combinat.sagemath.org? Are there other places those files are
>stored?
> 
>--
>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 [3]sage-combinat-devel+unsubscr...@googlegroups.com.
>To post to this group, send email to
>[4]sage-combinat-devel@googlegroups.com.
>Visit this group at
>[5]https://groups.google.com/group/sage-combinat-devel.
>For more options, visit [6]https://groups.google.com/d/optout.
> 
> References
> 
>1. http://www.sagemath.org/
>2. http://combinat.sagemath.org/
>

  1   2   3   4   5   6   7   8   9   10   >