for the vertex-version and then remark which small changes need to be made for the edge-version. We define $g(0):=0$ and $g(k):=8 \log_2(k)+2$, for every positive integer $k$.

\[thm:vertexcycle\] For every graph $G$ and every nonnegative integer $k$, either $G$ contains at least $k$ vertex-disjoint cycles, or there is a set $F\subseteq V(G)$ of size at most $k\cdot g(k)$ such that $G-F$ has no cycle.

We proceed by induction on $|V(G)|$, the base case $|V(G)|=0$ being clearly true for any $k$. Let $k\geq 1$ and let $G$ be a non-empty graph. Suppose first that $G$ has girth at most $g(k)$. Let $C$ be a shortest cycle in $G$ and consider the graph $G':=G-V(C)$. Note that $|V(C)|\leq g(k)$. By induction, either $G'$ contains $k-1$ vertex-disjoint cycles or there exists a set $F'\subseteq V(G')$ of size at most $(k-1)\cdot g(k-1)$ such that $G'-F'$ has no cycles. In the former case we can add $C$ to the collection to obtain $k$ vertex-disjoint cycles, as desired. In the latter case $G-F$ has no cycles, where $F:= F' \cup V(C)$ has size at most $|F'|+|V(C)|\leq  (k-1)\cdot g(k-1) + g(k) \leq  k \cdot g(k)$, as desired. Thus we may assume from now on that $G$ has girth 