def pol_linear_combination(f, g, h):
    """
    Write ``f`` as ``f = a*g + b*h`` with ``deg(a) < deg(h).

    INPUT:

    - ``f``, ``g``, ``h`` -- polynomials over a field k

    We assume that `g` and `h` are relatively prime.

    OUTPUT: a pair `(a, b)` of polynomials such that

    .. MATH::

            f = a\\cdot g + b\\cdot h

    and such that `deg(a) < deg(h)`.

    """
    d, A, B = g.xgcd(h)
    C, a = (f * A).quo_rem(h)
    b = B * f + C * g
    return a, b
