If you want to look deeper into this, check out this paper (PDF warning)
https://ir.library.oregonstate.edu/downloads/t435gg51wExamples are given in Common Lisp at the end, which at least for me, is infinitely easier to read than mathematical notation.