全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Simply typed λ-calculus?

又称: simply typed lambda-calculus

Definition 6.3 University Computer Science — Year 3 · 第 6 章 — Type Systems and Type Inference

The simply typed λ\lambda-calculus is the λ\lambda-calculus restricted to terms that have a type under rules var, abs and app, with each parameter annotated by its type and a set of base types.

 x:int⊢x:int var x:int⊢2:intx:int⊢x×2:int op⊢λx:int. x×2:int→int abs\begin{gather*}{\dfrac{{\dfrac{{\dfrac{\ }{x : \mathtt{int} \vdash x : \mathtt{int}}\,\scriptstyle\text{var}} \qquad {\dfrac{\ }{x : \mathtt{int} \vdash 2 : \mathtt{int}}}}{x : \mathtt{int} \vdash x \times 2 : \mathtt{int}}\,\scriptstyle\text{op}}}{\vdash \lambda x{:}\mathtt{int}.\,x \times 2 : \mathtt{int} \to \mathtt{int}}\,\scriptstyle\text{abs}}\end{gather*}
Four judgements, the last four lines of Output 6.1, as a tree. The leaves need no premise: a variable is looked up in the context, a constant has its type.
在原文中阅读 →