Ask Your Question

pkoprowski's profile - activity

2020-10-26 09:11:12 +0200 received badge  Notable Question (source)
2015-11-30 05:53:04 +0200 received badge  Popular Question (source)
2015-02-16 14:56:46 +0200 received badge  Necromancer (source)
2014-06-29 21:19:31 +0200 received badge  Popular Question (source)
2014-06-29 21:19:31 +0200 received badge  Notable Question (source)
2013-10-18 20:49:01 +0200 received badge  Student (source)
2013-07-08 11:13:26 +0200 answered a question ideal primality in a polynomial ring with integer coefficients

I don't know how to do it in Sage, but the answer to the second part of your question (i.e. the theory) is in: P. Gianni, B. Trager, G. Zacharias "Groebner bases and primary decomposition of polynomial ideals" JSC 6/1988, 149-167 The same algorithm is AFAIR also in W. Adams, Ph. Loustaunau "Introduction to Groebner Bases"

Returning to the first part of your question - Sage uses Singular internally. I think Singular has an appropriate built-in. Hence, I think you will have to "tunnel" the problem down to Singular and do the work in it.

2013-06-30 03:54:54 +0200 received badge  Nice Answer (source)
2013-06-29 09:07:28 +0200 received badge  Teacher (source)
2013-06-29 08:58:11 +0200 received badge  Supporter (source)
2013-06-29 08:52:58 +0200 answered a question Get a matrix to display answers as decimals/floats, not fraction?

1) You can easily write matrix "multilined". By default Python joins lines if the first one contains an opening bracket/parenthesis. Hence you can easily write:

ma = matrix([
[25, 5, 1], 
[49, 7, 1], 
[81, 9, 1]])
mb = matrix([
[1121], 
[626],
[967]])

2) In order to display matrix entries as decimals you may convert a matrix base field to RDF like this:

ms = ma^-1 * mb
show(matrix(RDF, ms))

or alternatively:

show(ms.change_ring(RDF))
2013-06-29 05:19:40 +0200 commented answer Outputing lists without brackets in SageTeX

Thanks for your reply. It indeed solves the problem in two example cases I presented, but... still I sometimes need yet another delimiters around the sage's output (e.g $\langle$ or $\langle\langle$...)

2013-06-27 08:37:27 +0200 asked a question Outputing lists without brackets in SageTeX

Hi,

how can I output a list in SageTeX without it being enclosed in brackets? Consider for example:

\begin{sagesilent}
A = [ 1, 2, 4 ]
\end{sagesilent}

and in the text

... $A = \{ \sage{A} \}$

produces $A = \{ \left[1, 2, 4\right] \}$ instead of $\{ 1,2,4 \}$. Or a more realistic example:

\begin{sagesilent}
R.<x,y> = PolynomialRing(QQ, 'x,y', order='lex')
I = R.ideal(x^2+1, y*x-y)
\end{sagesilent}

and know somewhere in the text I want to put

The Groebner basis of $I$ is $\{ \sage{I.groebner_basis()} \}$

but the result is: $\{ \left[x^{2} + 1, y\right] \}$ rather then expected $\{ x^{2} + 1, y \}$

2013-02-14 12:02:14 +0200 asked a question Hyperbolic forms over Qp(2)

Is this a bug in Sage or am I doing something wrong:

q = DiagonalQuadraticForm(QQ, [1,1,-1,-1])
q.is_hyperbolic(2)

The answer should be clearly true, but Sage return false???

2012-12-23 10:24:53 +0200 asked a question is_square in p-adics

I need to find whether a given (often somewhat complicated) dyadic field contains $i$. I tried to use is_square method, but I'm getting error reports.

Consider the following (very simplified) example:

Q2 = Qp(2); Q2(-1).is_square()

As far as good - the answer is False as expected. So try a simple extension:

F.<a> = Qq(2^3); F(-1).is_square()

And... I'm getting an error message:

AttributeError: 'sage.rings.padics.padic_ZZ_pX_CR_element.pAdicZZpXCRElement' object has no attribute 'residue'

Is this a Sage bug or I'm doing something wrong?

2012-12-13 04:04:43 +0200 answered a question Normalization (integral closure)

I believe this can be easily computed with Macaulay-2, as documented here: http://www.math.uiuc.edu/Macaulay2/do... (BTW, this is yet another reason to integrate Sage with Macaulay by default, not only as a optional package.)