Logic

, ⁣:¬\vee, \lor \wedge \colon \oplus \otimes \lnot \forall \exists

Formal Notation

  • Inference: agent will use knowledge and logic to provide inference

  • Soundness: Only valid conclusions can be proven

  • Completeness: All valid conclusions can be proven

  • Predicate: a function that maps object args to T/F

    • Feathers(bluebird) >>> True

Implication x implies y, \Rightarrow

Conjunctions, Disjunctions, Negations, Implications

Conjunction

if an animal lays eggs and an animal flies than the animal is a bird

If Lays-eggs(animal)Flies(animal)Then Bird(animal)\text{If Lays-eggs(animal)} \wedge \text{Flies(animal)} \Rightarrow \text{Then Bird(animal)}

Disjunction

if an animal lays eggs or an animal flies than the animal is a bird

Lays-eggs(animal)Flies(animal)Then Bird(animal)\text{Lays-eggs(animal)} \vee \text{Flies(animal)} \Rightarrow \text{Then Bird(animal)}

If an animal flies and is not a bird, it is a bat

Flies(animal)¬Bird(animal)Bat(animal)\text{Flies(animal)} \wedge \lnot\text{Bird(animal)} \Rightarrow \text{Bat(animal)}

Truth Tables

  • Demorgan's law ¬(AB)==¬A¬B\lnot(A\wedge B) == \lnot A \vee \lnot B
    • The outer not flips the inner operation

Kinda weird logic for "Implies" \Rightarrow

ABABA\Rightarrow B
TTT
TFF
FTT
FFT

AB==¬ABA \Rightarrow B == \lnot A \vee B

Rules of Inference

Modus Ponens

xLogic
Sentence 1PQP \Rightarrow Q
Sentence 2PP
Sentence 3QQ

Modus Tollens

xLogic
Sentence 1PQP \Rightarrow Q
Sentence 2¬Q\lnot Q
Sentence 3¬P\lnot P

Resolution Theorem Proving

  • Prove the opposite of what we're trying to prove
  • Start by eliminating the thing you're trying to prove with the contrapositive in the full sentence