Today is easiest way and *secure* to use multiplicative_generator function:
sage: K=GF(2^4,'a') sage: K Finite Field in a of size 2^4 sage: b=K.random_element() sage: b.log(K.multiplicative_generator()) 14 sage: K.multiplib.log(K.multiplicative_generator()) K.multiplication_table K.multiplicative_generator sage: K.multiplicative_generator()^b.log(K.multiplicative_generator()) == b True Because the function log_repr() works only in some special cases. sage: K=GF(2^4,'a',modulus=ZZ['x']('x^4 + x^3 + x^2 + x + 1')); sage: K.list() [0, a + 1, a^2 + 1, a^3 + a^2 + a + 1, a^3 + a^2 + a, a^3 + a^2 + 1, a^3, a^2 + a + 1, a^3 + 1, a^2, a^3 + a^2, a^3 + a + 1, a, a^2 + a, a^3 + a, 1] sage: b=K.random_element() sage: b a^3 + a sage: b.log_repr() '14' sage: b^ZZ(b.log_repr()) == b False sage: K.multiplicative_generator() a^2 + a + 1 sage: K.multiplicative_generator()^ZZ(b.log(K.multiplicative_generator())) == b True On Monday, September 17, 2012 11:07:58 PM UTC+2, Mike OS wrote: > > HI > > I was asking myself this question and couldn't find an answer in the > documentation, not > in past posts (which is how I found this email). > > So I re-ask the question is there a way to have finite field elements > printed as powers of the primitive element? > > Thanks > > Mike > > On Saturday, October 31, 2009 2:34:38 AM UTC-7, Kwankyu wrote: >> >> Hi, >> >> Is it possible to get elements of a finite field printed as powers of >> a primitive element if the modulus is a primitive polynomial? That >> will save a lot of screen space. >> >> >> Kwankyu > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.