Kevin Acres on Thu, 24 Dec 2009 13:00:13 +0100


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

Re: How to implement equivalent of magma NullSpace in Pari/GP


Hi,

Thanks both Bill and John for the help.  I've got what I need now.

lift(matker(M2~*Mod(1,2))~) does the job, but it seems that FpM_ker(M2~, 2)~ does it quicker.

Both of these directly replace the Magma NullSpace function in the context that I'm using it.

Once again many thanks for the help. I can get back to the snfs port once more.


Best Regards,

Kevin.


At 10:30 PM 24/12/2009, John Cremona wrote:
2009/12/24 Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
> On Thu, Dec 24, 2009 at 08:33:41PM +1100, Kevin Acres wrote:
>> Hi,
>>
>> I'm trying to implement an equivalent of the Magma NullSpace() function.
>
> In PARI, this is called matker().
>
>> For example I'd like:
>>
>> [0 0 0 1 0 0 1 0]
>> [1 0 1 0 0 0 1 0]
>> [1 1 0 0 0 0 0 1]
>> [0 1 1 0 0 0 0 1]
>> [0 1 1 0 0 0 0 0]
>> [0 0 1 0 0 1 0 0]
>>
>> to return
>>
>> [0 1 0 0 0 0 0 0 1]
>> [0 0 1 0 0 1 1 0 0]
>
> Really ?  If you want to compute the kernel over Z/2Z then you should do
> matker(M*Mod(1,2)).

Perhaps not "should":  from the documentation of matker,

   Note:  The library function FpM_ker(x,  p),  where x has integer
entries reduced mod p and p is
prime,  is equivalent to,  but orders of magnitude faster than,
matker(x*Mod(1,p)) and needs much
less stack space. To use it under gp, type install(FpM_ker, GG) first.

John


>
> Cheers,
> Bill.
>