| 1 | initial version |
This should do the job:
def riAj(A,i,j):
return A.row(i-1)[:j]
def pAi(A,i):
for j in (1..A.ncols()):
if riAj(A,i,j) not in span(A.base_ring(),(riAj(A,k,j) for k in (1..i-1))):
return j
raise ValueError
| 2 | No.2 Revision |
This should do the job:
def riAj(A,i,j):
return A.row(i-1)[:j]
def pAi(A,i):
for j in (1..A.ncols()):
if A[0,j-1]!=0 and riAj(A,i,j) not in span(A.base_ring(),(riAj(A,k,j) for k in (1..i-1))):
return j
raise ValueError
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.