Professional Documents
Culture Documents
Handwritten
Handwritten
Eff
comparispes
Introduction
to Propositional Logic Mathematical is the of how conclusions Propositional formulas the evaluate False
logic study Logic Logic
of
can be logically derived from
given premises
Why is Natural
Language not sufficient
1 The sun rises in the west and sets in the east
Premise 1 If an earthquake occurs people must leave the building 2 The sun rises in the east and sets in the west
Premise 2 Everyone is leaving the building 3 True
Conclusion
An earthquake occurred 4 False
doesnt hold
p Negation p
png Conjunction p AND q
pug Disjunction
p OR q
Conditional
p q p implies
9
p is is
Biconditional
p q exactly 9
Natural Deduction Gentzen's Based on rules of inference Modus Ponens Implication Elimination
In natural deduction for each operation there are two kinds of rule
Elimination Introduction Ex rains rains wet wet slippery t slippery
some conclusion
by eliminating the operation Prove conclusion
by the operation
introducing
Deduction Explanation
Ex Prove
png of gno I rains Premise
4 wet e 1,2
Deduction Explanation 5 slippery e 3,4
1 Premise
png
Introduction
2 9 e2 I Implication Assume
Premise
3 8
4 gnr ni 2,3 42
4 y
Ex png ont t pno
Deduction Explanation Ex 1 png 9 No premises given
1 png
Premise
png t 9
2 ont Premise Deduction Explanation
3 1 png Assumption
par Assumption
4 p net I 2
9 2 I
5 8 net 3 3 png 9 i 1,2
6 ni 4,5
Conclusion
4 1 can be treated as y Ex pu png no
tp
41.42.43 Un 1 can be treated as
1 4 Un E Deduction
42 Explanation
I no Premise
pu png
Ex
p q p o t p r 2
p
Assumption
3 P copy
Deduction Explanation 4 png ar Assumption
1 Premise 5 ne
p 9 png
2
p 8 Premise 6
p nee 5
3 ne 7 p Proof
by cases 3 and 6
p
4 8 nez
5
poor i 3,4 Elimination Contradiction introduction
Negation
y 74
coffradiction
Ex p qua q s r s 1 p s
Deduction Explanation infer from a contradiction
e
1 Premise
p qua y
2 Premise
9 s
3 r s Premise Negation
Introduction Assume
Y
Y p Assumption Ti
5 i 4 I I
quo we started with is false
6
4 assumption
9 Assumption
7 s i 6,2 Proof
p q p 79 1 7p
8 8 Assumption
1 Premise 3 7C 1,2
p
4 from false in line 3 anything follows
2 7719 8 Premise
g
3 8 7722 5
q i 2 4
9 p
4 8 nes 3
5 77
p 771 Modus ponens If both hypotheses are true then conclusion is true
6 77
pro ni 3,4 Modus tollens If hypothesis is not true an implication is true other propositio
cant be tone
OR introduction
4 4 viz
guy guy y y 74
SubProofs 74
OR Elimination
guy
I Premise
4 Y
x ve Premise
2 74
3 Assume
4
pn qur png pnr 4 µ e
5 7 2,4
t 6
Deduction
palqua png 74 Assumption was
wooy
Explanation Deduction Explanation
8 ni 9,4
98 nez10 3 3 e 1,2
par
7
9 Assumption 2
png pnr viz 3 4 4 774 71 2,3
6 ni 9,7 1 ve 4 2,7 5
png png par 8 Y
Law of Excluded Middle either is true or is true How rows will be needed in truth table to validate the
yv7y y 74 many
formula
a
following
74 42478 n
pung vs n rxzv.it
y p
9 74 p 2,8 9 s x t
27 128 8005
1 Premise
y v74
2 Assume Entailment Notation
4 Semantic
wife
3 Vi truth
4474 alidity or
4 13 41 42 43144 In is True
5 74 2 4 the Y is True
6 Vi
4474
7 1,6 Satisfiability If assignment can evaluate the expression to 1
any
Conclusion
8
4474
Validity Tautology
Natural Deduction Proof of unsatisfiable formula will always be valid
of
a Logical Identity Negation
I p q Premise
4 7pvq Vi 3 pug r n
pungus
n rvs v71
5 p Assumption
pure literal 2
6 9 e 1,5 unit clause 0
7
9 47 p vi 6
8 3 4,5 7
Normal forms
Syntactically
different can be semantically equivalent DPLL trace Backtracking Based Algorithm
for deciding
SAT problems are written as CNF its MP complete Two special cases
0 94 ally true
4 C1 always fake
Proof of Unsatisfiability
Resolution Rule Empty clause
Ex IVA n 71 c n c n A Step1 Look for the 2 special cases return Toof ace
Resolution on A Assumption
Step 2 Look for unit clause return DPLC 4101
I 71 c a 7C Steps Look for pure literal return DPLL 4101
Resolution on 1 Step 4 If nothing is found
for some variable v
C n 7C take a until receive true or false
guess you
Resolution on C
False
Assumption 7A is
false
Ex S
PVQY.IR NP P9478 p vagus n rvsv7t
puguir n
prig n rent s t
Pravin Px 70 TP R U ping n n r t f
puqvir
n 8 T
pug 7pv7q
Choose unit clauses
Pravin Px 70 TP R u P P i n
pug pung
QUR 70 IR O 70 G I T paf
P
R R U R
1 79 9
unsatisfiable
q f I q T
T T
a b c a a v76 n c n av b a d Satisfiable Satisfiable
arb n97av7b a av b n d c
s
a F a T
Y
Frb n d n fv7b I fx7b a 1 b
baib Tb
I 1 if b T
Satisfiable
Intro to Model Checking
Model Checking is an automic push button technique which require Behaviour of the System can be modelled
by
Execution
a a
three
things
Model System Space Verifier
4 42
Path is a specific part of an execution may not start at so
Transition State
P AP
pip
Specification
System
t.ca beings
cogc 8 y
mail.fi
A
Traces tells how
behaves with
a
thehelp AP
yÉ
system
of
MFY Trace where property doesn't hold p It's an infinite wood overAP
p.pl 3 p.pe
3
as
p pipit
States 5 a bc d is subset trace
e Property
of p p
f Initialstate a GLP Safe Eliminate all traces with bad prefix
b Behaviour e f GIP Invariant Such a property where an AP is true forffstates G
T T
d a FIP Liveness
AP is true eventually
d
Bad Prefix Dont want an AP to hold
C Nondeterministic
choice P Property is true in next state
Transition is
system a tuple
f
3,40 Act AP he
Set of states State space
Transition relationship
ʰ
SxAct
s as s 4,5 ES atAct
AP Set of atomic prepositions
L Labelling
function enables designation of every state with a prepo
L S 2AP
Temporal Logic
Linear Temporal Logic LTL CTL G All states A All paths
Computational Tree Logic CTL
Existential
Op E
0 0 0 030 0 E red a
green
000 0300 there exists a path were state is real and nextstate
is
green
88 Universal
OP
Alf green
LTL Next Operator X aloy all path state eventually turns
green
a a will be true in next state
Global Operator G AP door closed
G b door closed
a
9
whenever a is true the next state will be b
Finally
Future Operator F F lights on
Fb 9 request Flresponded
eventually b is True
Until Operator U 25 aub
redUgreen
Weak Unti Operator W
00 0 0 0
1
b
red Wgreen 00 0 0 0
030303030
Release Operator R
rainy R sunny
0 0 0
70
03030 0 00030
2
I 1
friend
Suraj
Paawan Hx plx 1 x
plx
H E
Line Number Deduction Explanation
natural 1 1 Hx p x Prenice
naturala natural x He s
suis
pit
3 xplx 2
Yn
0 4 pit plx 791 7 y7gly
i 7
9 4 near µ 1 pH Premise
by g e re 3
plt 7g H He 2
i 4 t e 1,3
µ 79
5 4
try I 77
Fyngly
te me
909 q
ve 7 77
LEM Y 7pm
0
I
6 e 4,5
q x
Fx g x
of Hi 6
Introduction
X
II
fresh
doesnt
Fx
occurs with 7
x's band
3
Play atty holy x VPly 2
x 4
plx glx He t
5 x He 2 Plx both are free
p y y
ii.in
both are
701g x y free
both
Ply 2 y 2 are free
Elimination
of is bound
Hy 791g
x
Ply 2 y
Introde Xo
X x
independent somethtime
ofto Fe
a
2 xplx Premise
3 Fresh
4 p Xo Assume
5 x Hx
0
Hoare correctness a written Post FIX
Floyd Verify of program gum
in imperative style
1 Fx Factorial x
Correctness
Does A compute what its 11 N O
supposed to F Ls N
fompletycorrectuey
Partially correct 1 Hx O x n X N 1
Does A terminate fooli o ion itt
Total correctness
TX 1 1
Pre Condition
Alx for all value index LEX 41 1
Post Condition
of
79
Semantic Entailment
LTL
blag
NZ beats England
Ga bvc
x n d x 2
so 5 52
option i b 7 x nd x2
53 zig
Ss option 2 b
zig
7 x a'd z
so 5 s 52
E bua
So s s
I B
A
j
inner loop
i
Hj osj
1
say
a
j
7 1
it t
ian
decrease