Download presentation
Presentation is loading. Please wait.
1
Propositional calculus
Propositional formula: We have a non-empty set A of propositional variables 1. Each variable is a formula 2. When α,β are variables, than (¬α), (α β), (α β), (α β), (α β) are formulas. 3. Anything other is not a formula Such definition is called recursive or inductive
2
Evaluation ≡ is a mapping of A into {FALSE, TRUE}.
Propositional calculus basic terms Evaluation ≡ is a mapping of A into {FALSE, TRUE}. Evaluation of the formula runs after the common rules for logical couplings. Propositional formula with s n logical variables has 2n possible truth values depanding on evaluation of the varibles The formula is tautology iff it is TRUE for all possible evaulations of the variables The formula is contradiction iff it is FALSE for all possible evaulations of the variables The formula is satisfable iff there exist at least one evaluation under which it is TRUE
3
Semantic consequence • The formula Φ is the semantic consequence of the set of formulas Ψ={Ψ1,Ψ2,…Ψn} iff Φ has value TRUE in all evaluations in which all the formulas {Ψ1,Ψ2,…Ψn} have evaluation TRUE. The notation is Ψ Φ • The formulas Φ and Ψ are tautologicaly equivalent iff Ψ is semantic consequence of Φ and Φ is semantic consequence of Ψ.
4
Full system of logical couplings
0-ary couplings: TRUE (tautology) and FALSE (constradiction) Unary couplings: Identity and negation For logical function of 2 variables we can obtain 24 Possible logical functions, so there are 14 possible logical couplings Possible full system could be form by couplings ¬, and or ¬and or |
5
All logical couplings F F F F F F x y F F 1 F 2 F 3 F 4 F 5 F 6 F 7 F
F 1 F 2 F 3 F 4 F 5 F 6 F 7 F 8 F 9 F 10 F 11 F 12 F 13 F 14 F 15 F x y ¬ x ¬y T | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 F0 = contradiction F1 = AND, F2 = (inhibition) F4 = (back inhibition) F6 = XOR F7 = OR F8 = NOR, Peirce arrow F9 = equivalence F10 = not x F11 = back implication F12 = not y F13 = implication F14 = NAND, (Sheffers stroke) F15 tautology
6
Normal forms Conjunctive normal form (CNF)
The formula is conjunction of one or finite couple of literals or disjunction of literals. Example: (x ∨¬y)∧(¬y ∨z )∧(x ∨¬r ∨z ) Disjunctive normal form (DNF) The formula is disjunction of one or finite couple of literals or conjunction of literals. Example: (x ∧¬y)∨(¬y ∧z )∨(x ∧¬r ∧z ) The formula in conjunction in CNF is called clause. Clause is disjunction of literals or one literal. There exist also empty clause with no literal which is not satisfable. For any logical formula there exist tautologicaly equivalent DNF formula and also tautologicaly equivalent CNF formula.
7
Inference system By inference system it is possible to derive conclusions from assumptions. For any logical coupling we have I-rule for definition and E-rule for elimination.
8
Formal (syntactic, logic) deduction
Operation of deriving formula from a set of formulas S we notate →. By using this operation we can obtain a new set of formulas containing assumptions and formulas derived by several sequence of the inference rules from the assumptions. We call derived formula β to be logical consequence of S. The set of formulas S is contradictory , iff there exist the formula α such that both α and ¬α could be logicaly derived from S. In the other situation we call the set S non-contradictory or health.
9
Completness of propositional calculus
Formula ϕ is semantic consequence of the set of formulas S if in each evaluation in which all formulas in S are TRUE the formula ϕ is also TRUE. Formula ϕ is logical consequence of the set of formulas S if it could be derived from the set S by sequence of inference rules (there exist a proof). If the set S is non-contradictory the each formula which is a logical consequence is also a semantic consequence. For the propositional calculus there holds also a conversion. Any formula which is a semantic consequence of S is also a logical consequence of S. Everything what is TRUE could be proved. This property is called completness.
10
Resolution principe We have a set of formulas S and a inference systém. Let α be a formula. We are interestred in a question wheather α is a logical consequence of S. The resolution principe is based on the fact that α logicaly follows from S iff S∪{¬α} is not satisfiable. It is equivalent with the well known fact that α⇒β and ¬α∨β are tautologicaly equivalent. The resolution principe is a foundation of logical programming.
11
Resolution principe We will asume CNF.
We will write {x,¬y,¬z,v,¬w} instead of x∧¬y∧¬z∧v∧¬w. The empty clause will be notated as []. The resolution principe consist in the elimination of two complementary literals from the clauses: (x ∨ y) ∧ (¬x ∨ z) ⇒ y ∨ z. We will call D to be a resolvent of the clause C1 and C2 by the literal iff there exist a literal p such that: p∈C1, ¬p∈C2 and D= (C1 ÷{p}) ∪(C1 ÷{¬p}).
12
Resolution principe In resolution principe we repeatedly form resolventas: R0(S) = S, Rj+1(S) = R(Rj(S)) for j= 1, 2, ... . Let R*(S) be union of all Rj(S) for j= 1, 2, ... S = R0(S) ⊆R1(S) ⊆... ⊆Rk(S)⊆... . As the set of all variables is finite we can make only finite amount of disjunction and there exist a number n such that Rn+1(S)=Rn(S) = R*(S). The empty clause is contained in the set R*(S) in the case that S or some of the Rk(S) contains both {x} and {¬x} for some variable x. Resolution principe: The set of clases S is satisfiable iff the result of resolventa aplications does not contain empty clause []. To decide wheather formula ϕ is a semantic consequence of the set of formulas S is equivalent to the decision wheather set of formulas S∪{¬ϕ} je unsatisfiable, it means wheather it is possible to derive the empty clause from the set of formulas S∪{¬ϕ} .
13
Procedure of the resolution principe
For any formula in S find tautologicaly equivalent CNF formula. We replace all formulas in the assumption. We obtain a set of disjunctions which must be TRUE together. If there are any tautologies we skip them. If the set is now empty it contained only tautologies and it was satisfable. In the other case we apply resolution principe (we look for complementary literals). We add (in arbitary order) new resolventas. If we during the procedure find the empty clause, the original set S was unsitisfiable. If the procedure stops and R*(S) does not contain the empty clause the original set S was satisfiable.
14
Example The set S = {x ∨ y ∨ z, z ∨ t ∨ v, z ⇒ (x ∨ y), y ⇒ x, w ⇒ t, v ∨ w} Is x semantic consequence of S? We will convert this problem into problem of satisfiability of the set S ∪ {¬x} Procedure: Convert S into CNF: {x∨y∨z, z∨t∨v, ¬z∨x∨y, ¬y∨x, ¬w∨t, v∨w}
15
Example We derived the empty formula, so the set is unsatifiable and so x is the semantic consequence of S.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.