Download presentation
Presentation is loading. Please wait.
1
Logic Deduction System Casey Schu Write a program to make deductions using first order predicate logic.
2
Symbolic Logic List of given statements with single goal statement v ~t ~t p q p q s /\ r s /\ r e \/ o e \/ o (~n \/ (g d)) (h /\ (m k) (~n \/ (g d)) (h /\ (m k) ((u /\ l) \/ (w ~y)) /\ (b \/ ~(w y)) ((u /\ l) \/ (w ~y)) /\ (b \/ ~(w y))
3
Symbolic Logic Prove goal statement by making deductions or arguments p qPremise 1 pPremise 2 Therefore qConclusion
4
Valid Argument Forms Modus Ponens p q p Therefore q Modus Tollens p q ~q Therefore ~p Disjunctive Addition p Therefore p \/ q q Therefore p \/ q Conjunctive Addition p q Therefore p /\ q Disjunctive Syllogism p \/ q ~q Therefore p p \/ q ~p Therefore q Hypothetical Syllogism p q q r Therefore p r Conjunctive Simplification p /\ q Therefore p p /\ q Therefore q
5
Symbolic Logic Example My glasses are on the kitchen table I saw my glasses at breakfast I was reading the newspaper in the living room I was reading the newspaper in the kitchen My glasses are on the coffee table I was reading my book in bed My glasses are on the bed table
6
Symbolic Logic Example p = My glasses are on the kitchen table q = I saw my glasses at breakfast r = I was reading the newspaper in the living room s = I was reading the newspaper in the kitchen t = My glasses are on the coffee table u = I was reading my book in bed v = My glasses are on the bed table
7
Symbolic Logic Example If my glasses are on the kitchen table, then I saw them at breakfast I was reading the newspaper in the living room or I was reading the newspaper in the kitchen I did not see my glasses at breakfast p q r \/ s ~q
8
Symbolic Logic Example Complete list of given statements p q p q r \/ s r \/ s r t r t ~q ~q u v u v s p s p Goal statement t
9
Symbolic Logic Example Proof: 1.p qGiven ~ qGiven Therefore ~ pBy Modus Tollens 2.s pGiven ~ pBy Conclusion of 1 Therefore ~ sBy Modus Tollens 3.r \/ sGiven ~ sBy Conclusion of 2 Therefore rBy Disjunctive Syllogism 4.r tGiven rBy Conclusion of 3 Therefore tBy Modus Ponens
10
Input Format C(p)The variable p is true N(p)The statement is not true I(p,q)If p, then q A(p&q)Both p and q are true O(p|q)p, q, or both are true
11
Input Format p q r \/ s r t ~ q u v s p t (goal) I(C(p),C(q)) O(C(r)|C(s)) I(C(r),C(t)) N(C(q)) I(C(u),C(v)) I(C(s),C(p)) C(t)
12
Classes Deducer Statement Implies Implies And And Or Or Not Not Constant Constant Variable Deduction
13
Statements as Objects Implies(Constant(Variable(“p”)), Constant(Variable(“q”))) Or(Constant(Variable(“r”))| Constant(Variable(“s”))) Not(Constant(Variable(“q”))) Constant(Variable(“t”)) I(C(p),C(q)) O(C(r)|C(s)) N(C(q)) C(t)
14
Proof Strategy Examine one statement Perform searches throughout the list of statements based on the type of the examined statement Add appropriate statements Check to see if goal statement is in the list DeducerDemo
15
Optimizing Output Irrelevant deductions should be omitted Recursively find all relevant deductions 1. Look at final deduction 2. If one or more premises is not given a.Trace deductions back until both premises are given statements b.Show only deductions that were traced
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.