What logic can teach us, Scala programmers
summary
Uses Scala 3 to encode propositions as types and proofs as programs, implementing examples from propositional logic, Aristotle syllogisms and Smullyan knights-and-knaves. Demonstrates mechanical type-driven development: lambda introduction, pattern-match destructors, hole-filling that produces code which compiles. Shows when proofs fail intuitionistically (need law of excluded middle to recover classical tautologies), models predicates with path-dependent types and universals with dependent function types, and provides a working repo with implementations for 24 Aristotle syllogisms.
AI-written summary · about
chapters (6)
- 0:00Introduction to logic and Scala
- 1:52Propositional logic in Scala
- 21:14First-order logic with syllogisms
- 35:58Second-order logic puzzles
- 47:16Lessons and takeaways
- 51:10Resources and conclusion
related talks
37mIn Types We Trust
01h 34mFormal Logic Undressed
44mIn Types We Trust
23mReasoning about types and code
41mThe Dialectics of Type-Level Programming
01h 01mLearning Propositional Logic with Logic Programming
56mCalculating Intuitionistic Logic in Scala
15mLogic Programming with Extensible Types (Lightning talk)
