Theorem huffman_build_minimun : forall (c : code A) (t : btree A), unique_prefix c -> in_alphabet m c -> build (fun x => number_of_occurrences eqA_dec x m) (map (fun x => leaf (fst x)) (frequency_list eqA_dec m)) t -> weight eqA_dec m (compute_code t) <= weight eqA_dec m c.