0

I've tried searching the answer to my question on the internet (including MSE) but to no avail. I was reading through a proof of Wolstenholme's theorem: For $p \ge 5$, $$1 + \frac 12 + \frac 13 + \ldots + \frac 1{p - 1} = \frac mn \Longrightarrow p^2 \mid m.$$ But my question isn't actually much related to the theorem itself. Clearly the fractions above are regular fractions, but in the proof I was reading, the fractions at one point magically turn into multiplicative fractions… The proof was as follows:

  1. The statement is equivalent to proving $1 + \frac 12 + \ldots + \frac 1{p - 1} \equiv 0 \pmod {p^2}$.

This is supposedly justified because $a \mid m$ in $\frac mn \Longleftrightarrow$ $a \mid \frac mn$ which I don't understand at all. How do you even work with fractions mod something?

  1. If we pair up terms $\frac 1i$ and $\frac 1{p-i}$, we get $$\sum_{i = 1}^{p - 1} \frac 1i = \sum_{i = 1}^{\frac {p-1}2} \bigg(\frac 1i + \frac 1{p - 1}\bigg) = p \sum_{i = 1}^{\frac{p - 1}2} \frac 1{i(p - i)} \equiv 0 \pmod p.$$ This proves the result mod $p$.

I don't understand this either since clearly $\sum_{i = 1}^{\frac{p - 1}2} \frac 1{i(p - i)}$ is not necessarily an integer.

  1. It remains to prove $\sum_{i = 1}^{\frac{p - 1}2} \frac 1{i(p - i)} \equiv 0 \pmod p$ as well. We multiply by $2$ and since $p - i \equiv -i \pmod p$, we get $$2\sum_{i = 1}^{\frac{p - 1}2} \frac 1{i(p - i)} = \sum_{i = 1}^{p - 1} \frac {-1}{i^2} \pmod p.$$ Taking the inverse is a bijection from $\{1, \ldots, p - 1\}$ to itself so $$-\sum_{i = 1}^{p - 1} \frac 1{i^2} = -\sum_{i = 1}^{p - 1} (i^{-1})^2 = -\sum_{i = 1}^{p - 1} i^2 = -\frac{(p - 1)p(2p - 1)}6 \equiv 0 \pmod p,$$ since $p \ge 5$. QED

This is even more confusing. I understand everything except how you could possibly justify $\frac 1{i(p - i)} = \frac 1{-i^2} = -(i^2)^{-1}$ mod $p$. Just because you are working mod $p$ doesn't mean you can substitute $-i$ for $p - i$ everywhere, let alone treat regular fractions as multiplicative inverses.

I'm clearly missing something here. Could someone elaborate on why all this is possible?

  • 1
    You can reduce fractions $\bmod p$ as long as the denominator isn't divisible by $p$. This reduction is a ring homomorphism from the local ring $\mathbb{Z}_{(p)}$ of rational numbers whose denominators aren't divisible by $p$ to $\mathbb{F}_p$. So you can reduce each fraction $\bmod p$ individually and add them, and the result is congruent to the result of adding all the fractions up into a giant fraction and reducing that one $\bmod p$. This is a nice exercise. – Qiaochu Yuan Dec 31 '24 at 22:47
  • 1
    See the linked dupes for an intro to modular fractions. In short, in simple language, modular arithmetic extends to fractions with denominator coprime to the modulus, where $,a/b \equiv ab^{-1}.,$ If you study abstract algebra this will become clearer as the universal property of localizations (rings of fractions obtained by adjoining inverses). – Bill Dubuque Dec 31 '24 at 23:08
  • 1
    Think if it this way. If you are working with $\mod p$ then $\mathbb Z/p\mathbb Z$ is your entire universe. Anything you say must be interpreted within the universe. So what is $\frac 1k$. If our universe is $\mathbb R$ then $\frac 1k$ is defined as the number $w$ so that $w\cdot k =1$. So in the $\mod p$ univers $\frac 1k$ is defined exactly the same: It is the number $w$ so that $w\times k \equiv 1 \pmod p$. So $\frac 15\equiv 3\pmod 7$ because $3$ is the number $w$ so that $5w\equiv 1\pmod 7$. – fleablood Jan 01 '25 at 02:11
  • 2
    " Just because you are working mod p doesn't mean you can substitute −i for p−i everywhere" It most certainly does mean that. In your universe of $\mod p$, $-i$ and $p-i$ are the exact same thing. The only thing to keep in mind. 1) fractions never mean fractional parts of numbers; they always mean multiplicative inverses. 2)"division" means finding multiplicative inverses. It doesn't mean finding fractional parts. – fleablood Jan 01 '25 at 02:13
  • Thanks for the helpful comments! I've looked at the duplicates, it's clear to me now. – SchellerSchatten Jan 01 '25 at 19:29

0 Answers0