Mathematical proofs are built upon valid inference structures; in formal logic, we express these structures with precise and succinct symbols, and study their properties. This course module focuses on the natural deduction system of propositional intuitionistic logic, introduces the basic syntactic and semantic proof methods used in formal logic, and points out the intimate relationship between logic and computation, leading into the topic of dependently typed programming. By studying the inference structures formally, this course module also introduces the necessary proof techniques used in other modules.
Nowadays many languages such as Haskell and Agda are based on variants of λ-calculus. In this course module, we will investigate λ-calculus and its notions and properties mathematically. For example, we will define computation and computational equivalence; after introducing types, we show how ‘a well-typed program does not go wrong’. Apart from theoretical interests, we also discuss a prevalent language feature —polymorphism— which has been applied to solve the code duplication problem in practice. Continuing into the dependently typed programming module, we will use Agda to implement λ-calculus and prove its properties.
|上午||Functional Programming 0Inductive definitions||Functional Programming 1Folds||λ-Calculus 0Untyped λ-Calculus||λ-Calculus 1Simply typed λ-Calculus||λ-Calculus 2Polymorphic λ-Calculus|
|下午||Logic 0Propositional logic & natural deduction||Logic 1Classical semantics of propositional logic||Functional Programming 2Red-black trees||Logic 2Curry–Howard correspondence||討論Discussion|
|上午||Monad and Side Effects 0Dualism: Pure programming with effects, monad, type classes||Monad and Side Effects 1Choices: Nondeterministic search & lazy sharing, parsing, probabability||Monad and Side Effects 2AI: Gradient descent, automatic differentiation, equational reasoning||Monad and Side Effects 3Optional topics||考試Exam|
|下午||Dependently Typed Programming 0Indexed datatypes & dependent pattern matching||Dependently Typed Programming 1Shallow embedding of higher-order logic & deep embedding of propositional logic||Dependently Typed Programming 2Formalisation of simply typed λ-Calculus||討論Discussion|