aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/carten.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-10-25 03:47:29 +0000
committerdos-reis <gdr@axiomatics.org>2011-10-25 03:47:29 +0000
commit2092a554d70524bc90440d96367e32c9ede28ee8 (patch)
treef60d455b9d03bfe6454bb2ae33b82114aeb3f91b /src/algebra/carten.spad.pamphlet
parent99aeb02edd1614d30e308a9267325f138617d58f (diff)
downloadopen-axiom-2092a554d70524bc90440d96367e32c9ede28ee8.tar.gz
* algebra/perman.spad.pamphlet (Permanent): Specify type of local
variable j. * algebra/patmatch1.spad.pamphlet (PatternMatchTools): Tidy. * algebra/padic.spad.pamphlet: Restrict type of literal constants. * algebra/sttf.spad.pamphlet: Likewise. * algebra/puiseux.spad.pamphlet: Likewise. * algebra/odealg.spad.pamphlet (SystemODESolver) [applyLodo0]: Specify type of local variable ans. * algebra/numtheor.spad.pamphlet (IntegerNumberTheoryFunctions): Tidy. * algebra/naalgc.spad.pamphlet (MonadWithUnit) [rightPower]: Specify type of local variable res. [leftPower]: Likewise. * algebra/lodop.spad.pamphlet (NonCommutativeOperatorDivision) [leftLcm]: Specify type of local variable v. * algebra/intfact.spad.pamphlet (IntegerRoots) [approxSqrt]: Specify type of local variables old and new. * algebra/elfuts.spad.pamphlet (EllipticFunctionsUnivariateTaylorSeries): Restrict types of literal constants. * algebra/ffnb.spad.pamphlet (FiniteFieldNormalBasisExtensionByPolynomial): Likewise. * algebra/fnla.spad.pamphlet (FreeNilpotentLie): Likewise. * algebra/intaux.spad.pamphlet (IntegrationResult): Likewise. * algebra/defintef.spad.pamphlet (ElementaryFunctionDefiniteIntegration) [checkSMP]: Specify type in the definition of local variable n. * algebra/combinat.spad.pamphlet (IntegerCombinatoricFunctions): Tidy definition of local variables. * algebra/clifford.spad.pamphlet (CliffordAlgebra): Specify type in the definition of local variables k, exchanges, bz. * algebra/catdef.spad.pamphlet (CartesianTensor): Specify type in the definition of local varibles rx and offz. Remove useless variables zol, xol, oly, and zoly.
Diffstat (limited to 'src/algebra/carten.spad.pamphlet')
-rw-r--r--src/algebra/carten.spad.pamphlet22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/algebra/carten.spad.pamphlet b/src/algebra/carten.spad.pamphlet
index a1fd01f6..7cc2fbbb 100644
--- a/src/algebra/carten.spad.pamphlet
+++ b/src/algebra/carten.spad.pamphlet
@@ -272,7 +272,7 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
v = dim2 => 2
v = dim3 => 3
v = dim4 => 4
- rx := 0
+ rx: NNI := 0
while v ~= 0 repeat
qr := divide(v, dim)
v := qr.quotient
@@ -431,7 +431,7 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
z
coerce(m: SM(dim,R)): % ==
z := new(dim**2, 0)
- offz := 0
+ offz: NNI := 0
for i in 0..dim-1 repeat
for j in 0..dim-1 repeat
set!(z, offz + j, m(i+1,j+1))
@@ -500,7 +500,7 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
error "Improper index for contraction"
if i > j then (i,j) := (j,i)
- rl:= (rx- j) pretend NNI; nl:= dim**rl; zol:= 1; xol:= zol
+ rl:= (rx- j) pretend NNI; nl:= dim**rl
rm:= (j-i-1) pretend NNI; nm:= dim**rm; zom:= nl; xom:= zom*dim
rh:= (i - 1) pretend NNI; nh:= dim**rh; zoh:= nl*nm
xoh:= zoh*dim**2
@@ -511,7 +511,7 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
for m in 1..nm _
for xm in xh.. by xom for zm in zh.. by zom repeat
for l in 1..nl _
- for xl in xm.. by xol for zl in zm.. by zol repeat
+ for xl in xm.. for zl in zm.. repeat
set!(z, zl, 0)
for k in 1..dim for xk in xl.. by xok repeat
set!(z, zl, get(z,zl) + get(x,xk))
@@ -524,11 +524,11 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
i < 1 or i > rx or j < 1 or j > ry =>
error "Improper index for contraction"
- rly:= (ry-j) pretend NNI; nly:= dim**rly; oly:= 1; zoly:= 1
+ rly:= (ry-j) pretend NNI; nly:= dim**rly
rhy:= (j -1) pretend NNI; nhy:= dim**rhy
- ohy:= nly*dim; zohy:= zoly*nly
+ ohy:= nly*dim; zohy:= nly
rlx:= (rx-i) pretend NNI; nlx:= dim**rlx
- olx:= 1; zolx:= zohy*nhy
+ zolx:= zohy*nhy
rhx:= (i -1) pretend NNI; nhx:= dim**rhx
ohx:= nlx*dim; zohx:= zolx*nlx
@@ -537,11 +537,11 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
for dxh in 1..nhx _
for xh in 0.. by ohx for zhx in 0.. by zohx repeat
for dxl in 1..nlx _
- for xl in xh.. by olx for zlx in zhx.. by zolx repeat
+ for xl in xh.. for zlx in zhx.. by zolx repeat
for dyh in 1..nhy _
for yh in 0.. by ohy for zhy in zlx.. by zohy repeat
for dyl in 1..nly _
- for yl in yh.. by oly for zly in zhy.. by zoly repeat
+ for yl in yh.. for zly in zhy.. repeat
set!(z, zly, 0)
for k in 1..dim _
for xk in xl.. by nlx for yk in yl.. by nly repeat
@@ -556,13 +556,13 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
error "Improper indicies for transposition"
if i > j then (i,j) := (j,i)
- rl:= (rx- j) pretend NNI; nl:= dim**rl; zol:= 1; zoi := zol*nl
+ rl:= (rx- j) pretend NNI; nl:= dim**rl; zoi := nl
rm:= (j-i-1) pretend NNI; nm:= dim**rm; zom:= nl*dim; zoj := zom*nm
rh:= (i - 1) pretend NNI; nh:= dim**rh; zoh:= nl*nm*dim**2
z := new(#x, 0)
for h in 1..nh for zh in 0.. by zoh repeat _
for m in 1..nm for zm in zh.. by zom repeat _
- for l in 1..nl for zl in zm.. by zol repeat _
+ for l in 1..nl for zl in zm.. repeat _
for p in 1..dim _
for zp in zl.. by zoi for xp in zl.. by zoj repeat
for q in 1..dim _