add accumulator in coq formalisation