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

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

Completeness and Expressiveness
1 First order theories (Chapter 1, Sections 1.4 – 1.5)
10 October 2006 Foundations of Logic and Constraint Programming 1 Unification ­An overview Need for Unification Ranked alfabeths and terms. Substitutions.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Recursive Definitions and Structural Induction
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Knowledge Representation Methods
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
A Semantic Characterization of Unbounded-Nondeterministic Abstract State Machines Andreas Glausch and Wolfgang Reisig 1.
TR1413: Discrete Mathematics For Computer Science Lecture 3: Formal approach to propositional logic.
The Common Logic Standard Christopher Menzel Texas A&M University
1 First order theories. 2 Satisfiability The classic SAT problem: given a propositional formula , is  satisfiable ? Example:  Let x 1,x 2 be propositional.
1/25 Pointer Logic Changki PSWLAB Pointer Logic Daniel Kroening and Ofer Strichman Decision Procedure.
CS1502 Formal Methods in Computer Science Lecture Notes 1 Course Information Introduction to Logic Part 1.
Software Verification 1 Deductive Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität und Fraunhofer Institut.
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Section 5.3. Section Summary Recursively Defined Functions Recursively Defined Sets and Structures Structural Induction.
Atomic Sentences Chapter 1 Language, Proof and Logic.
1st-order Predicate Logic (FOL)
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
LDK R Logics for Data and Knowledge Representation PL of Classes.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Formal Methods in Software Engineering 1
Key Concepts Representation Inference Semantics Discourse Pragmatics Computation.
CompSci 102 Discrete Math for Computer Science
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Bertram Ludäscher Department of Computer Science & Engineering University of California, San Diego CSE-291: Ontologies in Data Integration.
CS6133 Software Specification and Verification
DL Overview Second Pass Ming Fang 06/19/2009. Outlines  Description Languages  Knowledge Representation in DL  Logical Inference in DL.
LDK R Logics for Data and Knowledge Representation First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Section 3.4 Boolean Algebra. A link between:  Section 1.3: Logic Systems  Section 3.3: Set Systems Application:  Section 3.5: Logic Circuits in Computer.
lamsweerde Chap.4: Formal Requirements Specification © 2009 John Wiley and Sons Fundamentals of RE Chapter 4 Requirements.
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
ece 627 intelligent web: ontology and beyond
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Software Verification 1 Deductive Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität und Fraunhofer.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
An Introduction to Classical Logic (propositional and Predicate Logic)
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Syntax of First-Order Predicate Calculus (FOPC): 1. Alphabet Countable set of predicate symbols, each with specified arity  0. Countable set of function.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
6/11/2016 Linear Resolution and Introduction to First Order Logic Michael Leuschel Softwaretechnik und Programmiersprachen Lecture 5.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
From Classical Proof Theory to P vs. NP
Propositional Calculus: Boolean Functions and Expressions
Propositional Calculus: Boolean Functions and Expressions
Lecture 2 Propositional Logic
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Formal Methods in software development
1st-order Predicate Logic (FOL)
Logics for Data and Knowledge Representation
Search techniques.
Algebraic Specification Software Specification Lecture 34
Logics for Data and Knowledge Representation
Representations & Reasoning Systems (RRS) (2.2)
1st-order Predicate Logic (FOL)
Logics for Data and Knowledge Representation
Presentation transcript:

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

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

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.

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(Σ,r) consisting of a set Σ together with a function r: Σ→S*×S assigning a rank (u, s) to each symbol f in Σ ) 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 Vs={X 0,X 1,X 2 …}, each variable X i being of rank (e,s). - Auxiliary symbols: “(” and “)” - Equality symbol ≒, of rank (ss, bool)

Syntax: Languages of many sorted FOL A (S U {bool})-ranked alphabet L of nonlogical symbols consisting of: - FS: function symbols, FS→S + ×S, 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. - CS s : constants, For every sort s ∈ S, a set CS s of symbols c 0,c 1,…, each of rank (e,s). The family of sets CS s is denoted by CS - PS: predicate symbols, A set PS of symbols P0,P1,…,and a rank function r:PS→S + ×{bool}, assigning a pair r(P)=(u,bool) called rank to each predicate symbol P. The string u is called the arity of P. If u=e, P is a propositional letter. It is assumed that the sets V s, FS, CS s, 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.

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 t 1,…,t n are terms, each t i of sort u i, and f is function symbol of rank (u 1 …u n,s), then ft 1 …t n is a term of sort s - Each propositional letter is an atomic formula. - If t 1,…,t n are terms, each t i of sort u i, and P is a predicate symbol of arity u 1 …u n, then Pt 1 …t n 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 x i of sort s and any formula A, ∀ s x i A and ∃ s x i A are also formulas

Example of Many-sorted FOL Let L be following many-sorted first order language for stacks, where S={stack, integer}, CSinterger={0}, CSstack={Λ}, FS={Succ, +, *, push, pop, top}, and PS={<} 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(<)=(integer.integer, bool); Then, the following are terms: Succ 0 top push Λ Succ 0 The following are formulas: < 0 Succ 0 ∀ integer x ∀ stack y ≒ stack pop push y x y

Semantics of many sorted FOL Many-sorted first order structures - First, let define many-sorted Σ-algebra A is a pair, where A=(A s )s ∈ S is an S- indexed family of nonempty sets, each A s 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 BOOL={T,F} Semantics of formulas Given a many-sorted L-structure M and an assignment v: V→M, the function t M : [V→M]→M s defined by a term t of sort s is the function such that for every assignments v in [V→M], the value t M [v] is defined recursively as follows: 1. For a variable x of sort s, x M [v]=v s (x) 2. For a constant c, c M [v]= c M 3. Let t=f(t 1 …t n ), then (ft 1 …t n ) M [v]=f M ((t 1 ) M [v],…(t n ) M [v]) 4. Let A=P(t 1 …t n ), then (Pt 1 …t n ) M [v]=P M ((t 1 ) M [v],…(t n ) M [v]) 5. If (t 1 )M[v]=(t 2 )M[v] then ( ≒ s t 1 t 2 ) M [v]=T otherwise F 6. Let * denotes {Λ, ν→, ↔}, then (A*B) M =* M (A M,B M ) 7. ( ∀ x i :sA) M [v]=T iff A M [v[x i :=m]]=T, for all m ∈ Ms and ( ∃ x i :sA) M [v]=T iff A M [v[x i :=m]]=T, for some m ∈ Ms

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

The completeness of many-sorted logic There are two degrees of completeness: Weak completeness: Each validity is a theorem. That is, |=Φimplies |-Φ for every formula Φ. Strong completeness: Every consequence of a set of formulas is also derivable from it. That is, for every set of formulas Γ and formulas Φ, when every Γ|=Φ then also Φ can be deduced from Γ. Henkin’s theorem: Γ consistent → Γ has a model.

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 D s, 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(D s (x)→B’ ), where B’ is the result of converting B

Reference Many-Sorted Logic And its Applications, K.Meinke and J.V.Tucker Logic for Computer Science: Foundations of Automatic Theorem Proving, Jean Gallier