123456789101112131415161718192021222324252627282930313233343536373839404142(******************* Convenience functions **********************)letmyfoldlaf=List.fold_leftfalletmyrevmaplf=List.rev_mapflletmyrevmap2l1l2f=List.rev_map2fl1l2(* Builds a string from a list of items *)letsepmapspl=List.fold_left(funacux->ifacu=""thenmapxelseacu^sp^(mapx))""l(******************* Shortcuts to Zarith ***********************)let(++)=Z.addlet(+++)bi=b++(Z.of_inti)letsucc=Z.succlet(--)=Z.subletminus=Z.neglet(*^)ij=letopenZin(Z.of_inti)**jlet(**)=Z.mullet(**.)ib=(Z.of_inti)**bletquomod=Z.div_remletbigmodab=Z.remabletsign=Z.signletbig_compare=Z.compareletbigzero=Z.zeroletbigone=Z.oneletis_bigonex=Z.comparexbigone=0letsob=Z.to_stringletbos=Z.of_stringletboi=Z.of_intletiob=Z.to_int