SlideShare una empresa de Scribd logo
1 de 21
CS344 : Introduction to Artificial
Intelligence
Pushpak Bhattacharyya
CSE Dept.,
IIT Bombay
Lecture 4- Logic
Logic and inferencing
Vision NLP
Expert
Systems
Planning
Robotics
 Search
 Reasoning
 Learning
 Knowledge
Obtaining implication of given facts and rules -- Hallmark of
intelligence
Inferencing through
− Deduction (General to specific)
− Induction (Specific to General)
− Abduction (Conclusion to hypothesis in absence of any other evidence
to contrary)
Deduction
Given: All men are mortal (rule)
Shakespeare is a man (fact)
To prove: Shakespeare is mortal (inference)
Induction
Given: Shakespeare is mortal
Newton is mortal (Observation)
Dijkstra is mortal
To prove: All men are mortal (Generalization)
If there is rain, then there will be no picnic
Fact1: There was rain
Conclude: There was no picnic
Deduction
Fact2: There was no picnic
Conclude: There was no rain (?)
Induction and abduction are fallible forms of reasoning. Their conclusions are
susceptible to retraction
Two systems of logic
1) Propositional calculus
2) Predicate calculus
Propositions
− Stand for facts/assertions
− Declarative statements
− As opposed to interrogative statements (questions) or imperative
statements (request, order)
Operators
=> and ¬ form a minimal set (can express other operations)
- Prove it.
Tautologies are formulae whose truth value is always T, whatever the
assignment is
)
(
(~),
),
(
),
( 

 N
IMPLIC
NOT
OR
AND
Model
In propositional calculus any formula with n propositions has 2n models
(assignments)
- Tautologies evaluate to T in all models.
Examples:
1)
2)
-e Morgan with AND
P
P 

)
(
)
( Q
P
Q
P 





Semantic Tree/Tableau method of proving tautology
Start with the negation of the formula
α-formula
β-formula
α-formula
p
q
¬q
¬ p
- α - formula
- β - formula
)]
(
)
(
[ Q
P
Q
P 






)
( Q
P 

)
( Q
P 



- α - formula
Example 2:
B C B C
Contradictions in all paths
X
α-formula
¬ A ¬C
¬ A
¬B ¬ A ¬B
A
B∨ C
A
B∨ C A
B∨ C
A
B∨ C
(α - formulae)
(β - formulae)
(α - formula)
)]
(
)
(
)
(
[ C
A
B
A
C
B
A 






)
( C
B
A 

))
(
)
(( C
A
B
A 



)
( B
A 

))
( C
A 

Exercise:
Prove the backward implication in the previous
example
Formal Systems
 Rule governed
 Strict description of structure and rule application
 Constituents
 Symbols
 Well formed formulae
 Inference rules
 Assignment of semantics
 Notion of proof
 Notion of soundness, completeness, consistency,
decidability etc.
Hilbert's formalization of propositional calculus
1. Elements are propositions : Capital letters
2. Operator is only one :  (called implies)
3. Special symbol F (called 'false')
4. Two other symbols : '(' and ')'
5. Well formed formula is constructed according to the grammar
WFF P|F|WFFWFF
6. Inference rule : only one
Given AB and
A
write B
known as MODUS PONENS
7. Axioms : Starting structures
A1:
A2:
A3
This formal system defines the propositional calculus
))
(
( A
B
A 

)))
(
)
((
))
(
(( C
A
B
A
C
B
A 





)
)
)
((( A
F
F
A 


Notion of proof
1. Sequence of well formed formulae
2. Start with a set of hypotheses
3. The expression to be proved should be the last line in the
sequence
4. Each intermediate expression is either one of the hypotheses
or one of the axioms or the result of modus ponens
5. An expression which is proved only from the axioms and
inference rules is called a THEOREM within the system
Example of proof
From P and and prove R
H1: P
H2:
H3:
i) P H1
ii) H2
iii) Q MP, (i), (ii)
iv) H3
v) R MP, (iii), (iv)
Q
P 
Q
P 
Q
P 
R
Q 
R
Q 
R
Q 
Prove that is a THEOREM
i) A1 : P for A and B
ii) A1: P for A and for B
iii)
A2: with P for A, for B and P for C
iv) MP, (ii), (iii)
v) MP, (i), (iv)
)
( P
P 
)
)
(( P
P
P
P 


)
( P
P
P 

))]
(
))
(
((
))
)
((
[( P
P
P
P
P
P
P
P
P 







)
( P
P 
))
(
)
(
( P
P
P
P
P 



)
( P
P 
)
( P
P 
Formalization of propositional logic (review)
Axioms :
A1
A2
A3
Inference rule:
Given and A, write B
A Proof is:
A sequence of
i) Hypotheses
ii) Axioms
iii) Results of MP
A Theorem is an
Expression proved from axioms and inference rules
))
(
( A
B
A 

)))
(
)
((
))
(
(( C
A
B
A
C
B
A 





)
)
)
((( A
F
F
A 


)
( B
A 
Example: To prove
i) A1 : P for A and B
ii) A1: P for A and for B
iii)
A2: with P for A, for B and P for C
iv) MP, (ii), (iii)
v) MP, (i), (iv)
)
( P
P 
)
)
(( P
P
P
P 


)
( P
P
P 

))]
(
))
(
((
))
)
((
[( P
P
P
P
P
P
P
P
P 







)
( P
P 
))
(
)
(
( P
P
P
P
P 



)
( P
P 
)
( P
P 
Shorthand
1. is written as and called 'NOT P'
2. is written as and called
'P OR Q’
3. is written as and called
'P AND Q'
Exercise: (Challenge)
- Prove that
¬P F
P 
)
)
(( Q
F
P 
 )
( Q
P 
)
))
(
(( F
F
Q
P 

 )
( Q
P 
))
(
( A
A 


A very useful theorem (Actually a meta
theorem, called deduction theorem)
Statement
If
A1, A2, A3 ............. An ├ B
then
A1, A2, A3, ...............An-1├
├ is read as 'derives'
Given
A1
A2
A3
.
.
.
.
An
B
Picture 1
A1
A2
A3
.
.
.
.
An-1
Picture 2
B
An 
B
An 
Use of Deduction Theorem
Prove
i.e.,
├ F (M.P)
A├ (D.T)
├ (D.T)
Very difficult to prove from first principles, i.e., using axioms and
inference rules only
))
(
( A
A 


)
)
(( F
F
A
A 


F
A
A 
,
F
F
A 
 )
(
)
)
(( F
F
A
A 


Prove
i.e.
├ F
├ (D.T)
├ Q (M.P with A3)
P├
├
)
( Q
P
P 

)
)
(( Q
F
P
P 


F
Q
F
P
P 
 ,
,
F
P
P 
, F
F
Q 
 )
(
Q
F
P 
 )
(
)
)
(( Q
F
P
P 



Más contenido relacionado

Más de kumarkaushal17

DOC-20230427-WA0010..pptx
DOC-20230427-WA0010..pptxDOC-20230427-WA0010..pptx
DOC-20230427-WA0010..pptxkumarkaushal17
 
DOC-20230427-WA0012..pptx
DOC-20230427-WA0012..pptxDOC-20230427-WA0012..pptx
DOC-20230427-WA0012..pptxkumarkaushal17
 
4. OPTIMIZATION NN AND FL.pptx
4. OPTIMIZATION NN AND FL.pptx4. OPTIMIZATION NN AND FL.pptx
4. OPTIMIZATION NN AND FL.pptxkumarkaushal17
 
Cloud_Deployment_Model (1).pptx
Cloud_Deployment_Model (1).pptxCloud_Deployment_Model (1).pptx
Cloud_Deployment_Model (1).pptxkumarkaushal17
 
pending-1664760315-2 knowledge based agent student.pptx
pending-1664760315-2 knowledge based agent student.pptxpending-1664760315-2 knowledge based agent student.pptx
pending-1664760315-2 knowledge based agent student.pptxkumarkaushal17
 
pending-1664760315-2 knowledge based agent student.pptx
pending-1664760315-2 knowledge based agent student.pptxpending-1664760315-2 knowledge based agent student.pptx
pending-1664760315-2 knowledge based agent student.pptxkumarkaushal17
 
dbmspresentation-161126155322.pptx
dbmspresentation-161126155322.pptxdbmspresentation-161126155322.pptx
dbmspresentation-161126155322.pptxkumarkaushal17
 
MYSQL GROUP FUNCTION.pptx
MYSQL GROUP FUNCTION.pptxMYSQL GROUP FUNCTION.pptx
MYSQL GROUP FUNCTION.pptxkumarkaushal17
 

Más de kumarkaushal17 (13)

DOC-20230427-WA0010..pptx
DOC-20230427-WA0010..pptxDOC-20230427-WA0010..pptx
DOC-20230427-WA0010..pptx
 
DOC-20230427-WA0012..pptx
DOC-20230427-WA0012..pptxDOC-20230427-WA0012..pptx
DOC-20230427-WA0012..pptx
 
Semiservice.pptx
Semiservice.pptxSemiservice.pptx
Semiservice.pptx
 
4. OPTIMIZATION NN AND FL.pptx
4. OPTIMIZATION NN AND FL.pptx4. OPTIMIZATION NN AND FL.pptx
4. OPTIMIZATION NN AND FL.pptx
 
Cloud_Deployment_Model (1).pptx
Cloud_Deployment_Model (1).pptxCloud_Deployment_Model (1).pptx
Cloud_Deployment_Model (1).pptx
 
pending-1664760315-2 knowledge based agent student.pptx
pending-1664760315-2 knowledge based agent student.pptxpending-1664760315-2 knowledge based agent student.pptx
pending-1664760315-2 knowledge based agent student.pptx
 
pending-1664760315-2 knowledge based agent student.pptx
pending-1664760315-2 knowledge based agent student.pptxpending-1664760315-2 knowledge based agent student.pptx
pending-1664760315-2 knowledge based agent student.pptx
 
dbmspresentation-161126155322.pptx
dbmspresentation-161126155322.pptxdbmspresentation-161126155322.pptx
dbmspresentation-161126155322.pptx
 
MYSQL GROUP FUNCTION.pptx
MYSQL GROUP FUNCTION.pptxMYSQL GROUP FUNCTION.pptx
MYSQL GROUP FUNCTION.pptx
 
DS MOD2 (1) (1).pptx
DS MOD2 (1) (1).pptxDS MOD2 (1) (1).pptx
DS MOD2 (1) (1).pptx
 
IPv4-ppt.k.pptx
IPv4-ppt.k.pptxIPv4-ppt.k.pptx
IPv4-ppt.k.pptx
 
module 3-.pptx
module 3-.pptxmodule 3-.pptx
module 3-.pptx
 
IP-Addresses.pptx
IP-Addresses.pptxIP-Addresses.pptx
IP-Addresses.pptx
 

Último

Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 

Último (20)

Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 

cs344-lect4-logic-14jan08.ppt

  • 1. CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 4- Logic
  • 2. Logic and inferencing Vision NLP Expert Systems Planning Robotics  Search  Reasoning  Learning  Knowledge Obtaining implication of given facts and rules -- Hallmark of intelligence
  • 3. Inferencing through − Deduction (General to specific) − Induction (Specific to General) − Abduction (Conclusion to hypothesis in absence of any other evidence to contrary) Deduction Given: All men are mortal (rule) Shakespeare is a man (fact) To prove: Shakespeare is mortal (inference) Induction Given: Shakespeare is mortal Newton is mortal (Observation) Dijkstra is mortal To prove: All men are mortal (Generalization)
  • 4. If there is rain, then there will be no picnic Fact1: There was rain Conclude: There was no picnic Deduction Fact2: There was no picnic Conclude: There was no rain (?) Induction and abduction are fallible forms of reasoning. Their conclusions are susceptible to retraction Two systems of logic 1) Propositional calculus 2) Predicate calculus
  • 5. Propositions − Stand for facts/assertions − Declarative statements − As opposed to interrogative statements (questions) or imperative statements (request, order) Operators => and ¬ form a minimal set (can express other operations) - Prove it. Tautologies are formulae whose truth value is always T, whatever the assignment is ) ( (~), ), ( ), (    N IMPLIC NOT OR AND
  • 6. Model In propositional calculus any formula with n propositions has 2n models (assignments) - Tautologies evaluate to T in all models. Examples: 1) 2) -e Morgan with AND P P   ) ( ) ( Q P Q P      
  • 7. Semantic Tree/Tableau method of proving tautology Start with the negation of the formula α-formula β-formula α-formula p q ¬q ¬ p - α - formula - β - formula )] ( ) ( [ Q P Q P        ) ( Q P   ) ( Q P     - α - formula
  • 8. Example 2: B C B C Contradictions in all paths X α-formula ¬ A ¬C ¬ A ¬B ¬ A ¬B A B∨ C A B∨ C A B∨ C A B∨ C (α - formulae) (β - formulae) (α - formula) )] ( ) ( ) ( [ C A B A C B A        ) ( C B A   )) ( ) (( C A B A     ) ( B A   )) ( C A  
  • 9. Exercise: Prove the backward implication in the previous example
  • 10. Formal Systems  Rule governed  Strict description of structure and rule application  Constituents  Symbols  Well formed formulae  Inference rules  Assignment of semantics  Notion of proof  Notion of soundness, completeness, consistency, decidability etc.
  • 11. Hilbert's formalization of propositional calculus 1. Elements are propositions : Capital letters 2. Operator is only one :  (called implies) 3. Special symbol F (called 'false') 4. Two other symbols : '(' and ')' 5. Well formed formula is constructed according to the grammar WFF P|F|WFFWFF 6. Inference rule : only one Given AB and A write B known as MODUS PONENS
  • 12. 7. Axioms : Starting structures A1: A2: A3 This formal system defines the propositional calculus )) ( ( A B A   ))) ( ) (( )) ( (( C A B A C B A       ) ) ) ((( A F F A   
  • 13. Notion of proof 1. Sequence of well formed formulae 2. Start with a set of hypotheses 3. The expression to be proved should be the last line in the sequence 4. Each intermediate expression is either one of the hypotheses or one of the axioms or the result of modus ponens 5. An expression which is proved only from the axioms and inference rules is called a THEOREM within the system
  • 14. Example of proof From P and and prove R H1: P H2: H3: i) P H1 ii) H2 iii) Q MP, (i), (ii) iv) H3 v) R MP, (iii), (iv) Q P  Q P  Q P  R Q  R Q  R Q 
  • 15. Prove that is a THEOREM i) A1 : P for A and B ii) A1: P for A and for B iii) A2: with P for A, for B and P for C iv) MP, (ii), (iii) v) MP, (i), (iv) ) ( P P  ) ) (( P P P P    ) ( P P P   ))] ( )) ( (( )) ) (( [( P P P P P P P P P         ) ( P P  )) ( ) ( ( P P P P P     ) ( P P  ) ( P P 
  • 16. Formalization of propositional logic (review) Axioms : A1 A2 A3 Inference rule: Given and A, write B A Proof is: A sequence of i) Hypotheses ii) Axioms iii) Results of MP A Theorem is an Expression proved from axioms and inference rules )) ( ( A B A   ))) ( ) (( )) ( (( C A B A C B A       ) ) ) ((( A F F A    ) ( B A 
  • 17. Example: To prove i) A1 : P for A and B ii) A1: P for A and for B iii) A2: with P for A, for B and P for C iv) MP, (ii), (iii) v) MP, (i), (iv) ) ( P P  ) ) (( P P P P    ) ( P P P   ))] ( )) ( (( )) ) (( [( P P P P P P P P P         ) ( P P  )) ( ) ( ( P P P P P     ) ( P P  ) ( P P 
  • 18. Shorthand 1. is written as and called 'NOT P' 2. is written as and called 'P OR Q’ 3. is written as and called 'P AND Q' Exercise: (Challenge) - Prove that ¬P F P  ) ) (( Q F P   ) ( Q P  ) )) ( (( F F Q P    ) ( Q P  )) ( ( A A   
  • 19. A very useful theorem (Actually a meta theorem, called deduction theorem) Statement If A1, A2, A3 ............. An ├ B then A1, A2, A3, ...............An-1├ ├ is read as 'derives' Given A1 A2 A3 . . . . An B Picture 1 A1 A2 A3 . . . . An-1 Picture 2 B An  B An 
  • 20. Use of Deduction Theorem Prove i.e., ├ F (M.P) A├ (D.T) ├ (D.T) Very difficult to prove from first principles, i.e., using axioms and inference rules only )) ( ( A A    ) ) (( F F A A    F A A  , F F A   ) ( ) ) (( F F A A   
  • 21. Prove i.e. ├ F ├ (D.T) ├ Q (M.P with A3) P├ ├ ) ( Q P P   ) ) (( Q F P P    F Q F P P   , , F P P  , F F Q   ) ( Q F P   ) ( ) ) (( Q F P P   