scala version of the coq file