https://123dok.org/document/zkw74821-implementation-in-coq.html