THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16)
FOL: A language to formulate knowledge Logic is the study of entailment relationslanguages, truth conditions and rules of inference. FOL or Predicate Calculus is very popular logical language invented by Frege at the turn of twentieth century for the formalization of mathematical inference. It has been used by the AI community for KR purposes. The tools of FOL ideally suits for a knowledgelevel analysis of a KBS.
What does it mean to have a language? 3 Aspects applying to declarative languages: Syntax: well formedness Semantics: meaning Pragmatics: usage
The Syntax of FOL Logical Symbols(have a fixed meaning or use ~ reserved words in a PL) Punctuation: (, ),.. Connectives:, Λ,,,, = Variables: x,y,z, sometimes with subscripts. Nonlogical Symbols(application dependent meaning or use, have arity ~ identifiers in a PL) Function symbols: a,b,c,f,g,h,mother, Predicate symbols: P,Q,R,OlderThan
Syntax(cont d) Constants: function of arity 0 (a,b,c,..) Propositions: predicates of arity 0 Syntactic Expressions: Terms: used to refer something in the world. Every variable is a term. f(t 1,,t n ) is a term (t 1,,t n are terms) Formulas: used to express a proposition. P(t 1,,t n ) is a formula. t 1 = t 2 is a formula. If α and β are formulas, and x is a variable, then α, (α β), (α β), x.α, x.α are formulas. First two types of formulas are called atoms.
Syntax (cont d) Propositional Logic A subset of FOL No terms, no quantifiers, but only propositional symbols. Ex: (P (Q R)) Abbreviations: (α β) for ( α β) (α β) for (( α β) ( β α)).
Scope of Quantifiers(syn. cont d) A variable occurrence is bound in a formula if it lies within the scope of a quantifier, and free otherwise. i.e. x is bound if it appears in a subformula x.α, x.α of the formula. Substitition: If x is a variable, t is a term, and α is a formula, α x t stands for the formula that results from replacing all free occurrences of x in α by t. α[ c ] means α with each free x i replaced by the corresponding c i.
Semantics Explains what the expressions of a language mean. Nonlogical symbols are used in an application-dependent way. All we need to say regarding the meaning of the nonlogical symbols, and hence the meaning of all sentences.
Semantics(cont d) There are objects in the world. For any predicate P of arity 1, some of the objects will satisfy P and some will not.an interpretation of P settles the question, deciding for each object whether it has or does not have the property in question. An interpretation of a predicate of arity n decides on which n-tuples of objects stand in the corresponding n-ary relation. No other aspects of the world matter.
Interpretations (sem. cont d) An interpretation I in FOL is a pair < D,I >; D: domain, any nonempty set of objects, I: interpretation mapping, from the nonlogical symbols to functions and relations over D. I[P] is an n-ary relation over D. I[f] is an n-ary function over D. A variable assignment over D is a mapping from the variables of FOL to the elements of D.
Denotation (sem. cont d) Given an interpretation, we can specify which elements of D are denoted by any variable-free term of FOL. t : denotation of term t, given an interpretation I and a variable assignment µ. Example: bestfriend(john)
Satisfaction and Models (sem. cont d) Given an interpretation and the denotation relation, we can now specify which sentences of FOL are true and which are false. I,µ α means α is satisfied in I. When α is a sentence(having no free variables), satisfaction does not depend on µ then we write I α (i.e. α is true in µ). In propositional logic, we write I [α] = 1 if I α. I S, where S is a set of sentences, means all of the sentences in S are true in I. In this case, I is a logical model of S.
There exists a set of rules to evaluate the truth or falsity of sentences in the intended interpretation. For example: I,µ α iff it is not the case that I,µ α.
The Pragmatics How are we supposed to use this language to represent knowledge?
Logical Consequence α is a logical consequence of S (or S logically entails α), written as S α, iff for every interpretation I, if I S then I α. Every model of S satisfies α. There is no interpretation I where I S { α}, i.e. S { α} is unsatisfiable.
KBS and Logical Entailment Reasoning based on logical consequence only allows safe, logically guaranteed conclusions to be drawn. By starting with a rich collection of sentences as given premises, including not only facts about particulars of the intended application but also those expressing connections among the nonlogical symbols involved (ex: x.dog(x) Mammal (x)), the set of entailed conclusions becomes a much richer set, closer to the set of sentences true in the intended interpretation. Calculating these entailments thus becomes more like the form of reasoning we would expect of someone who understood the meaning of the terms involved.
Explicit and Implicit Belief KB: Explicitly given beliefs of the system. Entailments of KB: Implicitly given beliefs. It is often nontrivial to move from explicit to implicit beliefs. For FOL, the problem of determining whether one sentence is a logical consequence of others is in general unsolvable: No automated procedure can decide validity, and so no automated procedure can tell us in all cases whether or not a sentence is entailed.
Knowledge-Based Systems For KR, we start with a large KB. This KB could be the result of what the system is told, or perhaps what the system found out for itself through perception or learning. Our goal is to influence the behaviour of the overall system based on what is implicit in this KB, or as close as possible. This requires reasoning.
Deductive Inference Deductive Inference is the process of calculating the entailments of a KB, that is, given the KB, and for any sentence α, determining whether or not KB α. A reasoning process is logically sound if whenever it produces α, then α is guaranteed to be a logical consequence. A reasoning process is logically complete if it is guaranteed to produce α whenever α is entailed. No automated reasoning process for FOL can be both sound and complete in general.