How to prove using Lagrange's theorem $a^{p-1}\equiv 1\bmod p$.
Here, exponentiation (repeated multiplication) is of concern.
So, first want to show this property in action. Below shown for two values of $p=5,7$ with operation of exponentiation, the desired property, i.e. for $4$-th power $\equiv 1\bmod 5$, and $6$-th power $\equiv 1\bmod 7$, for all elements of the group. I.e., the last column follows the rule.
Say, $$\begin{array}{|c|c|c|c|c|} \hline &a^1&a^2&a^3&a^4\\ \hline 1 & 1& 1& 1&1\\ \hline 2 & 2 & 4& 3& 1\\ \hline 3 & 3 & 4& 2& 1\\ \hline 4 & 4 & 1& 4& 1\\ \hline \end{array}$$
The same pattern occurs for $p=7$, as shown in the below table : $$\begin{array}{|c|c|c|c|c|c|c|} \hline &a^1&a^2&a^3&a^4&a^5&a^6\\ \hline 1 & 1& 1& 1&1&1&1\\ \hline 2 & 2 & 4& 1& 2&4&1\\ \hline 3 & 3 & 2& 6& 4&5&1\\ \hline 4 & 4 & 2& 1& 4&2&1\\ \hline 5 & 5 & 4& 6 & 2 &3&1\\ \hline 6 & 6 & 1& 6 & 1 &6&1\\ \hline \end{array}$$
Doubt 1: But, none of the above is a group, so can the Lagrange theorem apply?
It says: order of element divides order of group.$- \tag{1}$
There is no group (wrt, exponential operation), and no order hence comes into view.
So, cannot say that can use property (1) to derive the given property from that.
Edit : expect a simple answer, so given tag accordingly.
Edit 1: as per suggestion by @Cpc - to see instead the group properties in multiplication table, which seems is due to the reason that basically exponentiation is repeated multiplication.
So, rather than checking if $<\mathbb {Z^*}, \wedge >$ is a group, need check that $<\mathbb{Z^*}, \times > $ is a group table or not.
$$\begin{array}{|c|c|c|c|c|} \hline \times \bmod 5 &1&2&3&4\\ \hline 1 & 1& 2& 3&4\\ \hline 2 & 2 & 4& 1& 3\\ \hline 3 & 3 & 1& 4& 2\\ \hline 4 & 4 & 3& 2& 1\\ \hline \end{array}$$
$$\begin{array}{|c|c|c|c|c|c|c|} \hline \times \bmod 7 &1&2&3&4&5&6\\ \hline 1 & 1& 2& 3&4&5&6\\ \hline 2 & 2 & 4& 6& 1&3&5\\ \hline 3 & 3 & 6& 2& 5&1&4\\ \hline 4 & 4 & 1& 5& 2&6&3\\ \hline 5 & 5 & 3& 1 & 6 &4&2\\ \hline 6 & 6 & 4& 4 & 3 &2&1\\ \hline \end{array}$$
Edit 2: Also, is there any other such problem in multiplication (similar to exponentiation operation here) where instead need check addition table (similar to addition operation here) for group properties?
Let $U(\Bbb{Z}_n) $ denotes the group of units of the ring $(\Bbb{Z_n}, +, •) $
$$U(\Bbb{Z}_n) ={a\in \Bbb{Z_n} : a\le n \text{ and } (a, n) =1}$$( see here )
$|U(\Bbb{Z}_p)|=\varphi(p)=p-1$
Now use the first result.
– SoG Jun 28 '22 at 13:36