Ask Your Question
0

How to sum or product of two elements of two different fields?

asked 2019-06-02 07:47:14 +0100

updated 2024-04-16 21:17:50 +0100

FrédéricC gravatar image

I would like to sum of product two elements from different fields and the resultant operation should be in the bigger field. I have used the following codes, but it gives errors.

R.<x> = PolynomialRing(GF(2))
F = GF(2^3, name='x', modulus=x^3 + x^2 + 1)
G = GF(2^8, name='x', modulus=x^8 + x^5 + x^3 + x + 1)
print F.fetch_int(3)
print  G.fetch_int(5)
#F.fetch_int(3) => x + 1
#G.fetch_int(5) => x^2 + 1
#print F.fetch_int(3)*G.fetch_int(5) 
print (x^2 + 1)*(x + 1)
edit retag flag offensive close merge delete

Comments

Is it homework ?

tmonteil gravatar imagetmonteil ( 2019-06-02 22:55:35 +0100 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2019-06-02 22:52:13 +0100

tmonteil gravatar image

updated 2019-06-02 22:55:30 +0100

Regarding mathematics, how could F be embedded in G ? How could the generator "x" of F be the same that the generator "x" of G ?

Regarding Sage code, you can have a look at https://doc.sagemath.org/html/en/refe...

edit flag offensive delete link more

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: 2019-06-02 07:47:14 +0100

Seen: 743 times

Last updated: Jun 02 '19