Some terms
“,”: And.
“:-“: if, or is implied by.
“unify”: approximate “assign value” or “instantiate”.
Variable
Starts with uppercase or underscore. Usually, underscore is for internal usage, and 2 external variables can point to same internal variable (similar with a pointer).
Prolog can only assign the value once to a variable during one query. The exception is anonymous variable “_” which can have several values.
Structured data
.pl file is the text file which contains the facts. If pl file is associated to SWI Prolog, you can simply double click the file. Prolog will load them into the knowledge base. If not, use, File -> Consult… to load the file.