Many Sorted First-order Logic - PowerPoint PPT Presentation

About This Presentation
Title:

Many Sorted First-order Logic

Description:

Syntax: Terms and Formulas of many sorted FOL ... First, let define many-sorted S-algebra A is a pair A,I , where A=(As)sS is an ... Semantics of formulas ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 13
Provided by: liuxi2
Category:

less

Transcript and Presenter's Notes

Title: Many Sorted First-order Logic


1
Many Sorted First-order Logic
  • Student Liuxing Kan
  • Instructor William Farmer
  • Dept. of Computing and Software
  • McMaster University, Hamilton, CA

2
Contents
  • Introduction What is many sorted FOL
  • Syntax Languages of many sorted FOL
  • Syntax Terms and Formulas of many sorted FOL
  • Example of Many-sorted FOL Semantics
  • Semantics of many sorted FOL
  • Proof Theory of Many-sorted FOL
  • The completeness of many-sorted logic
  • Reduction many-sorted logic to one-sorted logic
  • Reference

3
Introduction what is many-sorted FOL
  • Sometimes people want to express properties of
    structures of different sorts (types). There are
    plenty of examples of subjects where the
    semantics of formulas are many-sorted structures.
    For instance, in geometry, to take a simple and
    ancient example, we use universes of pointes,
    lines, angles, triangles, rectangles, polygons,
    etc.
  • By adding to the formalism of first-order logic
    the notion of sort, we can obtain a flexible and
    convenient logic called many-sorted first order
    logic, which has the same properties as first
    order logic.
  • In contrast to FOL, in many-sorted FOL, the
    arguments of function and predicate symbols may
    have different sorts, and constant and function
    symbols also have some sorts.
  • Uses of many-sorted logic abstract data types,
    semantics and program verification, definition of
    programming languages, algebras for logic,
    databases, dynamic logic, semantics of natural
    languages, computer-aided problem solving,
    knowledge representation of design, logic
    programming and automated deduction.

4
Syntax Languages of many sorted FOL
  • In contrast to standard first-order languages, in
    many-sorted first order languages, the argument
    of function and predicate symbols may have
    different sorts, and constant and function
    symbols also have some sort. Technically, this
    means that a many-sorted alphabet is a
    many-sorted ranked alphabet. (An S-ranked
    alphabet is pair(S,r) consisting of a set S
    together with a function r S?SS assigning a
    rank (u, s) to each symbol f in S )
  • Alphabet of many-sorted first order language
  • - S U bool of sorts containing the
    special sort bool
  • - Connectives ?,?,?,?, all of rank
    (bool.bool, bool), (not) of rank (bool, bool),
  • -(of rank (e, bool))
  • - Quantifiers ? , ? , each of rank (bool,
    bool)
  • - Variables a countable set
    VsX0,X1,X2, each variable Xi being of rank
    (e,s).
  • - Auxiliary symbols ( and )
  • - Equality symbol ?, of rank (ss, bool)

5
Syntax Languages of many sorted FOL
  • A (S U bool)-ranked alphabet L of nonlogical
    symbols consisting of
  • - FS function symbols, FS?SS, assigning a
    pair r(f)(u,s) called rank to every function
    symbol f. The string u is called the arity of f,
    and the symbol s is the sort of f.
  • - CSs constants, For every sort s?S, a set
    CSs of symbols c0,c1,, each of rank (e,s). The
    family of sets CSs is denoted by CS
  • -PS predicate symbols, A set PS of symbols
    P0,P1,,and a rank function rPS?Sbool,
    assigning a pair r(P)(u,bool) called rank to
    each predicate symbol P. The string u is called
    the arity of P. If ue, P is a propositional
    letter.
  • It is assumed that the sets Vs, FS, CSs, and PS
    are disjoint for all s?S. We will refer to a
    many-sorted first order language with set of
    nonlogical symbols L as the language L.
    Many-sorted first order languages obtained by
    omitting the equality symbol are referred to as
    many-sorted first order languages without
    equality.

6
Syntax Terms and Formulas of M-S FOL
  • Let L(CS,FS,PS) be a language of many sorted FOL
  • Terms atomic formulas of L are defined as
    follows
  • - Each constant and each variable of sort
    sis a term of L.
  • - If t1,,tn are terms, each ti of sort ui,
    and f is function symbol of rank (u1un,s), then
    ft1tn is a term of sort s
  • - Each propositional letter is an atomic
    formula.
  • - If t1,,tn are terms, each ti of sort ui,
    and P is a predicate symbol of arity u1un, then
    Pt1tn is an atomic formula
  • Formulas are defined as follows
  • - Every atomic formula is a formula
  • - For any two formula A and B, (A?B), (A?B),
    (A ?B), (A?B ), A are also formula
  • - For any variable xi of sort s and any
    formula A, ?sxiA and ?sxiA are also formulas

7
Example of Many-sorted FOL
  • Let L be following many-sorted first order
    language for stacks, where Sstack, integer,
    CSinterger0, CSstack?, FSSucc, , ,
    push, pop, top, and PSlt
  • The rank functions are given by
  • - r(succ)(integer, integer)
  • - r()r()(integer.integer, integer)
  • - r(push)(stack.integer, stack)
  • - r(pop)(stack, stack)
  • - r(top)(stack, integer)
  • - r(lt)(integer.integer, bool)
  • Then, the following are terms
  • Succ 0
  • top push ? Succ 0
  • The following are formulas
  • lt 0 Succ 0
  • ?integerx ?stacky?stack pop push y x y

8
Semantics of many sorted FOL
  • Many-sorted first order structures
  • - First, let define many-sorted S-algebra A
    is a pair ltA,Igt, where A(As)s?S is an S-indexed
    family of nonempty sets, each As being called a
    carrier of sort s, and I is an interpretation
    function assigning functions to the function
    symbols.
  • - Give a many-sorted first order language
    L, a many-sorted L-structure M is a many-sorted
    L-algebra, such that the carrier of sort bool is
    the set BOOLT,F
  • Semantics of formulas
  • Given a many-sorted L-structure M and an
    assignment v V?M, the function tM V?M?Ms
    defined by a term t of sort s is the function
    such that for every assignments v in V?M, the
    value tMv is defined recursively as follows
  • 1. For a variable x of sort s, xMvvs(x)
  • 2. For a constant c, cMv cM
  • 3. Let tf(t1tn), then (ft1tn)MvfM((t1)
    Mv,(tn)Mv)
  • 4. Let AP(t1tn), then (Pt1tn)MvPM((t1)
    Mv,(tn)Mv)
  • 5. If (t1)Mv(t2)Mv then (?st1t2)MvT
    otherwise F
  • 6. Let denotes ?, ??, ?, then
    (AB)MM(AM,BM)
  • 7. (?xisA)MvT iff AMvximT, for
    all m?Ms and (? xisA)MvT iff AMvximT,
    for some m?Ms

9
Proof Theory of Many-sorted FOL
  • Gentzen System G for Many-sorted Languages
    Without Equality
  • Gentzen System G for languages With Equality

10
The completeness of many-sorted logic
  • There are two degrees of completeness
  • Weak completeness Each validity is a
    theorem. That is, Fimplies -F for every
    formula F.
  • Strong completeness Every consequence of a
    set of formulas is also derivable from it. That
    is, for every set of formulas G and formulas F ,
    when every GF then also F can be deduced from
    G.
  • Henkins theorem G consistent ? G has a model.

11
Reduction to one-sorted logic
  • There is translation of many-sorted logic into
    one-sorted logic. Such a translation is described
    in Enderton, 1972, and you can read it for
    details. The essential idea to convert a
    many-sorted language L in to a one-sorted
    language L is to add domain predicate symbols Ds,
    one for each sort, and to modify quantified
    formulas recursively as follows
  • Every formula A of the form ?x sB (or ? sB)
    is converted to the formula A ? x(Ds(x)?B ),
    where B is the result of converting B

12
Reference
  • Many-Sorted Logic And its Applications, K.Meinke
    and J.V.Tucker
  • Logic for Computer Science Foundations of
    Automatic Theorem Proving, Jean Gallier
Write a Comment
User Comments (0)
About PowerShow.com