Thanks for you answer.
Ah well, I already tried to compute the adjugate of a corresponding
scalar field matrix, but it threw an error due to the is_field method.
So I thought it is not possible since the ring is no field (what I found
really strange, but god knows what algorithms are used). But I just
added a "proof=True" argument to scalar fields and now it's fine. I get
the feeling, interpreting error messages correctly is some kind of art. :D
Best regards,
Michael
Am 12.07.19 um 17:20 schrieb Vincent Delecroix:
> Or directly through the adjugate method
>
> sage: R. = ZZ[]
--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/4WVPLOHyMbc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/01b4c7c8-f4a6-a816-35b3-4614300a6178%40uni-potsdam.de.
For more options, visit https://groups.google.com/d/optout.
sage: M = Manifold(2, 'M', structure='top')
sage: X.<x,y> = M.chart()
sage: matrix = MatrixSpace(X.function_ring(), 2)([x,0,0,y]); matrix
[x 0]
[0 y]
sage: sage: matrix.adjugate()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4-4d376cef30d0> in <module>()
----> 1 matrix.adjugate()
/home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix.adjugate (build/cythonized/sage/matrix/matrix2.c:66666)()
8948 return X
8949
-> 8950 X = self._adjugate()
8951 self.cache('adjugate', X)
8952 return X
/home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix._adjugate (build/cythonized/sage/matrix/matrix2.c:66896)()
9064 MS = self._parent
9065
-> 9066 f = self.charpoly()
9067
9068 # A will be the adjugate of M and N is used to store powers of M
/home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix.charpoly (build/cythonized/sage/matrix/matrix2.c:20041)()
2353 elif is_IntegerModRing(R):
2354 f = self.lift().charpoly(var).change_ring(R)
-> 2355 elif R.is_field(proof = False) and R.is_exact():
2356 f = self._charpoly_hessenberg(var)
2357 else:
TypeError: is_integral_domain() got an unexpected keyword argument 'proof'
def is_field(self, proof=True):
if self.is_zero():
return False
if proof:
raise NotImplementedError("No way to prove that %s is an integral domain!" % self)
else:
return False
try:
is_field = R.is_field()
except TypeError:
is_field = (R in Rings())