proposition: Lemma nth_cons_case : forall n x l, nth n (x::l) = (If n = 0 then x else nth (n-1) l).
proof: Proof. Proof using. intros. destruct n as [|n']. { case_if. rewrite~ nth_zero. } { case_if. rewrite~ nth_succ. fequals; math. } Qed.
imports: Coq.Classes.Morphisms TLC(LibTactics LibLogic LibReflect LibOperation LibProd LibOption LibNat LibInt LibWf LibMonoid LibRelation)