canonical structure programming in Coq