Logical purity is the property of logic programs that are written only using Horn clauses.
Is there a way to do an if in prolog, e.g. if a variable is 0, then to do some …