From 2f4a173a01acbc47bbe855a01ea79b18d0a0c4a0 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 21 Dec 2008 02:20:35 +0000 Subject: * interp/define.boot (checkRepresentation): Take a third argument. Provide view morphisms for domain extensions. (compCapsule): Adjust call. * algebra/alql.spad.pamphlet (DataList): Use per and rep. * algebra/fortmac.spad.pamphlet (MachineInteger): Likewise. * algebra/fortran.spad.pamphlet (FortranExpression): Likewise. * algebra/integer.spad.pamphlet (NonNegativeInteger): Likewise. (PositiveInteger): Likewise. * algebra/ituple.spad.pamphlet (InfiniteTuple): Likewise. * algebra/matrix.spad.pamphlet (RectangularMatrix): Likewise. * algebra/pf.spad.pamphlet (InnerPrimeField): Likewise. * algebra/radix.spad.pamphlet (BinaryExpansion): Likewise. (DecimalExpansion): Likewise. (HexadecimalExpansion): Likewise. --- src/algebra/matrix.spad.pamphlet | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/algebra/matrix.spad.pamphlet') diff --git a/src/algebra/matrix.spad.pamphlet b/src/algebra/matrix.spad.pamphlet index 660a5de4..d017dc19 100644 --- a/src/algebra/matrix.spad.pamphlet +++ b/src/algebra/matrix.spad.pamphlet @@ -293,10 +293,10 @@ RectangularMatrix(m,n,R): Exports == Implementation where mini ==> minIndex maxi ==> maxIndex - ZERO := new(m,n,0)$Matrix(R) pretend $ + ZERO := per new(m,n,0)$Matrix(R) 0 == ZERO - coerce(x:$):OutputForm == coerce(x pretend Matrix R)$Matrix(R) + coerce(x:$):OutputForm == rep(x)::OutputForm matrix(l: List List R) == -- error check: this is a top level function @@ -307,28 +307,28 @@ RectangularMatrix(m,n,R): Exports == Implementation where for i in minr(ans)..maxr(ans) for ll in l repeat for j in minc(ans)..maxc(ans) for r in ll repeat qsetelt_!(ans,i,j,r) - ans pretend $ + per ans - row(x,i) == directProduct row(x pretend Matrix(R),i) - column(x,j) == directProduct column(x pretend Matrix(R),j) + row(x,i) == directProduct row(rep x,i) + column(x,j) == directProduct column(rep x,j) - coerce(x:$):Matrix(R) == copy(x pretend Matrix(R)) + coerce(x:$):Matrix(R) == copy rep x rectangularMatrix x == (nrows(x) ~= m) or (ncols(x) ~= n) => error "rectangularMatrix: matrix of bad dimensions" - copy(x) pretend $ + per copy(x) if R has EuclideanDomain then - rowEchelon x == rowEchelon(x pretend Matrix(R)) pretend $ + rowEchelon x == per rowEchelon(rep x) if R has IntegralDomain then - rank x == rank(x pretend Matrix(R)) - nullity x == nullity(x pretend Matrix(R)) + rank x == rank rep x + nullity x == nullity rep x nullSpace x == - [directProduct c for c in nullSpace(x pretend Matrix(R))] + [directProduct c for c in nullSpace rep x] if R has Field then -- cgit v1.2.3