aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/matrix.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-12-21 02:20:35 +0000
committerdos-reis <gdr@axiomatics.org>2008-12-21 02:20:35 +0000
commit2f4a173a01acbc47bbe855a01ea79b18d0a0c4a0 (patch)
tree4f15c7ade2b48e69c25bdf8ce7d721a5a016a6c1 /src/algebra/matrix.spad.pamphlet
parent93853a12aba78b695405d9275f9ab56b01ec4269 (diff)
downloadopen-axiom-2f4a173a01acbc47bbe855a01ea79b18d0a0c4a0.tar.gz
* 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.
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