Proof using.
intros m; elim m; simpl in |- *; auto.
intros a l H c1 c2 H0 H1.
apply f_equal2 with (f := app (A:=bool)); auto.
apply find_code_permutation; auto.
Qed.

(* Specifications: *)
(* Permuting the message permutes the encoding *)
Theorem encode_permutation_val :
forall m1 m2 c, permutation m1 m2 -> permutation (encode c m1) (encode c m2).