Set Implicit Arguments.
Unset Automatic Introduction.
Require vec.
Require List.
Require Vector.
Section contents.
Variable T: Set.
Inductive L: Set := one: T -> L | cons: T -> L -> L.
Fixpoint to_plain (l: L): List.list T :=
match l with one x => List.cons x List.nil | cons x y => List.cons x (to_plain y) end.
Coercion to_plain: L >-> List.list.
Fixpoint from_plain (x: T) (l: List.list T): L:=
match l with
| List.nil => one x
| List.cons h t => cons x (from_plain h t)
end.

Lemma round_trip l x: (to_plain (from_plain x l)) = List.cons x l.
Proof with auto. induction l... simpl. rewrite IHl... Qed.