The type-variable context Δ is a list of distinct variables; every type in Γ is formed under Δ. Formation and Church typing are the following complete rules.
⋅𝗍𝗒𝗉𝖾𝖼𝗍𝗑
F-Δ-Emp
Δ𝗍𝗒𝗉𝖾𝖼𝗍𝗑𝑋∉Δ
Δ,𝑋𝗍𝗒𝗉𝖾𝖼𝗍𝗑
F-Δ-Ext
Δ𝗍𝗒𝗉𝖾𝖼𝗍𝗑
Δ⊢⋅𝖼𝗍𝗑
F-Γ-Emp
Δ⊢Γ𝖼𝗍𝗑Δ⊢𝐴𝗍𝗒𝗉𝖾𝑥∉dom(Γ)
Δ⊢Γ,𝑥:𝐴𝖼𝗍𝗑
F-Γ-Ext
𝑋∈Δ
Δ⊢𝑋𝗍𝗒𝗉𝖾
F-Ty-Var
Δ⊢𝐴𝗍𝗒𝗉𝖾Δ⊢𝐵𝗍𝗒𝗉𝖾
Δ⊢𝐴→𝐵𝗍𝗒𝗉𝖾
F-Ty-Arr
Δ,𝑋⊢𝐴𝗍𝗒𝗉𝖾𝑋∉Δ
Δ⊢∀𝑋.𝐴𝗍𝗒𝗉𝖾
F-Ty-All
𝑥:𝐴∈Γ
Δ;Γ⊢𝑥:𝐴
F-Var
Δ;Γ,𝑥:𝐴⊢𝑡:𝐵
Δ;Γ⊢𝜆𝑥:𝐴.𝑡:𝐴→𝐵
F-Arr-I
Δ;Γ⊢𝑡:𝐴→𝐵Δ;Γ⊢𝑢:𝐴
Δ;Γ⊢𝑡𝑢:𝐵
F-Arr-E
Δ,𝑋;Γ⊢𝑡:𝐴𝑋∉Δ
Δ;Γ⊢Λ𝑋.𝑡:∀𝑋.𝐴
F-All-I
Δ;Γ⊢𝑡:∀𝑋.𝐴Δ⊢𝐵𝗍𝗒𝗉𝖾
Δ;Γ⊢𝑡[𝐵]:𝐴[𝐵/𝑋]
F-All-E
The two compatible beta roots are (𝜆𝑥:𝐴.𝑡)𝑢⟶𝛽𝑡[𝑢/𝑥],(Λ𝑋.𝑡)[𝐵]⟶𝛽𝑡[𝐵/𝑋]. The relation ⟶𝛽 is closed under both sides of application, the bodies of 𝜆 and Λ, and the operator of type application. Equivalently, from 𝑡⟶𝛽𝑡′ one may infer 𝜆𝑥:𝐴.𝑡⟶𝛽𝜆𝑥:𝐴.𝑡′,Λ𝑋.𝑡⟶𝛽Λ𝑋.𝑡′,𝑡[𝐵]⟶𝛽𝑡′[𝐵],𝑡𝑢⟶𝛽𝑡′𝑢,𝑢𝑡⟶𝛽𝑢𝑡′. The call-by-value subrelation instead uses 𝑣::=𝜆𝑥:𝐴.𝑡∣Λ𝑋.𝑡,𝐸::=[]∣𝐸𝑡∣𝑣𝐸∣𝐸[𝐴], closes the two beta roots only under 𝐸, and requires a value argument at the term-beta root. This is the operational system of definition 5.8. For confluence, the complete parallel beta relation is
𝑥⇛𝛽𝑥
P-Var
𝑠⇛𝛽𝑠′
𝜆𝑥:𝐴.𝑠⇛𝛽𝜆𝑥:𝐴.𝑠′
P-Lam
𝑠⇛𝛽𝑠′𝑢⇛𝛽𝑢′
𝑠𝑢⇛𝛽𝑠′𝑢′
P-App
𝑠⇛𝛽𝑠′
Λ𝑋.𝑠⇛𝛽Λ𝑋.𝑠′
P-TLam
𝑠⇛𝛽𝑠′
𝑠[𝐴]⇛𝛽𝑠′[𝐴]
P-TApp
𝑠⇛𝛽𝑠′𝑢⇛𝛽𝑢′
(𝜆𝑥:𝐴.𝑠)𝑢⇛𝛽𝑠′[𝑢′/𝑥]
P-Beta
𝑠⇛𝛽𝑠′
(Λ𝑋.𝑠)[𝐴]⇛𝛽𝑠′[𝐴/𝑋]
P-TBeta
For Curry System F, erase the annotations, Λ, and type application from the term grammar. Its complete typing rules are
𝑥:𝐴∈Γ
Δ;Γ⊢𝐶𝑥:𝐴
C-Var
Δ;Γ,𝑥:𝐴⊢𝐶𝑚:𝐵
Δ;Γ⊢𝐶𝜆𝑥.𝑚:𝐴→𝐵
C-Arr-I
Δ;Γ⊢𝐶𝑚:𝐴→𝐵Δ;Γ⊢𝐶𝑛:𝐴
Δ;Γ⊢𝐶𝑚𝑛:𝐵
C-Arr-E
Δ,𝑋;Γ⊢𝐶𝑚:𝐴𝑋∉Δ
Δ;Γ⊢𝐶𝑚:∀𝑋.𝐴
C-All-I
Δ;Γ⊢𝐶𝑚:∀𝑋.𝐴Δ⊢𝐵𝗍𝗒𝗉𝖾
Δ;Γ⊢𝐶𝑚:𝐴[𝐵/𝑋]
C-All-E
Chapter 6 changes none of these syntax, formation, typing, or reduction rules. Its relations live in the metatheory over closed typed beta-classes; the relational interpretation and abstraction theorem are therefore recorded in appendix C, appendix D rather than as a second object-language rule table.