  We give effective estimates for the $l^1$-distance between the corank
distribution of $r \times r$ R\'edei matrices and the measure predicted by the
Cohen--Lenstra heuristics. To this end we pinpoint a class of stochastic
processes, which we call $c$-transitioning. These stochastic processes are well
approximated by Markov processes, and we give an effective ergodic theorem for
such processes. With this tool we make effective a theorem of Gerth
\cite{Gerth} that initiated the study of the Cohen--Lenstra heuristics for $p =
2$.
  Gerth's work triggered a series of developments that has recently culminated
in the breakthrough of Smith \cite{Smith}. The present work will be used in
upcoming work of the authors on further applications of Smith's ideas to the
arithmetic of quadratic fields. To this end we extend our main result to
several other families of matrix spaces that occur in the study of integral
points on the equation $x^2 - dy^2 = l$ as $d$ varies.
