diff options
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/padic.spad.pamphlet | 11 | ||||
-rw-r--r-- | src/algebra/polycat.spad.pamphlet | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/algebra/padic.spad.pamphlet b/src/algebra/padic.spad.pamphlet index 61e5ca9a..6b3481d1 100644 --- a/src/algebra/padic.spad.pamphlet +++ b/src/algebra/padic.spad.pamphlet @@ -290,18 +290,21 @@ InnerPAdicInteger(p,unBalanced?): Exports == Implementation where coerce(x:%):OUT == empty?(st := stream x) => 0 :: OUT - n : NNI ; count : NNI := _$streamCount$Lisp + count : NNI := _$streamCount$Lisp l : L OUT := empty() - for n in 0..count while not empty? st repeat + n : NNI := 0 + while n <= count while not empty? st repeat if frst(st) ~= 0 then l := concat(termOutput(n :: I,frst st),l) st := rst st + n := n + 1 if showAll?() then - for n in (count + 1).. while explicitEntries? st and _ - not eq?(st,rst st) repeat + n := count + 1 + while explicitEntries? st and not eq?(st,rst st) repeat if frst(st) ~= 0 then l := concat(termOutput(n pretend I,frst st),l) st := rst st + n := n + 1 l := explicitlyEmpty? st => l eq?(st,rst st) and frst st = 0 => l diff --git a/src/algebra/polycat.spad.pamphlet b/src/algebra/polycat.spad.pamphlet index a7d306f7..e48b3214 100644 --- a/src/algebra/polycat.spad.pamphlet +++ b/src/algebra/polycat.spad.pamphlet @@ -141,7 +141,6 @@ FiniteAbelianMonoidRing(R:Ring, E:OrderedAbelianMonoid): Category == ans,xn,yn: % bincoef: Integer powl: List(%):= [x] - i : Integer for i in 2..nn repeat powl:=[x * powl.first, :powl] yn:=y; ans:=powl.first; i:=1; bincoef:=nn for xn in powl.rest repeat |