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 (Two early clicker questions are coming!) 1/28
Predicate Logic: Semantics, Interpretations and Environments Carmen Bruni Lecture 13 Based on slides by Jonathan Buss, Lila Kari, Anna Lubiw and Steve Wolfman with thanks to B Bonakdarpour, A Gao, D Maftuleac, C Roberts, R Trefler, and P Van Beek Predicate Logic Semantics 2/28
Last Time Did another substitution example (Please Review!) Discussed Interpretations with respect to Predicate Logic Predicate Logic Semantics 3/28
Learning Goals Define an interpretation and an environment Give examples of interpretations and environments in specific situations Define validity, satisfiable and unsatisfiable Predicate Logic Semantics 4/28
Environments How do we deal with variables and quantifiers? Definition: An environment is a function that assigns a value in the domain to every variable symbol in the language An environment needs to be defined on all variables! We will see in practice, environments will only be used to interpret free variables but must nonetheless be defined on all variables including bound variables Bound variables will get their meaning primarily through the corresponding quantifier Predicate Logic Semantics 5/28
Meaning of Terms The combination of an interpretation and an environment supplies a value for every term Definition: Fix an interpretation I and environment For each term, the value of under I and, denoted I, is as follows If is a constant, the value I is I If is a variable, the value I is If is, the value I is I I I To extend this definition to formulas, we must consider quantifiers But first, a few examples Predicate Logic Semantics 6/28
Constants Vs Variables Example: Let be (where is a constant), and let be (where a variable) Let I be the interpretation with domain N, I and I is even Then I T, but I is undefined Predicate Logic Semantics 7/28
Constants Vs Variables Example: Let be (where is a constant), and let be (where a variable) Let I be the interpretation with domain N, I and I is even Then I T, but I is undefined To give a value, we must also specify an environment For example, if, then I T Predicate Logic Semantics 7/28
Example Let and be function symbols Let and be predicate symbols, let be constant symbols and let be variable symbols Define an interpretation I by: Domain: D Constants: I, I, I Functions: I I, I, I I (min is the minimum function) Predicates: I I and define an environment by (see next slide) Predicate Logic Semantics 8/28
Interpretations What is the meaning of each of these formulas in the interpretation and environment on the previous slide? I I I I Predicate Logic Semantics 9/28
Meaning of Terms Example Example Suppose a language has constant symbol, a unary function, and a binary function We shall write in infix position: instead of The expressions and are both terms The following are examples of interpretations and environments D dom I N, I, I is the successor function and I is the addition operation Then, if, the terms get values I and I Predicate Logic Semantics 10/28
Meaning of Terms Example 2 D dom J is the collection of all words over the alphabet, J, J appends to the end of a string, and J is concatenation Let Then J and J Predicate Logic Semantics 11/28
Quantifiers Finally, we can evaluate formulas with free and bound variables How can we evaluate a formula of the form or? For, we need to verify that is true for every possible value of in the domain For we need to verify that is true for at least one possible value of in the domain We formalize this on the next few slides Predicate Logic Semantics 12/28
Quantifiers Finally, we can evaluate formulas with free and bound variables How can we evaluate a formula of the form or? For, we need to verify that is true for every possible value of in the domain For we need to verify that is true for at least one possible value of in the domain We formalize this on the next few slides but first a small aside Predicate Logic Semantics 12/28
Quantifiers Over Finite Domains The universal and existential quantifiers may be understood respectively as generalizations of conjunction and disjunction If the domain is finite then: For all, iff and and There exists, iff or or where is a predicate (a property) Predicate Logic Semantics 13/28
Quantified Formulas Definition: For any environment and domain element d, the environment with re-assigned to, denoted d, is given by d if is d if is not In other words, d and for any other variable, d Key point: d is just a new environment! Predicate Logic Semantics 14/28
Example Let D for some interpretation I and consider as defined by Then What about the following? Predicate Logic Semantics 15/28
Values of Quantified Formulas Definition: The values of and are given by I T F I T F if I d T for every d in dom I otherwise if I d T for some d in dom I otherwise Note: The values of I and I do not depend on the value of The value only matters for free occurrences of but nonetheless environments must be specified for all variables! Predicate Logic Semantics 16/28
Examples: Value of a Quantified Formula Example Let dom I a b and I a a a b b b Let and We have I T, since a a I I F, since b a I I T, since I a T (That is, a a a a I ) What is I? Predicate Logic Semantics 17/28
Examples: Continued Example Let dom I a b and I a a a b b b Let a and b What is I? Since b a I, we have I b a F, and thus I F Predicate Logic Semantics 18/28
Examples: Continued Example Let dom I a b and I a a a b b b Let a and b What is I? Since b a I, we have I b a F, and thus I F What about I? Predicate Logic Semantics 18/28
A Question of Syntax In the previous example, we wrote I b a F Why did we not write simply b a F or perhaps b a I F? Predicate Logic Semantics 19/28
A Question of Syntax In the previous example, we wrote I b a F Why did we not write simply b a F or perhaps b a I F? Because b a is not a formula The elements a and b of dom I are not symbols in the language; they cannot appear in a formula Predicate Logic Semantics 19/28
Satisfaction of Formulas An interpretation I and environment satisfy a formula, denoted I, if I T; they do not satisfy, denoted I, if I F Form of Condition for I I I I I both I and I either I or I (or both) either I or I (or both) for every a dom I, I a there is some a dom I such that I a If I for every, then I satisfies, denoted I Predicate Logic Satisfaction of Formulas 20/28
Example: Satisfaction Example Consider the formula (For a binary predicate and a binary function) Suppose dom I, I is the addition operation, and I is the equality predicate Give a simple condition that determines when I holds Predicate Logic Satisfaction of Formulas 21/28
Example: Satisfaction Example Consider the formula (For a binary predicate and a binary function) Suppose dom I, I is the addition operation, and I is the equality predicate Give a simple condition that determines when I holds I iff is an even number Predicate Logic Satisfaction of Formulas 21/28
Validity and Satisfiability Validity and satisfiability of formulas have definitions analogous to the ones for propositional logic Definition: A formula is valid if every interpretation and environment satisfy ; that is, if I for every I and, satisfiable if some interpretation and environment satisfy ; that is, if I for some I and, and unsatisfiable if no interpretation and environment satisfy ; that is, if I for every I and (The term tautology is not used in predicate logic) Predicate Logic Satisfaction of Formulas 22/28
Note If there is no need to specify an environment, then simply defining an interpretation I and writing I will suffice Predicate Logic Satisfaction of Formulas 23/28
Revisit Example Let and be function symbols Let and be predicate symbols, let be constant symbols and let be variable symbols Define an interpretation by: Domain: D Constants: I, I, I Functions: I I, I, I I (min is the minimum function) Predicates: I I and define an environment by Give a new interpretation J and environment satisfying J Give a new interpretation J and environment satisfying J Predicate Logic Satisfaction of Formulas 24/28
Solution Give a new interpretation J and environment satisfying J Predicate Logic Satisfaction of Formulas 25/28
Solution Give a new interpretation J and environment satisfying J Solution: Set and J to be I except, let J Then J Predicate Logic Satisfaction of Formulas 25/28
Solution Give a new interpretation J and environment satisfying J Solution: Set and J to be I except, let J Then J Give a new interpretation J and environment satisfying J Predicate Logic Satisfaction of Formulas 25/28
Solution Give a new interpretation J and environment satisfying J Solution: Set and J to be I except, let J Then J Give a new interpretation J and environment satisfying J Solution: Set and J to be I except, let J Then J Predicate Logic Satisfaction of Formulas 25/28
Relevance Lemma Lemma: Let be a first-order formula, I be an interpretation, and and be two environments such that for every that occurs free in Then I if and only if I Proof by induction on the structure of Predicate Logic Satisfaction of Formulas 26/28
Example: Satisfiability and Validity Let L be a language consisting of variables, function symbols, and predicate symbol Let be the formula The formula is satisfiable: dom I : N I : summation I : squaring I : equality, and is not valid (Why?) Predicate Logic Satisfaction of Formulas 27/28
Another Example Let L be a language consisting of variables, predicate symbol Let I be the interpretation defined by Domain: D I and environment given by: 1 Show that I where def 2 Give an interpretation J and an environment such that J 3 Give an interpretation J and an environment such that J 4 Give an interpretation J and an environment such that J 5 Is valid? Why or why not? Predicate Logic Satisfaction of Formulas 28/28