Sequent Proof Interface Name (SPIN) is a React+TypeScript web app for creating proofs with propositional logic using the Fitch Sequent System (FSS).
The file CODE_NOTES.md
contains documentation about the program structure and
design choices in the code that should be helpful for programmers interested in
contributing to SPIN or using parts of its code elsewhere.
- Create and order a list of propositional logic sequents
- Automatically check sequent justifications and compute assumption sets
- Open and save proof files
Use the open/save buttons to open/save a file. When saving, you will be prompted for a file name. Click the new proof button to reset to a blank proof. You will be asked to confirm this. Click new sequent to add a sequent to the proof. You will be prompted for a sequent ID.
The up/down buttons on the left are used to reorder sequents. On the right, the sequent ID can be changed with the rename button, or the sequent deleted with the delete button. Click edit to switch a sequent to edit mode. You will be able to enter a logic expression and comment in the appropriate text boxes. Use the checkboxes in the select column to reference other sequents for deriving a new sequent. The justification rule can be selected with the dropdown in the rule column. When clicking done, the sequent (and those that depend on it) are checked automatically. While editing, the sequent is highlighted in yellow. Referenced sequents (selected by the checkboxes) are highlighted in orange.
SPIN is largely inspired by Slate, a software used in Selmer Bringsjord's logic classes at Rensselaer Polytechnic Institute. For easy of parsing, it uses lisp S expressions in the same style Slate uses. A statement can be an atom (variable name) consisting of '_', letters, and numbers, not starting with a number. Some valid examples are "P", "_Q", "c1", "x_1". Logic statements can be formed with connectives in the following formats:
Statement | S expression |
---|---|
¬P | (not P) |
P∧Q | (and P Q) |
P∨Q | (or P Q) |
P→Q | (if P Q) |
P↔Q | (iff P Q) |
⊥ | (cont) |
In these examples, P and Q are allowed to be any logic statement in S expression form. The AND and OR connectives generalize to more than 2 statements. The contradiction symbol is handled as a connective in order to differentiate it from atoms.
Here are some examples:
Statement | S expression |
---|---|
¬(A→(B∨C)) | (not (if A (or B C))) |
(X∧Y)↔¬Z | (iff (and X Y) (not Z)) |
(P→Q)∧(Q→R) | (and (if P Q) (if Q R)) |
(M↔N)∨L | (or (iff M N) L) |
There are 14 rules in the Fitch Sequent System (FSS). SPIN implements 13 of them. The only one excluded is thinning, which can be done with other inference rules in FSS. Thinning was left out because SPIN computes the assumption sets automatically much like Slate does.
From nothing, we can infer that any statement is a consequence of itself.
If we can infer
If we can infer
If we can infer
If we can infer
If we can infer a statement from
If we can infer a statement from
If we can infer a contradiction from some statements, then we can infer the negation of one of those statements after removing it from the assumption set.
If we can infer a contradiction from
If we can infer a statement and its negation, then we can infer a contradiction from the assumptions combined.
If we can infer
If we can infer
If we can infer
If we have sequents from which we can infer