F. Brief review of classical predicate logic (PC)

Similar documents
Proseminar on Semantic Theory Fall 2013 Ling 720 An Algebraic Perspective on the Syntax of First Order Logic (Without Quantification) 1

Typed Lambda Calculus

Semantics and Pragmatics of NLP Propositional Logic, Predicates and Functions

Propositional Logic. Part I

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Semantics and Pragmatics of NLP

Chapter 2 & 3: Representations & Reasoning Systems (2.2)

Propositional Logic Formal Syntax and Semantics. Computability and Logic

CS 512, Spring 2017: Take-Home End-of-Term Examination

Fundamentals of Software Engineering

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Typed Lambda Calculus for Syntacticians

Logic as a framework for NL semantics. Outline. Syntax of FOL [1] Semantic Theory Type Theory

Towards a Logical Reconstruction of Relational Database Theory

15-819M: Data, Code, Decisions

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

Programming Languages Third Edition

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

CS3110 Spring 2017 Lecture 7 Specifications using types continued

CSC 501 Semantics of Programming Languages

LTCS Report. Concept Descriptions with Set Constraints and Cardinality Constraints. Franz Baader. LTCS-Report 17-02

logic with quantifiers (informally)

Situation Calculus and YAGI

3.7 Denotational Semantics

Review Material: First Order Logic (FOL)

Introduction to Logic Programming

Lecture 6: Arithmetic and Threshold Circuits

What is a Logic Program. Introduction to Logic Programming. Introductory Examples. Introductory Examples. Foundations, First-Order Language

Where Can We Draw The Line?

Warm-Up Problem. Let L be the language consisting of as constant symbols, as a function symbol and as a predicate symbol. Give an interpretation where

SOFTWARE ENGINEERING DESIGN I

Semantics of programming languages

One of the most important areas where quantifier logic is used is formal specification of computer programs.

COMPUTABILITY THEORY AND RECURSIVELY ENUMERABLE SETS

Lecture 5: Predicate Calculus. ffl Predicate Logic ffl The Language ffl Semantics: Structures

1.3. Conditional expressions To express case distinctions like

Handout 9: Imperative Programs and State

Propositional Logic. Andreas Klappenecker

Higher-Order Logic. Specification and Verification with Higher-Order Logic

An Inverse Lambda Calculus Algorithm. For Natural Language Processing. Marcos Alvarez Gonzalez

Complexity of unique list colorability

Introduction to Lambda Calculus. Lecture 7 CS /08/09

Recap Datalog Datalog Syntax Datalog Semantics. Logic: Datalog. CPSC 322 Logic 6. Textbook Logic: Datalog CPSC 322 Logic 6, Slide 1

Semantics of programming languages

Semantics. A. Demers Jan This material is primarily from Ch. 2 of the text. We present an imperative

Announcements. The current topic: Scheme. Review: BST functions. Review: Representing trees in Scheme. Reminder: Lab 2 is due on Monday at 10:30 am.

Expressive Power and Abstraction in Essence

Formal Predicate Calculus. Michael Meyling

The Inverse of a Schema Mapping

An Annotated Language

PCP and Hardness of Approximation

CSC Discrete Math I, Spring Sets

Lecture 9: Predicate Logic. First: Finish Propositional Logic in Haskell. Semantics in Haskell. Syntax In Haskell. CS 181O Spring 2016 Kim Bruce

Goals: Define the syntax of a simple imperative language Define a semantics using natural deduction 1

Paths, Flowers and Vertex Cover

Calculus of Inductive Constructions

Types, Expressions, and States

Lecture 4: January 12, 2015

CMSC 330: Organization of Programming Languages

Lexicografie computationala Feb., 2012

Part I Logic programming paradigm

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

Safe Stratified Datalog With Integer Order Does not Have Syntax

Semantics of programming languages

Byzantine Consensus in Directed Graphs

CMSC 330: Organization of Programming Languages. Formal Semantics of a Prog. Lang. Specifying Syntax, Semantics

EXTENSIONS OF FIRST ORDER LOGIC

Finite Model Generation for Isabelle/HOL Using a SAT Solver

Knowledge Representation. CS 486/686: Introduction to Artificial Intelligence

CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011

1 Introduction. 3 Syntax

n λxy.x n y, [inc] [add] [mul] [exp] λn.λxy.x(nxy) λmn.m[inc]0 λmn.m([add]n)0 λmn.n([mul]m)1

APA Interprocedural Dataflow Analysis

Discrete Mathematics Lecture 4. Harper Langston New York University

2 A topological interlude

CMPS 277 Principles of Database Systems. Lecture #4

Intermediate Logic. Interpretations

Shell CSCE 314 TAMU. Haskell Functions

Lecture Notes on Data Representation

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m.

PROPOSITIONAL LOGIC (2)

COSC252: Programming Languages: Semantic Specification. Jeremy Bolton, PhD Adjunct Professor

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

SC/MATH Boolean Formulae. Ref: G. Tourlakis, Mathematical Logic, John Wiley & Sons, York University

Variables. Substitution

Lecture 5: The Halting Problem. Michael Beeson

Concepts of programming languages

Introduction to Lambda Calculus. Lecture 5 CS 565 1/24/08

LING 130: Quantified Noun Phrases

CMPSCI 250: Introduction to Computation. Lecture #7: Quantifiers and Languages 6 February 2012

Computability via Recursive Functions

8. Relational Calculus (Part II)

Database Theory VU , SS Introduction: Relational Query Languages. Reinhard Pichler

X-KIF New Knowledge Modeling Language

The discussion of Chapter 1 will be split into two sessions; the first will cover 1.1 and 1.2; the second will cover 1.3, 1.4, and 1.5.

Going beyond propositional logic

Lecture 6,

Typed First-order Logic

This book is licensed under a Creative Commons Attribution 3.0 License

CS 4110 Programming Languages & Logics. Lecture 17 Programming in the λ-calculus

Transcription:

F. Brief review of classical predicate logic (PC) F.I. Syntax (LfP 4.1) F.I.1. Primitive symbols Primitive vocabulary of PC (LfP 90): connectives: Ñ,, @ variables: x, y,... (with or without numerical subscripts) n-place predicates F, G,... (with or without numerical subscripts) individual constants (names): a, b,... (with or without numerical subscripts) parentheses Terminology. We ll often drop the individual and just call a, b,... constants. F.I.2. Complex expressions We simultaneously define (PC-) term and (PC-) wff recursively: Definition of a term (for PC) (LfP 90): If α is a variable or an individual constant, α is a term. Definition of a wff (for PC): If Π is an n-place predicate and α 1,..., α n are terms, Πα 1,..., α n is a wff. If φ and ψ are wffs, and α is a variable, φ, pφ Ñ ψq, and @αφ are wffs. Remark. Only strings that can be shown to be terms and wffs using these clauses are wffs. We ll leave this qualification tacit in the following. F.I.3. Free variables Definition of free variable occurrence (LfP 91): an occurrence of variable α in wff φ is bound in φ iff it occurs in a wff of the form @αψ. Otherwise it is free. Remark. In other words all and only the occurrences of α in the scope of a @α are bound. F.I.4. Unofficial connectives The connectives ^, _ and Ø are introduced as before; we also add D: Definition of D (in the metalanguage, LfP 91): Dαφ is short for @α φ. 32

F.II. Semantics (LfP 4.2) F.II.1. PC-Models The primitive symbols of PC, save for variables, are interpreted by a PC-model: Definition of a PC-model A PC-model is a pair xd, I y such that: D is a non-empty set ( the domain ) I is a function meeting the following conditions: ( the interpretation function ) I pαq P D for α a constant I pπq is an n-place relation over D for n-place predicate Π Remark. Recall that an n-place relation over D is a set of n-tuples of members of D. F.II.2. Variable assignments The variables of PC are interpreted by a variable assignment: Definition of a variable assignment: a variable assignment g for a PC-model xd, I y is a function with gpαq P D for each variable α. The semantics for quantifiers also deploy the following notion: Definition of a variant assignment: When g is a variable assignment for xd, I y and u P D, we define gu α as follows: # gupβq α gpβq if β α u if β α F.II.3. Term denotations The denotation of a term is settled by either the model or the assignment: Definition of term denotation: Let M xd, I y be a PC-model, g an assignment for M : rαs M,g I pαq if α is a constant rαs M,g gpαq if α is a variable 33

F.II.4. PC-valuations Valuations assign truth-values to wffs: Definition of valuation (for PC) (LfP 94): The valuation function, V M,g for a PCmodel M xd, I y and variable assignment g is the unique function that assigns 0 or 1 to each wff and satisfies the following conditions: V M,g pπα 1... α n q 1 iff xrα 1 s M,g,..., rα n s M,g y P I pπq, for terms α i, n-ary predicate Π. V M,g p φq 1 iff V M,g pφq 0, for wff φ. V M,g pφ Ñ ψq 1 iff V M,g pφq 0 or V M,g pψq 1, for wffs φ and ψ. V M,g p@αφq 1 iff, for every u P D, V M,g α u pφq 1, for wff φ and variable α. This delivers the expected truth-condition for D: Remark. V g pdαφq 1 iff, for some u P D, V g α u pφq 1. F.II.5. Validity Truth is defined as truth under all assignments: Definition of truth in a model (LfP 95): a wff φ is true in a PC-model M iff V M,g pφq 1 for every assignment g for M. Note that the truth-value of a sentence is unaffected by the assignment, indeed: Fact about variable assignments: if g and h agree on the free variables in φ, V M,g pφq V M,h pφq. Proof. Sheet 5, q. 1. And, as usual, validity is defined as truth in all models: Definition of PC-validity (LfP 95): a wff φ is PC-valid in symbols: ( PC φ iff φ is true in all PC-models. Remark. One way to show ( PC φ is to show that V M,g pφq 0 generates a contradiction. F.II.6. Semantic Consequence Semantic consequence is defined as truth preservation in every model and assignment: Definition of PC-semantic consequence: a wff φ is a semantic consequence of a set of wffs Γ Γ ( PC φ iff V M,g pφq 1 for every PC-model M and assignment g with V M,g pγq 1 for each γ P Γ. 34

G. Four extensions of PC. G.I. The identity predicate, = (LfP 5.1) To add as a further logical primitive, we amend the syntax and semantics of PC: G.I.1. Complex expressions Terms and wffs are defined as before, with one additional clause in the definition of wff: Definition of a wff [additional clause for =] (LfP 107): If α and β are terms, then α β is a wff. G.I.2. Valuations We add one further clause to the definition of a valuation: Definition of valuation [additional clause for =] (LfP 108): V M,g pα βq 1 iff rαs M,g rβs M,g If we re just adding identity, the definition of term denotation remains the same. Remark. To just add =, these are the only changes we make: The notion of model remains the same as for PC (without =). The definitions of validity and consequence also remain the same. This is the case for all of the extensions considered in this section. 1 G.I.3. Application: numerical quantifiers Identity lets us express numerical quantifiers (which can t be symbolized in PC): Example. Symbolize There is exactly one F. 1 But it s not the case if we add further non-logical expressions e.g. function symbols, see LfP 5.2. 35

G.II. The description operator, ι (LfP 5.3) We know how with some violence to surface form to capture definite description in PC with = by applying Russell s theory of descriptions an alternative is to use ι. Worked Example. Formalize the following sentence: (1) The author of Logic for Philosophy likes metaphysics. (i) in the language of PC with =; (ii) in the language of PC with ι. G.II.1. Complex expressions Definition of a term [additional clause for ι] (LfP 114): If φ is a wff and α is a variable, then ιαφ is a term. Notation. We sometimes write ια.φ to improve readability. G.II.2. Term denotations Definition of term denotation: [additional clause for ι] (LfP 115) # the u in D such that V rιβφs M,g M,g β u pφq 1 if there is a unique such u undefined, else G.II.3. Valuations Definition of valuation [modified clauses for possibly undefined ι-terms] V M,g pπα 1,..., α n q 1 iff rα 1 s M,g,..., rα n s M,g are all defined and xrα 1 s M,g,... rα n s, M,g y P I pπq Remarks. 1. Note that denotation/valuation are now defined simultaneously by recursion. 2. The new definition makes all formulas of the form Πα 1,..., α n false, with undefined ι-terms false. 3. To add ι and we combine the additions in the obvious way similarly for the other additions. 4. If we have = too we modify its semantic clause analogously to make α β false for undefined ι-terms (see LfP 115). 5. There s a sense in which ι is eliminable in the presence of identity see LfP 117. 36

G.III. The lambda operator, λ (LfP 5.5) Just as ι makes complex terms, λ makes complex predicates. Worked Example. Formalize the following sentence, with and without λ: (2) Logic is such that it is good and necessary. To extend PC (or an extension of PC) with λ, we make the following additions: G.III.1. Complex predicates Complex predicates are defined recursively alongside terms and wffs: Definition of a complex predicate [new clause for λ] (LfP 126): if α is a variable and φ a wff, then λαφ is a one-place predicate. Notation. When F is unary, we write λxf xy as λxf xpyq or pλx.f xqpyq. G.III.2. Valuations One preliminary definition in effect, we take the extension of the complex predicate λαφ to be defined as follows: Definition: extension of λαφ (LfP 120): φ M,g,α tu P D : V M,g α u pφq 1u Remark. The idea is that φpαq M,g,α is the set of things that satisfy φpαq make φpαq true when assigned to α but since φpαq may in general contain more than one free variable, we need to specify an assignment to fix the values of the others. Worked Example. Suppose gpyq 5 and that M has I with: I peq tn P N : n is evenu I plq txn, my : n, m P N, n ă mu Compute: pex ^ Lxyq M,g,x. We then add the following clause for complex predicates to the definition of valuation: Definition of valuation [additional clause for λ-predicates] V M,g ppλαφqpβqq 1 iff rβs M,g P φ M,g,α 37

G.IV. Second-order logic (SOL) (LfP 5.4.3) First-order logic (FOL) e.g. PC quantifies into name position; SOL also quantifies into predicate position. We add n-place predicate variables X, Y,... and second-order quantifiers @X to FOL: G.IV.1. Complex expressions Definition of a wff [additional clauses for SOL] : If π is an n-place predicate variable, and α 1,..., α n are (individual) terms, then πα 1,..., α n is a wff. If π is an n-place predicate variable and φ is a wff, @πφ is a wff. Example. @XpXa _ Xaq is a wff. G.IV.2. Variable assignments The notion of model is unchanged from PC. Assignments and variants are generalized in the natural way: assignments now also map n-place predicate variables to n-place relations. Definition of a variable assignment: a variable assignment g for a PC-model xd, I y is a function which assigns a member of D to each individual variable α and an n-place relation over D to each n-place predicate variable π. Definition of a variant assignment: When g is a variable assignment for xd, I y and U is an n-place relation over D we define, gu π as follows: # gupσq π gpσq if σ π U if σ π G.IV.3. Valuations Definition of PC-valuation [additional clauses for SOL] V M,g pπα 1,..., α n q 1 iff xrα 1 s M,g,... rα n s, M,g y P gpπq V M,g p@πφq 1 iff, for every n-place relation U over D, V M,g π U pφq 1 G.V. Further extensions Function symbols: LfP 5.2. Generalized quantifiers, e.g. most : LfP 5.4.1 2. 38