Lecture 5: Predicate Calculus. ffl Predicate Logic ffl The Language ffl Semantics: Structures
|
|
- Abigayle Page
- 5 years ago
- Views:
Transcription
1 Lecture 5: Predicate Calculus ffl Predicate Logic ffl The Language ffl Semantics: Structures 1
2 Why Predicate Logic? Propositional logic is not powerful enough to express statements such as ffl For every number there is a prime larger than that number. ffl The limit of sin(x)=x as x approaches 0 is 1. ffl The function x 7! x 3 is a bijection. ffl The set of all real numbers is larger than the set of all natural numbers. In order to express such statements we need to enlarge the language of logic a bit. E.g., the first statement has the following structure: for x all there exists y a and x < y y is prime universal quantifier existential quantifier binary relation logical connective unary relation Note that we assume we are dealing with natural numbers. 2
3 The Language We keep all logical connectives. But we add ffl constants that denote individual objects, ffl variables that range over individual objects, ffl quantifiers that express for all and there exists, ffl function symbols that denote functions, ffl relation symbols that denote relations. Notation: ffl a, b, c, ::: for constants, and x, y, z, ::: for variables, ffl 8 for the universal quantifier, and 9 for the existential quantifier, ffl f, g, h, ::: for function symbols, and R, P, Q, ::: for relation symbols. ffl Always allow = for equality. Last example: 8x9y(R(x; y) ^ P (y)) 3
4 Example: Arithmetic To express statements in arithmetic, we use the language L(p; t; c 0 ;c 1 ;L)of type (2; 2; 0; 0; 2). ffl binary function symbols p and t (for addition and multiplication) ffl constants c 0 and c 1 (for 0 and 1) a binary relation symbol L (for the less-than relation) ffl Think p of t and as functions taking 2 c inputs, 0 c and 1 as taking no inputs; they all return an element of the domain as output. L takes two inputs, but returns a Boolean value as output. I We always assume that equality = can be used in our language. Now consider formulae such as 8x9y(L(x; y)) 9x8y(x = y _ L(x; y)) How do we make sense out of these? 8x(p(x; c 0 ) = x) 4
5 Example: Arithmetic (Cont.) We interpret x; y range over natural numbers p; t ordinary addition +, multiplication c 0 ;c 1 the natural numbers 0, 1 L the ordinary less-than relation < Then all these formulae are true. I Induction. Another true formula: 0 ) ^8x(R(x)!R(p(x; c 1 )))! 8xR(x) R(c Here we have added another unary relation R symbol to our language. I A false formula: 8x8y9z(p(x; z) = y) But if we change the variables to range over integers (or rationals, or reals), the last formula would be true! 5
6 L(p(c 1 ;c 1 );u)^l(c 0 ;x)^l(c 0 ;y)^l(c 0 ;z)! 8x8y8z8u :(p(e(x; u);e(y; u)) = e(z; u)) Example: Arithmetic (Cont.) I Primality. In the next formula, x is a free variable (not quantified over). 1 ;x)^8y; z(x = t(y; z)! x = y _ x = z) L(c If we x replace p(c by ;p(c 1 ;c 1 )) 1 we get a true statement. But if we x replace p(c by ;p(c 1 ;p(c 1 ;c 1 ))) 1 we get a false statement. I An impossibly hard formula. Let s add another binary function to our language: e for exponentiation. True or false? This is Fermat s Last Theorem. 6
7 Syntax and Semantics Predicate logic is very expressive, but we need to clarify several important items. I First give a precise definition of what a formula in predicate logic is. Same as with programming languages: we have to pin down the syntax exactly. I Then associate a clear definition of truth (usually called validity) with these formulae. Somewhat like the semantics of a programming language. To define validity, we have to define structures, domains over which a formula in predicate logic I can be interpreted. 7
8 Syntax: Terms and Formulae Every function symbol and relation symbol has a fixed number of arguments, its arity. Terms are defined inductively by Every constant and variable is a term. ffl If f is an n-ary function symbol, and t 1 ;::: ;t n are terms, then f (t 1 ;::: ;t n )is also a term. ffl An atomic formula is an expression of the form 1 ;::: ;t n ) R(t R where is an n-ary relation symbol, t and ;::: ;t n 1 are terms. Lastly, formulae are defined inductively by ffl Every atomic formula is a is a formula. ffl If ' and ψ are formulae, so are (:'), (' ^ ψ), (' _ ψ), and ('! ψ). ffl If ' is a formula and x a variable, then (9x') and (8x') are also formulae. 8
9 Notation As usual, we omit uneccesary parentheses and write 8x(R(x)! 9y S(x; y)) The intended meaning is: For x,ifx any has property R, then there exists y a such x that y and are related by S. Binary relation and function symbols are often written in infix notation, using standard mathematical symbols. E.g., instead p(x; z) of we might x + write z. One often contracts quantifiers of the same kind into one block. sloppy style 8x8y9z(p(x; z) = y) 8x; y9z(x + z = y) 9
10 Free Variables A variable that is not in the range of a quantifier is free (as opposed to bound). One often indicates free variables like so: 9x'(x; y) 8y9x'(x; y) only y is free nothing free '(x; y) x and y are free A formula without free variables is closed,orasentence. Let us always avoid clashes between free and bound variables. better: rename bound variable R(x) ^9x8yS(x; y) R(x) ^9z8yS(z; y) Same as in programming languages (global and local variables). 10
11 Semantics: Structures We need to describe the domain of discourse in predicate logic. I A structure is a set together with a collection of functions and relations on that set. = ha; f 1 ;f 2 ;::: ;R 1 ;R 2 ;:::i A Each function and relation has a fixed arity. A nullary function is just an element of A. A unary function maps element of A to elements of A. A binary function maps pairs of elements of A to elements of A. And so on. Likewise for the relations: A unary relation describes a property of elements of A. A binary relation describes a relationship between pairs of elements of A. I In some sense, mathematics is nothing but the study of various structures. 11
12 Structures (Cont.) We associate the function and relation symbols in formulae with real functions and relations in a structure (of the same arity). f function symbol ; f A a function in A R function symbol ; R A a relation in A Example: Consider arithmetic: Language L(p; t; c 0 ;c 1 ;L)of type (2; 2; 0; 0; 2). Can interpret I over any structure of (2; 2; 0; 0; type 2). The most important structure for arithmetic is = N ;+; ;0;1;<i N h the set of natural numbers together with the standard operations. So = +, t N =, c N N = 0 p 0, N = c 1 1, =<. L Variables range N over N. 12
13 Structures (Cont.) Hence, intuitively, N over, the L(c formula ;c 1 0 )is true. As 8x9y(L(x; is y)). But how about the primality formula '(x) L(c 1 ;x)^8y; z(x = t(y; z)! x = y _ x = z) The free variable x does not stand for any particular number, so we can not directly make sense out of this. Could also interpret our formulae over the structure of the real numbers (has same type I 2; 0; 0; 2)): (2; R = h ;+; ;0;1;<i Here, + refers to addition of reals, 0 is the real number zero, and so on. Note that y(l(x; y)! 9z(L(x; z) ^ L(z; y)) 8x; is true over the reals, but not over the natural numbers. On the other '(x) hand, is not interesting over R: there is x no that makes it true (think square root). 13
14 ffl t = c: then ff(t) = c A The Link: Assignments In propositional logic, we assign a truth value to each propositional variable, and extend the definition of truth value to all formulae. I An assignment (over A) associates variables with elements in A. Given an assignment ff, we can associate an element ff(t) in A with each term t. ffl t = x: then ff(t) = ff(x) ffl t = f (r 1 ;::: ;r n ): then ff(t) = f A (ff(r 1 );::: ;ff(r n )) Example: N,ifff(x) = Over 3, ff(t(x; p(c then ;c 1 ))) = 1 6. But ff(x) = 0 for we ff(t(x; p(c get ;c 1 ))) =
15 Definition of Truth Finally, the definition of a truth value ff(') for every formula '. First without quantifiers. ' R(t ;::: ;t n 1 )is an atomic formula: ff(') then is true R iff holds on ff(t A );::: ;ff(t n ) ffl = 1 ψ^χ: then ff(') is true iff both ff(ψ) and ff(χ) are true. = ' ffl ffl ' = ψ _ χ: then ff(') is true iff at least one of ff(ψ) and ff(χ) is true. ffl ' = :ψ: then ff(') is true iff ff(ψ) is false. So far, this is essentially the same as in propositional logic except that we now have atomic formulae instead of propositional variables. Also note that this is a recursive definition, we are really using induction on the size of the formula. 15
16 Definition of Truth Quantifiers For an assignment ff, let us write ff[x=a] for the assignment that is the same as ff everywhere, except that ff[x=a](x) = a. ' = 9xψ: ffl ff(') Then is true iff there is a an A in such that for the ff assignment = ff[x=a] we have: ff 0 (ψ) is true. 0 ' = 8xψ: ffl ff(') Then is true iff for a all in A, ff assignments = ff[x=a] we have: ff 0 (ψ) is true. 0 Note that ff only needs to be defined on the free variables of ' to produce a value ff('), the values anywhere else do not matter. If ' is a sentence, ff can be totally undefined. 16
17 Models A formula ' is valid in A under assignment ff, in symbols ff(') iff is true. A ' formula is valid over A, in symbols A j= ff ' iff A j= ff ' for any assignment ff. A is said to be a model for '. A sentence is valid A j= ' iff it is valid over any structure. j= ' A formula is satisfiable iff there is some A structure and some ff assignment such A j= that ff '. In other words, 1 ;::: ;x n '(x 1 ;::: ;x n ) 9x has a model, x where ;::: ;x n 1 are the free variables of '. 17
18 Isn t this all circular? It looks like we are using for all to define what a universal quantifier means, and there is for existential quantifiers. True, but we are talking about syntactic objects, and define their meaning in terms of structures, which are not syntactic, they are real (in the world of mathematics). Think of this as a program: you can compute the truth value of a formula, as long as you can perform certain operations in the structure (evaluate f A, search over all elements, ::: ) IIf the structure in particular is finite, then we can actually carry out the computations. But over, say, N we cannot in general deal with quantifiers. Consider again the Fermat formula I (in sloppy notation) 8x; y; z; n(n > 2 ^ x; y; z > 0! x n + y n 6= z n ) 18
19 Valid Sentences Since validity means: holds over all structures one might wonder if there are any interesting valid sentences. Here are some important ones involving quantifiers: 8x8y'(x; y) () 8y8x'(x; y) 9x9y'(x; y) () 9y9x'(x; y) 9x8y'(x; y)! 8y9x'(x; y) Here are some important ones involving equality: 8x(x = x) 8x8y(x = y! y = x) 8x8y8z(x = y ^ y = z! x = z) 8x8y(x = y! (R(x), R(y))) 8x8y(x = y! f (x) = f (y)) 19
Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.
Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to
More informationPropositional Logic Formal Syntax and Semantics. Computability and Logic
Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship
More informationGoing beyond propositional logic
Going beyond propositional logic Consider the following statements: p: Ling took CS245 q: Ling passed CS245 r: Ling failed CS245 Taken literally, these are all atomic statements, and formally they have
More informationAutomated Reasoning. Natural Deduction in First-Order Logic
Automated Reasoning Natural Deduction in First-Order Logic Jacques Fleuriot Automated Reasoning Lecture 4, page 1 Problem Consider the following problem: Every person has a heart. George Bush is a person.
More informationCDM First-Order Logic
CDM First-Order Logic 1 First-Order Logic Klaus Sutner Carnegie Mellon University Syntax 40-fol-basics 2017/12/15 23:21 Model Theory Designing a Logic 3 Digression: Logic, the Field 4 There are three major
More informationCDM First-Order Logic
CDM First-Order Logic Klaus Sutner Carnegie Mellon University 40-fol-basics 2017/12/15 23:21 1 First-Order Logic Syntax Model Theory Designing a Logic 3 There are three major parts in the design of a new
More informationCMPS 277 Principles of Database Systems. https://courses.soe.ucsc.edu/courses/cmps277/fall11/01. Lecture #3
CMPS 277 Principles of Database Systems https://courses.soe.ucsc.edu/courses/cmps277/fall11/01 Lecture #3 1 Summary of Lectures #1 and #2 Codd s Relational Model based on the concept of a relation (table)
More informationCSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27
CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 2.1-2.7 p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer
More information1.3 Primitive Recursive Predicates and Bounded Minimalization
12 1 Primitive Recursive Functions 1.3 Primitive Recursive Predicates and Bounded Minimalization 1.3.1 Case discrimination function The case discrimination function D is defined by D(x, y, z) = v x 0 v
More informationThis is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS
1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be
More informationaxiomatic semantics involving logical rules for deriving relations between preconditions and postconditions.
CS 6110 S18 Lecture 18 Denotational Semantics 1 What is Denotational Semantics? So far we have looked at operational semantics involving rules for state transitions, definitional semantics involving translations
More informationNote 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.
CS 6110 S18 Lecture 8 Structural Operational Semantics and IMP Today we introduce a very simple imperative language, IMP, along with two systems of rules for evaluation called small-step and big-step semantics.
More informationWarm-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
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 is false Use a finite domain in your interpretation
More informationIntroduction to Logic Programming
Introduction to Logic Programming Foundations, First-Order Language Temur Kutsia RISC, Johannes Kepler University Linz, Austria kutsia@risc.jku.at What is a Logic Program Logic program is a set of certain
More informationWhat is a Logic Program. Introduction to Logic Programming. Introductory Examples. Introductory Examples. Foundations, First-Order Language
What is a Logic Program Introduction to Logic Programming Foundations, First-Order Language Temur Kutsia Research Institute for Symbolic Computation Johannes Kepler University Linz, Austria kutsia@risc.jku.at
More informationNotes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.
Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 1.3 1.4 of Rosen cse235@cse.unl.edu Introduction
More informationPart I Logic programming paradigm
Part I Logic programming paradigm 1 Logic programming and pure Prolog 1.1 Introduction 3 1.2 Syntax 4 1.3 The meaning of a program 7 1.4 Computing with equations 9 1.5 Prolog: the first steps 15 1.6 Two
More informationSOFTWARE ENGINEERING DESIGN I
2 SOFTWARE ENGINEERING DESIGN I 3. Schemas and Theories The aim of this course is to learn how to write formal specifications of computer systems, using classical logic. The key descriptional technique
More informationModule 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur
Module 6 Knowledge Representation and Logic (First Order Logic) 6.1 Instructional Objective Students should understand the advantages of first order logic as a knowledge representation language Students
More informationTo prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):
CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 7 This lecture returns to the topic of propositional logic. Whereas in Lecture 1 we studied this topic as a way of understanding proper reasoning
More informationCMPS 277 Principles of Database Systems. Lecture #4
CMPS 277 Principles of Database Systems http://www.soe.classes.edu/cmps277/winter10 Lecture #4 1 First-Order Logic Question: What is First-Order Logic? Answer: Informally, First-Order Logic = Propositional
More informationCSC Discrete Math I, Spring Sets
CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its
More informationSemantics. A. Demers Jan This material is primarily from Ch. 2 of the text. We present an imperative
CS411 Notes 1: IMP and Large Step Operational Semantics A. Demers 23-25 Jan 2001 This material is primarily from Ch. 2 of the text. We present an imperative language called IMP; wegive a formal definition
More informationSafe Stratified Datalog With Integer Order Does not Have Syntax
Safe Stratified Datalog With Integer Order Does not Have Syntax Alexei P. Stolboushkin Department of Mathematics UCLA Los Angeles, CA 90024-1555 aps@math.ucla.edu Michael A. Taitslin Department of Computer
More informationProgramming Languages Third Edition
Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand
More informationComputation Club: Gödel s theorem
Computation Club: Gödel s theorem The big picture mathematicians do a lot of reasoning and write a lot of proofs formal systems try to capture the ideas of reasoning and proof in a purely mechanical set
More informationDatabase Theory VU , SS Codd s Theorem. Reinhard Pichler
Database Theory Database Theory VU 181.140, SS 2011 3. Codd s Theorem Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 29 March, 2011 Pichler 29 March,
More informationCMSC 330: Organization of Programming Languages. Formal Semantics of a Prog. Lang. Specifying Syntax, Semantics
Recall Architecture of Compilers, Interpreters CMSC 330: Organization of Programming Languages Source Scanner Parser Static Analyzer Operational Semantics Intermediate Representation Front End Back End
More informationChapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation
Chapter 1.3 Quantifiers, Predicates, and Validity Reading: 1.3 Next Class: 1.4 1 Motivation Propositional logic allows to translate and prove certain arguments from natural language If John s wallet was
More informationModel Checking I Binary Decision Diagrams
/42 Model Checking I Binary Decision Diagrams Edmund M. Clarke, Jr. School of Computer Science Carnegie Mellon University Pittsburgh, PA 523 2/42 Binary Decision Diagrams Ordered binary decision diagrams
More informationCS112 Friday, September 12, 2008
CS112 Friday, September 12, 2008 Agenda Natural Deduction Questions FOL Translations FOL Interpretations Natural Deduction Questions? First Order Logic Translations Symbolization Key Universe of Discourse
More informationPropositional Logic. Part I
Part I Propositional Logic 1 Classical Logic and the Material Conditional 1.1 Introduction 1.1.1 The first purpose of this chapter is to review classical propositional logic, including semantic tableaux.
More informationLecture 5 - Axiomatic semantics
Program Verification March 2014 Lecture 5 - Axiomatic semantics Lecturer: Noam Rinetzky Scribes by: Nir Hemed 1.1 Axiomatic semantics The development of the theory is contributed to Robert Floyd, C.A.R
More informationTo prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):
CS 70 Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 7 This lecture returns to the topic of propositional logic. Whereas in Lecture Notes 1 we studied this topic as a way of understanding
More informationSoftware Engineering Lecture Notes
Software Engineering Lecture Notes Paul C. Attie August 30, 2013 c Paul C. Attie. All rights reserved. 2 Contents I Hoare Logic 11 1 Propositional Logic 13 1.1 Introduction and Overview..............................
More informationLecture 4. First order logic is a formal notation for mathematics which involves:
0368.4435 Automatic Software Verification April 14, 2015 Lecture 4 Lecturer: Mooly Sagiv Scribe: Nimrod Busany, Yotam Frank Lesson Plan 1. First order logic recap. 2. The SMT decision problem. 3. Basic
More informationLecture 1: Conjunctive Queries
CS 784: Foundations of Data Management Spring 2017 Instructor: Paris Koutris Lecture 1: Conjunctive Queries A database schema R is a set of relations: we will typically use the symbols R, S, T,... to denote
More informationSchema Mappings and Data Exchange
Schema Mappings and Data Exchange Lecture #2 EASSLC 2012 Southwest University August 2012 1 The Relational Data Model (E.F. Codd 1970) The Relational Data Model uses the mathematical concept of a relation
More informationSemantics and Pragmatics of NLP Propositional Logic, Predicates and Functions
, Semantics and Pragmatics of NLP, and s Alex Ewan School of Informatics University of Edinburgh 10 January 2008 , 1 2 3 4 Why Bother?, Aim: 1 To associate NL expressions with semantic representations;
More informationCSE 20 DISCRETE MATH. Fall
CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam
More informationCS 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
1 Logical Operations 1.1 And The and operator is a binary operator, denoted as, &,, or sometimes by just concatenating symbols, is true only if both parameters are true. A B A B F T F F F F The expression
More informationCSC 501 Semantics of Programming Languages
CSC 501 Semantics of Programming Languages Subtitle: An Introduction to Formal Methods. Instructor: Dr. Lutz Hamel Email: hamel@cs.uri.edu Office: Tyler, Rm 251 Books There are no required books in this
More informationComp 411 Principles of Programming Languages Lecture 7 Meta-interpreters. Corky Cartwright January 26, 2018
Comp 411 Principles of Programming Languages Lecture 7 Meta-interpreters Corky Cartwright January 26, 2018 Denotational Semantics The primary alternative to syntactic semantics is denotational semantics.
More information15-819M: Data, Code, Decisions
15-819M: Data, Code, Decisions 08: First-Order Logic André Platzer aplatzer@cs.cmu.edu Carnegie Mellon University, Pittsburgh, PA André Platzer (CMU) 15-819M/08: Data, Code, Decisions 1 / 40 Outline 1
More informationZ Notation. June 21, 2018
Z Notation June 21, 2018 1 Definitions There are many different ways to introduce an object in a Z specification: declarations, abbreviations, axiomatic definitions, and free types. Keep in mind that the
More informationFunctional programming with Common Lisp
Functional programming with Common Lisp Dr. C. Constantinides Department of Computer Science and Software Engineering Concordia University Montreal, Canada August 11, 2016 1 / 81 Expressions and functions
More informationIntroductory logic and sets for Computer scientists
Introductory logic and sets for Computer scientists Nimal Nissanke University of Reading ADDISON WESLEY LONGMAN Harlow, England II Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario
More informationCSE20: Discrete Mathematics
Spring 2018 Summary Last time: Today: Introduction to Basic Set Theory (Vardy) More on sets Connections between sets and logic Reading: Chapter 2 Set Notation A, B, C: sets A = {1, 2, 3}: finite set with
More informationLecture 6: Arithmetic and Threshold Circuits
IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Advanced Course on Computational Complexity Lecture 6: Arithmetic and Threshold Circuits David Mix Barrington and Alexis Maciel July
More informationCopyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and
Chapter 6 The Relational Algebra and Relational Calculus Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 Outline Unary Relational Operations: SELECT and PROJECT Relational
More information1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.
1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 2. true / false ML can be compiled. 3. true / false FORTRAN can reasonably be considered
More informationWarmup Problem. Translate the following sentence from English into Propositional Logic. I want to eat ice cream even though I am on a diet.
Warmup Problem Translate the following sentence from English into Propositional Logic I want to eat ice cream even though I am on a diet 1/25 CS 245: Logic and Computation Carmen Bruni Lecture 2 Based
More informationRecursive definition of sets and structural induction
CS2209A 2017 Applied Logic for Computer Science Lecture 21, 22 Recursive definition of sets and structural induction Instructor: Marc Moreno Maza 1 Tower of Hanoi game Rules of the game: Start with all
More informationReview Material: First Order Logic (FOL)
Information Integration on the WEB with RDF, OWL and SPARQL Review Material: First Order Logic (FOL) Grant Weddell October 7, 2013 Syntax of FOL Signatures Vocabularies are called signatures in FOL. The
More informationFundamentals of Software Engineering
Fundamentals of Software Engineering Reasoning about Programs with Dynamic Logic - Part I Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard
More informationCMPSCI 250: Introduction to Computation. Lecture #7: Quantifiers and Languages 6 February 2012
CMPSCI 250: Introduction to Computation Lecture #7: Quantifiers and Languages 6 February 2012 Quantifiers and Languages Quantifier Definitions Translating Quantifiers Types and the Universe of Discourse
More informationFormal Semantics of Programming Languages
Formal Semantics of Programming Languages Mooly Sagiv Reference: Semantics with Applications Chapter 2 H. Nielson and F. Nielson http://www.daimi.au.dk/~bra8130/wiley_book/wiley.html Benefits of formal
More informationA set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N
Mathematical Preliminaries Read pages 529-540 1. Set Theory 1.1 What is a set? A set is a collection of entities of any kind. It can be finite or infinite. A = {a, b, c} N = {1, 2, 3, } An entity is an
More informationFirst Order Predicate Logic CIS 32
First Order Predicate Logic CIS 32 Functionalia Demos? HW 3 is out on the web-page. Today: Predicate Logic Constructing the Logical Agent Predicate Logic First-order predicate logic More expressive than
More informationChapter 2 & 3: Representations & Reasoning Systems (2.2)
Chapter 2 & 3: A Representation & Reasoning System & Using Definite Knowledge Representations & Reasoning Systems (RRS) (2.2) Simplifying Assumptions of the Initial RRS (2.3) Datalog (2.4) Semantics (2.5)
More informationCS357 Lecture: BDD basics. David Dill
CS357 Lecture: BDD basics David Dill BDDs (Boolean/binary decision diagrams) BDDs are a very successful representation for Boolean functions. A BDD represents a Boolean function on variables x, x 2,...
More informationFormal Specification: Z Notation. CITS5501 Software Testing and Quality Assurance
Formal Specification: Z Notation CITS5501 Software Testing and Quality Assurance The Zed Notation, J.M.Spivey. Semester 1, 2017 A Formal Specification Notation A Syntax - often based on set theory and
More informationFormal Semantics of Programming Languages
Formal Semantics of Programming Languages Mooly Sagiv Reference: Semantics with Applications Chapter 2 H. Nielson and F. Nielson http://www.daimi.au.dk/~bra8130/wiley_book/wiley.html Benefits of formal
More informationACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes)
ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes) Steve Vickers CS Theory Group Birmingham 4. Toposes and geometric reasoning How to "do generalized
More informationComputer Science and Mathematics. Part I: Fundamental Mathematical Concepts Winfried Kurth
Computer Science and Mathematics Part I: Fundamental Mathematical Concepts Winfried Kurth http://www.uni-forst.gwdg.de/~wkurth/csm17_home.htm 1. Mathematical Logic Propositions - can be either true or
More informationFirst-Order Logic PREDICATE LOGIC. Syntax. Terms
First-Order Logic PREDICATE LOGIC Aim of this lecture: to introduce first-order predicate logic. More expressive than propositional logic. Consider the following argument: all monitors are ready; X12 is
More informationIntroduction to Programming, Aug-Dec 2008
Introduction to Programming, Aug-Dec 2008 Lecture 1, Monday 4 Aug 2008 Administrative matters Resource material Textbooks and other resource material for the course: The Craft of Functional Programming
More informationBack to the knights and knaves island
Back to the knights and knaves island During your Thanksgiving trip, you found another island with knights and knaves (you have a feeling that you may encounter many such islands this semester). Knights
More informationTh(N, +) is decidable
Theorem 6.12 Th(N, +) is decidable Presented by: Brian Lee Two Domains 1. We can give an algorithm to decide truth 2. A problem is undecidable First Order Logic Also known as First order predicate calculus
More informationCITS2211 Discrete Structures Logic
CITS2211 Discrete Structures Logic Unit coordinator: Rachel Cardell-Oliver August 6, 2017 Highlights All men are mortal, Socrates is a man, therefore Socrates is mortal. Reading Chapter 3: Logical Formulas
More information1.3. Conditional expressions To express case distinctions like
Introduction Much of the theory developed in the underlying course Logic II can be implemented in a proof assistant. In the present setting this is interesting, since we can then machine extract from a
More informationFoundations of Databases
Foundations of Databases Relational Query Languages with Negation Free University of Bozen Bolzano, 2009 Werner Nutt (Slides adapted from Thomas Eiter and Leonid Libkin) Foundations of Databases 1 Queries
More informationIntroduction to Automata Theory. BİL405 - Automata Theory and Formal Languages 1
Introduction to Automata Theory BİL405 - Automata Theory and Formal Languages 1 Automata, Computability and Complexity Automata, Computability and Complexity are linked by the question: What are the fundamental
More informationIntroduction to Scheme
How do you describe them Introduction to Scheme Gul Agha CS 421 Fall 2006 A language is described by specifying its syntax and semantics Syntax: The rules for writing programs. We will use Context Free
More informationConnecting Statements. Today. First there was logic jumping forward.. ..and then proofs and then induction...
Today Review for Midterm. First there was logic... A statement is a true or false. Statements? 3 = 4 1? Statement! 3 = 5? Statement! 3? Not a statement! n = 3? Not a statement...but a predicate. Predicate:
More informationFormal Systems and their Applications
Formal Systems and their Applications Dave Clarke (Dave.Clarke@cs.kuleuven.be) Acknowledgment: these slides are based in part on slides from Benjamin Pierce and Frank Piessens 1 Course Overview Introduction
More information1 / 43. Today. Finish Euclid. Bijection/CRT/Isomorphism. Fermat s Little Theorem. Review for Midterm.
1 / 43 Today Finish Euclid. Bijection/CRT/Isomorphism. Fermat s Little Theorem. Review for Midterm. 2 / 43 Finding an inverse? We showed how to efficiently tell if there is an inverse. Extend euclid to
More informationPure Lambda Calculus. Lecture 17
Pure Lambda Calculus Lecture 17 Lambda Calculus Lambda Calculus (λ-calculus) is a functional notation introduced by Alonzo Church in the early 1930s to formalize the notion of computability. Pure λ-calculus
More informationCSE 20 DISCRETE MATH. Winter
CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam
More informationThe Relational Model
The Relational Model David Toman School of Computer Science University of Waterloo Introduction to Databases CS348 David Toman (University of Waterloo) The Relational Model 1 / 28 The Relational Model
More informationSoftware Paradigms (Lesson 6) Logic Programming
Software Paradigms (Lesson 6) Logic Programming Table of Contents 1 Introduction... 2 2 Facts... 3 3 Predicates (Structured Terms)... 4 3.1 General Structures... 4 3.2 Predicates (Syntax)... 4 3.3 Simple
More informationAn Evolution of Mathematical Tools
An Evolution of Mathematical Tools From Conceptualization to Formalization Here's what we do when we build a formal model (or do a computation): 0. Identify a collection of objects/events in the real world.
More informationChapter 3: Propositional Languages
Chapter 3: Propositional Languages We define here a general notion of a propositional language. We show how to obtain, as specific cases, various languages for propositional classical logic and some non-classical
More information1 The language χ. Models of Computation
Bengt Nordström, 1 2017-10-13 Department of Computing Science, Chalmers and University of Göteborg, Göteborg, Sweden 1 The language χ The main purpose of the language χ is to illustrate some basic results
More informationSemantics via Syntax. f (4) = if define f (x) =2 x + 55.
1 Semantics via Syntax The specification of a programming language starts with its syntax. As every programmer knows, the syntax of a language comes in the shape of a variant of a BNF (Backus-Naur Form)
More informationDeclarative programming. Logic programming is a declarative style of programming.
Declarative programming Logic programming is a declarative style of programming. Declarative programming Logic programming is a declarative style of programming. The programmer says what they want to compute,
More information(Refer Slide Time: 4:00)
Principles of Programming Languages Dr. S. Arun Kumar Department of Computer Science & Engineering Indian Institute of Technology, Delhi Lecture - 38 Meanings Let us look at abstracts namely functional
More informationLECTURE 17. Expressions and Assignment
LECTURE 17 Expressions and Assignment EXPRESSION SYNTAX An expression consists of An atomic object, e.g. number or variable. An operator (or function) applied to a collection of operands (or arguments)
More informationSection 2.2: Introduction to the Logic of Quantified Statements
Section 2.2: Introduction to the Logic of Quantified Statements In this section, we shall continue to examine some of the fundamentals of predicate calculus. Specifically, we shall look at the negations
More informationLogic and Databases. Phokion G. Kolaitis. UC Santa Cruz & IBM Research - Almaden
Logic and Databases Phokion G. Kolaitis UC Santa Cruz & IBM Research - Almaden 1 Logic and Databases are inextricably intertwined. C.J. Date -- 2007 2 Logic and Databases Extensive interaction between
More informationIntroduction to Axiomatic Semantics
Introduction to Axiomatic Semantics Meeting 10, CSCI 5535, Spring 2009 Announcements Homework 3 due tonight Homework 2 is graded 13 (mean), 14 (median), out of 21 total, but Graduate class: final project
More informationFormal Methods in Software Engineering 1
Logic Review First Order Logic Propositional Logic Summary Formal Methods in Software Engineering 1 Logic From Merriam-Webster Online, Logic is the science of the formal principles of reasoning. Mathematical
More information6.001 Notes: Section 6.1
6.001 Notes: Section 6.1 Slide 6.1.1 When we first starting talking about Scheme expressions, you may recall we said that (almost) every Scheme expression had three components, a syntax (legal ways of
More informationWe ve studied the main models and concepts of the theory of computation:
CMPSCI 601: Summary & Conclusions Lecture 27 We ve studied the main models and concepts of the theory of computation: Computability: what can be computed in principle Logic: how can we express our requirements
More informationSC/MATH Boolean Formulae. Ref: G. Tourlakis, Mathematical Logic, John Wiley & Sons, York University
SC/MATH 1090 1- Boolean Formulae Ref: G. Tourlakis, Mathematical Logic, John Wiley & Sons, 2008. York University Department of Computer Science and Engineering York University- MATH 1090 01-Boolean 1 Overview
More informationRelational Calculus. Lecture 4B Kathleen Durant Northeastern University
Relational Calculus Lecture 4B Kathleen Durant Northeastern University 1 Relational Calculus Relational Calculus is an alternative way for expressing queries Main feature: specify what you want, not how
More information9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS
What is discrete? Sets (Rosen, Chapter 2) TOPICS Discrete math Set Definition Set Operations Tuples Consisting of distinct or unconnected elements, not continuous (calculus) Helps us in Computer Science
More informationLectures 20, 21: Axiomatic Semantics
Lectures 20, 21: Axiomatic Semantics Polyvios Pratikakis Computer Science Department, University of Crete Type Systems and Static Analysis Based on slides by George Necula Pratikakis (CSD) Axiomatic Semantics
More informationToday s Topics. What is a set?
Today s Topics Introduction to set theory What is a set? Set notation Basic set operations What is a set? Definition: A set is an unordered collection of objects Examples: Sets can contain items of mixed
More informationLECTURE 8: SETS. Software Engineering Mike Wooldridge
LECTURE 8: SETS Mike Wooldridge 1 What is a Set? The concept of a set is used throughout mathematics; its formal definition matches closely our intuitive understanding of the word. Definition: A set is
More information