Alice Mark on Tue, 11 Dec 2012 03:10:58 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: SNF over a PID

Thanks for your response on this. I have a follow up question. Is there a way to have the output be similar to matsnf with the flag 1?


On 11/29/2012 02:28 PM, Bill Allombert wrote:
On Thu, Nov 29, 2012 at 01:13:29PM -0600, Alice Mark wrote:
Hello pari-users,

I would like to know if there is a way to find the Smith Normal Form
of a matrix over a PID other than the integers.  matsnf() seems to
only work on integer matrices.  Specifically, I'd like to do this in
an integer ring of some quadratic extension of Q (in a case where
that's a PID).
Hello Alice,

Note that matsnf also work for polynomial rings over field (which are PID).

In your case, you need to use nfsnf which also handles non principal
integer rings, hence has some complication, which you can mostly ignore.
(in particular, you can take all the b_i and c_i to be 1).

Here an example (where x denotes I)

? B=bnfinit(x^2+1);
? nfsnf(B,[[1,x;1,1],[1,1],[1,1]])
%6 = [[2,1;0,1],[1,0;0,1]]
? apply(x->bnfisprincipal(B,x)[2],%)
%7 = [[1,1]~,[1,0]~]

Since the integral basis is [1,I], the HNF is [1+I,1]