ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 23 Sep 2019 19:43:06 +0200Elements of finitely presented modulehttps://ask.sagemath.org/question/47977/elements-of-finitely-presented-module/Hello everyone,
I am computing group homology and have to deal with huge boundary matrices. The result should be a finitely presented Z-module. But I got the following problem
M = Matrix(ZZ,3,[2,1,0,0,0,0,0,0,0])
V = M.left_kernel()
N = Matrix(ZZ,2,[0,2,2,0,0,0])
W = N.image()
Q = V/W
Q.0
Then I got the warning
"repr(sage.modules.fg_pid.fgp_module.FGP_Module_class_with_category.element_class at 0x7ff4aad554b0) failed: AttributeError: 'sage.matrix.matrix_integer_sparse.Matrix_integer_sparse' object has no attribute '_clear_denom'
Do you have any idea how I can get through this? I want to know information about the generators of Q.
I can't even ask for its additive order
x = Q.0
x.additive_order()
Thank you!Thu, 19 Sep 2019 16:54:30 +0200https://ask.sagemath.org/question/47977/elements-of-finitely-presented-module/Comment by tmonteil for <p>Hello everyone,</p>
<p>I am computing group homology and have to deal with huge boundary matrices. The result should be a finitely presented Z-module. But I got the following problem</p>
<pre><code>M = Matrix(ZZ,3,[2,1,0,0,0,0,0,0,0])
V = M.left_kernel()
N = Matrix(ZZ,2,[0,2,2,0,0,0])
W = N.image()
Q = V/W
Q.0
</code></pre>
<p>Then I got the warning </p>
<pre><code> "repr(sage.modules.fg_pid.fgp_module.FGP_Module_class_with_category.element_class at 0x7ff4aad554b0) failed: AttributeError: 'sage.matrix.matrix_integer_sparse.Matrix_integer_sparse' object has no attribute '_clear_denom'
</code></pre>
<p>Do you have any idea how I can get through this? I want to know information about the generators of Q.</p>
<p>I can't even ask for its additive order</p>
<pre><code>x = Q.0
x.additive_order()
</code></pre>
<p>Thank you!</p>
https://ask.sagemath.org/question/47977/elements-of-finitely-presented-module/?comment=47995#post-id-47995It works for me (Sage 8.9.rc0 complied on Debian jessie 64bit, run from the command line).
Could you please give us some informations so that someone can try to reproduce your problem:
- which version of Sage did you use ?
- which OS ?
- did you install Sage from the binaries, and which ones ?
- did you compile Sage yourself ?
- which notebook did you use (Sage notebook or jupyter notebook) ?
- did you use the command line ?
- ... ?Fri, 20 Sep 2019 20:59:12 +0200https://ask.sagemath.org/question/47977/elements-of-finitely-presented-module/?comment=47995#post-id-47995Comment by FrédéricC for <p>Hello everyone,</p>
<p>I am computing group homology and have to deal with huge boundary matrices. The result should be a finitely presented Z-module. But I got the following problem</p>
<pre><code>M = Matrix(ZZ,3,[2,1,0,0,0,0,0,0,0])
V = M.left_kernel()
N = Matrix(ZZ,2,[0,2,2,0,0,0])
W = N.image()
Q = V/W
Q.0
</code></pre>
<p>Then I got the warning </p>
<pre><code> "repr(sage.modules.fg_pid.fgp_module.FGP_Module_class_with_category.element_class at 0x7ff4aad554b0) failed: AttributeError: 'sage.matrix.matrix_integer_sparse.Matrix_integer_sparse' object has no attribute '_clear_denom'
</code></pre>
<p>Do you have any idea how I can get through this? I want to know information about the generators of Q.</p>
<p>I can't even ask for its additive order</p>
<pre><code>x = Q.0
x.additive_order()
</code></pre>
<p>Thank you!</p>
https://ask.sagemath.org/question/47977/elements-of-finitely-presented-module/?comment=48012#post-id-48012Works fine for me too in 8.9.rc0Sat, 21 Sep 2019 16:35:38 +0200https://ask.sagemath.org/question/47977/elements-of-finitely-presented-module/?comment=48012#post-id-48012Comment by John Palmieri for <p>Hello everyone,</p>
<p>I am computing group homology and have to deal with huge boundary matrices. The result should be a finitely presented Z-module. But I got the following problem</p>
<pre><code>M = Matrix(ZZ,3,[2,1,0,0,0,0,0,0,0])
V = M.left_kernel()
N = Matrix(ZZ,2,[0,2,2,0,0,0])
W = N.image()
Q = V/W
Q.0
</code></pre>
<p>Then I got the warning </p>
<pre><code> "repr(sage.modules.fg_pid.fgp_module.FGP_Module_class_with_category.element_class at 0x7ff4aad554b0) failed: AttributeError: 'sage.matrix.matrix_integer_sparse.Matrix_integer_sparse' object has no attribute '_clear_denom'
</code></pre>
<p>Do you have any idea how I can get through this? I want to know information about the generators of Q.</p>
<p>I can't even ask for its additive order</p>
<pre><code>x = Q.0
x.additive_order()
</code></pre>
<p>Thank you!</p>
https://ask.sagemath.org/question/47977/elements-of-finitely-presented-module/?comment=48041#post-id-48041You can also use the `ChainComplex` construction in Sage: given your `M` and `N`, you could do `C = ChainComplex({0: M, 1: N})`, where the numbers 0 and 1 indicate the dimensions indexing those matrices, and then you can ask for `C.homology()` or `H = C.homology(2); H.gen(0).additive_order()`, etc.Mon, 23 Sep 2019 19:43:06 +0200https://ask.sagemath.org/question/47977/elements-of-finitely-presented-module/?comment=48041#post-id-48041