AI

AI: first-order logic

Posted by Chet on 2017-04-18

While propositional logic assumes the world contains facts, first-order logic assumes the world contains objects, relations, functions, like natural language.

Syntax

  • Constants: Poly, 2, refer to objects
  • Predicates: brother, larger than, refer to relations
  • functions: sqrt, refer to functional relations
  • variables: x, y
  • connectives: ^ ⇒\Rightarrow
  • equality: =
  • quantifiers: ∃\exists, ∀\forall

Sentences

  • atomic sentence = predicate(term1, …, termN) or term1 = term2. where term = function(term1, …, termN) or constant or variable
  • complex sentences are made from atomic sentences using connectives

Universal quantification

∀<variables><sentence>\forall <variables> <sentence> Typically, ⇒\Rightarrow is the main connective with ∀\forall, avoid ∧\wedge.

Existential quantification

∃<variables><sentence>\exists <variables> <sentence> Typically, ∧\wedge is the main connective with ∀\forall, avoid ⇒\Rightarrow.

Properties of quantifiers

  • ∀x∀y\forall x \forall y is same as ∀y∀x\forall y \forall x
  • ∃x∃y\exists x \exists y is same as ∃y∃x\exists y \exists x
  • duality:
  • ∀xRelation(object)\forall x Relation(object) is same as ¬∀x¬Relation(object)\neg\forall x \neg Relation(object)

Universal instantiation

Summary

  • objects and relations are semantic primitives
  • increase expressive power