aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/matrix.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/matrix.spad.pamphlet')
-rw-r--r--src/algebra/matrix.spad.pamphlet22
1 files changed, 11 insertions, 11 deletions
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