Docsity

Understanding First Order Logic: Expressive Power and Syntax, Study notes of Logic

Partial preview of the text

Download Understanding First Order Logic: Expressive Power and Syntax and more Study notes Logic in PDF only on Docsity!

First Order Logic

Philipp Koehn

9 March 2017

Wittgenstein: Tractatus Logico-Philosophicus^1

  1. The world is everything that is the case.
  2. What is the case (a fact) is the existence of states of affairs.
  3. A logical picture of facts is a thought.
  4. A thought is a proposition with a sense.
  5. A proposition is a truth-function of elementary propositions. (An elementary proposition is a truth-function of itself.)
  6. The general form of a proposition is the general form of a truth function, which is: [p,¯ ξ, N¯ ( ξ¯)]. This is the general form of a proposition.
  7. Whereof one cannot speak, thereof one must be silent.

3

why?

Pros and Cons of Propositional Logic^4

● PRO: Propositional logic is declarative : pieces of syntax correspond to facts

● PRO: Propositional logic allows partial/disjunctive/negated information (unlike most data structures and databases)

● PRO: Propositional logic is compositional : meaning of B 1 , 1 ∧ P 1 , 2 is derived from meaning of B 1 , 1 and of P 1 , 2

● PRO: Meaning in propositional logic is context-independent (unlike natural language, where meaning depends on context)

● CON: Propositional logic has very limited expressive power (unlike natural language) E.g., cannot say “pits cause breezes in adjacent squares” except by writing one sentence for each square

More Logics^6

Language Ontological Epistemological Commitment Commitment

Propositional logic facts true/false/unknown First-order logic facts, objects, relations true/false/unknown Temporal logic facts, objects, relations, times true/false/unknown Probability theory facts degree of belief Fuzzy logic facts + degree of truth known interval value

Higher-order logic: relations and functions operate not only on objects, but also on relations and functions

7

syntax and semantics

Atomic Sentences^9

● Atomic sentence = predicate(term 1 ,... , termn) or term 1 = term 2

● Term = f unction(term 1 ,... , termn) or constant or variable

● E.g., Brother(KingJohn, RichardT heLionheart)

(Length(Lef tLegOf (Richard)), Length(Lef tLegOf (KingJohn)))

Complex Sentences^10

● Complex sentences are made from atomic sentences using connectives

¬S, S 1 ∧ S 2 , S 1 ∨ S 2 , S 1 Ô⇒ S 2 , S 1 ⇔ S 2

● For instance

- Sibling(KingJohn, Richard) Ô⇒ Sibling(Richard, KingJohn) - >( 1 , 2 ) ∨ ≤( 1 , 2 ) - >( 1 , 2 ) ∧ ¬>( 1 , 2 )

  • Models for FOL: Example

Truth Example^13

● Object symbols

- Richard → Richard the Lionheart - John → the evil King John

● Predicat symbol

- Brother → the brotherhood relation

● Atomic sentence

- Brother(Richard, John)

true iff Richard the Lionheart and the evil King John are in the brotherhood relation in the model

Universal Quantification^15

● Syntax: ∀ ⟨variables⟩ ⟨sentence⟩

● Everyone at JHU is smart: ∀ x At(x, JHU ) Ô⇒ Smart(x)

● ∀ x P is true in a model m iff P is true with x being each possible object in the model

● Roughly speaking, equivalent to the conjunction of instantiations of P

(At(KingJohn, JHU ) Ô⇒ Smart(KingJohn)) ∧ (At(Richard, JHU ) Ô⇒ Smart(Richard)) ∧ (At(Jane, JHU ) Ô⇒ Smart(Jane)) ∧...

A Common Mistake to Avoid^16

● Typically, Ô⇒ is the main connective with ∀

● Common mistake: using ∧ as the main connective with ∀:

∀ x At(x, JHU ) ∧ Smart(x)

means “Everyone is at JHU and everyone is smart”

● Correct ∀ x At(x, JHU ) Ô⇒ Smart(x)

means “For everyone, if she is at JHU, then she is smart”

Another Common Mistake to Avoid^18

● Typically, ∧ is the main connective with ∃

● Common mistake: using Ô⇒ as the main connective with ∃:

∃ x At(x, JHU ) Ô⇒ Smart(x)

is true if there is anyone who is not at JHU

● Correct ∃ x At(x, JHU ) ∧ Smart(x)

is true if there is someone who is at JHU and smart

Properties of Quantifiers^19

● ∀ x ∀ y is the same as ∀ y ∀ x (why?)

● ∃ x ∃ y is the same as ∃ y ∃ x (why?)

● ∃ x ∀ y is not the same as ∀ y ∃ x

● ∃ x ∀ y Loves(x, y) “There is a person who loves everyone in the world”

● ∀ y ∃ x Loves(x, y) “Everyone in the world is loved by at least one person”

● Quantifier duality: each can be expressed using the other

● ∀ x Likes(x, IceCream) ¬∃ x ¬Likes(x, IceCream)

● ∃ x Likes(x, Broccoli) ¬∀ x ¬Likes(x, Broccoli)