Sequent Calculus:
the handwriting of logic
James B. Wilson Professor of Mathematics

Conjunction
\[\frac{\Gamma \vdash Q,P}{\Gamma \vdash P\wedge Q}\]
Dilemma: \[\begin{array}{c} P \vdash R \\ P\vdash R\\ P\vee Q \\ \hline R \end{array}\]
Logic Requires
- A context (stuff at the top of a program, the books you were supposed to have read by now, conventions...)
- A grammar (guarantee what we put in language can be read the same way by everyone)
- Rules.
Aristotle
Syllogism: a largely poetic scheme with 3 parts.
- "All men are mortal."
- "Socrates is a man."
- "Therefore Socrates is mortal."
First "syntax" based model of logic.
There are 256 options, but only 24 "valid", history of mnemonics "Barbara, Barbari,..."
(Major premise)
(Minor premise)
(Conclusion)
Frege & Gentzen
Ignore the poetry, expand the premises.
\[\frac{Premises}{Conclusion}\]
Line is pronounced "entails"
One-line notation
\(Premises ~\vdash~Conclusion\)
- Frege had \(|\) for "judgement" and \(-\) for content.
- Gentzen brought them together as \(\vdash\) to "judge content".
-
We call it "Turnstyle", typed U+22A2 or &vdash or \vdash
And
- Pick a language & grammar, i.e. the symbol(s) for and how data will placed with the symbol.
<Conjunction> ::= both <Term> and <Term>
<Conjunction> ::= (<Term> && <Term>)
\[\langle conj\rangle ::= (\langle term\rangle \wedge \langle term\rangle)\]
"both Jack and Jill"
(i<=j) && (j<=100)
\[(x^2=0)\wedge(x\geq 0)\]
And
(L)anguage
2. Make introduction.
\[\langle conj\rangle ::= (\langle term\rangle \wedge \langle term\rangle)\]
\(P,Q \vdash P\wedge Q\qquad (I_{\wedge})\).
\[\begin{array}{rl} \Gamma &\vdash P\\ \Gamma &\vdash Q\\ \hline \Gamma & \vdash P \wedge Q\end{array}\qquad(I_{\wedge})\]
I for "intro", symbol to remind use of operator
Better yet, make context explicit as \(\Gamma\) or \(\texttt{ctx}\)
And
(L)anguage
(I)ntroduction
\[\begin{array}{rl} \Gamma &\vdash P\wedge Q\\ \hline \Gamma & \vdash P\end{array}(E_{L\wedge})\qquad\begin{array}{rl} \Gamma &\vdash P\wedge Q\\ \hline \Gamma & \vdash Q\end{array}(E_{\wedge R})\]
\[\langle conj\rangle ::= (\langle term\rangle \wedge \langle term\rangle)\]
3. Rule(s) to eliminate symbol.
\(P,Q \vdash P\wedge Q\qquad (I_{\wedge})\).
\(P\wedge Q \vdash P\qquad (E_{L\wedge})\)
\(P\wedge Q \vdash Q \qquad (E_{\wedge R})\)
Using logical And
(L)anguage
(I)ntroduction
\[\langle conj\rangle ::= (\langle term\rangle \wedge \langle term\rangle)\]
(E)limination
\(P,Q \vdash P\wedge Q\qquad (I_{\wedge})\).
\(P\wedge Q \vdash P\qquad (E_{L\wedge})\)
\(P\wedge Q \vdash Q \qquad (E_{\wedge R})\)
L.I.E. is a pattern for many logical operators
And
(L)anguage
(I)ntroduction
\[\langle conj\rangle ::= (\langle term\rangle \wedge \langle term\rangle)\]
(E)limination
\(P,Q \vdash P\wedge Q\qquad (I_{\wedge})\).
\(P\wedge Q \vdash P\qquad (E_{L\wedge})\)
\(P\wedge Q \vdash Q \qquad (E_{\wedge R})\)
Measurements are absolute values. = \(\Gamma \vdash P:=(\ell\geq 0)\)
Area is 100. = \(\Gamma \vdash (\ell^2=100)\)
\(\Gamma \vdash (\ell\geq 0) \wedge (\ell^2=100)\)
What part of our AND "LIE" are we using?
And
(L)anguage
(I)ntroduction
\[\langle conj\rangle ::= (\langle term\rangle \wedge \langle term\rangle)\]
(E)limination
\(P,Q \vdash P\wedge Q\qquad (I_{\wedge})\).
\(P\wedge Q \vdash P\qquad (E_{L\wedge})\)
\(P\wedge Q \vdash Q \qquad (E_{\wedge R})\)
Lakes are deep and wide.
Lakes are deep
What part of our AND "LIE" are we using?
Logical Or?
(L)anguage
(I)ntroduction
\[\langle conj\rangle ::= (\langle term\rangle \vee \langle term\rangle)\]
(E)limination
\(P \vdash P\vee Q\qquad (I_{L \vee})\)
\(Q \vdash P\vee Q\qquad (I_{\wedge R})\)
\(P\vee Q \vdash P?\) or is it \(P\vee Q \vdash Q?\)
What a dilemma!
Disjunctive Dilemma
\[\begin{array}{rl} \ \Gamma,P &\vdash R \\ \Gamma,Q&\vdash R\\ \Gamma &\vdash P\vee Q\\ \hline \Gamma & \vdash R\end{array}\]
<disjunction> ::= either <term> or <term>
<disjunction> ::= <term> || <term>
Using Logical Or?
(L)anguage
(I)ntroduction
\[\langle conj\rangle ::= (\langle term\rangle \vee \langle term\rangle)\]
(E)limination
\(P \vdash P\vee Q\qquad (I_{L \vee})\)
\(Q \vdash P\vee Q\qquad (I_{\wedge R})\)
Disjunctive Dilemma
\[\begin{array}{rl} \ \Gamma,P &\vdash R \\ \Gamma,Q&\vdash R\\ \Gamma &\vdash P\vee Q\\ \hline \Gamma & \vdash R\end{array}\]
Wet roads lead to car crashes,
inexperience leads to car crashes, and
today there is a wet road or inexperienced driver then ...
...we will have a car crash.
And vs. Or
And and Or are similar and in many ways "dual":
- And: 1 introduction 2 eliminations.
- Or: 2 introductions 1 elimination.
However, there are some hints of non-dual nature, e.g. we cannot use Or without a third term.
Logical true?
(L)anguage
(I)ntroduction
\[\langle boolean\rangle ::= \top ~|~ \bot \]
(E)limination
\(\vdash \top\)
\(\bot\vdash P\)
<boolean> ::= true | false
Law of Explosion:
One false premise can conclude anything.
Used in classical and intuitionisitic logic, avoid in paraconsistent logic.
You can always assume truth is valid, so \(P\vdash \top\).
Logical not?
(L)anguage
(I)ntroduction
\[\langle neg\rangle ::= \neg <term> \]
(E)limination
\[\frac{\Gamma, P\vdash \bot}{\Gamma \vdash \neg P}\]
\[\begin{array}{rl} \Gamma & \vdash \neg P\\ \Gamma & \vdash P\\ \hline \Gamma & \vdash \bot\end{array}\]
<neg> ::= not <term>
If P leads to falsity, it cannot be true.
<neg> ::= !<term>
\[\frac{ P\vdash \bot}{ \vdash \neg P}\]
\[\frac{\Gamma\vdash ~(\neg P) \wedge P}{\Gamma\vdash ~\bot}\]
Premise "P" leads to falsity \(\bot\)
Conclusion "not P" is valid.
Sequent Calculus separate premises from conclusion
- A horizontal line or turnstyle \(\vdash\) is the separator, called "entails"
- Logical operators occurs when we specify a
- (L)anguage & Grammar
- (I)ntroduction rules (how to introduce the operator)
- (E)limination rules (how to use/eliminate the operator)
Logical implication?
(L)anguage
(I)ntroduction
\[\langle implies\rangle ::= <term>\Rightarrow <term>\]
(E)limination
\[\begin{array}{rl} \Gamma & \vdash P\Rightarrow Q\\ \Gamma & \vdash P\\ \hline \Gamma & \vdash Q\end{array}\]
<implies> ::= if <term> then <term>
\[\frac{ \Gamma, \overbrace{P,\ldots,P}\vdash Q}{\Gamma \vdash P\Rightarrow Q}\]
"P" appears any number of times, even 0 times!
Sequent Calculus
By James Wilson
Sequent Calculus
Sequent calculus is a language to write logic. It uses few symbols with little to no meaning so that you can introduce just the meaning you want without the burden of all the implied ideas that normal language might provide. In exchange we get symbols which take practice to master.
- 99