[sage-combinat-devel] Question on a doctest
Hi! Working on some patch, I get the following doctest errors in combinat/ sf/dual.py File "/mnt/local/king/SAGE/broken/devel/sage-main/sage/combinat/sf/ dual.py", line 185: sage: l(f._to_self_cache) # note: this may depend on possible previous computations! Expected: [([1, 1], [([1, 1], 2), ([2], 1)]), ([2], [([1, 1], 1), ([2], 1)])] Got: [([], [([], 1)]), ([1, 1], [([1, 1], 2), ([2], 1)]), ([2], [([1, 1], 1), ([2], 1)])] ** File "/mnt/local/king/SAGE/broken/devel/sage-main/sage/combinat/sf/ dual.py", line 187: sage: l(f._from_self_cache) Expected: [([1, 1], [([1, 1], 1), ([2], -1)]), ([2], [([1, 1], -1), ([2], 2)])] Got: [([], [([], 1)]), ([1, 1], [([1, 1], 1), ([2], -1)]), ([2], [([1, 1], -1), ([2], 2)])] It states that this may depend on possible previous computations. Is there really no work around? Such as, using an object that is not considered in any other doc test? Is the new result correct? Shouldn't both tests better be marked as "random"? Best regards, Simon -- 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] Re: sage-combinat queue broken
On 3/31/11 5:59 PM, Daniel Bump wrote: It seems that your patch has a problem to be applied to the current sage 4.6.2. The patch was tested with 4.7.alphas (because we hope for it to be merged soon). The syntax of classical_crystals.py at the top of the file has changed since 4.6.2. So it doesn't merge. One possibility would be to guard the patch so that it only applies to more recent versions. I'm cc:ing Nicolas to ask his advice. Which patch are you talking about? 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] Re: sage-combinat queue broken
> It seems that your patch has a problem to be applied to the current sage > 4.6.2. The patch was tested with 4.7.alphas (because we hope for it to be merged soon). The syntax of classical_crystals.py at the top of the file has changed since 4.6.2. So it doesn't merge. One possibility would be to guard the patch so that it only applies to more recent versions. I'm cc:ing Nicolas to ask his advice. Dan -- 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] Re: Categorification of sage/rings/ring.pyx
Hi Anne, On 1 Apr., 00:09, Anne Schilling wrote: > I have a question regarding the quotients. If I work in the free algebra > > sage: F = FreeAlgebra(QQ,3,'x',implementation='letterplace') > sage: x = F.gens() > sage: p=x[1]*x[0]+x[2]*x[2] > > I can iterate over the elements: > > sage: [w for w in p] > [((0, 0, 1, 0, 0, 1), 1), ((0, 1, 0, 1, 0, 0), 1)] > > and hence can get access to the keys this way. However, for quotients this > does not work: That's because it is just the existing code for QuotienRingElement. > Is there a plan to change this? Not from my side. But I wonder if it would make sense to provid the quotient ring elements with an iterator inherited from the cover ring: def __iter__(self): return self.__rep.__iter__() or something like that. I don't know if this makes sense, though. After all, that depends on the choice of a representative for the quotient ring element. Best regards, Simon -- 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] Re: Categorification of sage/rings/ring.pyx
Hi Simon, Thank you for your answers! I keep working with the combined patch trac7797-full_letterplace_wrapper.patch for now. I have a question regarding the quotients. If I work in the free algebra sage: F = FreeAlgebra(QQ,3,'x',implementation='letterplace') sage: x = F.gens() sage: p=x[1]*x[0]+x[2]*x[2] I can iterate over the elements: sage: [w for w in p] [((0, 0, 1, 0, 0, 1), 1), ((0, 1, 0, 1, 0, 0), 1)] and hence can get access to the keys this way. However, for quotients this does not work: sage: F = FreeAlgebra(QQ,3,'x',implementation='letterplace') sage: x = F.gens() sage: rel = [x[2]**2 - x[1]*x[0]] sage: I = F*rel*F sage: Q = F.quo(I, names='a') sage: a = Q.gens() sage: p=a[1]*a[0]+a[2]*a[2] sage: p 2*a2*a2 sage: [w for w in p] --- TypeError Traceback (most recent call last) TypeError: 'QuotientRingElement' object is not iterable Is there a plan to change this? I am now using the trick of coercing to another free algebra to get access to the iterator: sage: K = FreeAlgebra(QQ,3,'x') sage: p=a[1]*a[0]+a[2]*a[2] sage: [w for w in p.lift()*K.one()] [(2, x2^2)] but this seems a little around about. Cheers, Anne On 3/31/11 12:35 PM, Simon King wrote: Here is the solution: Create an empty file __init__.py in .../sage/algebras/letterplace/, for examply with touch sage/algebras/letterplace/__init__.py (when you are in SAGE_ROOT/devel/sage/) Then, sage -br should do the trick. Once again, I forgot to include __init__.py in a patch. I will update it on trac tomorrow. Cheers, Simon -- 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] Re: Categorification of sage/rings/ring.pyx
Here is the solution: Create an empty file __init__.py in .../sage/algebras/letterplace/, for examply with touch sage/algebras/letterplace/__init__.py (when you are in SAGE_ROOT/devel/sage/) Then, sage -br should do the trick. Once again, I forgot to include __init__.py in a patch. I will update it on trac tomorrow. Cheers, Simon -- 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] Re: Categorification of sage/rings/ring.pyx
Hi Anne On 31 Mrz., 14:09, Anne Schilling wrote: > /Applications/sage-4.6.2/devel/sage-combinat/sage/algebras/letterplace/free_algebra_letterplace.pxd:15:72: > Name 'FreeAlgebraElement_letterplace' not declared in module > 'sage.algebras.letterplace.free_algebra_element_letterplace' I can reproduce the problem. Well, the ticket currently is "needs work" anyway :( Best regards, Simon -- 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] Re: Categorification of sage/rings/ring.pyx
On 31 Mrz., 14:09, Anne Schilling wrote: > /Applications/sage-4.6.2/devel/sage-combinat/sage/algebras/letterplace/free_algebra_letterplace.pxd:15:72: > Name 'FreeAlgebraElement_letterplace' not declared in module > 'sage.algebras.letterplace.free_algebra_element_letterplace' On the other hand, if it can not find stuff, then something is wrong. Can you tell me the content of .../sage/algebras/letterplace/ ? Cheers, Simon -- 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] Re: Categorification of sage/rings/ring.pyx
Hi Anne, On 31 Mrz., 14:09, Anne Schilling wrote: > Hi Simon, > > Applying your two patches > > trac11068_nc_ideals_and_quotients.patch > trac7797-full_letterplace_wrapper_rel11068.patch > > in this order, I get the attached error for sage -b. Am I missing a patch? Do you also have the patch from #10961, which is a dependency for #11068? Anyway, I think I'll soon have to rebase everything. Namely, in #11068, it would be nice if one could *move* code from sage.rings.ring.Ring to sage.categories.rings.Rings.ParentMethods, rather than copying it (code duplication is known as a "code smell"). But in order to be able to move it, it is needed that the category is properly initialised for all rings. This is the purpose of #9944 and #9138. But I think that, for now, #10961, #11068 and #7797 should be enough for letterplace. Best regards, Simon -- 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] Re: sage question
On Thu, Mar 31, 2011 at 05:19:42AM -0700, Anne Schilling wrote: > >On Thu, Mar 31, 2011 at 12:39:44AM -0400, msh...@math.vt.edu wrote: > >>How can I make a Combinatorial Algebra with an infinite basis? > >>I'm trying to make the nilHecke algebra for any root datum, > >>but I'll start with the nilCoxeter algebra. > This is already in sage: > > sage: H = IwahoriHeckeAlgebraT(['A',3,1],1,0,base_ring=ZZ, prefix='s') > sage: s = H.algebra_generators() > sage: s[1]*s[1] > s1 > sage: H = IwahoriHeckeAlgebraT(['B',3,1],1,0,base_ring=ZZ, prefix='s') > sage: s = H.algebra_generators() > sage: s[1]*s[1] > s1 Good point :-) sage: H = IwahoriHeckeAlgebraT(['B',3,1],0,0,base_ring=ZZ, prefix='s') sage: s = H.algebra_generators() sage: s[1]*s[1] 0 I was apparently too focused on doing it the monoid way (which we should do at some point though)! 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 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] Categorification of sage/rings/ring.pyx
Hi Simon, Applying your two patches trac11068_nc_ideals_and_quotients.patch trac7797-full_letterplace_wrapper_rel11068.patch in this order, I get the attached error for sage -b. Am I missing a patch? Is it now possible to extract the monomials or __dict__ for quotients of free algebras? Best, Anne -- ... Building sage/ext/interpreters/wrapper_cdf.pyx because it depends on sage/rings/ring.pxd. Building sage/ext/interpreters/wrapper_rr.pyx because it depends on sage/rings/ring.pxd. python `which cython` --cplus --embed-positions --directive cdivision=True,autotestdict=False -I/Applications/sage-4.6.2/devel/sage-combinat -o sage/algebras/letterplace/free_algebra_letterplace.cpp sage/algebras/letterplace/free_algebra_letterplace.pyx Error converting Pyrex file to C: ... cdef class FreeAlgebra_letterplace from sage.rings.ring cimport Algebra from sage.structure.element cimport AlgebraElement, ModuleElement, RingElement, Element from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomialRing_libsingular, MPolynomial_libsingular from sage.algebras.letterplace.free_algebra_element_letterplace cimport FreeAlgebraElement_letterplace ^ /Applications/sage-4.6.2/devel/sage-combinat/sage/algebras/letterplace/free_algebra_letterplace.pxd:15:0: 'sage.algebras.letterplace.free_algebra_element_letterplace.pxd' not found Error converting Pyrex file to C: ... cdef class FreeAlgebra_letterplace from sage.rings.ring cimport Algebra from sage.structure.element cimport AlgebraElement, ModuleElement, RingElement, Element from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomialRing_libsingular, MPolynomial_libsingular from sage.algebras.letterplace.free_algebra_element_letterplace cimport FreeAlgebraElement_letterplace ^ /Applications/sage-4.6.2/devel/sage-combinat/sage/algebras/letterplace/free_algebra_letterplace.pxd:15:0: 'FreeAlgebraElement_letterplace.pxd' not found Error converting Pyrex file to C: ... cdef class FreeAlgebra_letterplace from sage.rings.ring cimport Algebra from sage.structure.element cimport AlgebraElement, ModuleElement, RingElement, Element from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomialRing_libsingular, MPolynomial_libsingular from sage.algebras.letterplace.free_algebra_element_letterplace cimport FreeAlgebraElement_letterplace ^ /Applications/sage-4.6.2/devel/sage-combinat/sage/algebras/letterplace/free_algebra_letterplace.pxd:15:72: Name 'FreeAlgebraElement_letterplace' not declared in module 'sage.algebras.letterplace.free_algebra_element_letterplace' Error running command, failed with status 256. sage: There was an error installing modified sage library code. On 3/29/11 12:56 AM, Simon King wrote: Hi all! working on #11068, I tried to move the methods responsible for creating ideals and quotient rings from sage/rings/ring.pyx to sage/ categories/rings.py. However, it did not work, because rings are not using categories properly. I think I could manage to make them use categories. Or at least, Sage starts after my changes, and #9138 gets fixed! Question: Shall I use #9138 or another existing ticket (which one?) to submit a patch (if I really manage to fix it), or shall I open a new ticket? I did not find an appropriate ticket mentioned on the categories road map. Cheers, Simon -- 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] Re: sage question
On 3/31/11 12:38 AM, Nicolas M. Thiery wrote: Hi Mark! On Thu, Mar 31, 2011 at 12:39:44AM -0400, msh...@math.vt.edu wrote: How can I make a Combinatorial Algebra with an infinite basis? I'm trying to make the nilHecke algebra for any root datum, but I'll start with the nilCoxeter algebra. Finite or infinite basis does not really make a difference. Here is how to build just the vector space: sage: F = CombinatorialFreeModule(QQ, WeylGroup(["A",3,1])) sage: F.an_element() 2*B[[-1 1 0 1] [ 0 1 0 0] [ 0 0 1 0] [ 0 0 0 1]] + 3*B[[ 0 -1 1 1] [ 1 -1 1 0] [ 0 0 1 0] [ 0 0 0 1]] + B[[1 0 0 0] [0 1 0 0] [0 0 1 0] [0 0 0 1]] + B[[ 2 0 1 -2] [ 2 0 0 -1] [ 1 1 0 -1] [ 1 0 1 -1]] For an example of implementation of algebra (which is further graded, but you can ignore this part), you can have a look at: sage: A = GradedAlgebrasWithBasis(QQ).example() sage: A?? Note: this requires the sage-combinat patches. And of course there is the tutorial: http://combinat.sagemath.org/doc/reference/demos/tutorial-implementing-algebraic-structures.html Now, you may want to check out with Anne, since she might already have code for what you want. This is already in sage: sage: H = IwahoriHeckeAlgebraT(['A',3,1],1,0,base_ring=ZZ, prefix='s') sage: s = H.algebra_generators() sage: s[1]*s[1] s1 sage: H = IwahoriHeckeAlgebraT(['B',3,1],1,0,base_ring=ZZ, prefix='s') sage: s = H.algebra_generators() sage: s[1]*s[1] s1 Cheers, 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] Re: sage question
Hi Mark! On Thu, Mar 31, 2011 at 12:39:44AM -0400, msh...@math.vt.edu wrote: > How can I make a Combinatorial Algebra with an infinite basis? > I'm trying to make the nilHecke algebra for any root datum, > but I'll start with the nilCoxeter algebra. Finite or infinite basis does not really make a difference. Here is how to build just the vector space: sage: F = CombinatorialFreeModule(QQ, WeylGroup(["A",3,1])) sage: F.an_element() 2*B[[-1 1 0 1] [ 0 1 0 0] [ 0 0 1 0] [ 0 0 0 1]] + 3*B[[ 0 -1 1 1] [ 1 -1 1 0] [ 0 0 1 0] [ 0 0 0 1]] + B[[1 0 0 0] [0 1 0 0] [0 0 1 0] [0 0 0 1]] + B[[ 2 0 1 -2] [ 2 0 0 -1] [ 1 1 0 -1] [ 1 0 1 -1]] For an example of implementation of algebra (which is further graded, but you can ignore this part), you can have a look at: sage: A = GradedAlgebrasWithBasis(QQ).example() sage: A?? Note: this requires the sage-combinat patches. And of course there is the tutorial: http://combinat.sagemath.org/doc/reference/demos/tutorial-implementing-algebraic-structures.html Now, you may want to check out with Anne, since she might already have code for what you want. 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 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.