jimmysong / programmingbitcoin

Repository for the book
Other
1.75k stars 656 forks source link

Finite Field Definition: closed property example #217

Open smhall05 opened 3 years ago

smhall05 commented 3 years ago

1 says we are closed under addition and multiplication.This means that we have to define addition and multiplication in a way that ensures the results stay in the set.For example, a set containing {0,1,2} is not closed under addition, since 1 + 2 = 3 and 3 is not in the set; neither is 2 + 2 = 4.Of course we can define addition a little differently to make this work, but using “normal” addition, this set is not closed.On the other hand, the set {–1,0,1} is closed under normal multiplication.Any two numbers can be multiplied (there are nine such combinations), and the result is always in the set.

Is it actually valid to check 2 + 2 = 4?

a + a is being done instead of a + b