Predicate LogicIntroductionTerminologyTermPredicateQuantifierWFF (of First-Order Logic)WFFNotation: Seven Kinds of SymbolsApplication: Parse TreeFree and Bound VariablesApplication: Determining Free or Bound using Parse TreeSubstitutionMotivationFormal DefinitionInterpretationsValues of Variable-Free TermsTotal FunctionsValues of Formulas Containing Only Variable-Free TermsEnvironmentsMeaning of TermsQuantified FormulasValues of Quantified FormulasValidity and SatisfiabilityExercise: Give an Interpretation and an environment such that ...Overall RemarksSemantic EntailmentRelevance LemmaSemantic EntailmentExercise: Semantic EntailmentNatural DeductionTrivial: Forall-eliminationTrivial: Exists-introductionChallenging: Forall-introduction Challenging: Exists-elimination
Predicate logic generalizes propositional logic with the following new things:
Definition. A term is defined inductively as:
Definition. A predicate represents a property of an object or a relation among multiple objects.
Remark. We can think of a predicate as a function mapping from into .
Definition. The set of well-formed formulas of first-order logic is inductively defined as follows:
Remarks. Function symbols and predicate symbols have assigned arities.
Definition. There are two types of variables in a formula:
Definition.
In a formula or , the scope of a quantifer is the formula ; the quantifier binds its variable within its scope.
An occurrence of a variable in a formula is bound if it lies in the scope of some quantifier of the same variable. Otherwise the occurrence of this variable is free.
A formula with no free variables is called a closed formula or sentence.
To determine whether a variable is free or bound, we can use a parse tree:
Definition. For a variable , a term , and a formula , denotes the resulting formula by replacing each free occurrence of variable in formula with term .
Remark. Subsitution does NOT affect bound occurrences of a variable.
Example.
Let , then
If , then , because has no free occurrence of so the substitution does nothing.
Definition. Let be a variable and a term.
For a term , the term is with each occurrence of replaced by .
For a formula ,
Exercise.
, then is?
Note that the term contains a bounded variable. To resolve the name clash, we first replace every occurrence of in by , i.e. , and then substitute by , so that .
To write this formally, we need the following steps:
Definition. Fix a set of constant symbols, function symbols, variable symbols and predicate symbols. An interpretation for the set consists of
Definition. Fix an interpretation . For each term containing no variables (only constants), the value of under interpretation , denoted , is as follows:
Remark. The value of a term is always a member of the domain of .
Motivation. Recall that your function's interpretation must be defined on the entire domain. That is, for a function with arity , we need to define an interpretation such that the function satisfies
Definition. Functions capable of doing this (that is, the result is in domain) are called total functions.
Example. Let . The addition function is a total function since the sum of any two natural numbers gives another natural number. However, the subtraction function is not, as .
Definition. Fix an interpretation . For each formula containing no variables, the value of under interpretation , denoted , is as follows:
If is , then
If is or , then is determined by and in the same way as for propositional logic.
Remark. simply means evaluates to True under the interpretation .
Definition. An environment is a function that assigns a value in the domain to every variable symbol in the language.
Principle. The combination of an interpretation and an environment supplies a meaning (value) for every term.
Definition. Fix an interpretation and an environment . For each term , the value of under and , dentoed , is as follows:
Example. Let be where is a constant and let be where is a variable. Let be the interpretation with domain , and . Then but is undefined. To give a value, we must also specify an environment . For example, if (inside this environment has value ), then .
Definition. For any environment and domain element , the environment " with maps to ", denoted , is given by
In other words, and for any other variable , .
Remark. is a new environment!
Example. Let for some and such that . Then .
Definition. The values of and are given by
Remark. The values of and do not depend on the values of ; only matters for free occurrences of but nontheless environments must be specified for all variables.
Definition. A formula is
Remark. The term "tautology" is not used in predicate logic.
Remark. If there is no need to specify an environment, then simply defining an interpretation and writing will suffice.
Remark. To show a formula is valid or unsatisfiable, start with "let be an arbitrary interpretation and be an arbitrary environment", then show that (for valid) and (for unsatisfiable); to show a formula is satisfiable, give examples of being true under some and false under some .
Template:
Now use reduction to show the statement holds.
Example I. (with variables but no quantifier): Consider this language of predicate logic:
Give an interpretation and environment such that .
Solution I:
The interpretation and the environment are given below:
Given and , we can show that because
Example II: Use the same language as above, give an interpretation and environment such that .
Remark II: is free so its value is given by the environment; even though and do not appear in the formula, we need to define their mapping as part of . To make the statement true, there must be at least one tuple in the set of with second element being .
Solution II:
The interpretation and the environment are given below:
Given and , we can show that because
The constants get their meaning through and the variables through .
Map every constant to a domain element in and every variable to a domain element in , even if some of them do not appear in the formula.
The function and predicate must be able to every possible domain elements (or combinations of domain element, in the case its arity is greater than one).
To show , show that ; LHS gets its value from only if there is no free variable.
Use the satisfaction rules precisely
Lemma. Let be a well-formed predicate formula, be an interpretation, and be two environments such that for every that occurs free in . Then if and only if .
Let be a set of well-formed predicate logic formulas and is a well-formed predicate logic formula. For an interpretation and an environment , we write if and only if for every , we have that .
Definition. We say that semantically entails , written as , if and only if for any interpretation and environment , we have implies . This can also be written as .
Remark. means that is valid (recall how we interpret this in propositional logic).
Notes. Suppose . Then means
Thus, to prove these, take an arbitrary interpretation and environment and show that if this satisified then it must also satisfy . You may also assume towards a contradiction that and proceed from there. To prove find an interpretation and environment that satisfies but doesn't satisfy , that is, show that .
Example I. Show that , where is a variable symbol and and are well-formed predicate formulas.
Remark I. The solution to this kind of problems will be a stack of logic properties and satisfaction rules.
Solution I. Consider an interpretation and environment such that . We will prove that . First, if , the implication is vacuously true, thus we assume the hypothesis is true.
Thus, the entailment holds.
Example II. Show that .
Remark II. We need to come up with a concrete example. The first step is to choose concrete formulas for and , because without doing so, we cannot make claims about whether and are true under a particular interpretation. Next, we need to cnostruction an interpretation to satisfy the premise but not the conclusion.
Solution II. Let be and be where are unary predicates. Consider the following interpretation:
Let be an arbitrary environment (no free variable, but still need to mention it). First, we will show that .
Next, we shall show .
Hence, the entailment does not hold.
Example III. Show that .
Solution III. Let be an arbitrary environment. Consider an interpretation such that . We will show that .
We present four new rules; two of them are pretty much trivial; the other two are a little bit more challenging.