If you want to understand prolog, you must understand the four-port model:
https://grack.com/writing/school/enel553/report/prolog.html
And to understand the four-port model is to understand solution-space navigation and pruning.
And to understand the four-port model is to understand solution-space navigation and pruning.