Every proof consists of a list of proof steps, where each step has the basic form:
[lineNum] [|*] phi [: reason] <NEWLINE>
^ ^ ^ ^ ^
1 2 3 4 5
| phi : assumption
Nested boxes can be created by adding more pipes:
|| phi2 : assumption
They can be ended explicitly, with any number of dashes on a new line, or implicitly, by simply omitting the pipe. See Example 1 under [Examples].
Describing how each proof step should be formed, logically, is beyond the scope of this document.
FOLProof accepts the following logical operators, in order of precedence. The first column gives the ASCII notation, and the second provides alternative textual and Unicode notation.
ASCII Operator | Alternatives | Precedence | Assoc |
---|---|---|---|
t = s | Atomic | N/A | |
_|_ |
bot, ⊥ | Atomic | N/A |
~ | not, ¬ | 1 | N/A |
& | and, ∧ | 2 | Right |
v | or, ∨, + | 2 | Right |
-> | implies, → | 3 | Right |
<-> | iff | 3 | Right |
A x. | ∀ x. | 4 | N/A |
E x. | ∃ x. | 4 | N/A |
Quantifiers extend as far possible to the right, which means that, for example, A x. Q(x) and P(x)
is interpreted as A x. (Q(x) & P(x))
and not (A.x Q(x)) & P(x)
, while A x. Q(x) -> P(x)
is interpreted as A x. (Q(X) -> P(x))
.
The alternative notation allow textual and unicode representations.
For instance, the following three inputs are interpreted all as the same formula.
∀x. P(x) ∧ Q(x) → ¬R(x) ∨ T(x, c)
A x. P(x) & Q(x) -> ~R(x) + T(x, c)
A x. P(x) and Q(x) implies not R(x) or T(x, c)
Arguably, the notation with words is somewhat more difficult to read and merits some parentheses
Justifications are the reasons why your current proof step follows logically from what is already there. They take the form:
: ruleName[.v1/t] [elim/intro[1/2]] [[(num/range), ]*]
^ ^ ^ ^ ^ ^
1 2 3 4 5 6
A.x/x0
. Complex terms, as in A.x/f(x0)
are allowed.
The backchaining rule also allows parallel substitutions, where the variable assignments are
separated by semicolons: B.x/f(c); y/g(k)
.phi : or elim a,b-c,d-e
. Single letters, like “e” and “i”, are valid shorthand.phi1 or phi2 : or i1 n
.a,b-c,d-e
.1 a or b : premise
2 ~a : premise
3 ~b : premise
4| a : assumption
5| _|_ : neg elim 4,2
-----------------------
6| b : assumption
7| _|_ : neg elim 6,3
8 _|_ : or elim 1,4-5,6-7
Notice how the first assumption is terminated, explicitly, out of necessity, since it would otherwise be difficult to tell there are two assumption boxes. The second box is terminated, implicitly, simply by omitting the leading pipe on line 8.
Rule Name | Connective | Type | Forms | References | Substitutions |
---|---|---|---|---|---|
premise | N/A | intro | N/A | N/A | N/A |
assumption | N/A | intro | N/A | N/A | N/A |
sorry | N/A | intro | N/A | N/A | N/A |
copy | N/A | intro | N/A | a | N/A |
and | & | basic | elim1 | a | N/A |
elim2 | a | N/A | |||
intro | a,b | N/A | |||
or | v | basic | elim | a,b-c,d-e | N/A |
intro1 | a | N/A | |||
intro2 | a | N/A | |||
neg | ~ | basic | elim | a,b | N/A |
intro | a-b | N/A | |||
-> | -> | basic | elim | a,b | N/A |
intro | a-b | N/A | |||
<-> | <-> | basic | elim1 | a | N/A |
elim2 | a | N/A | |||
intro | a,b | N/A | |||
A | Ax. | basic | elim | a | |
intro | a-b | ||||
E | Ex. | basic | elim | a-b | |
intro | a | ||||
bot | ⊥ | basic | elim | a | N/A |
= | = | intro | N/A | N/A | |
elim | a,b | N/A | |||
contra | N/A | basic | N/A | a-b | N/A |
MT | N/A | deriv. | N/A | a,b | N/A |
NOTNOT | N/A | deriv. | elim | a | N/A |
LEM | N/A | deriv. | N/A | N/A | N/A |
B | N/A | deriv. | N/A | a,b1, …, bn |