First time here? Check out the FAQ!

Ask Your Question
0

how to check the element is field element

asked 5 years ago

santoshi gravatar image

p=(3^151) F1.<x>=GF(3)[] F.<a>=GF(3^151,'a',modulus=x^151+2*x^2+1); A=1 B1=(0x1fc4865afe00a9216b0b5fd32c6300c4bed0707ae4072a03e55299f157b);B1 B=F(B1.digits(3));B D=F(B).field_element();D

how to check the element B is Field element, the command which i have written gave me attribute error.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 5 years ago

rburing gravatar image

What do you want to check? B in F is true by definition of B. You can do B in F.prime_subfield() to check if B is in GF(3). This is the same as checking B1 < 3, which is seen to be False here.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 5 years ago

Seen: 429 times

Last updated: Aug 04 '19