The dependently typed lambda-calculus with algebraic datastructures is a programming language with very few primitives but a huge expressivity. The Coq proof assistant is built over one variant of this language, the CIC. Its semantics is extremely clear but it is verbose. Therefore, users do not write programs directly in CIC. Instead, Coq provides tools to elaborate programs incrementally using higher level constructions. Especially, mixing algebraic and dependent types increases the power and the difficulty of case analysis. Each case has a different type depending of the type of the constructor. Some cases are even impossible because of typing. These type casts and impossibility witnesses are explicit in CIC terms but they can be built m...