1. Trang chủ
  2. » Thể loại khác

Logic as a tool a guide to formal logical reasoning ( PDFDrive ) 221

1 2 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 1
Dung lượng 82,34 KB

Nội dung

Deductive Reasoning in First-order Logic 197 θ := compose (θ, mgu(pθ, qθ)) Else, if variable (t) and t ∈ / Var (s) then θ := compose (θ, [s/t]); θ := compose (θ, mgu(pθ , qθ)) Else, return failure end Example 148 Some examples of unification of atomic formulae using the algorithm above (where Bill and Jane are constant symbols, father, mother are unary functional symbols and parents is a ternary predicate symbol) are as follows Literal 1: parents(x, father(x), mother(Bill)), Literal 2: parents(Bill, father(Bill), y), Most general unifier: [Bill/x, mother(Bill)/y] Literal 1: parents(x, father(x), mother(Bill)), Literal 2: parents(Bill, father(y), z), Most general unifier: [Bill/x, Bill/y, mother(Bill)/z] Literal 1: parents(x, father(x), mother(Jane)), Literal 2: parents(Bill, father(y), mother(y)), The procedure mgu starts computing: [ Bill/x, Bill/y, failure] The algorithm fails Therefore, a unifier does not exist Literal 1: g(x,f(x)) Literal 2: g(f(y),y) The procedure mgu starts computing: [f(y)/x, f ailure] MGU does not exist Indeed, any unifier would have to unify f (f (x)) with x, which is impossible 4.5.4 Resolution with unification in first-order logic The first-order resolution rule is combined with a preceding unification of the clausal set in order to produce a complementary pair of literals in the resolving clauses: Res : C ∨ Q(s1 , , sn ), D ∨ ¬Q(t1 , , tn ) σ (C ∨ D ) where: (i) the two clauses have no variables in common (achieved by renaming of variables); and (ii) σ is a most general unifier of the literals Q(s1 , , sn ) and Q(t1 , , tn ) Note that we require that the unifier applied in the rule is a most general unifier of the respective literals in order not to weaken the resolvent unnecessarily This is important because that resolvent may have to be used in further applications of resolution For instance, resolving {P (a, y ), Q(x)} with {¬P (a, x)} by using the unifier [a/x, a/y ]

Ngày đăng: 28/10/2022, 15:27