proposition: Theorem test_graph : forall k i, tanner_rel H =2 graph (build_tree H rW (k:=k) i).
proof: Proof. apply build_tree_ok. + apply acyclic_equiv. suff : acyclic myrel. rewrite /acyclic=> Hac p Hlen Huc. apply (Hac _ Hlen). by rewrite /ucycle /ucycleb (eq_cycle myrel_ok). move=> p Hlen Hun. apply/negP: (Hun). apply /implyP/test_acyclic: Hlen. rewrite in_cons. destruct p; first by []. move /andP: Hun => [Hp Hun]. rewrite mypath_ok ?orbT //. rewrite /cycle rcons_path in Hp. by move/andP/proj1: Hp. + move => a b. have Hab: (a,b) \in allpairs pair enum_id enum_id. apply/allpairsP. exists (a,b). simpl. by rewrite !enum_id_ok. apply/connectP. move /hasP: (test_connected Hab) => [[|x p] _ Hp]. rewrite (eqP Hp). by exists [::]. move /andP: Hp => [] /andP [] /eqP -> Hp /eqP ->. exists p => //; by rewrite -(eq_path myrel_ok) Hp. Qed.
imports: Wf_nat Init.Wf Recdef Reals mathcomp(all_ssreflect perm zmodp matrix ssralg) mathcomp(Rstruct) ssrR Reals_ext ssr_ext ssralg_ext bigop_ext f2 fdist channel pproba linearcode subgraph_partition tanner tanner_partition summary ldpc checksum ldpc_algo