Ask Your Question
1

Bug report (z[0]+z[1]+z[2])^5 == z0^5 + z1^5 + z2^5

asked 2019-11-06 12:29:06 +0100

egi gravatar image

Hello, my configuration: SageMath 8.9, Jupiter, Windows 10

z = GF(5)['z0, z1, z2'].gens()

z -> (z0, z1, z2)

(z[0]+z[1]+z[2])^1 -> z0 + z1 + z2

(z[0]+z[1]+z[2])^2 -> z0^2 + 2z0z1 + z1^2 + 2z0z2 + 2z1z2 + z2^2

(z[0]+z[1]+z[2])^3 -> z0^3 - 2z0^2z1 - 2z0z1^2 + z1^3 - 2z0^2z2 + z0z1z2 - 2z1^2z2 - 2z0z2^2 - 2z1z2^2 + z2^3

(z[0]+z[1]+z[2])^5 -> z0^5 + z1^5 + z2^5 ???

edit retag flag offensive close merge delete

Comments

1

What is wrong ? What did you expect ?

tmonteil gravatar imagetmonteil ( 2019-11-06 20:19:37 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-06 20:28:32 +0100

rburing gravatar image

updated 2019-11-06 20:34:35 +0100

This is not a bug.

sage: var('x,y,z')
sage: ((x+y+z)^5).expand()
x^5 + 5*x^4*y + 10*x^3*y^2 + 10*x^2*y^3 + 5*x*y^4 + y^5 + 5*x^4*z + 20*x^3*y*z + 30*x^2*y^2*z + 20*x*y^3*z + 5*y^4*z + 10*x^3*z^2 + 30*x^2*y*z^2 + 30*x*y^2*z^2 + 10*y^3*z^2 + 10*x^2*z^3 + 20*x*y*z^3 + 10*y^2*z^3 + 5*x*z^4 + 5*y*z^4 + z^5

Note the divisibility by 5 of all terms which are "missing" in your characteristic $p=5$ calculation.

This is a consequence of the Freshman's dream: $(x+y)^p \equiv x^p + y^p \pmod p$; just apply it twice.

It looks too good to be true, but it really is true in characteristic $p$ (the proof is in the linked article).

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-11-06 12:29:06 +0100

Seen: 601 times

Last updated: Nov 06 '19