[sage-combinat-devel] problem in words

2012-03-15 Thread Martin Rubey
Hi there,

I was using lrcalc, and noticed that supplying the weight keyword does
not work, not even the doctest:  (this is on sage 4.8)

lrcalc.lrskew([3,2,1], [2], weight=[3,1])

gives 1 not in alphabet.

I found that the problem is that the row_word of a skew tableau expects
its entries to be from ZZ, while lrcalc uses int's.

If this is not known, how should it be fixed?  Should we convert the
entries of the tableau returned by lrcalc to ZZ's or only when computing
the row_word?

Martin

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] problem in words

2012-03-15 Thread Nicolas M. Thiery
Hi Martin, hi Vincent,

On Thu, Mar 15, 2012 at 08:43:47AM +0100, Martin Rubey wrote:
 I was using lrcalc, and noticed that supplying the weight keyword does
 not work, not even the doctest:  (this is on sage 4.8)
 
 lrcalc.lrskew([3,2,1], [2], weight=[3,1])
 
 gives 1 not in alphabet.
 
 I found that the problem is that the row_word of a skew tableau expects
 its entries to be from ZZ, while lrcalc uses int's.
 
 If this is not known, how should it be fixed?  Should we convert the
 entries of the tableau returned by lrcalc to ZZ's or only when computing
 the row_word?

For the record, this only appears when alphabet-vd.patch is
applied. Without it, the doctest pass (4.8, 5.0):

sage: import sage.libs.lrcalc.lrcalc
sage: sage.libs.lrcalc.lrcalc.lrskew([3,2,1], [2], weight=[3,1])
[[[None, None, 1], [1, 1], [2]]]

That being said, internally, this tableau indeed contains ints:

sage: t = sage.libs.lrcalc.lrcalc.lrskew([3,2,1], [2], weight=[3,1])[0]
sage: type(t[2][0])
type 'int'

Whereas the same tableau build from the command line would be filled
with Integers::

sage: t2 = SkewTableau([[None, None, 1], [1, 1], [2]])
sage: type(t2[2][0])
type 'sage.rings.integer.Integer'

Well, at least, those two tableaux are equal:

sage: t == t2
True

I let the tableau fans decide whether we want to enforce that all
entries of a (skew) tableau are Integers, and if yes to write a patch
on lrcalc to convert the ints to Integers. We could throw this in the
ticket #12284 which will make lrcalc a standard Sage package.

Cheers,

Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] problem in words

2012-03-15 Thread Nicolas M. Thiery
On Thu, Mar 15, 2012 at 09:27:00AM +0100, Martin Rubey wrote:
 Yet another thing:
 
 sage: lrskew([1,1],[2])[0].pp()
 .  .
 1
 
 So, possibly lrskew should check that mu is contained in lambda?

I guess the result above indeed has no specific meaning, but you might
want to double check with Anders, just in case.

Otherwise, you are welcome to add in the documentation that inner
should be contained in outer. And to add an assertion check such as:

assert len(inner) = len(outer) and inner[i]=outer[i] for i in 
range(len(inner)),
inner should be contained in outer

Cheers,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] problem in words

2012-03-15 Thread Martin Rubey
Dear Anders,

I was using lrcalc from within sage and noticed the following:

sage: lrskew([1,1],[2])[0].pp()
.  .
1

that is, lrskew returns a tableau of shape [1,1]/[2] :-)

Should lrcalc check that mu is contained in lambda, or sage, or neither?

Many thanks,

Martin

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] bug? in Partitions

2012-03-15 Thread Nicolas M. Thiery
On Tue, Mar 13, 2012 at 05:52:03PM +0100, Florent Hivert wrote:
 So if we suggest that the sum could be negative then we should also
 take care of having other negative argument.

I would put it more mildly: if we accept negative sums, then the user
might expect that other arguments like min_part would accept negative
values. However the underlying algorithmic strongly relies on all
parts to be non negative.

That being said, if there is a good use case where it is much more
practical to accept negative sums, and if it can be implemented
consistently for Partitions, Compositions, and other IntegerVectors
with just a few lines of code, then I guess I would be fine with it,
as long as this is documented as such:

For the user's convenience, Partitions(-4) is accepted and returns
the empty set::

sage: Partitions(-4).list()
[]
sage: TestSuite(Partitions(-4)).run()

Cheers,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] problem in words

2012-03-15 Thread Vincent Delecroix
Hi Martin, hi Nicolas,

2012/3/15, Nicolas M. Thiery nicolas.thi...@u-psud.fr:
   Hi Martin, hi Vincent,

 On Thu, Mar 15, 2012 at 08:43:47AM +0100, Martin Rubey wrote:
 I was using lrcalc, and noticed that supplying the weight keyword does
 not work, not even the doctest:  (this is on sage 4.8)

 lrcalc.lrskew([3,2,1], [2], weight=[3,1])

 gives 1 not in alphabet.

 I found that the problem is that the row_word of a skew tableau expects
 its entries to be from ZZ, while lrcalc uses int's.

 If this is not known, how should it be fixed?  Should we convert the
 entries of the tableau returned by lrcalc to ZZ's or only when computing
 the row_word?

 For the record, this only appears when alphabet-vd.patch is
 applied. Without it, the doctest pass (4.8, 5.0):


Sorry for this. The reason is:
{{{
sage: 1 in IntegerRange(5)
True
sage: int(1) in IntegerRange(5)
False
}}}
and that alphabet-vd.patch now makes IntegerRange a default for
alphabet over integer. I don't know what to do...

Cheers,
Vincent

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] problem in words

2012-03-15 Thread Anne Schilling
Hi Vincent,

On 3/15/12 7:30 AM, Vincent Delecroix wrote:
 Hi Martin, hi Nicolas,
 
 2012/3/15, Nicolas M. Thiery nicolas.thi...@u-psud.fr:
  Hi Martin, hi Vincent,

 On Thu, Mar 15, 2012 at 08:43:47AM +0100, Martin Rubey wrote:
 I was using lrcalc, and noticed that supplying the weight keyword does
 not work, not even the doctest:  (this is on sage 4.8)

 lrcalc.lrskew([3,2,1], [2], weight=[3,1])

 gives 1 not in alphabet.

 I found that the problem is that the row_word of a skew tableau expects
 its entries to be from ZZ, while lrcalc uses int's.

 If this is not known, how should it be fixed?  Should we convert the
 entries of the tableau returned by lrcalc to ZZ's or only when computing
 the row_word?

 For the record, this only appears when alphabet-vd.patch is
 applied. Without it, the doctest pass (4.8, 5.0):

 
 Sorry for this. The reason is:
 {{{
 sage: 1 in IntegerRange(5)
 True
 sage: int(1) in IntegerRange(5)
 False
 }}}
 and that alphabet-vd.patch now makes IntegerRange a default for
 alphabet over integer. I don't know what to do...

As Nicolas wrote, one could in principle enforce the skew tableaux produced by 
lrcalc
to use Integers. This could be put in #12284. If containment checking of the 
skew partitions
also should be done, this could also go into that patch.

Best,

Anne

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



[sage-combinat-devel] doctest failures in categories/coxeter_groups.py

2012-03-15 Thread Mark Shimozono
Arrgh, I had my google account settings wrong and several of my email
posts went to the
bit bucket before I noticed.

I have been encountering doctest errors involving the availability of
chevie:

/coxeter_group.py, line 256, in CoxeterGroup
assert is_chevie_available()

What is the workaround?

The error log follows (snipped after the assertion error).
(Note that _test_enumerated_set_iter_cardinality() also fails.)

--Mark

sage -t  devel/sage-combinat/sage/categories/coxeter_groups.py
**
File /home/msshimo/sage-5.0.beta7/devel/sage-combinat/sage/categories/
coxeter_groups.py, line 74:
sage: W = CoxeterGroups().example(); TestSuite(W).run(verbose =
True)
Expected:
running ._test_an_element() . . . pass
running ._test_associativity() . . . pass
running ._test_category() . . . pass
running ._test_elements() . . .
  Running the test suite of self.an_element()
  running ._test_category() . . . pass
  running ._test_eq() . . . pass
  running ._test_not_implemented_methods() . . . pass
  running ._test_pickling() . . . pass
  pass
running ._test_elements_eq() . . . pass
running ._test_enumerated_set_contains() . . . pass
running ._test_enumerated_set_iter_cardinality() . . . pass
running ._test_enumerated_set_iter_list() . . . pass
running ._test_eq() . . . pass
running ._test_has_descent() . . . pass
running ._test_inverse() . . . pass
running ._test_not_implemented_methods() . . . pass
running ._test_one() . . . pass
running ._test_pickling() . . . pass
running ._test_prod() . . . pass
running ._test_reduced_word() . . . pass
running ._test_simple_projections() . . . pass
running ._test_some_elements() . . . pass
Got:
running ._test_an_element() . . . pass
running ._test_associativity() . . . pass
running ._test_category() . . . pass
running ._test_elements() . . .
  Running the test suite of self.an_element()
  running ._test_category() . . . pass
  running ._test_eq() . . . pass
  running ._test_not_implemented_methods() . . . pass
  running ._test_pickling() . . . pass
  pass
running ._test_elements_eq() . . . pass
running ._test_enumerated_set_contains() . . . pass
running ._test_enumerated_set_iter_cardinality() . . . fail
Traceback (most recent call last):
  File /home/msshimo/sage-5.0.beta7/local/lib/python/site-
packages/sage/misc/sage_unittest.py, line 279, in run
test_method(tester = tester)
  File /home/msshimo/sage-5.0.beta7/local/lib/python/site-
packages/sage/categories/finite_enumerated_sets.py, line 426, in
_test_enumerated_set_iter_cardinality
tester.assert_(type(card) is Integer)
  File /home/msshimo/sage-5.0.beta7/local/lib/python2.7/unittest/
case.py, line 420, in assertTrue
raise self.failureException(msg)
AssertionError: False is not true

running ._test_enumerated_set_iter_list() . . . pass
running ._test_eq() . . . pass
running ._test_has_descent() . . . pass
running ._test_inverse() . . . pass
running ._test_len() . . . pass
running ._test_not_implemented_methods() . . . pass
running ._test_one() . . . pass
running ._test_pickling() . . . pass
running ._test_prod() . . . pass
running ._test_reduced_word() . . . pass
running ._test_simple_projections() . . . pass
running ._test_some_elements() . . . pass
The following tests failed: _test_enumerated_set_iter_cardinality
**
File /home/msshimo/sage-5.0.beta7/devel/sage-combinat/sage/categories/
coxeter_groups.py, line 612:
sage: W = CoxeterGroup(['A',2],index_set=[1,2])
Exception raised:
Traceback (most recent call last):
  File /home/msshimo/sage-5.0.beta7/local/bin/ncadoctest.py,
line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
  File /home/msshimo/sage-5.0.beta7/local/bin/sagedoctest.py,
line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example,
filename, compileflags)
  File /home/msshimo/sage-5.0.beta7/local/bin/ncadoctest.py,
line 1172, in run_one_example
compileflags, 1) in test.globs
  File doctest __main__.example_16[2], line 1, in module
W =
CoxeterGroup(['A',Integer(2)],index_set=[Integer(1),Integer(2)])###line
612:
sage: W = CoxeterGroup(['A',2],index_set=[1,2])
  File /home/msshimo/sage-5.0.beta7/local/lib/python/site-
packages/sage/combinat/root_system/coxeter_group.py, line 256, in
CoxeterGroup
assert is_chevie_available()
AssertionError

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this 

Re: [sage-combinat-devel] doctest failures in categories/coxeter_groups.py

2012-03-15 Thread mshimo
Cristian and Nicolas,

I already installed the J-M distro of gap3 and
it works from the command line,
but how do I tell sage of its existence?
I see that the ticket has a line

sage -i gap3-jm2.spkg

based on an older version.

--Mark

 I have just updated the GAP3 interface ticket description on

   http://trac.sagemath.org/sage_trac/ticket/8380

 to describe how to install GAP3 (including a link to the spkg based on
 Jean-Michel's distribution). Please check!

 On Thu, Mar 15, 2012 at 06:59:03PM +0100, Christian Stump wrote:
 You should then be set to play with CoxeterGroups in Sage. Please be
 aware that I am constantly (sometimes more sometimes less) working on
 the implementation, so it is not yet completely stable and things
 might change. Please send feedback when you encounter bugs or missing
 features (of course, there is a lot missing still!).

 By the way: for Mark's current purpose, it might be sufficient to tag
 the GAP3 dependent tests with # optional.

 Cheers,
   Nicolas
 --
 Nicolas M. Thiéry Isil nthi...@users.sf.net
 http://Nicolas.Thiery.name/

 --
 You received this message because you are subscribed to the Google Groups
 sage-combinat-devel group.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-combinat-devel+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/sage-combinat-devel?hl=en.





-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] doctest failures in categories/coxeter_groups.py

2012-03-15 Thread mshimo
Never mind, I had named the shellscript
gap instead of gap3.

--Mark

 Can you reconfirm that you can run gap3 from the command line within
 the Sage folder. I wouldn't know anything else necessary, do you
 Nicolas? Next, what happens if you run gap3.console() from within
 Sage?

 --
 You received this message because you are subscribed to the Google Groups
 sage-combinat-devel group.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 To unsubscribe from this group, send email to
 sage-combinat-devel+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/sage-combinat-devel?hl=en.





-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] doctest failures in categories/coxeter_groups.py

2012-03-15 Thread Anne Schilling
Hi!

Actually, I think the easiest to install gap3 for Sage is using

sage -f http://sage.math.washington.edu/home/nthiery/gap3-jm2.spkg

Best,

Anne

On 3/15/12 10:59 AM, Christian Stump wrote:
 Dear Marc,
 
 /coxeter_group.py, line 256, in CoxeterGroup
assert is_chevie_available()
 
 To use the coxeter groups implementation, you must have gap3 installed
 (i.e., typing gap3 in the command line starts gap3), and the chevie
 package available (i.e., typing RequirePackage(chevie) within gap3
 should work). The easiest to obtain that is to download Jean Michel's
 version of gap3 with chevie preinstalled, which you can download at
 http://www.math.jussieu.fr/~jmichel/gap3/gap3-jm4.tar.gz (Thanks to
 Jean for providing it!).
 
From http://www.math.jussieu.fr/~jmichel/gap3/:
 
 
 The installation instructions are as follows: unpack somewhere the
 file, it will make a gap3-jm4 directory. Then, in gap3-jm4/bin edit
 gap.sh (on Linux or Mac-OSX) or gap.bat or gap.cmd (on dos/windows) so
 that the variable GAP_DIR refers to the right directory and GAP_PRG to
 the right executable, and put gap.sh (renamed gap3) or gap.bat
 someplace on your path.
 
 
 You should then be set to play with CoxeterGroups in Sage. Please be
 aware that I am constantly (sometimes more sometimes less) working on
 the implementation, so it is not yet completely stable and things
 might change. Please send feedback when you encounter bugs or missing
 features (of course, there is a lot missing still!).
 
 Let me know if you don't get gap3 running, or if you have other issues!
 
 Christian

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.