On Monday, 14 September 2015 09:44:48 UTC-7, eggartmumie wrote:
>
> Dear Vincent,
>
> thank You for Your advice.
> Probably I am extremely slow-witted, but I know PolynomialRing, polygen etc
> Using Your suggestion I get _polynomials_ like x0, x1, x2, x3, x4 or x0 + 
> 2*x1 
> which have a degree, a constant term, which can be partially 
> differentiated etc. 
> What I do _not_ get is a variable which assumes values in a certain finite 
> field.
> Unfortunately SAGE let me specify var('x',domain = GF(3)) but ignores the 
> specification of the domain: 
> x is essentially a variable which assumes complex values.
>
 
You are right:  Sage does not support "symbolic calculus over finite 
fields".
On the other hand,  every function over  a finite field can be written as a 
polynomial, more or less...
Thus, why would you ever need to do var('x',domain = GF(3)) ?

E.g.
sage: R.<x,y>=PolynomialRing(GF(3))
sage: p=x^2+y^2+1
sage: p
x^2 + y^2 + 1
sage: p(1,-1)
0

(so you see it's all consistent, as 1+1+1 = 0 mod 3...)



 
> I consider to write variable elements of F.<a> = GF(2^2) 
> as c_1*a+c_o with complex variables c_o and c_1.
> But then I have to implement all arithmetic in F and its extension fields 
> by hand.
>

what do you need to compute?

 

> This is not what I expect is the right way to do it in SAGE.
> What do You recommend? Best Eggart
>
>
>
> Am Montag, 14. September 2015 00:15:31 UTC+2 schrieb vdelecroix:
>>
>> Hello, 
>>
>> You would better use polynomial variables 
>>
>> sage: R = PolynomialRing(GF(3), 'x', 5) 
>> sage: R.gens() 
>> (x0, x1, x2, x3, x4) 
>> sage: x0,x1,x2,x3,x4 = R.gens() 
>> sage: x0 + 2*x1 
>> x0 - x1 
>>
>> But you can only do polynomial computations with them 
>>
>> sage: x0 ** x1 
>> Traceback (most recent call last): 
>> ... 
>> TypeError: non-integral exponents not supported 
>>
>> Is that enough for your purpose? 
>>
>> Vincent 
>>
>> On 13/09/15 19:04, eggartmumie wrote: 
>> > Hi, 
>> > 
>> > in the context of HFE pf post quantum cryprography 
>> > I had to realize that symbolic variables are real or complex only. 
>> > SAGE ignores a 'domain=F' in var('x',domain=F) for some finite field F! 
>> > Is it possible to define symbolic variables as elements of a finite 
>> field? 
>> > I need such variables in order to determine the public set of 
>> polynomials 
>> > given the private conversion T\circ iso^{-1} \circ P\circ iso\circ S 
>> > where S and T are matrix transformations of vectors over some field F, 
>> > iso is the vector space isomorphism of F^n to the extension field E, 
>> > and P is some polynomial on E. 
>> > It is easy to determine the conversion of a given vector over F. 
>> > But how can I compute the n multivariate polynomials if the argument 
>> > is a symbolic vector over F? 
>> > I am using SAGE 6.2. 
>> > Any indication is very much appreciated, best Eggart 
>> > 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to