Mathematical Logic 2016 Lecture 11: First Order Logic

Mathematical Logic 2016 Lecture 11: First Order Logic

Mathematical Logic 2016 Lecture 11: First order logic - Syntax and Semantics Instructor: Ashutosh Gupta TIFR, India Compile date: 2016-09-10 cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 1 Where are we and where are we going? We have seen I Propositional logic We will see I First order logic (FOL) syntax I semantics cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 2 Topic 11.1 First order logic (FOL) - syntax cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 3 First order logic(FOL) First order logic(FOL) = propositional logic + quantifiers over individuals + functions/predicates \First" comes from this property Example 11.1 Consider the following argument: Humans are mortal. Socrates is a human. Therefore, Socrates is mortal. In symbolic form, 8x:(H(x) ) M(x)) ^ H(s) ) M(s) I H(x) = x is a human I M(x) = x is mortal I s = Socrates cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 4 Connectives and variables An FOL consists of three disjoint kinds of symbols I variables I logical connectives I non-logical symbols : function and predicate symbols cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 5 Variables We assume that there is a set Vars of countably many variables. I Since Vars is countable, we assume that variables are indexed. Vars = fx1; x2;:::; g I The variables are just names/symbols without any inherent meaning I We may also sometimes use x; y; z to denote the variables Now forget all the definitions of the propositional logic. We will redefine everything and the new definitions will subsume the PL definitions. cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 6 Logical connectives The following are a finite set of symbols that are called logical connectives. formal name symbol read as true > top 0-ary false ? bot negation : not unary conjunction ^ and 9 > > disjunction _ or => implication ) implies binary exclusive or ⊕ xor > > equivalence , iff ; equality ≈ equals binary predicate existential quantifier 9 there is quantifiers universal quantifier 8 for each 9 open parenthesis ( = close parenthesis ) punctuation comma ; ; cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 7 Non-logical symbols FOL is a parameterized logic The parameter is a signature S = (F; R), where I F is a set of function symbols and I R is a set of predicate symbols. Each symbol has arity ≥ 0 F and R may either be finite or infinite. Each S defines an FOL. We say, consider an FOL with signature S = (F; R) ... We write f =n 2 F and P=k 2 R to explicitly state the arity With n = 0, f is called constant With k = 0, P is called propositional variable cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 8 Syntax : terms Definition 11.1 For signature S = (F; R), S-termsT S are given by the following grammar: t , x j f (t;:::; t); | {zn } where x 2 Vars and f =n 2 F. Example 11.2 Consider F = fc=0; f =1; g=2g. The following are terms Some notation: I f (x1) I Let ~t , t1; ::; tn I g(f (c); g(x2; x1)) I c You may be noticing some similarities x I 1 between variables and constants cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 9 Syntax: atoms and formulas Definition 11.2 S-atomsA S are given by the following grammar: a , P(t;:::; t) j t ≈ t j ? j >; | {zn } where P=n 2 R. Definition 11.3 S-formulas PS are given by the following grammar: F ,a j :F j (F ^ F ) j (F _ F ) j (F ) F ) j (F , F ) j (F ⊕ F ) j8x:(F )j9x:(F ) where x 2 Vars. Example 11.3 Consider F = fs=0g and R = fH=1; M=1g The following is a (F; R)-formula: 8x:(H(x) ) M(x)) ^ H(s) ) M(s) cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 10 Unique parsing For FOL we will ignore the issue of unique parsing, and assume all the necessary precedence and associativity orders are defined for ensuring human readability and unique parsing. cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 11 Some terminology We may write some functions and predicates in infix notation. For example, we may write +(a; b) as a + b and similarly < (a; b) as a < b. We may not mention S if from the context the signature is clear. Since we know arity of each symbol, we need not write \," \(", and \)" to write a term unambiguously. For example, f (g(a; b); h(x); c) can be written as fgabhxc. Definition 11.4 subterms and subformulas are naturally defined. cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 12 Closed terms and quantifier free Definition 11.5 A closed term is a term without variable. Let T^S be the set of closed S-terms. Sometimes closed terms are also referred as ground terms. Definition 11.6 A formula F is quantifier free if there is no quantifier in F . cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 13 Free variables Definition 11.7 A variable x 2 Vars is free in formula F if I F 2 AS: x occurs in F , I F = :G: x is free in G, I F = G ◦ H: x is free in G or H, for some binary operator ◦, and I F = 9y:G or F = 8y:G: x is free in G and x 6= y. LetFV (F ) denote the set of free variables in F . Exercise 11.1 Is x free? I H(x) 3 I 8x:H(x) 7 I H(y) 7 I x ≈ y ) 9x:G(x) 3 cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 14 Sentence Definition 11.8 A variable x 2 Vars is bounded in formula F if x occurs in F and x is not free. In 8x:G(9x:G), we say the quantifier 8x ( 9x )has scope G and boundsx. Definition 11.9 A formula F is a sentence if it has no free variable. Exercise 11.2 Is the following formula a sentence? I H(x) 7 I x = y ) 9x:G(x) 7 I 8x:H(x) 3 I 8x:9y: x = y ) 9x:G(x) 3 cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 15 Topic 11.2 FOL - semantics cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 16 Semantics : models Definition 11.10 For signature S = (F; R), a S-model m is a n n (Dm; ffm : Dm ! Dmjf =n 2 Fg; fPm ⊆ DmjP=n 2 Rg); where Dm is a nonempty set. Let S-Mods denotes the set of all S-models. Some terminology I Dm is called domain of m. I fm assigns meaning to f under model m. I Similarly, Pm assigns meaning to P under model m. Example 11.4 (Running example) Consider S = (f[=2g; f2 =2g). m = (N; [m = max; 2m= f(i; j)ji < jg) is a S-model. Commentary: Models are also known as interpretation/structure. cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 17 Semantics: assignments Definition 11.11 An assignment is a map ν : Vars ! Dm cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 18 Semantics: term value Definition 11.12 ν For a model m and assignment ν, we definem : TS ! Dm as follows. ν m (x) , ν(x) x 2 Vars ν ν ν m (f (t1;:::; tn)) , fm(m (t1);:::; m (tn)) Definition 11.13 ν Let t be a closed term.m (t) , m (t) for any ν. Example 11.5 Consider assignment ν = fx 7! 2; y 7! 3g and term [(x; y). mν([(x; y)) = max(2; 3) = 3 cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 19 Semantics: satisfaction relation Definition 11.14 We define the satisfaction relation j= among models, assignments, and formulas as follows m; ν j= > ν ν m; ν j= P(t1;:::; tn) if (m (t1);:::; m (tn)) 2 Pm ν ν m; ν j= t1 ≈ t2 if m (t1) = m (tn) m; ν j= :F if m; ν 6j= F m; ν j= F1 _ F2 if m; ν j= F1 or m; ν j= F2 skipping other boolean connectives m; ν j= 9x:F if there is u 2 Dm : m; ν[x 7! u] j= F m; ν j= 8x:F if for each u 2 Dm : m; ν[x 7! u] j= F Exercise 11.3 Consider sentence F = 9x:8y: :y 2 x (what does it say to you!) Use m and ν from previous example. Does m; ν j= F? cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 20 Satisfiable, true, valid, and unsatisfiable We say I F is satisfiable if there are m and ν such that m; ν j= F I Otherwise, F is called unsatisfiable I F is true in m (m j= F ) if for all ν we have m; ν j= F I F is valid (j= F ) if for all ν and m we have m; ν j= F If F is a sentence, ν has no influence in the satisfaction relation.(why?) For sentence F , we say I F is true in m if m j= F I Otherwise, F is false in m. cbna Mathematical Logic 2016 Instructor: Ashutosh Gupta TIFR, India 21 Example: satisfiability Example 11.6 Consider S = (fs=1; +=2g; fg) and formula 9z:s(x) + y ≈ s(z) Consider model m = (N; succ; +N) and assignment ν = fx 7! 3; y 7! 2g mν(s(x) + y)= mν(s(x)) +N mν(y) = succ(mν(x)) +N 2 = succ(3) + 2 = 6 ν[z7!5] ν m (s(x) + y) = m (s(x) + y) = 6 //Since z does not occur in the term mν[z7!5](s(z)) = 6 Therefore, m; ν[z 7! 5] j= s(x) + y ≈ s(z).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    40 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us