moved Coq code