This code is a translation/adaptation to Python 3.10+ of the original OCaml code from the book "Handbook of Practical Logic and Automated Reasoning" by John Harrison ...