# Error-Correction Coding Using Polynomial Residue Number System
## 3 Theoretical Foundations of Building Redundant Codes of Polynomial Residue Number System
### PRNS Codes with One Control Base
Then, we use the Chinese Remainder Theorem for polynomials and perform the inverse conversion:  
\[R_{i}(z)\
eq V_{i}(z){\rm mod}p_{i}(z) \tag{25}\]3  
At the same time, according to Theorem 1, there is a polynomial \(D(z)=(d_{1}(z),\ \ldots,\ d_{i}(z),\ldots,d_{n+1}(z))\) among the allowed code combinations of PRNS that differs from \(D^{*}(z)\) by residue \(d_{i}(z)\) on the \(i\)-th base. Furthermore, the condition \(\text{deg}D(z)<\text{deg}W_{n}(z)\) holds for such a code combination. Then, based on the CRT, the given polynomial is presented as  
\[R_{i}(z)\
eq V_{i}(z){\rm mod}p_{i}(z) \tag{25}\]4  
Therefore, the following equality is valid:  
\[R_{i}(z)\
eq V_{i}(z){\rm mod}p_{i}(z) \tag{25}\]5  
Substitute Expressions (36) and (37) into Equality (38) and, taking into account the properties of orthogonal bases of redundant PRNS, that is,  
\[R_{i}(z)\
eq V_{i}(z){\rm mod}p_{i}(z) \tag{25}\]6  
we obtain  
\[R_{i}(z)\
eq V_{i}(z){\rm mod}p_{i}(z) \tag{25}\]7  
Equality (40) is satisfied under the condition \(d_{i}(z)=\left|d_{i}(z)+\Delta d_{i}(z)\right|_{p_{i}(z)}\), in other words, when an error depth is \(\Delta d_{i}(z)=0\). However, according to the provided information, an error occurred in the code combination of PRNS and the residue is \(d_{i}^{*}(z)\
eq d_{i}(z)\). Therefore, the code combination \(D_{i}^{*}(z)\) contains an error on the \(i\)-th base of the code of polynomial residue number system and Condition (33) is valid for it. The proof is finished. \(\square\)  
It is obvious that Theorem 3 underlies the principles of constructing redundant codes of polynomial residue number system that are capable of detecting and correcting errors in calculations. Using this theorem, it we have shown that the distortion of any residue of the code of polynomial residue number system transforms an allowed code combination into a prohibited one. It is the violation of Condition (30) that makes it possible to detect an error in the code combination of PRNS. Consider the issue of determining the location of the error in the PRNS code combination. We can use the following theorem in order to do this. **Theorem 4**. : _If a combination \(D^{*}(z)=(d_{1}(z),\ \ldots,\ d_{i}^{*}(z),\ldots,d_{n+1}(z))\) has a single error, \(d_{i}^{*}(z)=\left|d_{i}(z)+\Delta d_{i}(z)\right|_{p_{i}(z)}\), on the \(i\)-th base in an ordered code of polynomial residue number system, then the polynomial interval corresponding to this error is determined by the expression_  
\[R_{i}(z)\
eq V_{i}(z){\rm mod}p_{i}(z) \tag{25}\]8  
**Proof of Theorem 4. ** A single error in the redundant code of polynomial residue number system means a distortion of one residue in the code combination. Accordingly, if an error occurs on the \(i\)-th base of the code, an erroneous polynomial, \(D^{*}(z)=(d_{1}(z),\ \ldots,\ d_{i}^{*}(z),\ldots,\ d_{n+1}(z))\), is obtained by adding the allowed code combination \(D(z)=(d_{1}(z),\ \ldots,\ d_{i}(z),\ldots,\ d_{n+1}(z))\) and \(d_{i}^{*}(z)=\left|d_{i}(z)+\Delta d_{i}(z)\right|_{p_{i}(z)}\), where \(\Delta d_{i}(z)\) is an error depth. Use the CRT to convert an erroneous combination of PRNS into a positional code. Then, we have  
\[R_{i}(z)\
eq V_{i}(z){\rm mod}p_{i}(z) \tag{25}\]9 \[D_{iR}(z)-D_{iV}(z)=\left|R_{i}(z)-V_{i}(z)\right|_{p_{i}(z)}m_{i}(z)\frac{W_{n} (z)}{p_{i}(z)} \tag{26}\]0 \[D_{iR}(z)-D_{iV}(z)=\left|R_{i}(z)-V_{i}(z)\right|_{p_{i}(z)}m_{i}(z)\frac{W_{n} (z)}{p_{i}(z)} \tag{26}\]1  
where \(B_{i}(z)\) is the \(i\)-th orthogonal basis of PRNS. The polynomial interval of the code combination of PRNS is determined by the expression  
\[D_{iR}(z)-D_{iV}(z)=\left|R_{i}(z)-V_{i}(z)\right|_{p_{i}(z)}m_{i}(z)\frac{W_{n} (z)}{p_{i}(z)} \tag{26}\]2  
From the Expression (43), we can see that if \(\text{deg}D(z)<\text{deg}W_{n}(z)\), then \(S(z)=0\).