axiom-developer
[Top][All Lists]

## Re: [Axiom-developer] A quick question about finite fields and

 From: Waldek Hebisch Subject: Re: [Axiom-developer] A quick question about finite fields and Date: Tue, 17 Apr 2012 18:26:59 +0200 (CEST)

```Alasdair McAndrew wrote:
>
> Hello,
>
> I'm just looking at axiom again after some years, and I've run into a
> little conundrum.  I have two objects, an element u of the finite field
> FF(7,4), and the defining polynomial f of that field.  Thus:
>
> (67) -> u
> (67) ->
>             3      2
>    (67)  5%A  + 5%A  + %A
>                                                        Type:
> FiniteField(7,4)
> 68) -> f
> (68) ->
>           4
>    (68)  ?  + ? + 1
>                                 Type: SparseUnivariatePolynomial PrimeField
> 7
>
> What I want to do is to coerce both objects to polynomials over PF 7, so
> that I can factorize the result.  I want something like
>
> (69) -> factor(5*b^3+5*b^2+b+b^4+b+1::POLY PF 7)
> (69) ->
>    (69)  (b + 1)(b + 2)(b + 3)(b + 6)
>                                        Type: Factored Polynomial PrimeField
> 7
>
> But how can I obtain the polynomial in expression (69) without typing it
> in; that is, from u and f directly?

In interpreter that is easy:

(1) -> fF := FiniteField(7,4)

(1)  FiniteField(7,4)
Type: Type
(2) -> pF := PrimeField(7)

(2)  PrimeField(7)
Type: Type
(3) -> u := (5*b^3+5*b^2+b+b^4+b+1)::SparseUnivariatePolynomial(fF)

4     3     2
(3)  ?  + 5?  + 5?  + 2? + 1
Type: SparseUnivariatePolynomial(FiniteField(7,4))
(4) -> u::SparseUnivariatePolynomial(pF)

4     3     2
(4)  ?  + 5?  + 5?  + 2? + 1
Type: SparseUnivariatePolynomial(PrimeField(7))

In Spad you need to use:

map((c : fF) : pF +-> retract(c)@pF,
u)\$UnivariatePolynomialCategoryFunctions2(fF, SUP fF, pF, SUP pF)

In more complex cases you may need PolynomiaCategoryLifting.

--
Waldek Hebisch