0% found this document useful (0 votes)
90 views

Truth Table

Propositional logic is a simple logical language used to represent statements and define their relationships. It uses logical constants and propositional symbols combined with logical connectives like "and", "or", "implies", and "not". Sentences in propositional logic can be evaluated as true or false by assigning truth values to the basic propositions. Inference rules like modus ponens and resolution can be used to derive new sentences that logically follow from a set of initial sentences. Propositional logic provides a foundation for more advanced logics while keeping reasoning decidable, though it lacks expressiveness for many real-world problems.

Uploaded by

Navdeep Jimmy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views

Truth Table

Propositional logic is a simple logical language used to represent statements and define their relationships. It uses logical constants and propositional symbols combined with logical connectives like "and", "or", "implies", and "not". Sentences in propositional logic can be evaluated as true or false by assigning truth values to the basic propositions. Inference rules like modus ponens and resolution can be used to derive new sentences that logically follow from a set of initial sentences. Propositional logic provides a foundation for more advanced logics while keeping reasoning decidable, though it lacks expressiveness for many real-world problems.

Uploaded by

Navdeep Jimmy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

Propositional logic

Logical constants: true, false

Propositional symbols: P, Q,... (atomic sentences)

Wrapping parentheses: ( )

Sentences are combined by connectives:


and [conunction!
or [disunction!
implies [implication " conditional!
is e#ui$alent[biconditional!
not [negation!

Literal: atomic sentence or negated atomic sentence


P, P
Examples of PL sentences

(P Q) %
&'f it is (ot and (umid, t(en it is raining)

Q P
&'f it is (umid, t(en it is (ot)

Q
&'t is (umid.)

We*re free to c(oose better symbols, bt+:


,o - &'t is (ot)
,u - &'t is (umid)
% - &'t is raining)
Propositional logic (PL)

Simple language for s(o+ing .ey ideas and definitions

/ser defines set of propositional symbols, li.e P and Q

/ser defines semantics of eac( propositional symbol:


0
P means &'t is (ot), Q means &'t is (umid), etc.

1 sentence (+ell formed formula) is defined as follo+s:


0
1 symbol is a sentence
0
'f S is a sentence, t(en S is a sentence
0
'f S is a sentence, t(en (S) is a sentence
0
'f S and 2 are sentences, t(en (S 2), (S 2), (S 2), and (S
3 2) are sentences
0
1 sentence results from a finite number of applications of t(e
rules
Some terms

2(e meaning or semantics of a sentence


determines its interpretation

4i$en t(e trut( $alues of all symbols in a


sentence, it can be &e$aluated) to determine its
truth value (2rue or 5alse)

1 model for a 67 is a possible world 0 an


assignment of trut( $alues to propositional
symbols t(at ma.es eac( sentence in t(e 67
2rue
More terms

1 valid sentence or tautology is a sentence t(at is


2rue under all interpretations, no matter +(at t(e
+orld is actually li.e or +(at t(e semantics is.
89ample: &'t*s raining or it*s not raining)

1n inconsistent sentence or contradiction is a


sentence t(at is 5alse under all interpretations. 2(e
+orld is ne$er li.e +(at it describes, as in &'t*s
raining and it*s not raining.)

P entails Q, +ritten P :- Q, means t(at +(ene$er P


is 2rue, so is Q. 'n ot(er +ords, all models of P are
also models of Q.
Truth tables
Truth tables for the five logical connectives
Example of a truth table used for a complex sentence

2rut( tables are used to define logical connecti$es

and to determine +(en a comple9 sentence is true


gi$en t(e $alues of t(e symbols in it
n the implies connective! P Q

;ote t(at is a logical connecti$e

So PQ is a logical sentence and (as a trut(


$alue, i.e., is eit(er true or false

'f +e add t(is sentence to t(e 67, it can be


used by an inference rule, Modes Ponens, to
deri$e"infer"pro$e Q if P is also in t(e 67

4i$en a 67 +(ere P-2rue and Q-2rue, +e


can also deri$e"infer"pro$e t(at PQ is 2rue
P Q

W(en is PQ true< =(ec. all t(at apply

P-Q-true

P-Q-false

P-true, Q-false

P-false, Q-true
P Q

W(en is PQ true< =(ec. all t(at apply

P-Q-true

P-Q-false

P-true, Q-false

P-false, Q-true

We can get t(is from t(e trut( table for

;ote: in 5>? it*s muc( (arder to pro$e t(at


a conditional true.
0
=onsider pro$ing prime(9) odd(9)

"nference rules

Logical inference creates ne+ sentences t(at


logically follo+ from a set of sentences (67)

1n inference rule is sound if e$ery sentence @ it


produces +(en operating on a 67 logically
follo+s from t(e 67
0
i.e., inference rule creates no contradictions

1n inference rule is complete if it can produce


e$ery e9pression t(at logically follo+s from (is
entailed by) t(e 67.
0
;ote analogy to complete searc( algorit(ms
Sound rules of inference

,ere are some e9amples of sound rules of inference

8ac( can be s(o+n to be sound using a trut( table


#$LE P#EM"SE %&%L$S"&
Aodus Ponens 1, 1 7 7
1nd 'ntroduction 1, 7 1 7
1nd 8limination1 7 1
Bouble ;egation 1 1
/nit %esolution 1 7, 7 1
#esolution ' () ( % ' %
Soundness of modus ponens
' ( ' * ( +,
2rue 2rue 2rue
2rue 5alse 5alse
5alse 2rue 2rue
5alse 5alse 2rue
#esolution

#esolution is a $alid inference rule producing a ne+


clause implied by t+o clauses containing
complementary literals
0
1 literal is an atomic symbol or its negation, i.e., P, CP

1maDingly, t(is is t(e only interference rule you need


to build a sound and complete t(eorem pro$er
0
7ased on proof by contradiction and usually called
resolution refutation

2(e resolution rule +as disco$ered by 1lan %obinson


(=S, /. of Syracuse) in t(e mid EFs
#esolution

1 67 is actually a set of sentences all of +(ic( are


true, i.e., a conunction of sentences.

2o use resolution, put 67 into conjunctive normal


form (=;5), +(ere eac( sentence +ritten as a disuncG
tion of (one or more) literals
89ample

67: [PQ , Q%S!

67 in =;5: [CPQ , CQ% , CQS!

%esol$e 67(H) and 67(I) producing: CP% (i.e. P!"

%esol$e 67(H) and 67(J) producing: CPS (i.e. P#"

;e+ 67: [CPQ , CQC%CS , CP% , CPS!


Tautologies
(17)3(C17)
(1(7=)) 3(17)(1=)
Propositional logic! pro and con

1d$antages
0
Simple 6% language sufficient for some problems
0
?ays t(e foundation for (ig(er logics (e.g., 5>?)
0
%easoning is decidable, t(oug( ;P complete, and
efficient tec(ni#ues e9ist for many problems

Bisad$antages
0
;ot e9pressi$e enoug( for most problems
0
8$en +(en it is, it can $ery &unGconcise)

You might also like