[parent]
Remember from §A-1 that is the remainder of divided by , and the congruence relation means that the remainder of divided by is the same as the remainder of divided by . Its equivalent numeric equation is , meaning that and differ by some multiple of . The congruence and equation are two different ways of describing the relationship between two numbers and .
In this section, we introduce another way of describing the relationship between numbers. We will describe two numbers and in terms of a different modulo instead of the original modulo . Such a change of modulo of a congruence relation is called modulo scaling. When we rescale the modulo of a congruence relation, we also need to rescale the numbers involved in the congruence relation.
Suppose we have the following congruence relations:
Now, suppose we want to rescale the modulo of the above congruence relations from , where (i.e., divides all of , or is a multiple of ). Then, the accordingly updated congruence relations are as shown in Table 3.
Congruence | Rescaled Congruence Relation | Rescaled Congruence Relation |
Relation | – Exact | – Approximate |
(if divides all of: ) | (if does not divide: ) | |
(if divides all of: ) | (if does not divide: or ) | |
(if divides both: ) | (if does not divide: or ) | |
Proof.
,
Therefore:
,
Therefore:
,
Therefore:
,
Therefore:
As shown in the proof, if all numbers in the congruence relations are exactly divisible by the rescaling factor during the modulo rescaling, then the rescaled result gives exact congruence relations in the new modulo. On the other hand, if any numbers in the congruence relations are not divisible by the rescaling factor during the modulo rescaling (i.e., we need to round some decimals), then the rescaled result gives approximate congruence relations in the new modulo.
In a more complicated congruence relation that contains many operations, the same principle of modulo rescaling explained above can be recursively applied to each pair of operands surrounding each operator.
Suppose we have the following congruence relation:
, where: , , , , , ,
First, we can test if the above congruence relation is true by plugging in the given example values as follows:
This congruence relation is true.
Now, suppose we want to rescale the modulo from . Then, based on the rescaling principles described in Table 3, we compute the rescaled values as follows:
, ,
The rescaled congruence relation from modulo is derived as follows:
(an exact congruence relation, as all rescaled values have no decimals)
As shown above, the rescaled congruence relation preserves correctness, because all rescaled values are divisible by the rescaling factor. By contrast, if did not divide any of , , or , then the rescaled congruence relation would be an approximate (i.e., ) congruence relation.
[parent]