SlideShare a Scribd company logo
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
COMPUTATIONAL LOGIC
Dr.J.Faritha Banu
SRM IST- Ramapuram
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Topics Covered in this Presentation are
 Propositional Calculus Introduction
 Terminologies
 Natural Deduction proof system
 Inference Rules
 Example Problems
 Sub Formula – Sub Proposition
 Soundness of Propositional Logic
 Completeness of Propositional Logic
 Gentzen sequent calculus
 Axiomatic System for PC
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
PROPOSITIONAL CALCULUS
 A proof starts with some well known facts and proceeds towards the result using
the allowed inferences.
 The accepted facts (proved theorems) are called axioms.
 The allowed inferences(Valid consequences) are called the rules of inference,
which link one or more propositions to another.
 A proof is then a sketch of how we reach the final proposition from the axioms by
means of the inference rules.
 Propositional Calculus (PC): Branch of symbolic logic that deals with
propositions and the relations between them, without examination of their
content.
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
INFORMAL METHOD
 Axiomatic systems are inconvenient as they insist on formality.
 Informal methods can be developed from the axiomatic systems.
INFORMAL SYSTEM – PROOF
NATURAL DEDUCTION
 Inference Rules: These are used in the Propositional natural deduction for
constructing proof. These rules are categorized to be either for introduction or for
elimination.
 Propositional Natural Deduction system (PND), This system has only one axiom,
which is ⊤; PND has the following inference rules (read ‘ i ’ for introduction and ‘e
’ for elimination
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
NATURAL DEDUCTION - Inference Rules
Natural Deduction of Propositional Logic: Rules of Conjunction, Disjunction, Implication, Negation
Conjunction (Introduction) Conjunction (Elimination) or Simplification
p p ∧ q p ∧ q
q p q
p ∧ q
Modus Ponens Modus Tollens
p→q p→q
p ¬q
q ¬ p
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
NATURAL DEDUCTION - Inference Rules
Disjunction(Introduction)
p q
p ∨ q p ∨ q
Disjunction(Elimination)
p ∨ q
p
(where p → r)
r
q ( where q → r)
r
r
Can be written as (p…..r) (q…r) , p v q ( ….. Means conditional)
r
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
NATURAL DEDUCTION - - Inference Rules
Top –True (Introduction) Top (Elimination)
Bottom -False (Introduction) Bottom -False (Elimination)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
NATURAL DEDUCTION - Inference Rules
Negation (Introduction) Negation (Elimination)
Double Negation (Introduction) Double Negation
(Elimination)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
NATURAL DEDUCTION- - Inference Rules
Conditional (Implication ) → (Introduction) → (Elimination)
Biconditional (Equivalence) ↔ (Introduction) ↔ (Elimination)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Proof 1 :
 Premises ( p ∧ q ) ∧ ( r ∧ ( s ∧ t ))
Conclusion s
Deduction:
1. ( p ∧ q ) ∧ ( r ∧ ( s ∧ t )) Premise
2. ( r ∧ ( s ∧ t )) Conjunction Elimination (1)
3. s ∧ t Conjunction Elimination (2)
4. s Conjunction Elimination (2)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Proof 2 :
 Premises ( p ∧ ( q ∨ r )) ∧ ( r ∧ ( s ↔ t ))
 Conclusion p ∧ r
Deduction:
1. ( p ∧ ( q ∨ r )) ∧ ( r ∧ ( s ↔ t )) Premise
2. p ∧ ( q ∨ r ) Conjunction Elimination(∧e)
(1)
3. p Conjunction Elimination(∧e)
(2)
4. r ∧ ( s ↔ t ) Conjunction Elimination (1)
5. r Conjunction Elimination (4)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Proof 3 : Premises ( p ∧ q ) → r
p ∧ s
q
 Conclusion r ∨ t
Deduction:
1. ( p ∧ q ) → r Premise
2. p ∧ s Premise
3. q Premise
4. p Conjunction Elimination (2)
5. s Conjunction Elimination (2)
6. p ∧ q Conjunction Introduction (4,3)
7. r Modus Ponens (1,6)
8. r ∨ t Disjunction (7)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Proof 4 : Premises p → ( q ∧ r )
¬( q ∧ r)
Conclusion ¬ p ∧ ¬ ( q ∧ r)
Deduction:
1. p → ( q ∧ r ) Premise
2. ¬( q ∧ r) Premise
3. ¬ p Modus Tollens (1)
4. ¬ p ∧ ¬ ( q ∧ r) Conjunction Introduction (3,2)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Proof 5 : Premises p → q
p → r
s → ¬( q ∨ r)
Conclusion ¬ s ∧ p
Deduction:
1. p → q Premise
2. p → r Premise
3. s → ¬( q ∨ r) Premise
4. p Conjuction elimination 2
5. q Modus ponens(4,1)
6. q ∨ r Disjunction introduction (5)
7. ¬ s Modus Tollens (3,6)
8. ¬ s ∧ p Conjuction introduction (4,7)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Proof 6: A proof for ⊢ p→(q→ p) is as follows:
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Sub Formula – Sub Proposition:
 A sub-proposition of w, is a proposition corresponding to any subtree of the
parse tree of w.
Immediate sub-proposition of a proposition w is any proposition
corresponding to a subtree of the parse tree Tw of w whose depth is one less
than Tw.
The set of appropriate nonlogical constants is called the signature of the
propositional language.
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Sub Formula – Sub Proposition:
 The function sub(P ) giving the sub formulas of a formula P is defined by
structural induction as follows:
sub(pi) = {pi}, for all atomic formulas pi
 sub(P ∧ Q) = {(P ∧ Q)} ∪ sub(P ) ∪ sub(Q)
sub(P ∨ Q) = {(P ∨ Q)} ∪ sub(P ) ∪ sub(Q)
sub(P → Q) = {(P → Q)} ∪ sub(P ) ∪ sub(Q)
sub(P ↔ Q) = {(P ↔ Q)} ∪ sub(P ) ∪ sub(Q)
sub(¬P ) = {¬P } ∪ sub(P ).
The set sub(P ) is called the set of sub formulas of P .
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Sub Formula – Sub Proposition:
 Compute sub(P ) for P = ((p1 ∧ ¬p2) ∨ ¬p3).
sub(P ) = {P } ∪ sub(p1 ∧ ¬p2) ∪ sub(¬p3)
= {P } ∪ {(p1 ∧ ¬p2)} ∪ sub(p1) ∪ sub(¬p2) ∪ sub(¬p3)
= {P, (p1 ∧ ¬p2)} ∪ {p1} ∪ {¬p2} ∪ sub(p2) ∪ {¬p3} ∪ sub(p3)
= {P, (p1 ∧ ¬p2), p1, ¬p2, p2, ¬p3, p3}
Note : From the Parse tree write propositions for all the
subtree of the parse tree of w. A tree is subtree to itself,
so w also.
∨
∧ ¬
p1 ¬ p3
p2
Parse Tree
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Soundness of Propositional Logic:
soundness property: if and only if every formula that can be proved in the system
is logically valid (Tautology) with respect to the semantics of the system.
Theorem :
Let Σ be a set of propositions, and let w be a proposition.
(1) If Σ ⊢ w in PC, then Σ ⊨ w.
(2) If Σ is satisfiable, then Σ is PC-consistent.
Ex: Modus ponens Proof
p (p=1)
p → q (p → q =1)
Q q=1
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Completeness of Propositional Logic:
Completeness property: any formula that is true under all valuations is a theorem.
Theorem :
Let Σ be an infinite set of propositions, and let w be a proposition.
(1) Σ ⊨ w iff Σ has a finite subset Γ such that Γ ⊨ w.
(2) Σ is unsatisfiable iff Σ has a finite unsatisfiable subset.
(3) Σ is satisfiable iff each nonempty finite subset of Σ is satisfiable
Note:
 Soundness means that you cannot prove anything that's wrong
 Completeness means that you can prove anything that's right.
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Gentzen sequent calculus
 Sequent calculus: Instead of constructing proofs, will prove that certain consequences
are provable. In a sequent calculus, one starts from a given sequent (consequence) and
goes on applying sequent rules to get newer sequents.
 Gentzen Sequent calculus: identifies some of the sequents as correct or self-evident
and tries to reduce everything to the self-evident ones, which terminate a proof.
 A sequent is of the form Σ ⊢ Γ, where Σ and Γ are sets of propositions. The empty sequent
‘⊢’ represents a consequence which never holds; and the universal sequent ⊤ represents
a valid consequence, which is used to terminate a proof.
 This system is also known as GPC, Gentzen’s Propositional Calculus.
 ⊤ p, r ⊢ q, s, t p, r ⊢ q p ⊢ q p ⊢ ⊢ q ⊢
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Gentzen sequent calculus
 Let Σ, Γ, Δ, Ω be generic sets of propositions, and let x, y be generic
propositions. The inference rules or the sequent rules of GPC, along with their
mnemonics, are as follows:
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Gentzen sequent calculus
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Gentzen sequent calculus
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Gentzen sequent calculus
 A derivation (GPC-derivation) is a tree whose root is a sequent, and it is
generated by applications of sequent rules on the leaves recursively.
 The new sequents are added as children of the original (leaf) node.
 Rules that have a single denominator are called stacking rules, and the ones
with two denominators are called branching rules.
 Sequents arising out of an application of a stacking rule are written one after
another from top to bottom, while those arising out of branching rules are written
with the help of slanted lines
 A proof of a sequent (GPC-proof) is a derivation with the sequent at its root and ⊤ at
all its leaves
 A set of propositions Σ is inconsistent in GPC iff Σ ⊢ ⊥.
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
GPC-proof for p → (q → p)
 ⊢ p → (q → p) ⊢ → (then x ⊢ y)
p ⊢ (q→p) ⊢ → (then x ⊢ y)
p , q ⊢ p
T
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
GPC-proof for ⊢ p→(¬q→¬(p→q))
⊢ p→ (¬q→¬(p→q)) ⊢ → (then x ⊢ y)
p ⊢ ¬q→¬(p→q) ⊢ → (then x ⊢ y)
 p , ¬q ⊢ ¬(p→q) ⊢ ¬ ( then x ⊢
 p, ¬q , (p→q) ⊢ ¬ ⊢ (then ⊢ x)
 p, (p→q) ⊢ q
→ ⊢ then ⊢ x y ⊢
 p ⊢ p, q p, q ⊢ q
 T T
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
GPC-proof for ⊢ (p→(q→r))→((p→q)→(p→r))
⊢ (p→(q→r))→((p→q)→(p→r)) ⊢ → (then x ⊢ y)
p →(q→r) ⊢ ((p→q)→(p→r) ⊢ → (then x ⊢ y)
 p→(q→r), p→q ⊢ p→r ⊢ → (then x ⊢ y)
 p→(q→r), p→q, p ⊢ r → ⊢ then ⊢ x y ⊢
 p→(q→r), p ⊢ p, r p→(q→r), q,p ⊢ r → ⊢ then ⊢ x y ⊢
 T q,p ⊢ p,r q→r,q,p ⊢ r
T
q,p ⊢ q, r r,q,p ⊢ r
T T
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Show that the following sequent are provable or not using GPC
p, p→q ! ⊢ q
p, p→q ⊢ q → ⊢ then ⊢ x y ⊢
p ⊢p, q p, q ⊢ q
T T
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
AXIOMATIC SYSTEM PC
We choose the subset {¬,→} we ignore other connectives for simplicity.
We choose the subset {¬,→} we ignore other connectives for simplicity.
we use capital letters A,B,C, . . . as generic symbols for propositions.
The axiom schemes of PC are:
(A1) A→(B→A)
(A2) (A→(B→C))→((A→B)→(A→C))
(A3) (¬A→¬B)→((¬A→B)→A)
In addition to the axioms, PC has a inference rule - Modus Ponens:
{A, A→B} ⊨ B.
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Proof using axiomatic system
EX: Show that ⊢ q→(p→ p).
1. p→ p Theorem
2. (p→ p)→(q→(p→ p)) A1
3. q→(p→ p) MP 1, 2
EX: Show that ⊢ (¬q→q)→q.
1. ¬q→¬q Theorem
2. (¬q→¬q)→((¬q→q)→q) A3
3. (¬q→q)→q 1, 2,MP
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Proof using axiomatic system
⊨ PC r→(p→(q→ p)).
1. (p→(q→ p)) → r→(p→(q→ p)). A1 , A := p→(q→ p), B := r
2. p→(q→ p) A1, A := p, B := q
3. r→(p→(q→ p)) MP 1, 2,
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
References
1. Arindama Singh," Logics for Computer Science", PHI Learning Private
Ltd,2nd Edition, 2018
2. Wasilewska & Anita, "Logics for computer science: classical and non-
classical", Springer, 2018
3. Huth M and Ryan M, Logic in Computer Science: Modeling and Reasoning
about systems‖, Cambridge University Press, 2005
4. Dana Richards & Henry Hamburger, "Logic And Language Models For
Computer Science", Third Edition, World Scientific Publishing Co. Pte.
Ltd,2018
Computational logic Propositional Calculus proof system

More Related Content

What's hot

Minimization of DFA
Minimization of DFAMinimization of DFA
Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5
Abhimanyu Mishra
 
Code로 이해하는 RNN
Code로 이해하는 RNNCode로 이해하는 RNN
Code로 이해하는 RNN
SANG WON PARK
 
27 power series x
27 power series x27 power series x
27 power series x
math266
 
VTU Algorithms Notes CBCS (DAA Notes) by Nithin, VVCE
VTU Algorithms Notes CBCS (DAA Notes) by Nithin, VVCEVTU Algorithms Notes CBCS (DAA Notes) by Nithin, VVCE
VTU Algorithms Notes CBCS (DAA Notes) by Nithin, VVCE
Nithin Kumar,VVCE, Mysuru
 
Series solution to ordinary differential equations
Series solution to ordinary differential equations Series solution to ordinary differential equations
Series solution to ordinary differential equations
University of Windsor
 
#5 formal methods – hoare logic
#5 formal methods – hoare logic#5 formal methods – hoare logic
#5 formal methods – hoare logic
Sharif Omar Salem
 
Translating English to Propositional Logic
Translating English to Propositional LogicTranslating English to Propositional Logic
Translating English to Propositional LogicJanet Stemwedel
 
Chapter 6 taylor and maclaurin series
Chapter 6 taylor and maclaurin seriesChapter 6 taylor and maclaurin series
Chapter 6 taylor and maclaurin series
Irfaan Bahadoor
 
4.3 related rates
4.3 related rates4.3 related rates
4.3 related ratesmath265
 
Deep generative model.pdf
Deep generative model.pdfDeep generative model.pdf
Deep generative model.pdf
Hyungjoo Cho
 
Fundamental principle of counting -Discrete Mathematics
Fundamental principle of counting -Discrete MathematicsFundamental principle of counting -Discrete Mathematics
Fundamental principle of counting -Discrete MathematicsOmnia A. Abdullah
 
Applied Calculus Chapter 4 multiple integrals
Applied Calculus Chapter  4 multiple integralsApplied Calculus Chapter  4 multiple integrals
Applied Calculus Chapter 4 multiple integrals
J C
 
2.4 defintion of derivative
2.4 defintion of derivative2.4 defintion of derivative
2.4 defintion of derivativemath265
 
Mathematical Reasoning DM
Mathematical Reasoning DMMathematical Reasoning DM
Mathematical Reasoning DM
Rokonuzzaman Rony
 
Kalman Filter Basic
Kalman Filter BasicKalman Filter Basic
Kalman Filter Basic
National Cheng Kung University
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logic
Sharif Omar Salem
 
Depth-First Search
Depth-First SearchDepth-First Search
Depth-First Search
Md. Shafiuzzaman Hira
 
6.2 special cases system of linear equations
6.2 special cases system of linear equations6.2 special cases system of linear equations
6.2 special cases system of linear equationsmath260
 
21 properties of division and roots x
21 properties of division and roots x21 properties of division and roots x
21 properties of division and roots x
math260
 

What's hot (20)

Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFA
 
Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5
 
Code로 이해하는 RNN
Code로 이해하는 RNNCode로 이해하는 RNN
Code로 이해하는 RNN
 
27 power series x
27 power series x27 power series x
27 power series x
 
VTU Algorithms Notes CBCS (DAA Notes) by Nithin, VVCE
VTU Algorithms Notes CBCS (DAA Notes) by Nithin, VVCEVTU Algorithms Notes CBCS (DAA Notes) by Nithin, VVCE
VTU Algorithms Notes CBCS (DAA Notes) by Nithin, VVCE
 
Series solution to ordinary differential equations
Series solution to ordinary differential equations Series solution to ordinary differential equations
Series solution to ordinary differential equations
 
#5 formal methods – hoare logic
#5 formal methods – hoare logic#5 formal methods – hoare logic
#5 formal methods – hoare logic
 
Translating English to Propositional Logic
Translating English to Propositional LogicTranslating English to Propositional Logic
Translating English to Propositional Logic
 
Chapter 6 taylor and maclaurin series
Chapter 6 taylor and maclaurin seriesChapter 6 taylor and maclaurin series
Chapter 6 taylor and maclaurin series
 
4.3 related rates
4.3 related rates4.3 related rates
4.3 related rates
 
Deep generative model.pdf
Deep generative model.pdfDeep generative model.pdf
Deep generative model.pdf
 
Fundamental principle of counting -Discrete Mathematics
Fundamental principle of counting -Discrete MathematicsFundamental principle of counting -Discrete Mathematics
Fundamental principle of counting -Discrete Mathematics
 
Applied Calculus Chapter 4 multiple integrals
Applied Calculus Chapter  4 multiple integralsApplied Calculus Chapter  4 multiple integrals
Applied Calculus Chapter 4 multiple integrals
 
2.4 defintion of derivative
2.4 defintion of derivative2.4 defintion of derivative
2.4 defintion of derivative
 
Mathematical Reasoning DM
Mathematical Reasoning DMMathematical Reasoning DM
Mathematical Reasoning DM
 
Kalman Filter Basic
Kalman Filter BasicKalman Filter Basic
Kalman Filter Basic
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logic
 
Depth-First Search
Depth-First SearchDepth-First Search
Depth-First Search
 
6.2 special cases system of linear equations
6.2 special cases system of linear equations6.2 special cases system of linear equations
6.2 special cases system of linear equations
 
21 properties of division and roots x
21 properties of division and roots x21 properties of division and roots x
21 properties of division and roots x
 

Similar to Computational logic Propositional Calculus proof system

Rules of inference
Rules of inferenceRules of inference
Rules of inference
Lakshmi R
 
Logical equivalence, laws of logic
Logical equivalence, laws of logicLogical equivalence, laws of logic
Logical equivalence, laws of logic
Lakshmi R
 
L2.pdf
L2.pdfL2.pdf
Lecture 09 -_davis_putnam
Lecture 09 -_davis_putnamLecture 09 -_davis_putnam
Lecture 09 -_davis_putnam
Issen Sobri
 
Computer Science Engineering: Discrete mathematics & graph theory, THE GATE A...
Computer Science Engineering: Discrete mathematics & graph theory, THE GATE A...Computer Science Engineering: Discrete mathematics & graph theory, THE GATE A...
Computer Science Engineering: Discrete mathematics & graph theory, THE GATE A...
klirantga
 
AI R16 - UNIT-3.pdf
AI R16 - UNIT-3.pdfAI R16 - UNIT-3.pdf
AI R16 - UNIT-3.pdf
JNTUK KAKINADA
 
Formal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of InferenceFormal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of Inference
Laguna State Polytechnic University
 
Logic and proof
Logic and proofLogic and proof
Logic and proof
Suresh Ram
 
NAND and NOR connectives
NAND and NOR connectivesNAND and NOR connectives
NAND and NOR connectives
Lakshmi R
 
Formal Logic - Lesson 6 - Switching Circuits
Formal Logic - Lesson 6 - Switching CircuitsFormal Logic - Lesson 6 - Switching Circuits
Formal Logic - Lesson 6 - Switching Circuits
Laguna State Polytechnic University
 
1. linear model, inference, prediction
1. linear model, inference, prediction1. linear model, inference, prediction
1. linear model, inference, prediction
Malik Hassan Qayyum 🕵🏻‍♂️
 
Orthogonal basis and gram schmidth process
Orthogonal basis and gram schmidth processOrthogonal basis and gram schmidth process
Orthogonal basis and gram schmidth process
gidc engineering college
 
Du Calcul des prédicats vers Prolog
Du Calcul des prédicats vers PrologDu Calcul des prédicats vers Prolog
Du Calcul des prédicats vers Prolog
Serge Garlatti
 
Predicate Calculus
Predicate CalculusPredicate Calculus
Predicate Calculus
Serge Garlatti
 
Discrete_Mathmatics Projects report.docx
Discrete_Mathmatics Projects report.docxDiscrete_Mathmatics Projects report.docx
Discrete_Mathmatics Projects report.docx
SwapnajitSahoo1
 
discreatemathpresentationrss-171107192105.pptx
discreatemathpresentationrss-171107192105.pptxdiscreatemathpresentationrss-171107192105.pptx
discreatemathpresentationrss-171107192105.pptx
AbdulMajeetMohamed
 
chapter9.ppt
chapter9.pptchapter9.ppt
chapter9.ppt
Praveen Kumar
 
A simple method to find a robust output feedback controller by random search ...
A simple method to find a robust output feedback controller by random search ...A simple method to find a robust output feedback controller by random search ...
A simple method to find a robust output feedback controller by random search ...
ISA Interchange
 

Similar to Computational logic Propositional Calculus proof system (20)

Rules of inference
Rules of inferenceRules of inference
Rules of inference
 
Logical equivalence, laws of logic
Logical equivalence, laws of logicLogical equivalence, laws of logic
Logical equivalence, laws of logic
 
Chap05
Chap05Chap05
Chap05
 
L2.pdf
L2.pdfL2.pdf
L2.pdf
 
Lecture 09 -_davis_putnam
Lecture 09 -_davis_putnamLecture 09 -_davis_putnam
Lecture 09 -_davis_putnam
 
Computer Science Engineering: Discrete mathematics & graph theory, THE GATE A...
Computer Science Engineering: Discrete mathematics & graph theory, THE GATE A...Computer Science Engineering: Discrete mathematics & graph theory, THE GATE A...
Computer Science Engineering: Discrete mathematics & graph theory, THE GATE A...
 
AI R16 - UNIT-3.pdf
AI R16 - UNIT-3.pdfAI R16 - UNIT-3.pdf
AI R16 - UNIT-3.pdf
 
Formal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of InferenceFormal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of Inference
 
Logic and proof
Logic and proofLogic and proof
Logic and proof
 
NAND and NOR connectives
NAND and NOR connectivesNAND and NOR connectives
NAND and NOR connectives
 
Formal Logic - Lesson 6 - Switching Circuits
Formal Logic - Lesson 6 - Switching CircuitsFormal Logic - Lesson 6 - Switching Circuits
Formal Logic - Lesson 6 - Switching Circuits
 
1. linear model, inference, prediction
1. linear model, inference, prediction1. linear model, inference, prediction
1. linear model, inference, prediction
 
Orthogonal basis and gram schmidth process
Orthogonal basis and gram schmidth processOrthogonal basis and gram schmidth process
Orthogonal basis and gram schmidth process
 
Du Calcul des prédicats vers Prolog
Du Calcul des prédicats vers PrologDu Calcul des prédicats vers Prolog
Du Calcul des prédicats vers Prolog
 
Predicate Calculus
Predicate CalculusPredicate Calculus
Predicate Calculus
 
Discrete_Mathmatics Projects report.docx
Discrete_Mathmatics Projects report.docxDiscrete_Mathmatics Projects report.docx
Discrete_Mathmatics Projects report.docx
 
Logic
LogicLogic
Logic
 
discreatemathpresentationrss-171107192105.pptx
discreatemathpresentationrss-171107192105.pptxdiscreatemathpresentationrss-171107192105.pptx
discreatemathpresentationrss-171107192105.pptx
 
chapter9.ppt
chapter9.pptchapter9.ppt
chapter9.ppt
 
A simple method to find a robust output feedback controller by random search ...
A simple method to find a robust output feedback controller by random search ...A simple method to find a robust output feedback controller by random search ...
A simple method to find a robust output feedback controller by random search ...
 

Recently uploaded

Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 

Recently uploaded (20)

Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 

Computational logic Propositional Calculus proof system

  • 1. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 COMPUTATIONAL LOGIC Dr.J.Faritha Banu SRM IST- Ramapuram
  • 2. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Topics Covered in this Presentation are  Propositional Calculus Introduction  Terminologies  Natural Deduction proof system  Inference Rules  Example Problems  Sub Formula – Sub Proposition  Soundness of Propositional Logic  Completeness of Propositional Logic  Gentzen sequent calculus  Axiomatic System for PC
  • 3. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 PROPOSITIONAL CALCULUS  A proof starts with some well known facts and proceeds towards the result using the allowed inferences.  The accepted facts (proved theorems) are called axioms.  The allowed inferences(Valid consequences) are called the rules of inference, which link one or more propositions to another.  A proof is then a sketch of how we reach the final proposition from the axioms by means of the inference rules.  Propositional Calculus (PC): Branch of symbolic logic that deals with propositions and the relations between them, without examination of their content.
  • 4. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 INFORMAL METHOD  Axiomatic systems are inconvenient as they insist on formality.  Informal methods can be developed from the axiomatic systems. INFORMAL SYSTEM – PROOF NATURAL DEDUCTION  Inference Rules: These are used in the Propositional natural deduction for constructing proof. These rules are categorized to be either for introduction or for elimination.  Propositional Natural Deduction system (PND), This system has only one axiom, which is ⊤; PND has the following inference rules (read ‘ i ’ for introduction and ‘e ’ for elimination
  • 5. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 NATURAL DEDUCTION - Inference Rules Natural Deduction of Propositional Logic: Rules of Conjunction, Disjunction, Implication, Negation Conjunction (Introduction) Conjunction (Elimination) or Simplification p p ∧ q p ∧ q q p q p ∧ q Modus Ponens Modus Tollens p→q p→q p ¬q q ¬ p
  • 6. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 NATURAL DEDUCTION - Inference Rules Disjunction(Introduction) p q p ∨ q p ∨ q Disjunction(Elimination) p ∨ q p (where p → r) r q ( where q → r) r r Can be written as (p…..r) (q…r) , p v q ( ….. Means conditional) r
  • 7. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 NATURAL DEDUCTION - - Inference Rules Top –True (Introduction) Top (Elimination) Bottom -False (Introduction) Bottom -False (Elimination)
  • 8. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 NATURAL DEDUCTION - Inference Rules Negation (Introduction) Negation (Elimination) Double Negation (Introduction) Double Negation (Elimination)
  • 9. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 NATURAL DEDUCTION- - Inference Rules Conditional (Implication ) → (Introduction) → (Elimination) Biconditional (Equivalence) ↔ (Introduction) ↔ (Elimination)
  • 10. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Proof 1 :  Premises ( p ∧ q ) ∧ ( r ∧ ( s ∧ t )) Conclusion s Deduction: 1. ( p ∧ q ) ∧ ( r ∧ ( s ∧ t )) Premise 2. ( r ∧ ( s ∧ t )) Conjunction Elimination (1) 3. s ∧ t Conjunction Elimination (2) 4. s Conjunction Elimination (2)
  • 11. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Proof 2 :  Premises ( p ∧ ( q ∨ r )) ∧ ( r ∧ ( s ↔ t ))  Conclusion p ∧ r Deduction: 1. ( p ∧ ( q ∨ r )) ∧ ( r ∧ ( s ↔ t )) Premise 2. p ∧ ( q ∨ r ) Conjunction Elimination(∧e) (1) 3. p Conjunction Elimination(∧e) (2) 4. r ∧ ( s ↔ t ) Conjunction Elimination (1) 5. r Conjunction Elimination (4)
  • 12. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Proof 3 : Premises ( p ∧ q ) → r p ∧ s q  Conclusion r ∨ t Deduction: 1. ( p ∧ q ) → r Premise 2. p ∧ s Premise 3. q Premise 4. p Conjunction Elimination (2) 5. s Conjunction Elimination (2) 6. p ∧ q Conjunction Introduction (4,3) 7. r Modus Ponens (1,6) 8. r ∨ t Disjunction (7)
  • 13. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Proof 4 : Premises p → ( q ∧ r ) ¬( q ∧ r) Conclusion ¬ p ∧ ¬ ( q ∧ r) Deduction: 1. p → ( q ∧ r ) Premise 2. ¬( q ∧ r) Premise 3. ¬ p Modus Tollens (1) 4. ¬ p ∧ ¬ ( q ∧ r) Conjunction Introduction (3,2)
  • 14. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Proof 5 : Premises p → q p → r s → ¬( q ∨ r) Conclusion ¬ s ∧ p Deduction: 1. p → q Premise 2. p → r Premise 3. s → ¬( q ∨ r) Premise 4. p Conjuction elimination 2 5. q Modus ponens(4,1) 6. q ∨ r Disjunction introduction (5) 7. ¬ s Modus Tollens (3,6) 8. ¬ s ∧ p Conjuction introduction (4,7)
  • 15. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Proof 6: A proof for ⊢ p→(q→ p) is as follows:
  • 16. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Sub Formula – Sub Proposition:  A sub-proposition of w, is a proposition corresponding to any subtree of the parse tree of w. Immediate sub-proposition of a proposition w is any proposition corresponding to a subtree of the parse tree Tw of w whose depth is one less than Tw. The set of appropriate nonlogical constants is called the signature of the propositional language.
  • 17. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Sub Formula – Sub Proposition:  The function sub(P ) giving the sub formulas of a formula P is defined by structural induction as follows: sub(pi) = {pi}, for all atomic formulas pi  sub(P ∧ Q) = {(P ∧ Q)} ∪ sub(P ) ∪ sub(Q) sub(P ∨ Q) = {(P ∨ Q)} ∪ sub(P ) ∪ sub(Q) sub(P → Q) = {(P → Q)} ∪ sub(P ) ∪ sub(Q) sub(P ↔ Q) = {(P ↔ Q)} ∪ sub(P ) ∪ sub(Q) sub(¬P ) = {¬P } ∪ sub(P ). The set sub(P ) is called the set of sub formulas of P .
  • 18. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Sub Formula – Sub Proposition:  Compute sub(P ) for P = ((p1 ∧ ¬p2) ∨ ¬p3). sub(P ) = {P } ∪ sub(p1 ∧ ¬p2) ∪ sub(¬p3) = {P } ∪ {(p1 ∧ ¬p2)} ∪ sub(p1) ∪ sub(¬p2) ∪ sub(¬p3) = {P, (p1 ∧ ¬p2)} ∪ {p1} ∪ {¬p2} ∪ sub(p2) ∪ {¬p3} ∪ sub(p3) = {P, (p1 ∧ ¬p2), p1, ¬p2, p2, ¬p3, p3} Note : From the Parse tree write propositions for all the subtree of the parse tree of w. A tree is subtree to itself, so w also. ∨ ∧ ¬ p1 ¬ p3 p2 Parse Tree
  • 19. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Soundness of Propositional Logic: soundness property: if and only if every formula that can be proved in the system is logically valid (Tautology) with respect to the semantics of the system. Theorem : Let Σ be a set of propositions, and let w be a proposition. (1) If Σ ⊢ w in PC, then Σ ⊨ w. (2) If Σ is satisfiable, then Σ is PC-consistent. Ex: Modus ponens Proof p (p=1) p → q (p → q =1) Q q=1
  • 20. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Completeness of Propositional Logic: Completeness property: any formula that is true under all valuations is a theorem. Theorem : Let Σ be an infinite set of propositions, and let w be a proposition. (1) Σ ⊨ w iff Σ has a finite subset Γ such that Γ ⊨ w. (2) Σ is unsatisfiable iff Σ has a finite unsatisfiable subset. (3) Σ is satisfiable iff each nonempty finite subset of Σ is satisfiable Note:  Soundness means that you cannot prove anything that's wrong  Completeness means that you can prove anything that's right.
  • 21. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Gentzen sequent calculus  Sequent calculus: Instead of constructing proofs, will prove that certain consequences are provable. In a sequent calculus, one starts from a given sequent (consequence) and goes on applying sequent rules to get newer sequents.  Gentzen Sequent calculus: identifies some of the sequents as correct or self-evident and tries to reduce everything to the self-evident ones, which terminate a proof.  A sequent is of the form Σ ⊢ Γ, where Σ and Γ are sets of propositions. The empty sequent ‘⊢’ represents a consequence which never holds; and the universal sequent ⊤ represents a valid consequence, which is used to terminate a proof.  This system is also known as GPC, Gentzen’s Propositional Calculus.  ⊤ p, r ⊢ q, s, t p, r ⊢ q p ⊢ q p ⊢ ⊢ q ⊢
  • 22. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Gentzen sequent calculus  Let Σ, Γ, Δ, Ω be generic sets of propositions, and let x, y be generic propositions. The inference rules or the sequent rules of GPC, along with their mnemonics, are as follows:
  • 23. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Gentzen sequent calculus
  • 24. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Gentzen sequent calculus
  • 25. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Gentzen sequent calculus  A derivation (GPC-derivation) is a tree whose root is a sequent, and it is generated by applications of sequent rules on the leaves recursively.  The new sequents are added as children of the original (leaf) node.  Rules that have a single denominator are called stacking rules, and the ones with two denominators are called branching rules.  Sequents arising out of an application of a stacking rule are written one after another from top to bottom, while those arising out of branching rules are written with the help of slanted lines  A proof of a sequent (GPC-proof) is a derivation with the sequent at its root and ⊤ at all its leaves  A set of propositions Σ is inconsistent in GPC iff Σ ⊢ ⊥.
  • 26. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 GPC-proof for p → (q → p)  ⊢ p → (q → p) ⊢ → (then x ⊢ y) p ⊢ (q→p) ⊢ → (then x ⊢ y) p , q ⊢ p T
  • 27. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 GPC-proof for ⊢ p→(¬q→¬(p→q)) ⊢ p→ (¬q→¬(p→q)) ⊢ → (then x ⊢ y) p ⊢ ¬q→¬(p→q) ⊢ → (then x ⊢ y)  p , ¬q ⊢ ¬(p→q) ⊢ ¬ ( then x ⊢  p, ¬q , (p→q) ⊢ ¬ ⊢ (then ⊢ x)  p, (p→q) ⊢ q → ⊢ then ⊢ x y ⊢  p ⊢ p, q p, q ⊢ q  T T
  • 28. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 GPC-proof for ⊢ (p→(q→r))→((p→q)→(p→r)) ⊢ (p→(q→r))→((p→q)→(p→r)) ⊢ → (then x ⊢ y) p →(q→r) ⊢ ((p→q)→(p→r) ⊢ → (then x ⊢ y)  p→(q→r), p→q ⊢ p→r ⊢ → (then x ⊢ y)  p→(q→r), p→q, p ⊢ r → ⊢ then ⊢ x y ⊢  p→(q→r), p ⊢ p, r p→(q→r), q,p ⊢ r → ⊢ then ⊢ x y ⊢  T q,p ⊢ p,r q→r,q,p ⊢ r T q,p ⊢ q, r r,q,p ⊢ r T T
  • 29. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Show that the following sequent are provable or not using GPC p, p→q ! ⊢ q p, p→q ⊢ q → ⊢ then ⊢ x y ⊢ p ⊢p, q p, q ⊢ q T T
  • 30. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 AXIOMATIC SYSTEM PC We choose the subset {¬,→} we ignore other connectives for simplicity. We choose the subset {¬,→} we ignore other connectives for simplicity. we use capital letters A,B,C, . . . as generic symbols for propositions. The axiom schemes of PC are: (A1) A→(B→A) (A2) (A→(B→C))→((A→B)→(A→C)) (A3) (¬A→¬B)→((¬A→B)→A) In addition to the axioms, PC has a inference rule - Modus Ponens: {A, A→B} ⊨ B.
  • 31. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Proof using axiomatic system EX: Show that ⊢ q→(p→ p). 1. p→ p Theorem 2. (p→ p)→(q→(p→ p)) A1 3. q→(p→ p) MP 1, 2 EX: Show that ⊢ (¬q→q)→q. 1. ¬q→¬q Theorem 2. (¬q→¬q)→((¬q→q)→q) A3 3. (¬q→q)→q 1, 2,MP
  • 32. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Proof using axiomatic system ⊨ PC r→(p→(q→ p)). 1. (p→(q→ p)) → r→(p→(q→ p)). A1 , A := p→(q→ p), B := r 2. p→(q→ p) A1, A := p, B := q 3. r→(p→(q→ p)) MP 1, 2,
  • 33. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 References 1. Arindama Singh," Logics for Computer Science", PHI Learning Private Ltd,2nd Edition, 2018 2. Wasilewska & Anita, "Logics for computer science: classical and non- classical", Springer, 2018 3. Huth M and Ryan M, Logic in Computer Science: Modeling and Reasoning about systems‖, Cambridge University Press, 2005 4. Dana Richards & Henry Hamburger, "Logic And Language Models For Computer Science", Third Edition, World Scientific Publishing Co. Pte. Ltd,2018