Introduction to Propositional Logic
Ergodic Theorem Prelude
An individual variable can be expressed as a summation over state values multiplied by an indicator function:
By swapping the order of summation and applying the Ergodic Theorem, the long-run proportion of time spent in state corresponds to the stationary distribution probability .
When in state , the system yields a score of , making the long-run expected score equivalent to
Exam Logistics & Scope
Exam Day: Thursday.
Covered Scope: Search algorithms and knowledge representation, specifically up to Alpha-Beta Pruning and Symbolic Representation.
Excluded Content: Material taught on agent search algorithms introduced in the immediate prior lecture will not be covered on the test.
Topic Progression: Propositional Logic is split into two lectures:
Lecture 1: Basic fundamentals, including atomic propositions, truth tables, connectives, operator precedence, and material implication.
Lecture 2: Advanced reasoning, inference mechanisms, and logical operations built upon basic representations.
Symbolic Representation & Atomic Propositions
Knowledge Representation Goal: Enable an autonomous agent to build an internal model of its environment, reason under uncertainty, deduce unknown states, and construct valid plans toward goals without infinite physical trial-and-error.
Transition from Natural Language to Symbols: Natural language descriptions (e.g., "there is a breeze here, so an adjacent cell contains a pit") are intuitive for humans but unsuitable for computational algorithms. Automated inference requires exact symbolic representations.
Grid World Environment ( Matrix):
Cells are referenced by Cartesian coordinates , where and .
Atomic Propositions: Indivisible propositions evaluating strictly to true () or false ().
: The agent is present at cell .
: Cell contains a breeze.
: Cell contains a pit.
: Cell contains a Wumpus.
: Cell contains gold.
Concrete Grid World Examples:
asserts that cell contains a pit.
asserts that cell does not contain a Wumpus.
asserts that either cell contains a pit or cell contains a pit (or both).
If an agent starts at , then while .
If cell senses a breeze while cell does not, then and .
Logical Connectives & Operator Precedence
Logical Connectives: Operations used to compose complex propositions from atomic propositions.
Negation (): Reverses the truth value of a proposition.
Conjunction ( / AND): Evaluates to true if and only if both conjuncts are true.
Disjunction ( / OR): Evaluates to true if at least one disjunct is true.
Implication ( / IF-THEN): Represents conditional rules ().
Biconditional / Equivalence ( / IF AND ONLY IF): Evaluates to true if both propositions share the exact same truth value.
Precedence Hierarchy (Order of Operations):
To evaluate complex expressions without ambiguity, connectives follow a strict order of precedence (similar to algebraic order of operations):
Negation () (Highest priority)
Conjunction ()
Disjunction ()
Implication ()
Biconditional () (Lowest priority)
Conjunction () has strict priority over disjunction ().
Disjunction () has strict priority over implication ().
Explicit parentheses/brackets should be added to prevent evaluation errors during manual calculations.
Natural Language Translation Exercises
Exercise 1: "Cell (1,1) is safe and the agent has visited it."
Atomic Propositions: Let denote that cell is safe; let denote that cell has been visited.
Composite Symbolization:
Exercise 2: "If cell (2,1) has a breeze, then cell (1,1) or cell (3,1) or cell (2,2) has a pit."
Atomic Propositions: (breeze at ), (pit at ), (pit at ), (pit at ).
Composite Symbolization:
Structural Note: Parentheses enclose the entire right-hand disjunction because disjunction takes precedence over implication, ensuring the antecedent implies the unified collection of possibilities.
Exercise 3: "There is no gold anywhere in the bottom row."
Bottom Row Coordinates: , , , .
Atomic Propositions: , , , .
Composite Symbolization:
Logical Reason: Conjunction () must be used across all negated atomic propositions to guarantee that every single cell in the bottom row is individually verified to contain no gold.
Semantics & Interpretation Functions
Syntax vs. Semantics:
Syntax: The formal structure and grammar used to construct well-formed formulas/propositions.
Semantics: The meaning that propositions express about the state of the world.
Interpretation Function ():
A symbolic proposition has no intrinsic truth value on its own; it represents a variable set of possibilities.
An interpretation function maps atomic propositions directly to concrete boolean values ( or ).
Vacuum World Model Example:
Let represent "Room A is clean" and represent "Room B is clean".
If and , both Room A and Room B are dirty.
If and , Room A is dirty and Room B is clean.
Combinatorial Growth of Possible Worlds:
For atomic propositions, there are possible distinct worlds (models).
With 2 propositions (), there are possible worlds.
If a 3rd proposition ("Agent is in Room A") is added, there are possible worlds.
Strict Inference Warning: If (Agent is not in Room A), one cannot formally infer that the agent is in Room B unless an explicit structural constraint rule is formally added asserting that the agent must reside in either Room A or Room B.
Truth Tables & Logical Operators
Truth Table Functionality: An exhaustive enumeration of every possible truth value combination for constituent atomic variables and their complex expressions.
Master Truth Table for Standard Binary Connectives:
Implication, Vacuous Truth, & World Elimination
Deep Dive into Material Implication ():
Example statement: "If it is sunny (), I will go sailing (").
Case 1 (): It is sunny, and I go sailing. The rule holds ().
Case 2 (): It is sunny, but I do not go sailing. The rule is broken ().
Case 3 (): It is not sunny, but I go sailing anyway. The original statement made no promise regarding non-sunny days; the rule is not violated ().
Case 4 (): It is not sunny, and I do not go sailing. The rule is not violated ().
Vacuous Truth Principle: Whenever the antecedent is false, the implication automatically evaluates to , regardless of the truth value of the consequent
Information and World Elimination:
An agent begins with candidate worlds representing complete uncertainty.
Determining the precise truth value of an atomic proposition (e.g., establishing that ) instantly eliminates all candidate worlds where .
Each concrete observation reduces the remaining world space by half (), narrowing down candidate models until valid plans can be executed.
Logical Implication vs. Material Implication
Material Implication ():
A logical connective inside a formula used to construct a complex proposition ().
Evaluates directly to a truth value ( or ) within a single world/model.
Logical Implication ():
A semantic meta-relation between two propositions.
(" logically implies ") means that in every model/world where proposition is , proposition is strictly guaranteed to be .
Logical Equivalence ():
Two propositions and are logically equivalent () if and only if and
Logically equivalent propositions produce identical outputs in every corresponding row of their truth tables.
Fundamental Logical Equivalences
Double Negation Elimination:
Implication Elimination:
Contraposition:
De Morgan's Laws:
Distributive Laws:
Commutative Laws:
Associative Laws: