aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/modring.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/modring.spad.pamphlet')
-rw-r--r--src/algebra/modring.spad.pamphlet18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/algebra/modring.spad.pamphlet b/src/algebra/modring.spad.pamphlet
index 3ee11ff6..e4303078 100644
--- a/src/algebra/modring.spad.pamphlet
+++ b/src/algebra/modring.spad.pamphlet
@@ -66,8 +66,7 @@ ModularRing(R,Mod,reduction:(R,Mod) -> R,
0 == [0$R,0$Mod]$Rep
1 == [1$R,0$Mod]$Rep
zero? x == zero? x.val
--- one? x == one? x.val
- one? x == (x.val = 1)
+ one? x == one? x.val
newmodulo(m1:Mod,m2:Mod) : Mod ==
r:=merge(m1,m2)
@@ -146,8 +145,7 @@ EuclideanModularRing(S,R,Mod,reduction:(R,Mod) -> R,
xm:=t::Mod
yv:=y.val
invlcy:R
--- if one? leadingCoefficient yv then invlcy:=1
- if (leadingCoefficient yv = 1) then invlcy:=1
+ if one? leadingCoefficient yv then invlcy:=1
else
invlcy:=(inv reduce((leadingCoefficient yv)::R,xm)).val
yv:=reduction(invlcy*yv,xm)
@@ -161,8 +159,7 @@ EuclideanModularRing(S,R,Mod,reduction:(R,Mod) -> R,
xm:=t::Mod
yv:=y.val
invlcy:R
--- if not one? leadingCoefficient yv then
- if not (leadingCoefficient yv = 1) then
+ if not one? leadingCoefficient yv then
invlcy:=(inv reduce((leadingCoefficient yv)::R,xm)).val
yv:=reduction(invlcy*yv,xm)
dy:=degree yv
@@ -178,8 +175,7 @@ EuclideanModularRing(S,R,Mod,reduction:(R,Mod) -> R,
xm:=t::Mod
yv:=y.val
invlcy:R
--- if not one? leadingCoefficient yv then
- if not (leadingCoefficient yv = 1) then
+ if not one? leadingCoefficient yv then
invlcy:=(inv reduce((leadingCoefficient yv)::R,xm)).val
yv:=reduction(invlcy*yv,xm)
r:=monicDivide(x.val,yv)
@@ -190,14 +186,12 @@ EuclideanModularRing(S,R,Mod,reduction:(R,Mod) -> R,
unitCanonical x ==
zero? x => x
degree(x.val) = 0 => 1
--- one? leadingCoefficient(x.val) => x
- (leadingCoefficient(x.val) = 1) => x
+ one? leadingCoefficient(x.val) => x
invlcx:%:=inv reduce((leadingCoefficient(x.val))::R,x.modulo)
invlcx * x
unitNormal x ==
--- zero?(x) or one?(leadingCoefficient(x.val)) => [1, x, 1]
- zero?(x) or ((leadingCoefficient(x.val)) = 1) => [1, x, 1]
+ zero?(x) or one?(leadingCoefficient(x.val)) => [1, x, 1]
lcx := reduce((leadingCoefficient(x.val))::R,x.modulo)
invlcx:=inv lcx
degree(x.val) = 0 => [lcx, 1, invlcx]