Download Propositional Logic - Institute for Software Systems

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
2. Propositional Logic
Last time:
Introduction
Testing vs. Formal Specification
Examples (Petri Nets, CCS, Alloy, ...)
Today:
Propositional Logic
The following slides are based on the slides from M. Lawford
(http://www.cas.mcmaster.ca/~lawford/) and J. Bowen
(http://www.cs.ucl.ac.uk/staff/J.Bowen/GS03/ )
Verified Software Systems
1
What is Propositional Logic?
Verified Software Systems
2
1
Logical Connectives
Verified Software Systems
3
Computing with truth tables
Verified Software Systems
4
2
Example for implication
?
We expect that if n is greater than 3, then it
should be greater than 1,
so n > 3 should imply n > 1.
Therefore, the formula (n > 3) ⇒ (n > 1) should
equal true.
Substituting 4, 2, and 0 for n in this formula
explains why F ⇒ G means F implies G or,
equivalently, if F then G.
Verified Software Systems
5
Verified Software Systems
6
Truth Tables
3
Precedence of Logical Connectives
Verified Software Systems
7
Tautologies and Contradictions
Verified Software Systems
8
4
Logical (Semantic) Equivalence
Verified Software Systems
9
Logical (Semantic) Equivalence
Verified Software Systems
10
5
Normal Forms
Verified Software Systems
11
Normal Forms
Verified Software Systems
12
6
Normal Forms
Verified Software Systems
13
Logical Implication, Entailment
Verified Software Systems
14
7
Modus Ponens
Verified Software Systems
15
Checking validity (soundness)
Verified Software Systems
16
8
Example
See board
Verified Software Systems
17
Verified Software Systems
18
Solution
9
Verified Software Systems
19
Verified Software Systems
20
Contradicton
10
Validity & Satisfiability
Verified Software Systems
21
Conjunctive Normalform
Verified Software Systems
22
11
Using CNF to Check |= Ф
Verified Software Systems
23
Verified Software Systems
24
...
12
Language of Propositional Calculus
Verified Software Systems
25
BNF and Parse Trees
Verified Software Systems
26
13
Subformulas and Subtrees
Verified Software Systems
27
Motivating Proofs
Verified Software Systems
28
14
Motivating Proofs
Verified Software Systems
29
Proof rules and Proofs
Verified Software Systems
30
15
Proof rules and Natural Deduction
Verified Software Systems
31
Proof rules: Implication Elimination
Verified Software Systems
32
16
Proof rules: Implication Introduction
Verified Software Systems
33
A First Formal Proof
Verified Software Systems
34
17
Remark
In just 6 rows not 23=8 rows of Truth Table.
Try the second and checkt that the numbers
now are 8 vs. 24=16.
Verified Software Systems
35
Proof rules: And Introduction
Verified Software Systems
36
18
Proof rules: And Elimination
Verified Software Systems
37
Proof rules: Negation Elimination/Intr.
Verified Software Systems
38
19
Proof rules: Modus Tollens
Verified Software Systems
39
Verified Software Systems
40
MT
20
Proof rules: Or Introduction
Verified Software Systems
41
Proof rules: Or Elimination
Verified Software Systems
42
21
Proof rules: Or Elimination
Verified Software Systems
43
Verified Software Systems
44
...
22
Overview
Verified Software Systems
45
Verified Software Systems
46
Overview
23
Example
Verified Software Systems
47
Verified Software Systems
48
Overview
24
...
Verified Software Systems
49
Verified Software Systems
50
Copy
25
LEM
Verified Software Systems
51
Verified Software Systems
52
All Rules
26
Soundness
Verified Software Systems
53
Verified Software Systems
54
Completeness
27
Propositional logic is decidable
Verified Software Systems
55
Verified Software Systems
56
Summary
28
Conclusion
Verified Software Systems
57
29
Related documents