Dulranga's Notes
Semester 3Artificial Intelligence

Propositional Logic

In an AI model, propositional knowledge is stored using propositions which are either True or False. Also known as Boolean Logic, sentential logic

Proposition: a declarative statement that is either true or false.

  • "It is raining" ✅
  • "The door is open" ✅
  • "Close the door" ❌ (a command, not a proposition)

Atomic propositions: simple statements, usually written as symbols such as PP, QQ, RR. Compound propositions: atomic propositions combined with logical connectives.

Knowledge Representation

Even though the propositions can be True or False, once you include a proposition in a Knowledge base, it will assume it is only True

KB={P,P  ⟹  Q}KB = \{P, P\implies Q\}
  • PP and P  ⟹  QP \implies Q both are assert True.
  • However, QQ does not have to be Always True, since it is given as imply.

Terminology

Literal

A proposition or its negation.

Examples:

P,¬P,Q,¬RP, \neg P, Q, \neg R

Clauses

An OR combination of literals.

Example:

¬P∨Q∨R\neg P \lor Q \lor R (¬P∨Q)⏟clause 1∧(P∨R)⏟clause 2∧R\underbrace{(\neg P \lor Q)}_\text{clause 1} \land \underbrace{(P \lor R)}_\text{clause 2} \land R

Models

A state of all Propositions in a Knowledge Base is known as a model. For nn number of propositions in the KBKB, there will be 2n2^n models for that KBKB

kb-models-truth-table.png

  • Model satisfy knowledge base if, all Propositions of the Knowledge Base are true. In this case, M1M_1 is the only one satisfying this KB.

    For KB={P  ⟹  Q}KB = \{P\implies Q\} , in this case, Q does not have to be True since its implied.

ModelPQP ⇒ QWhole KB true?
M₁TTTYes
M₂TFFNo
M₃FTTYes
M₄FFTYes

Entailment

meaning - involves something inevitable If QQ is True in all models where KBKB is satisfied, then QQ is entailed to the KBKB. i.e. QQ must follow the KBKB and its inevitable.

KB⊨QKB \models Q

Other terms

TermDefinitionTrue in...
Valid (tautology)True in every modelAll models
SatisfiableTrue in at least one modelSome (≥ 1) models
Unsatisfiable (contradiction)True in no modelZero models

Conjunctive Normal Form (CNF)

A sentence is in CNF when it is an AND of ORs

RuleRewrite
Biconditional eliminationα  ⟺  β→(α  ⟹  β)∧(β  ⟹  α)\alpha \iff \beta \to (\alpha \implies \beta) \land (\beta \implies \alpha)
Implication eliminationα  ⟹  β→¬α∨β\alpha \implies \beta \to \neg \alpha \lor \beta
Double negation¬¬α→α\neg \neg \alpha \to \alpha
De Morgan (AND)¬(α∧β)→¬α∨¬β\neg (\alpha \land \beta) \to \neg \alpha \lor \neg \beta
De Morgan (OR)¬(α∨β)→¬α∧¬β\neg (\alpha \lor \beta) \to \neg \alpha \land \neg \beta
Distributivityα∨(β∧γ)→(α∨β)∧(α∨γ)\alpha \lor (\beta \land γ) \to (\alpha \lor \beta) \land (\alpha \lor γ)

On this page