# 02.1.剰余定理

## Theorem

### Statement

$R$:Ring
$f,g \in R[x]$
$g$ の最高次数係数は単元(unit)
then
$\exists p, q \in R[x],f = pg + q, \text{deg} g \le \text{deg} q$
and
$p,q$ are unique.

### Proof

if $\text{deg} f(x) \lt \text{deg} g(x)$, then $p(x) = 0, r(x) = f(x)$
if $\text{deg} f(x) \ge \text{deg} g(x)$, then
Let
$f(x) = a_n x^n + \cdots a_1 x^1 + a_0$
$g(x) = b_m x^m + \cdots b_1 x^1 + b_0$
$b_m$ is a unit
$f_1(x) = f(x) - a_n b_m^{-1} x^{n - m} g(x) = (a_{n-1}-a_n b_m^{-1}b_{m-1})x^{n-1} + \cdots \quad (a_0 - a_n b_{m-1}^{-1}b_0)$
$a_{n-1}' = (a_{n-1}-a_n b_m^{-1}b_{m-1})$
$f_2(x) = f_1(x) - a'_{n-1} b_m^{-1} x^{n-m-1} g(x)$
$f_3(x) = f_2(x) - a''_{n-2} b_m^{-1} x^{n-m-2} g(x)$
$\vdots$
$q(x) = f_{n-m}(x) - a^{\lt n-m \gt}_{m} b_m^{-1} g(x)$
Let $f_1(x) = a'_{n-1} x^{n-1} + \cdots a'_1 x^1 + a'_0$
Let $f_2(x) = a''_{n-2} x^{n-2} + \cdots a''_1 x^1 + a''_0$
Let $f_{n-m}(x) = a^{\lt n-n \gt}_{m} x^{m} + \cdots a^{\lt n-n \gt}_1 x^1 + a^{\lt n-m \gt}_0$
Then

Suppose
$f = pg + q = p'g + q'$
$\text{deg} q \lt \text{deg} g, \text{deg}q' \lt \text{deg} g \therefore \text{deg}(q'-q) \lt \text{deg} g$
if $p-p'\neq 0$ then $\text{deg} g \le \text{deg}((p-p')g)$
$\therefore \text{deg}(q'-q) \lt \text{deg} g \le \text{deg}((p-p')g)$
but $(p-p')g = q' - q \therefore \text{deg}((p-p')g) = \text{deg} (q'-q)$ leads to contradiction.
QED