[proofplan]
The proof reduces the desired integral estimate to the Neumann spectral gap for geodesic balls under a Ricci lower bound. Buser's local Neumann eigenvalue estimate supplies a uniform lower bound for the first nonzero Neumann eigenvalue after scaling by $r^{-2}$, with constants controlled only by $n$, $K$, and the upper radius bound $R_0$. Applying the Rayleigh quotient to the mean-zero function $f-f_{B_g(x,r)}$ gives the Poincare inequality, and the definition of the average identifies the correct mean-zero condition.
[/proofplan]
[step:Fix the ball and define the mean-zero test function]
Let $x \in M$ and $r \in (0,R_0]$, and set $B := B_g(x,r)$. Since $M$ is complete, the [Hopf-Rinow theorem](/page/Hopf-Rinow%20Theorem) implies that closed bounded subsets are compact; hence $\overline{B}$ is compact and $\operatorname{vol}_g(B) < \infty$. Because $B$ is a nonempty open geodesic ball in an $n$-dimensional Riemannian manifold, $\operatorname{vol}_g(B)>0$.
Define the average $m \in \mathbb{R}$ by
\begin{align*}
m := f_B := \frac{1}{\operatorname{vol}_g(B)}\int_B f(y)\,d\operatorname{vol}_g(y),
\end{align*}
and define the real-valued function $u \in C^1(\overline{B};\mathbb{R})$ by
\begin{align*}
u: \overline{B} &\to \mathbb{R} \\
y &\mapsto f(y)-m.
\end{align*}
Then $\nabla u=\nabla f$ on $B$, since $m$ is constant, and the definition of $m$ gives
\begin{align*}
\int_B u(y)\,d\operatorname{vol}_g(y)
&= \int_B f(y)\,d\operatorname{vol}_g(y)-m\operatorname{vol}_g(B) \\
&=0.
\end{align*}
[guided]
We first isolate the only part of $f$ that matters for a Poincare inequality: its oscillation around its average. Let $x \in M$ and $r \in (0,R_0]$, and write $B := B_g(x,r)$ for the geodesic ball under consideration. Completeness is used here through the [Hopf-Rinow theorem](/page/Hopf-Rinow%20Theorem): closed bounded subsets of $M$ are compact, so $\overline{B}$ is compact. In particular the Riemannian volume $\operatorname{vol}_g(B)$ is finite. Since $B$ is a nonempty open ball, $\operatorname{vol}_g(B)>0$, so division by $\operatorname{vol}_g(B)$ is legitimate.
Define the scalar $m \in \mathbb{R}$ by
\begin{align*}
m := f_B := \frac{1}{\operatorname{vol}_g(B)}\int_B f(y)\,d\operatorname{vol}_g(y).
\end{align*}
This is the average value of $f$ over $B$ with respect to the Riemannian volume measure. Now define
\begin{align*}
u: \overline{B} &\to \mathbb{R} \\
y &\mapsto f(y)-m.
\end{align*}
Because $f \in C^1(\overline{B};\mathbb{R})$ and $m$ is constant, we have $u \in C^1(\overline{B};\mathbb{R})$ and $\nabla u=\nabla f$ on $B$. The reason for subtracting $m$ is that the Neumann spectral gap applies to functions with zero average. We verify this condition directly:
\begin{align*}
\int_B u(y)\,d\operatorname{vol}_g(y)
&=\int_B \bigl(f(y)-m\bigr)\,d\operatorname{vol}_g(y) \\
&=\int_B f(y)\,d\operatorname{vol}_g(y)-m\operatorname{vol}_g(B) \\
&=\int_B f(y)\,d\operatorname{vol}_g(y)-\int_B f(y)\,d\operatorname{vol}_g(y) \\
&=0.
\end{align*}
Thus $u$ is exactly the admissible mean-zero function to which the spectral estimate will be applied.
[/guided]
[/step]
[step:Apply Buser's Neumann spectral gap with constants controlled by $n$, $K$, and $R_0$]
Let $\lambda_{1,N}(B)$ denote the first nonzero Neumann eigenvalue of the nonnegative Laplace-Beltrami operator on $B$, understood through the variational Neumann spectrum on the [open set](/page/Open%20Set) $B$ rather than through a pointwise boundary condition. The subscript $N$ records the Neumann condition. This convention is important because a geodesic ball can have nonsmooth boundary at the cut locus.
We use [Buser's local Neumann eigenvalue estimate](/page/Buser%27s%20Local%20Neumann%20Eigenvalue%20Estimate) under Ricci lower bounds. In the variational form needed here, it states that for every $n \in \mathbb{N}$, $K \ge 0$, and $R_0>0$, there is a constant $\Lambda=\Lambda(n,K,R_0)>0$ such that whenever $(M,g)$ is complete and satisfies $\operatorname{Ric}_g \ge -(n-1)K g$, every geodesic ball $B_g(x,r)$ with $0<r\le R_0$, with its first nonzero Neumann eigenvalue defined by the variational Rayleigh quotient on $B_g(x,r)$, satisfies
\begin{align*}
\lambda_{1,N}(B_g(x,r)) \ge \frac{\Lambda}{r^2}.
\end{align*}
This is exactly the cited variational form of Buser's estimate for geodesic balls, so no smoothness of $\partial B_g(x,r)$ is required and no separate boundary-regularity approximation is being invoked. The hypotheses match the present situation: $M$ is complete, the Ricci lower bound is exactly $\operatorname{Ric}_g \ge -(n-1)K g$, and $r\le R_0$ by assumption. Therefore
\begin{align*}
\lambda_{1,N}(B) \ge \frac{\Lambda}{r^2}.
\end{align*}
[guided]
The next input is the geometric estimate that converts the Ricci lower bound into a uniform spectral gap on every ball whose radius is at most $R_0$. Define $\lambda_{1,N}(B)$ to be the first nonzero Neumann eigenvalue of the nonnegative Laplace-Beltrami operator on $B$, in the variational sense; the subscript $N$ records the Neumann condition. We use the variational interpretation because the boundary of a geodesic ball need not be smooth at cut-locus points, so the Neumann condition is encoded by the Rayleigh quotient rather than by requiring a classical normal derivative on the entire boundary.
We apply [Buser's local Neumann eigenvalue estimate](/page/Buser%27s%20Local%20Neumann%20Eigenvalue%20Estimate). The estimate requires a complete $n$-dimensional Riemannian manifold, a Ricci lower bound of the form $\operatorname{Ric}_g \ge -(n-1)K g$ with $K\ge 0$, and a radius bound $0<r\le R_0$. These hypotheses are exactly the assumptions in the theorem and in the present choice of ball $B=B_g(x,r)$. Hence, in this variational Neumann sense, there is a constant $\Lambda=\Lambda(n,K,R_0)>0$, independent of $x$, $r$, and $f$, such that
\begin{align*}
\lambda_{1,N}(B) \ge \frac{\Lambda}{r^2}.
\end{align*}
This is the only place where the Ricci lower bound is used. The scaling $r^{-2}$ is the correct dimensional scaling for a Laplacian eigenvalue, and it is what will produce the factor $r^2$ in the final Poincare inequality.
[/guided]
[/step]
[step:Use the Rayleigh quotient for the mean-zero function]
The [Rayleigh variational characterization](/page/Rayleigh%20Quotient) of the first nonzero variational Neumann eigenvalue gives, for every real-valued $v \in C^1(\overline{B};\mathbb{R})$ satisfying $\int_B v\,d\operatorname{vol}_g=0$,
\begin{align*}
\lambda_{1,N}(B)\int_B |v(y)|^2\,d\operatorname{vol}_g(y)
\le \int_B |\nabla v(y)|_g^2\,d\operatorname{vol}_g(y).
\end{align*}
The function $u$ defined above is admissible because $u \in C^1(\overline{B};\mathbb{R})$ and has zero average over $B$. Applying the characterization to $v=u$ and using $\nabla u=\nabla f$ yields
\begin{align*}
\lambda_{1,N}(B)\int_B |f(y)-f_B|^2\,d\operatorname{vol}_g(y)
\le \int_B |\nabla f(y)|_g^2\,d\operatorname{vol}_g(y).
\end{align*}
[guided]
Now we translate the spectral lower bound into an integral inequality. The [Rayleigh variational characterization](/page/Rayleigh%20Quotient) says that the first nonzero variational Neumann eigenvalue controls the quotient of Dirichlet energy by $L^2$ mass on the subspace of mean-zero functions. Concretely, if $v \in C^1(\overline{B};\mathbb{R})$ and
\begin{align*}
\int_B v(y)\,d\operatorname{vol}_g(y)=0,
\end{align*}
then
\begin{align*}
\lambda_{1,N}(B)\int_B |v(y)|^2\,d\operatorname{vol}_g(y)
\le \int_B |\nabla v(y)|_g^2\,d\operatorname{vol}_g(y).
\end{align*}
We verified in the first step that the function $u: \overline{B}\to \mathbb{R}$ given by $u(y)=f(y)-f_B$ lies in $C^1(\overline{B};\mathbb{R})$ and has zero integral over $B$. Therefore $u$ is admissible in the variational characterization. Substituting $v=u$ gives
\begin{align*}
\lambda_{1,N}(B)\int_B |u(y)|^2\,d\operatorname{vol}_g(y)
\le \int_B |\nabla u(y)|_g^2\,d\operatorname{vol}_g(y).
\end{align*}
Since $u(y)=f(y)-f_B$ for $y\in B$ and $\nabla u=\nabla f$ on $B$, this becomes
\begin{align*}
\lambda_{1,N}(B)\int_B |f(y)-f_B|^2\,d\operatorname{vol}_g(y)
\le \int_B |\nabla f(y)|_g^2\,d\operatorname{vol}_g(y).
\end{align*}
This is already the Poincare inequality except that the coefficient on the left is still written as the eigenvalue $\lambda_{1,N}(B)$.
[/guided]
[/step]
[step:Insert the spectral gap and define the Poincare constant]
Combining the Rayleigh quotient estimate with $\lambda_{1,N}(B)\ge \Lambda r^{-2}$ gives
\begin{align*}
\frac{\Lambda}{r^2}\int_B |f(y)-f_B|^2\,d\operatorname{vol}_g(y)
\le \int_B |\nabla f(y)|_g^2\,d\operatorname{vol}_g(y).
\end{align*}
Multiplying by $r^2/\Lambda$ gives
\begin{align*}
\int_B |f(y)-f_B|^2\,d\operatorname{vol}_g(y)
\le \frac{1}{\Lambda}r^2\int_B |\nabla f(y)|_g^2\,d\operatorname{vol}_g(y).
\end{align*}
Define $C:=\Lambda(n,K,R_0)^{-1}$. This constant depends only on $n$, $K$, and $R_0$, and substituting $B=B_g(x,r)$ gives the asserted inequality.
[guided]
The last step is only algebra, but it is where the uniformity of the constant is recorded. From the Rayleigh quotient step we have
\begin{align*}
\lambda_{1,N}(B)\int_B |f(y)-f_B|^2\,d\operatorname{vol}_g(y)
\le \int_B |\nabla f(y)|_g^2\,d\operatorname{vol}_g(y).
\end{align*}
From Buser's estimate we also have $\lambda_{1,N}(B)\ge \Lambda r^{-2}$, where $\Lambda=\Lambda(n,K,R_0)>0$. Replacing $\lambda_{1,N}(B)$ by this lower bound on the left-hand side gives
\begin{align*}
\frac{\Lambda}{r^2}\int_B |f(y)-f_B|^2\,d\operatorname{vol}_g(y)
\le \int_B |\nabla f(y)|_g^2\,d\operatorname{vol}_g(y).
\end{align*}
Because $r>0$ and $\Lambda>0$, multiplying both sides by $r^2/\Lambda$ is valid and yields
\begin{align*}
\int_B |f(y)-f_B|^2\,d\operatorname{vol}_g(y)
\le \frac{1}{\Lambda}r^2\int_B |\nabla f(y)|_g^2\,d\operatorname{vol}_g(y).
\end{align*}
Define
\begin{align*}
C:=\Lambda(n,K,R_0)^{-1}.
\end{align*}
Since $\Lambda$ depends only on $n$, $K$, and $R_0$, the same is true of $C$. Recalling that $B=B_g(x,r)$ gives precisely the asserted Poincare inequality for the chosen ball. The choice of $x$, $r$, and $f$ was arbitrary subject to the hypotheses, so the proof is complete.
[/guided]
[/step]