I think a lot of the matrix code is assumed to work over commutative rings, but there is no assumption on them being fields. The MixedFormAlgebra is not commutative, correct? If so, I think the best thing is to implement what you need (i.e., the determinant) as a separate function for now. Otherwise, you should mark it in Algebras(R).Commutative() and you should be able to just use the generic matrix class and its determinant in Sage.
sage: R.<x,y,z> = QQ[] sage: Q = R.quotient([x^2*y-x,y^2-z,z^2-2*x*y-x-y-z]) sage: M = matrix([[Q(R.random_element()) for _ in range(3)] for _ in range(3 )]) sage: M [ -35/2*ybar*zbar + 1/2*zbar^2 - 1/2*xbar - 1/2*ybar + 1/2*zbar xbar*zbar + 3*zbar^2 - 1/3*ybar + 2/3*zbar -13*xbar^2 - 3*xbar*zbar - 1/2*ybar*zbar - 5*zbar^2 - 1/2*xbar] [ 1/2*zbar^2 + 1/2*xbar - 3/2*ybar + 9/2*zbar 8*xbar*zbar + 2*zbar^2 - 1/38 2*xbar^2 - zbar^2 + ybar] [ -1/6*ybar*zbar + 43/41*zbar^2 - xbar - ybar - zbar + 5/2 83/414*zbar^2 + 1/46*xbar + 1/46*ybar + 1/46*zbar -27/2*zbar^ 2 + 191/14*xbar + 13*ybar + 25/2*zbar] sage: M.det() 8984729371/2006704*zbar^3 + 8060049989/2257542*xbar^2 + 14983126743/2006704* xbar*zbar - 78071057467/18060336*ybar*zbar + 2763514553/785232*zbar^2 + 648366185/125419*xbar - 23760880219/3010056*ybar - 573699071/73416*zbar sage: type(M) <type 'sage.matrix.matrix_generic_dense.Matrix_generic_dense'> Best, Travis On Wednesday, May 15, 2019 at 3:34:51 AM UTC+10, Michael Jung wrote: > > Unfortunately, I noticed that the algorithm of computing the determinant > of MixedForm elements doesn't work for matrices of dimension higher than 3 > since MixedFormAlgebra isin general not a field. > > So, is it useful to create a new matrix class for this kind of purpose? If > so, how is the matrix implementation structured in sagemath? I couldn't > find any helpful documentation. > > And furthermore, what would be an appropriate efficient algorithm to > compute the determinant? Is it possible to use parallel processing, and if > so, how? > > Best regards > Michael > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@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/45649280-b349-4836-8279-02ed13ca8f39%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.