The most general formulation of a division algorithm that I know of goes as follows: Let $R$ be an arbitrary commutative ring, and let $R[t]$ be the ring of polynomials in one variable over $R$.
Terminology: For any $h= \sum_{j=0}^m c_j t^j \in R[t]$ where $c_m \neq 0$, we let $\deg(h)=m$ and call $c_mt^m$ the leading term of $h$ and $c_m$ its leading coefficient. If $h=0$ we do not assign it a degree.
Lemma: ("Division algorithm") If $f = \sum_{k=0}^n a_kt^k \in R[t]$ is such that its leading coefficient $a_n \in R^\times$, i.e. there is a $b \in R$ such that $b a_n=1$ then given any polynomial $g \in R[t]$ there are unique polynomials $q,r \in R[t]$ such that
$$
g =q.f + r, \text{ where } r=0 \text{ or } \deg(r)<\deg(f)
$$
Proof:
We will prove the existence and uniqueness of the pair $(q,r)$ for each $g \in R[t]$ by induction on $\deg(g)$.
Step 1: If $h \in R[t]$ is nonzero then we have $\deg(h.f) = \deg(h)+\deg(f)\geq \deg(f)$, since if the leading term of $h$ is $c_mt^m$ then the leading term of $h.f$ is $a_nc_m.t^{m+n}$, since $a_nc_m =0$ implies $0=b(a_nc_m) = (ba_n)c_m = c_m$ while $c_m \neq 0$ by assumption.
Step 2: Now suppose that the existence and uniqueness of the pair $(q,r)$ is known for all $h$ with $\deg(h)<k$ and suppose $g \in R[t]$ has $\deg(g)=k$.
If $g= q.f +r$, then if $q=0$ it follows $r=g$ and hence $\deg(g)<\deg(f)$. Conversely, if $q \neq 0$ then (as $r=0$ or $\deg(r)<\deg(f)$) the leading term of $q.f+r$ is $d a_n t^{\deg(q)+n}$ while that of $g$ is, say, $c_mt^m$. It follows that if $m<n$ we must have $q=0$, and hence the only possible pair $(q,r)$ is $(0,g)$, while if $m \geq n$ we must have $d a_n t^{\deg(q)+n} = c_mt^m$ so that the leading term of $q$ must be $c_m b t^{m-n}$
On the other hand, if $m \geq n$ then consider
$$
g_1: g-c_mb.t^{m-n}f
$$
Then since $\deg(g) =m = \deg(t^{m-n}.f)$ it follows that $\deg(g_1)\leq k$, while the coefficient of $t^k$ in $g_1$ is $c_k - c_kba_n = c_k - c_k =0$. It follows that $\deg(g_1)\leq k-1$, and hence by induction there are unique polynomials $(q_1,r_1)$ with $g_1 = q_1.f+r_1$. But then if we set $q=c_k.bt^{k-n} + q_1$ and $r=r_1$ it follows that $g = q.f+r$, and hence we have established the existence of pair $(q,r)$ for all $g\in R[t]$ of degree at most $k$.
Finally, to see that $(q,r)$ are unique, note that, as observed above, the leading term of any nonzero $q$ for which $g=q.f+r$ is necessarily equal to $c_m b t^{\deg(g)-n}$, and the inductive hypothesis ensures that $r$ and the lower order terms of $q$ are all unique, hence the pair $(q,r)$ is indeed unique.