cryptohack / issues-tracker

Repository to file issues for bugs and feature requests about CryptoHack
1 stars 1 forks source link

Modular Arithmetic 2 - Inverse Element Clarification #1

Closed Tressos-Aristomenis closed 4 months ago

Tressos-Aristomenis commented 4 months ago

As a first issue, let me know if any other format is more convenient.

[11/06/2023] Mentioned in Discord by @ NicoD.

Hello ! For the people who write the text for Modular Arithmetic 2. I think there could be confusion when talking about inverse element for addition and multiplication. We could understand from the text that the inverse is the same for addition and multiplication but it's not generally and also 0 as no inverse for multiplication

hyperreality commented 4 months ago

@GiacomoPope what do you think about this?

GiacomoPope commented 4 months ago

Yeah this could be reworded to be more precise. I'll do this now

GiacomoPope commented 4 months ago

Old text:

  A finite field <code>F<sub>p</sub></code> is the set of integers <code>{0,1,...,p-1}</code>, and under both addition and multiplication there is an inverse element <code>b</code> for every element <code>a</code> in the set, such that <code>a + b = 0</code> and <code>a * b = 1</code>.

New test:

  A finite field <code>F<sub>p</sub></code> is the set of integers <code>{0,1,...,p-1}</code>, and under both addition and multiplication there are inverse elements <code>b<sub>+</sub></code> and <code>b<sub>*</sub></code> for every element <code>a</code> in the set, such that <code>a + b<sub>+</sub> = 0</code> and <code>a * b<sub>*</sub> = 1</code>.
GiacomoPope commented 4 months ago

Note that we already had the comment:

Note that the identity element for addition and multiplication is different! This is because the identity when acted with the operator should do nothing: <code>a + 0 = a</code> and <code>a * 1 = a</code>.