Stanford CS221 | Autumn 2025 | Lecture 16: Logic II
TL;DR
This lecture introduces First Order Logic as a powerful extension of propositional logic that uses objects, predicates, functions, and quantifiers to compactly represent complex relationships and generalizations without enumerating every possible instance.
⚠️ Limitations of Propositional Logic 2 insights
Scalability breakdown with generalizations
Representing "all students know arithmetic" requires manually listing every student (Alice, Bob, etc.), creating exponentially large formulas that are impractical for real-world domains.
Missing structural elements
Propositional logic treats statements like "Alice knows arithmetic" as monolithic symbols, lacking the machinery to represent internal objects, relationships, or variables needed for abstraction.
🏗️ First Order Logic Syntax 3 insights
Terms denote objects, formulas denote truth
Terms (constants like Alice, variables like x, functions like father(x)) represent objects, while formulas (predicates applied to terms) evaluate to true or false.
Predicates vs. functions
Functions map terms to other terms (father(Alice) returns an object), whereas predicates map terms to boolean values (Student(Alice) returns true/false).
Strict type conventions
Lowercase conventions indicate terms representing objects, while uppercase indicates predicates and formulas representing truth values, preventing ill-formed expressions like Student(Arithmetic).
∀ Quantifiers and Expressive Power 3 insights
Universal and existential quantification
Quantifiers (∀ for all, ∃ for exists) allow expressing general rules like "for all x, Student(x) implies Person(x)" without enumerating every individual in the domain.
Compact complex representations
First order logic enables concise encoding of mathematical conjectures and real-world facts (e.g., Goldbach's conjecture) that would require infinite propositional symbols otherwise.
Inference foundations remain consistent
First order logic maintains the same semantic framework as propositional logic—models, interpretation functions, entailment, and satisfiability—while extending representational capacity.
Bottom Line
First order logic provides the essential machinery—quantifiers, predicates, and a strict separation between terms (objects) and formulas (truth values)—to represent complex world knowledge compactly and perform scalable automated reasoning.
More from Stanford Online
View all
Stanford MS&E435 Economics of the AI Supercycle | Spring 2026 | Applications, Coding AI
Vercel founder Guillermo Rauch explains how AI coding agents have expanded the software development market by 10-100x, driving a fundamental shift from traditional web services to 'agentic infrastructure' where tokens replace pixels as the primary commodity and deployment becomes the critical value creator.
Stanford MS&E435 Economics of the AI Supercycle | Spring 2026 | Building AI Factories
Crusoe Energy CEO Chase Lockmiller explains how AI data centers represent history's second-largest infrastructure investment, driven by the economic potential of scalable 'digital labor.' He reveals Crusoe's strategy of building massive AI factories in stranded-power locations like Abilene, Texas, to overcome the industry's critical bottleneck: energized data center capacity.
AI in Healthcare Series: Inside the Rise of AI in Healthcare, Open Evidence and Cyber Risks
Former U.S. Chief Data Scientist DJ Patil warns that healthcare systems are dangerously unprepared for AI-enabled cyberattacks from nation states, while simultaneously seeing rapid democratization of medical knowledge through tools like Open Evidence that are fundamentally reshaping the doctor-patient relationship.
Stanford CS153 Frontier Systems | Scale, AGI, and the Future of Everything
Sam Altman explains how AI has fundamentally altered startup economics, enabling small teams to achieve unprecedented scale, while sharing OpenAI's journey from research lab to product company and arguing that pushing systems beyond conventional scaling limits often reveals emergent properties that consensus thinking misses.