Skip to content

Propositional Logic ​

Summary of the basic stuff;

Semantics ​

The truth value of a sentence is based on the truth value of atoms, and for complex sentences how the truth values are combined.

Basic Example

  • p is true.
  • q is true.
  • p∧q is true.

Truth tables are used to easily determine the truth values of complex sentences.

Truth Table

pqp∧q
truetruetrue
falsetruefalse
truefalsefalse
falsefalsefalse

model

A model in propositional logic is simply ann assignment of truth values for the atoms of a sentence. For example if the set of atoms is {p, q}, a model might be { p = true, q = true }. Some models can satisfy the entire proposition others may not. (I remember this as each row in a truth table is a model.)

A model can be thought of as an abstract representation of the state of a real or abstract world.

The model M satisfies α, if α is true in m.

  • Notation: m⊨α
  • M(α) the set of models that satisfy α

For example {p: true, q: true} satisfies p∧q.

Entailment

KBα means that knowledge base KB, consisting of a set of propositional formulas entails α. Meaning that in all models in which KB is true, i.e, M(KB)⊆M(α)

For Example: p∧q⊨p Because:

  • $M(KB) = {(p is true, q is true)}
  • $M(\alpha) ={(p is true, q is true), (p is true, q is false)}
null

Terminology ​

  • Logical Equivalence: α≡β if M(α)=M(β).
    • Example: p∧q≡q∧p
  • Validity: A sentence α is valid if it is true in all models (tautology)
    • Example: p⟹p
  • Satisfiability: a sentence α is satisfiable if it is true in some model, i.e. M(α)≠∅

KB⊨α if M(KB∧¬α)=∅ Which means that if KB entails alpha all the models that satisfy KB also satisfy alpha. Makes sense if you look at the drawing because the models of KB are "inside" of the set of the models of alpha.

Reasoning ​

Reasoning is the use of propositional logic by the agent to select is actions. The approach to doing this is to model the environment of the agent with a knowledge base. Then inference or reasoning is done on the knowledge base to determine the agent's next action.

info Proving ​

info proving: applying rules to derive a proof of KB⊨α without model checking. Notation KB⊢α.

Example: Modus Ponens:

α⟹β,αβ$$.

The main challenge is to find which rule needs to be applied to which formulas in order to arrive at the desired conclusion.

Resolution Rule ​

Eliminate opposite literals of two disjuncts. reminder: disjunction == or.

Simple Resolution Rule:

p∨q,¬qp

Example:

tea∨coffee,¬coffeetea

Simple Resolution Rule With Disjunction.

p∨q,¬q∨rp∨r

Example:

tea∨coffee,¬∨coffee∨¬biscuitstea∨¬biscuits

Resolution Rule

i1∨⋯∨ik,mi∨⋯∨mki1∨…ik−1⋯∨ik∨m1∨⋯∨⋯∨mj−1∨mj+1⋯∨mn

Where ik and mj are complementary literals:

  1. ik=¬mj
  2. ¬ik=mj

basically the literals cancel out in the derived disjunction.

To be able to use the resolution rule we need to write our formulas in CNF (conjunctive normal form). The resolution rule can then be applied to the conjuncts.

Proof by Resolution ​

Goal is to prove KB⊢α

Steps:

  1. add ¬α to KB and try to prove KB∧¬α⊢⊥ (proof by contradiction)
  2. Write KB∧¬α in CNF
  3. Apply resolution rule until no new clause can be added anymore or false is derived.

Soundness & Completeness ​

  • Logical consequence
    • KB⊨α : semantic entailment, defined through models
    • KB⊨α : a proof exists showing that by applying syntactic rules, α follows from KB.
  • It is sound if it is proven by resolution that α follows from KB then KB⊨α
  • It is complete if KB⊨α then it can be proven by resolution that α follows from KB.