[sage-combinat-devel] Re: Categorification of sage/rings/ring.pyx

2011-04-18 Thread Simon King
Hi Anne,

On 18 Apr., 04:49, Anne Schilling a...@math.ucdavis.edu wrote:
 Hi Simon,

 Using your letterplace code, I get the following error:

 Singular error: no more memory
 System 65340600k:65340600k Appl 1084175k/64215466k Malloc 18133k/0k Valloc 
 65281508k/64215466k Pages 16320377/0 Regions 127623:127623

 halt 14

 Smaller computations are working fine.

 Any idea of how I could debug this?

It is known that letterplace computations tend to consume an awful lot
of memory. That is no surprise, since (at least if I am not mistaken)
the Letterplace Gröbner bases are not only infinite but the number of
its elements grows exponentially with the degree.

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

2011-04-18 Thread Nicolas M. Thiery
On Mon, Apr 18, 2011 at 12:47:05AM -0700, Simon King wrote:
 On 18 Apr., 04:49, Anne Schilling a...@math.ucdavis.edu wrote:
  Using your letterplace code, I get the following error:
 
  Singular error: no more memory
  System 65340600k:65340600k Appl 1084175k/64215466k Malloc 18133k/0k Valloc 
  65281508k/64215466k Pages 16320377/0 Regions 127623:127623
 
  halt 14
 
  Smaller computations are working fine.
 
  Any idea of how I could debug this?
 
 It is known that letterplace computations tend to consume an awful lot
 of memory. That is no surprise, since (at least if I am not mistaken)
 the Letterplace Gröbner bases are not only infinite but the number of
 its elements grows exponentially with the degree.

Out of curiosity: does Singular have any builtin memory limit, or is
it just using as much memory as is available on the system, as the
above seems to suggest?

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.



[sage-combinat-devel] Re: Categorification of sage/rings/ring.pyx

2011-04-18 Thread Simon King
Hi Nicolas,

On 18 Apr., 12:04, Nicolas M. Thiery nicolas.thi...@u-psud.fr
wrote:
 Out of curiosity: does Singular have any builtin memory limit, or is
 it just using as much memory as is available on the system, as the
 above seems to suggest?

Sorry, I have no idea if you need ulimit to prevent Singular from
eating all available resources, or if there is something else.

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

2011-04-18 Thread Simon King
PS:

On 18 Apr., 12:04, Nicolas M. Thiery nicolas.thi...@u-psud.fr
wrote:
 Out of curiosity: does Singular have any builtin memory limit, or is
 it just using as much memory as is available on the system, as the
 above seems to suggest?

We are using libSingular in this example, not a Singular subprocess
via pexpect. I would expect that libSingular has no separate memory
bound (or *can not* have, since it is just a C-library).

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: Categorification of sage/rings/ring.pyx

2011-04-17 Thread Anne Schilling

Hi Simon,

Using your letterplace code, I get the following error:

Singular error: no more memory
System 65340600k:65340600k Appl 1084175k/64215466k Malloc 18133k/0k Valloc 
65281508k/64215466k Pages 16320377/0 Regions 127623:127623

halt 14

Smaller computations are working fine.

Any idea of how I could debug this?

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] Re: Categorification of sage/rings/ring.pyx

2011-04-04 Thread Simon King
Hi Anne,

On 4 Apr., 06:42, Anne Schilling a...@math.ucdavis.edu wrote:
 Ok. Will you open it? Or do you want me to do so?


I'd prefer if you do.

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: Categorification of sage/rings/ring.pyx

2011-04-04 Thread Anne Schilling

On 4/4/11 11:39 AM, Simon King wrote:

Hi Anne,

On 4 Apr., 06:42, Anne Schillinga...@math.ucdavis.edu  wrote:

Ok. Will you open it? Or do you want me to do so?



I'd prefer if you do.


Ok, this is now #11127.

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.



Re: [sage-combinat-devel] Re: Categorification of sage/rings/ring.pyx

2011-04-03 Thread Anne Schilling

Hi Simon,


On 2 Apr., 08:50, Anne Schillinga...@math.ucdavis.edu  wrote:

...
I think this makes sense; when the elements in the quotient are printed,
there is also a choice which representative is printed. So going through
the iterator, one would just expect to give one of the representatives.
The result of the iterator would return elements of the quotient ring, not the
cover ring, right?


OK. But I think that should be on a different ticket, because it
contains quotient rings in general and not letterplace.


Ok. Will you open it? Or do you want me to do so?

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.



Re: [sage-combinat-devel] Re: Categorification of sage/rings/ring.pyx

2011-04-02 Thread Anne Schilling

Hi Simon,


On 1 Apr., 00:09, Anne Schillinga...@math.ucdavis.edu  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.


I think this makes sense; when the elements in the quotient are printed,
there is also a choice which representative is printed. So going through
the iterator, one would just expect to give one of the representatives.
The result of the iterator would return elements of the quotient ring, not the
cover ring, right?

Best wishes,

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.



Re: [sage-combinat-devel] Re: Categorification of sage/rings/ring.pyx

2011-04-01 Thread Nicolas M. Thiery
On Fri, Apr 01, 2011 at 12:07:36AM -0700, Simon King wrote:
 On 31 Mrz., 21:35, Simon King simon.k...@uni-jena.de wrote:
  Once again, I forgot to include __init__.py in a patch. I will update
  it on  trac tomorrow.
 
 Done. I don't know why, but aparently mercurial will not include an
 empty file in the patch. So, I filled __init__.py with a comment.

Yup; that's a know shortcoming of standard patches. You can request
git-style patches by throwing this in your .hgrc:

[diff]
git=1

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.



[sage-combinat-devel] Re: Categorification of sage/rings/ring.pyx

2011-03-31 Thread Simon King
Hi Anne,

On 31 Mrz., 14:09, Anne Schilling a...@math.ucdavis.edu 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.



[sage-combinat-devel] Re: Categorification of sage/rings/ring.pyx

2011-03-31 Thread Simon King
Hi Anne

On 31 Mrz., 14:09, Anne Schilling a...@math.ucdavis.edu 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.



Re: [sage-combinat-devel] Re: Categorification of sage/rings/ring.pyx

2011-03-31 Thread Anne Schilling

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

2011-03-29 Thread Simon King
Hi Nicolas,

On 29 Mrz., 11:00, Nicolas M. Thiery nicolas.thi...@u-psud.fr
wrote:
 I am happy with the recycling of this ticket. Especially since we also
 have #9944: categories for polynomial rings.

I guess that could be fixed as well. Currently I have
  sage: QQ['x'].category()
  Category of algebras over Rational Field
with my to-be-doctested-and finished patch. I think it could very well
be commutative algebras.

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

2011-03-29 Thread Simon King
Hi Nicolas,

On 29 Mrz., 11:19, Nicolas M. Thiery nicolas.thi...@u-psud.fr
wrote:
 All good, as long as it plays smoothly with the patches posted on
 #9944!

Hm. I guess that it is better to post on #9944 rather than on #9138,
then.

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.