The difference between clauses and formulas is a frequent source of confusion for Prover9 (and Otter) users. The page Clauses and Formulas describes the differences. For now, simply note that clauses and formulas are different types of objects; either or both can be used to state the logical specification of the problem.
Whitespace (spaces, newlines, tabs, etc.) is optional in most situations. The important exception is that whitespace is required around some operations in clauses and formulas (see the page Clauses and Formulas).
clauses(sos). % clauses to be placed in the sos list -man(x) | mortal(x). man(george). -mortal(george). end_of_list.Prover9 will take the clauses, use its automatic mode to decide on the inference rules, and then search for a refutation.
The preceding example can also be stated in a positive form by usine the goals list, as follows.
clauses(sos). % clauses to be placed in the sos list -man(x) | mortal(x). man(george). end_of_list. clauses(goals). % positive units to be negated and placed in the sos list mortal(george). end_of_list.
A third way of stating the conjecture uses formulas instead of clauses. Note that a clause without variables is also a formula, with the same meaning.
formulas(sos). % formulas to be translated to clauses and placed in the sos list all x (man(x) -> mortal(x)). man(george). end_of_list. formulas(goals). % formulas to be negated, translated to clauses, placed in sos mortal(george). end_of_list.The searches for the the three preceding inputs should all be similar, but they are not guaranteed to be identical, because clause order and symbols may be different.
clauses(sos). p(x). end_of_list. % heavily used clauses(goals). p(x). end_of_list. % must be positive units (see Goals) clauses(usable). p(x). end_of_list. % seldom used clauses(demodulators). f(x)=x. end_of_list. % seldom used, must be equalities clauses(hints). p(x). end_of_list. % should be used more often (see Hints) formulas(sos). all x p(x). end_of_list. % heavily used formulas(goals). all x p(x). end_of_list. % at most one formula (see Goals) formulas(usable). all x p(x). end_of_list. % seldom used terms(weights). weight(a) = 10. end_of_list. % see Weighting terms(kb_weights). a = 3. end_of_list. % see Term Ordering terms(actions). given = 100 -> set(print_kept). end_of_list. % see Actions terms(interpretations). interpretation(2,[],[relation(p,[1])]). end_of_list. % see SemanticsIf the input contains morethan one list of a particular type/name, the lists are simply concatenated by Prover9 as they are read.
op(400, infix_right, [+, --]). % declare parse precedence and type (see Clauses and Formulas) set(fof_reduction). % set a flag clear(auto_inference). % clear a flag assign(sos_limit, 20000). % integer parameter assign(stats, some). % string parameter assoc_comm(*). % not currently used commutative(g). % not currently used lex([0,1,a,b,f,g,*,+]). % symbol precedence (see Term Ordering) skolem([a,b,f,g]). % declare symbols to be Skolem function (rarely used)