Proof (rational functions with poles bounded by divisor minus point)

$l(D-P) \leq l(D)$ is obvious: if $\op{div}(f) + D-P \geq 0$, then $\op{div}(f) + D \geq 0$.

For $l(D-P) \geq l(D)-1$, fix a local parameter $π_P$ at $P$. Noting that $f\cdot π_P^{ν_P(D)}$ is regular at $P$ as $ν_P(f \cdot π_P^{ν_P(D)}) = ν_P(f) + ν_P(D) \geq 0$, consider the $k$-linear functional $$ \begin{align*} \op{ev}_P: L(D) &\to k \\ f &\mapsto ({π_P}^{ν_P(D)} f)(P). \end{align*} $$

Its kernel is $$ \begin{align*} \ker \op{ev}_P = \sb{f\in L(D)}{ν_P(f) \geq ν_P(D)+1} = L(D-P). \end{align*} $$

Applying rank-nullity gives $$ \begin{align*} l(D) - l(D-P) = \dim \im \op{ev}_P \leq 1. \end{align*} $$