Consider arbitrary precision integers $a, b$ represented in residue form modulo a set of primes $\{ p_0, p_1, \dots, p_n \}$. We can represent very large integers by increasing the number of prime modulii. We can do addition, subtraction, multiplication of arbitrary precision integers efficiently in a modular number system.
Example: $P = \{2, 3, 5, 7\}, M = 2.3.5.7 = 210$. This modulii can represent integers upto 210. If we wanted to represent larger integers , we can add more primes to the set $P$.
The residue representation of $a = 25$ would be $\langle a_2, a_3, a_5, a_7 \rangle = \langle 1, 1, 0, 4 \rangle$.
The residue representation of $b = 29$ would be $\langle b_2, b_3, b_5, b_7 \rangle = \langle 1, 2, 4, 1 \rangle$.
This is calculated by taking residues of the number modulo the prime modulii.
This question is about performing arithmetic inequality comparisons in the modular residue number system.
Although in this example, it appears that we can do element-wise comparison (lexicographic comparison) of the residues for >, < operations, that will not work for general $a, b$ for the simple reason that the residue modulo a single prime does not tell you how large the actual number is.
If we want to do an arithmetic inequality comparison ($a < b, a > b$) of these residue representations correctly, one way to do that would be convert them back to arbitrary precision integers using Chinese Remainder Theorem (CRT) and then do the bitwise (or byte/word/digit-wise) comparison.
Are there any other ways or tricks to accomplish this without doing the CRT conversion?
Related: