Download presentation
Presentation is loading. Please wait.
1
Formal Methods in software development
a.y.2017/2018 Prof. Anna Labella 4/15/2019
2
The predicate calculus [H-R ch.2]
The need for a richer language Terms and formulas quantifiers 4/15/2019
3
Examples Every student preparing his homework must be left alone
x (((x) ψ(x)) χ(x)) For every natural number there is number greater than it x (N(x) y (N(y) G(y,x)) x y G(y,x) There are people who do not like their dog x (x, d(x)) 4/15/2019
4
Syntax Inductive term definition BNF t::= x | c | f(t1,t2,…,tn)
4/15/2019
5
Syntax Inductive definition of wff BNF
::= p(t1,t2,…,tn) | t1=t2 | () | () | () | () | x | x 4/15/2019
6
Syntax One can always do without function symbols, using predicates and equality f(x)=y is the same as F(x,y) z (F(x,z) y=z) 4/15/2019
7
Peano’s arithmetics Predicates: - = -, - ≤ -
Functions : - + -, - . -, s(-),… Constants: 0 4/15/2019
8
Exercises 4/15/2019
9
Syntax Free and bounded variables 4/15/2019
10
Syntax Open and closed formulas 4/15/2019
11
Syntax Free and bounded variables 4/15/2019
12
Syntax Be careful with substitution! 4/15/2019
13
Natural deduction 1 A special predicate: equality =(-,-) or - = -
4/15/2019
14
Natural deduction 2 Proof rules for equality 4/15/2019
15
Natural deduction 3 We can prove symmetry 4/15/2019
16
Natural deduction 3 And also transitivity 4/15/2019
17
Exercises 4/15/2019
18
Natural deduction 1 Proof rules for universal quantification
where t is free for x in φ 4/15/2019 where x0 is a fresh variable
19
Natural deduction 2 Proof rules for existential quantification
where t is free for x in φ 4/15/2019 where x0 is a fresh variable
20
Examples of proofs where x0 is a fresh variable 4/15/2019
21
Examples of proofs 4/15/2019
22
Exercises 4/15/2019
23
Exercises 4/15/2019
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.