chinese_remainder_general
Provednumber-theoryproved
Chinese Remainder Theorem: For pairwise coprime moduli, the system of congruences x ≡ aᵢ (mod mᵢ) has a unique solution modulo m₁·...·mₙ. Proved. Generalizations to non-coprime moduli and rings are active research.
Preamble
import Mathlib
Formal statement
import Mathlib
theorem chinese_remainder_general (n : ℕ) (hn : 2 ≤ n)
(moduli : Fin n → ℕ)
(hpairwise : ∀ i j : Fin n, i ≠ j → Nat.Coprime (moduli i) (moduli j))
(remainders : Fin n → ℕ) :
∃ x : ℕ, ∀ i : Fin n, x % moduli i = remainders i % moduli i := by
sorrySource