diff options
Diffstat (limited to 'src/algebra/ffnb.spad.pamphlet')
-rw-r--r-- | src/algebra/ffnb.spad.pamphlet | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/algebra/ffnb.spad.pamphlet b/src/algebra/ffnb.spad.pamphlet index c283b9ff..a4441b5a 100644 --- a/src/algebra/ffnb.spad.pamphlet +++ b/src/algebra/ffnb.spad.pamphlet @@ -186,8 +186,7 @@ InnerNormalBasisFieldFunctions(GF): Exports == Implementation where a ** ex == e:NNI:=positiveRemainder(ex,sizeGF**((#a)::PI)-1)$I :: NNI zero?(e)$NNI => new(#a,trGen)$VGF --- one?(e)$NNI => copy(a)$VGF - (e = 1)$NNI => copy(a)$VGF + one?(e)$NNI => copy(a)$VGF -- inGroundField?(a) => new(#a,((a.1*trGen) **$GF e))$VGF e1:SI:=(length(e)$I)::SI sizeGF >$I 11 => @@ -213,8 +212,7 @@ InnerNormalBasisFieldFunctions(GF): Exports == Implementation where -- computes a**e by repeated squaring repSq(b,e) == a:=copy(b)$VGF --- one? e => a - (e = 1) => a + one? e => a odd?(e)$I => a * repSq(a*a,(e quo 2) pretend NNI) repSq(a*a,(e quo 2) pretend NNI) @@ -586,13 +584,11 @@ FiniteFieldNormalBasisExtensionByPolynomial(GF,uni): Exports == _ coerce(x:$):OUT == l:List OUT:=nil()$(List OUT) n : PI := extdeg --- one? n => (x.1) :: OUT - (n = 1) => (x.1) :: OUT + one? n => (x.1) :: OUT for i in 1..n for b in basisOutput repeat if not zero? x.i then mon : OUT := --- one? x.i => b - (x.i = 1) => b + one? x.i => b ((x.i)::OUT) *$OUT b l:=cons(mon,l)$(List OUT) null(l)$(List OUT) => (0::OUT) |