関数型 プログラミングと型理論 ポータル
1導入
このポータルでは、
2学習順
関数型 プログラミングの動機 として、参照透過性 と第一級関数 を理解 する。変数 の束縛 と自由変数 を定義 する。捕縛回避置換 とα同値 を定義 する。無型 λ計算 のβ簡約 、正規形 、評価戦略 を学習 する。- その
後 にのみ型判断 を導入 し、型付 きλ計算 を学習 する。
3体系 の境界
4論理 への接続
5まとめ
Functional Programming and Type Theory Portal
1Introduction
This portal presents a learning sequence from functional programming through the untyped lambda calculus and typed lambda calculi to the Curry–Howard correspondence. It introduces computational rules and typing rules in separate stages so that claims about distinct calculi are not conflated.
2Learning sequence
- Understand referential transparency and first-class functions as motivations for functional programming.
- Define variable binding and free variables.
- Define capture-avoiding substitution and alpha-equivalence.
- Study beta-reduction, normal forms, and evaluation strategies in the untyped lambda calculus.
- Only then introduce typing judgments and study typed lambda calculi.
At present, this sequence implements only stages 1 through 4. Stage 5 is planned for future lectures.
data/lecture/information/programming-languages/foundation/introduction-to-functional-programming.lecture.n.md data/lecture/information/programming-languages/foundation/variable-binding-and-free-variables-basics.lecture.n.md data/lecture/information/programming-languages/foundation/substitution-and-alpha-equivalence-basics.lecture.n.md data/lecture/information/programming-languages/lambda-calculus/lambda-calculus-basics.lecture.n.md3Boundaries between calculi
Terms of the untyped lambda calculus have no type annotations, and the calculus can express nonterminating terms such as . The simply typed lambda calculus adds typing judgments and restricts attention to typable terms. Consequently, one must neither assume type safety for untyped terms nor extend termination results for the simply typed calculus to all untyped terms.
4Connection to logic
After typed lambda calculi have been introduced, the sequence proceeds to the Curry–Howard correspondence, which interprets types as propositions and terms as proofs. Logical connectives, sets, and maps provide the mathematical prerequisites for that interpretation.
data/lecture/information/discrete-math/logic-and-truth-tables-basics.lecture.n.md data/lecture/information/discrete-math/sets-and-maps-basics.lecture.n.md5Summary
This sequence establishes binding and substitution before introducing the untyped lambda calculus, and it addresses the relationship between types and logic only afterward.