Congruences
Warm-upHumanWhich of these statements are true? (Choose all that apply.)
Which of these statements are true? (Choose all that apply.)
What is the last digit of ?
Find the inverse of modulo : the with .
Find the smallest positive integer with , and .
How many solutions modulo does the congruence have?
The second proof of Fermat's theorem reaches and then cancels . What justifies the cancellation?
Claim: "If for every coprime to , then is prime." Which number is a counterexample?
Which Lean statement correctly formalises the existence half of the Chinese remainder theorem? (IsCoprime m n means for some .)
Write crt(residues, moduli) that returns the smallest with for all , assuming the moduli are pairwise coprime. Combine the congruences one at a time, using an inverse modulo (Python's pow(a, -1, m) computes one). Then check Sunzi's answer.