scalar restriction in extension field

47 views
Skip to first unread message

fanx...@iie.ac.cn

unread,
Apr 16, 2018, 6:48:21 AM4/16/18
to sage-support
I have constructed  a big prime field:
>>p=68235916425158872634653027
>>F=GF(p)

And then I constructed two extension field:
>>E1=GF(p^2)
>>E2=GF(p^6)

It is obvious that E2 is the extension of E1. Now I want to expression the element in E2 into a vector with the basis in E1. I use :

>>from sage.coding.relative_finite_field_extension import *
>>FE=RelativeFiniteFieldExtension(E2,E1)

It has an error :"AttributeError: 'int' objects has no attribute 'devides'.

But the above sentences is correct when the p is smaller.

What should I do ?

Vincent Delecroix

unread,
Apr 16, 2018, 7:07:29 AM4/16/18
to sage-s...@googlegroups.com
On 16/04/2018 09:21, fanx...@iie.ac.cn wrote:
> I have constructed a big prime field:
>>> p=68235916425158872634653027
>>> F=GF(p)

Here is what I get

sage: p = 68235916425158872634653027
sage: F = GF(p)
Traceback (most recent call last):
...
ValueError: the order of a finite field must be a prime power

John Cremona

unread,
Apr 16, 2018, 7:15:51 AM4/16/18
to Sage support
OK, but apart from typos in the report there is a real bug:

sage: p=next_prime(68235916425158872634653027)
sage: F=GF(p)
sage: E2=GF(p^6)

 AttributeError: 'int' object has no attribute 'divisors'





--
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 sage-support+unsubscribe@googlegroups.com.
To post to this group, send email to sage-s...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Vincent Delecroix

unread,
Apr 16, 2018, 9:12:00 AM4/16/18
to sage-s...@googlegroups.com
On 16/04/2018 13:15, John Cremona wrote:
> On 16 April 2018 at 12:04, Vincent Delecroix <20100.d...@gmail.com>
> wrote:
>
>> On 16/04/2018 09:21, fanx...@iie.ac.cn wrote:
>>
>>> I have constructed a big prime field:
>>>
>>>> p=68235916425158872634653027
>>>>> F=GF(p)
>>>>>
>>>>
>> Here is what I get
>>
>> sage: p = 68235916425158872634653027
>> sage: F = GF(p)
>> Traceback (most recent call last):
>> ...
>> ValueError: the order of a finite field must be a prime power
>
>
> OK, but apart from typos in the report there is a real bug:
>
> sage: p=next_prime(68235916425158872634653027)
> sage: F=GF(p)
> sage: E2=GF(p^6)
>
> AttributeError: 'int' object has no attribute 'divisors'

reason: type inconsistency in the output of K.degree()

sage: type(GF(next_prime(2^62)^2).degree())
<type 'sage.rings.integer.Integer'>

versus

sage: type(GF(next_prime(2^63)^2).degree())
<type 'int'>

Vincent

Vincent Delecroix

unread,
Apr 16, 2018, 9:15:41 AM4/16/18
to sage-s...@googlegroups.com
which is a consequence of this one

sage: R1 = PolynomialRing(Zmod(next_prime(2^62)), 'x')
sage: type(R1.an_element().degree())
<type 'sage.rings.integer.Integer'>

versus

sage: R2 = PolynomialRing(Zmod(next_prime(2^63)), 'x')
sage: type(R2.an_element().degree())
<type 'int'>

Vincent

Vincent Delecroix

unread,
Apr 16, 2018, 9:31:46 AM4/16/18
to sage-s...@googlegroups.com

fanx...@iie.ac.cn

unread,
Apr 16, 2018, 8:39:49 PM4/16/18
to sage-support
Sorrry, I make a mistake in the value p. The value of p is 68235916425158872634563027.


--
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 sage-support...@googlegroups.com.

fanx...@iie.ac.cn

unread,
Apr 16, 2018, 8:41:18 PM4/16/18
to sage-support
sorry, I made a mistake in the value of p. In fact p==68235916425158872634563027. That is a prime

在 2018年4月16日星期一 UTC+8下午7:07:29,vdelecroix写道:

fanx...@iie.ac.cn

unread,
Apr 16, 2018, 8:50:21 PM4/16/18
to sage-support
That means when the length of bite is more than 62, Sage will change its type of data or the storage method..Right?


在 2018年4月16日星期一 UTC+8下午9:15:41,vdelecroix写道:

Dima Pasechnik

unread,
Apr 17, 2018, 1:03:47 PM4/17/18
to sage-support
most probably it had to do with Python's int becoming long int (ones displayed with L at the end by the usual Python shell)
Reply all
Reply to author
Forward
0 new messages