proposition: Lemma mdd_evenE : ~~ odd min_dist -> mdd_err_cor = (min_dist./2 - 1)%N.
proof: Proof. move=> even_d. rewrite /mdd_err_cor (_ : min_dist.-1./2 = min_dist./2 - 1)%N //. move Hd : min_dist => d. case: d Hd even_d => //= d -> /=. by rewrite negbK uphalf_half => ->; rewrite add1n subn1. Qed.
imports: mathcomp(all_ssreflect ssralg poly polydiv fingroup perm) mathcomp(finalg zmodp matrix mxalgebra mxpoly vector) ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code