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.Wed, 27 Feb 2019 04:36:56 +0100Calculating Milnor Numbers of Polynomials Using Singular via Sagehttps://ask.sagemath.org/question/45557/calculating-milnor-numbers-of-polynomials-using-singular-via-sage/I'm using Singular via Sage Math to calculate the Milnor numbers of a large number of polynomials. For most polynomials, doing `polynomial.milnor()` works fine, however I am getting a `-1` when I have a variable raised to a power times another variable. I have manually calculated the first Milnor number, and it should be `8`. For instance:
Works fine:
sage: ring = singular.ring(0,'(x,y,z)','ds')
sage: polynomial = singular('-x2+x3-y3+xy3-z5+xz5')
sage: _=singular.lib('sing.lib')
sage: polynomial.milnor()
8
Returns error:
sage: polynomial2 = singular('y2-x3-z2x2')
sage: polynomial2.milnor()
-1
I am following these documentation pages:
- Interface to Singular (Sage Interpreter Interfaces)
- D.6.15.10 milnor (Singular Documentation)
I can't publish links due to low karma, sorry!
By the second page, the `-1` would imply that the function is an isolated complete intersection singularity. This function does not have an ICIS to my knowledge, and I have tested several other functions which I can provide. I think that singular is interpreting the polynomial as `y2-x3-z^(2x2)`, instead of the wanted `y2-x3-(z2)(x2)`, but I am new to Sage and unsure of how to fix this (I attempted parentheses and it threw back an error).StrongPiccoloWed, 27 Feb 2019 04:36:56 +0100https://ask.sagemath.org/question/45557/Can I get a matrix to show with brackets instead of parentheses?https://ask.sagemath.org/question/24068/can-i-get-a-matrix-to-show-with-brackets-instead-of-parentheses/I'm using Sage and SageTeX to make worksheets and quizzes for my Linear Algebra course. I'd like my presentation to match the book's, and the book uses brackets around its matrices instead of parentheses. Is that doable? Is there a way, for example, to get `latex(A)` to generate
\left[\begin{array}{rrr} 6 & 6 & 1 \\ 7 & 0 & 6 \\ 4 & -7 & -7 \end{array}\right]
instead of
\left(\begin{array}{rrr} 6 & 6 & 1 \\ 7 & 0 & 6 \\ 4 & -7 & -7 \end{array}\right)
for some matrix A.mathochistTue, 09 Sep 2014 17:28:54 +0200https://ask.sagemath.org/question/24068/