Hello all,
I do not know how to inverse a matrix over a special ring. The ring is
SymmetricFunction(QQ).schur() . For information, this ring has no method
is_unit for its elements (perhaps required to invert a matrix with a
unit determinant...) and this ring has no fraction_field implemented.
I would like to know what should I have to specify to just use a simple
formula such as 1 / (M.det()) * comatrix.transpose() ?
Here is a log : It's about basis change of a free module over symmetric
function of finite rank. I know mathematically that these basis changes
are inversibles (determinat are always unit). The Schur polynomial (or
function) indexed by the empty partition : s[] is equal to the one for
the multiplication in my ring.
**********************************************************************
sage: A = AbstractPolynomialRingAsSymModule(QQ, 3); A
Polynomial ring in x1, x2, x3 over Rational Field view as module over
symmetric polynomials over Rational Field
sage: S = A.Schubert(); S
Multivariate Polynomial in x1, x2, x3 over Symmetric Functions over
Rational Field in the Schur basis in Schur Schubert decomposition
sage: M = A.Staircase(); M
Multivariate Polynomial in x1, x2, x3 over Symmetric Functions over
Rational Field in the Schur basis expressed with monmials under the
staircase
sage: D = A.Descent(); D
Multivariate Polynomial in x1, x2, x3 over Symmetric Functions over
Rational Field in the Schur basis expressed with descent monomials
sage: H = A.Harmonic(); H
Multivariate Polynomial in x1, x2, x3 over Symmetric Functions over
Rational Field in the Schur basis expressed with harmonic polynomials
sage: T = H.transition_matrix(S); print T, '\n\n det : ',T.det()
[ 2*s[] 0 0
0 0 0]
[ 0 -2*s[]
4*s[] 0 0 0]
[ -2*s[1] 4*s[]
-2*s[] 0 0 0]
[ 2*s[1, 1] - s[2] s[1] -2*s[1]
-3*s[] 3*s[] 0]
[ s[1, 1] + s[2] -2*s[1] -2*s[1]
6*s[] 3*s[] 0]
[2*s[1, 1, 1] - s[2, 1] 2*s[1, 1] -2*s[1, 1] +
2*s[2] -4*s[1] -2*s[1] 6*s[]]
det : 3888*s[] # which inverse in my base ring is (1/3888)*s[]
sage: T = H.transition_matrix(M); print T, '\n\n det : ',T.det()
[ 2*s[] 0 0
0 0 0]
[ 0 -2*s[]
2*s[] 0 0 0]
[ -2*s[1] 4*s[]
2*s[] 0 0 0]
[ 2*s[1, 1] - s[2] s[1] -s[1]
-3*s[] 3*s[] 0]
[ s[1, 1] + s[2] -2*s[1] -4*s[1]
6*s[] 3*s[] 0]
[2*s[1, 1, 1] - s[2, 1] 2*s[1, 1] 2*s[2]
-4*s[1] -2*s[1] 6*s[]]
det : 3888*s[] # which inverse in my base ring is (1/3888)*s[]
sage: T1 = M.transition_matrix(S); print T1, '\n\n det : ',T1.det()
[ s[] 0 0 0 0 0]
[ 0 s[] -s[] 0 0 0]
[ 0 0 s[] 0 0 0]
[ 0 0 0 s[] 0 0]
[ 0 0 0 0 s[] 0]
[ 0 0 0 0 0 s[]]
det : s[] # which inverse in my base ring is s[]
sage: T2 = S.transition_matrix(M); print T2, '\n\n det : ',T2.det()
[s[] 0 0 0 0 0]
[ 0 s[] s[] 0 0 0]
[ 0 0 s[] 0 0 0]
[ 0 0 0 s[] 0 0]
[ 0 0 0 0 s[] 0]
[ 0 0 0 0 0 s[]]
det : s[] # which inverse in my base ring is s[]
sage: T1*T2
[s[] 0 0 0 0 0]
[ 0 s[] 0 0 0 0]
[ 0 0 s[] 0 0 0]
[ 0 0 0 s[] 0 0]
[ 0 0 0 0 s[] 0]
[ 0 0 0 0 0 s[]]
sage: identity_matrix(SymmetricFunctions(QQ).schur(), 6)
[s[] 0 0 0 0 0]
[ 0 s[] 0 0 0 0]
[ 0 0 s[] 0 0 0]
[ 0 0 0 s[] 0 0]
[ 0 0 0 0 s[] 0]
[ 0 0 0 0 0 s[]]
sage: T1*T2 == identity_matrix(SymmetricFunctions(QQ).schur(), 6)
True
sage: T1.inverse()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-69-47d795bb10d8> in <module>()
----> 1 T1.inverse()
/home/nborie/sage/local/lib/python2.7/site-packages/sage/matrix/matrix2.so
in sage.matrix.matrix2.Matrix.inverse (sage/matrix/matrix2.c:40647)()
/home/nborie/sage/local/lib/python2.7/site-packages/sage/matrix/matrix0.so
in sage.matrix.matrix0.Matrix.__invert__ (sage/matrix/matrix0.c:26304)()
/home/nborie/sage/local/lib/python2.7/site-packages/sage/matrix/matrix1.so
in sage.matrix.matrix1.Matrix.matrix_over_field
(sage/matrix/matrix1.c:5354)()
/home/nborie/sage/local/lib/python2.7/site-packages/sage/structure/parent.so
in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:6650)()
/home/nborie/sage/local/lib/python2.7/site-packages/sage/structure/misc.so
in sage.structure.misc.getattr_from_other_class
(sage/structure/misc.c:1606)()
AttributeError: 'SymmetricFunctionAlgebra_schur_with_category' object
has no attribute 'fraction_field'
**********************************************************************
And sorry, you could not reproduce this error as it depends on a large
part of the combinat queue and a local patch on my machine. If someone
already fall on this for another ring... Without the pubilicity for my
free modules, here is a simpler way to reproduced the error on a regular
Sage 5.10 :
**********************************************************************
sage: SF = SymmetricFunctions(QQ).schur()
sage: Id = identity_matrix(SF, 6); Id
[s[] 0 0 0 0 0]
[ 0 s[] 0 0 0 0]
[ 0 0 s[] 0 0 0]
[ 0 0 0 s[] 0 0]
[ 0 0 0 0 s[] 0]
[ 0 0 0 0 0 s[]]
sage: Id*Id
[s[] 0 0 0 0 0]
[ 0 s[] 0 0 0 0]
[ 0 0 s[] 0 0 0]
[ 0 0 0 s[] 0 0]
[ 0 0 0 0 s[] 0]
[ 0 0 0 0 0 s[]]
sage: Id.inverse()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-73-fddb04e767db> in <module>()
----> 1 Id.inverse()
/home/nborie/sage/local/lib/python2.7/site-packages/sage/matrix/matrix2.so
in sage.matrix.matrix2.Matrix.inverse (sage/matrix/matrix2.c:40647)()
/home/nborie/sage/local/lib/python2.7/site-packages/sage/matrix/matrix0.so
in sage.matrix.matrix0.Matrix.__invert__ (sage/matrix/matrix0.c:26304)()
/home/nborie/sage/local/lib/python2.7/site-packages/sage/matrix/matrix1.so
in sage.matrix.matrix1.Matrix.matrix_over_field
(sage/matrix/matrix1.c:5354)()
/home/nborie/sage/local/lib/python2.7/site-packages/sage/structure/parent.so
in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:6650)()
/home/nborie/sage/local/lib/python2.7/site-packages/sage/structure/misc.so
in sage.structure.misc.getattr_from_other_class
(sage/structure/misc.c:1606)()
AttributeError: 'SymmetricFunctionAlgebra_schur_with_category' object
has no attribute 'fraction_field'
**********************************************************************
Also, I apology for my English and don't judge the names appearing in my
code too hardly, that's still draft code which hasn't been readed by a
native speaker...
Cheers,
Nicolas Borie.
--
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.