Stanford CS221 | Autumn 2025 | Lecture 15: Logic I

Stanford Online
Stanford OnlineMar 9, 2026

Why It Matters

Understanding logic’s syntax, semantics, and inference foundations enables AI developers to build agents that reason transparently, complementing data‑driven models and expanding the scope of trustworthy, explainable artificial intelligence.

Key Takeaways

  • Logic serves as a formal language for knowledge representation.
  • Propositional logic defined by syntax, semantics, inference rules.
  • Syntax specifies valid formulas using atomic symbols and connectives.
  • Semantics maps formulas to truth values via interpretation functions.
  • Logical reasoning complements probabilistic methods despite lacking uncertainty handling.

Summary

The lecture introduces logic as the final technical pillar before the AI society module, emphasizing propositional logic as a foundational formal language for representing and reasoning about knowledge. Professor Pietschmann contrasts logical reasoning with earlier topics—search, MDPs, Bayesian networks—highlighting its deterministic nature and expressive compactness. Key insights include the three‑fold structure of any logic: syntax (the set of admissible formulas built from atomic symbols and logical connectives), semantics (the meaning of those formulas via models and an interpretation function), and inference rules (mechanisms to derive new truths). He notes that while logic predates modern AI, its inability to handle uncertainty and limited data integration led to the rise of machine‑learning approaches, yet its expressive power remains unmatched. Illustrative examples range from a simple algebraic puzzle solved by symbolic reasoning to natural‑language inference failures, underscoring why formal logical languages avoid ambiguity. The professor walks through constructing propositional formulas, defining models as truth‑assignments, and implementing a recursive interpretation function that evaluates any formula against a world, using rain‑and‑wet examples to demonstrate model enumeration. The material signals that mastering propositional logic equips AI practitioners with a rigorous toolkit for knowledge representation, essential for later topics like first‑order and description logics, and for integrating symbolic reasoning with statistical methods in future intelligent systems.

Original Description

For more information about Stanford’s Artificial Intelligence professional and graduate programs, visit: https://stanford.io/ai
Please follow along with the course schedule: https://stanford-cs221.github.io/autumn2025/
Teaching Team
Percy Liang, Associate Professor of Computer Science (and courtesy in Statistics)

Comments

Want to join the conversation?

Loading comments...