The core signature of chapter 18 is 𝐴,𝐵::=𝑏∣1∣𝐴⊗𝐵∣𝐴⊸𝐵∣𝐴⊕𝐵∣!𝐴,𝑒::=𝑥∣∗∣𝜆𝑥.𝑒∣𝑒1𝑒2∣𝑒1⊗𝑒2∣𝗅𝖾𝗍𝑥⊗𝑦=𝑒1𝗂𝗇𝑒2∣𝗅𝖾𝗍∗=𝑒1𝗂𝗇𝑒2∣𝗂𝗇𝗅𝑒∣𝗂𝗇𝗋𝑒∣𝖼𝖺𝗌𝖾𝑒𝗈𝖿𝗂𝗇𝗅𝑥⇒𝑒1∣𝗂𝗇𝗋𝑦⇒𝑒2∣!𝑣∣𝗅𝖾𝗍!𝑥=𝑒1𝗂𝗇𝑒2,𝑣,𝑤::=𝑥∣∗∣𝜆𝑥.𝑒∣𝑣⊗𝑤∣𝗂𝗇𝗅𝑣∣𝗂𝗇𝗋𝑣∣!𝑣. The judgment is Γ;Δ⊢𝑒:𝐴. Both contexts are finite maps, their domains are disjoint, and exchange is map equality. Write Δ1#Δ2 for disjoint domains and Δ1⊎Δ2 for their union under that premise. Every rule display containing ⊎ carries the corresponding disjointness premise. The thirteen core typing rules are
𝑥:𝐴∈Γ
Γ;⋅⊢𝑥:𝐴
T-UVar
Γ;𝑥:𝐴⊢𝑥:𝐴
T-LVar
Γ;⋅⊢∗:1
T-OneI
Γ;Δ1⊢𝑒1:1Γ;Δ2⊢𝑒2:𝐶
Γ;Δ1⊎Δ2⊢𝗅𝖾𝗍∗=𝑒1𝗂𝗇𝑒2:𝐶
T-OneE
Γ;Δ,𝑥:𝐴⊢𝑒:𝐵
Γ;Δ⊢𝜆𝑥.𝑒:𝐴⊸𝐵
T-LolliI
Γ;Δ1⊢𝑒1:𝐴⊸𝐵Γ;Δ2⊢𝑒2:𝐴
Γ;Δ1⊎Δ2⊢𝑒1𝑒2:𝐵
T-LolliE
Γ;Δ1⊢𝑒1:𝐴Γ;Δ2⊢𝑒2:𝐵
Γ;Δ1⊎Δ2⊢𝑒1⊗𝑒2:𝐴⊗𝐵
T-TensorI
Γ;Δ1⊢𝑒1:𝐴⊗𝐵Γ;Δ2,𝑥:𝐴,𝑦:𝐵⊢𝑒2:𝐶
Γ;Δ1⊎Δ2⊢𝗅𝖾𝗍𝑥⊗𝑦=𝑒1𝗂𝗇𝑒2:𝐶
T-TensorE
Γ;Δ⊢𝑒:𝐴
Γ;Δ⊢𝗂𝗇𝗅𝑒:𝐴⊕𝐵
T-PlusI1
Γ;Δ⊢𝑒:𝐵
Γ;Δ⊢𝗂𝗇𝗋𝑒:𝐴⊕𝐵
T-PlusI2
Γ;Δ0⊢𝑒0:𝐴⊕𝐵Γ;Δ𝑟,𝑥:𝐴⊢𝑒1:𝐶Γ;Δ𝑟,𝑦:𝐵⊢𝑒2:𝐶
Γ;Δ0⊎Δ𝑟⊢𝖼𝖺𝗌𝖾𝑒0𝗈𝖿𝗂𝗇𝗅𝑥⇒𝑒1∣𝗂𝗇𝗋𝑦⇒𝑒2:𝐶
T-Case
Γ;⋅⊢𝑣:𝐴
Γ;⋅⊢!𝑣:!𝐴
T-BangI
Γ;Δ1⊢𝑒1:!𝐴Γ,𝑥:𝐴;Δ2⊢𝑒2:𝐵
Γ;Δ1⊎Δ2⊢𝗅𝖾𝗍!𝑥=𝑒1𝗂𝗇𝑒2:𝐵
T-BangE
The premise of T-BangI is a value and has empty linear context.
Weak left-to-right call-by-value evaluation uses 𝐸::=[]∣𝐸𝑒∣𝑣𝐸∣𝐸⊗𝑒∣𝑣⊗𝐸∣𝗅𝖾𝗍𝑥⊗𝑦=𝐸𝗂𝗇𝑒∣𝗅𝖾𝗍∗=𝐸𝗂𝗇𝑒∣𝗂𝗇𝗅𝐸∣𝗂𝗇𝗋𝐸∣𝖼𝖺𝗌𝖾𝐸𝗈𝖿𝗂𝗇𝗅𝑥⇒𝑒1∣𝗂𝗇𝗋𝑦⇒𝑒2∣𝗅𝖾𝗍!𝑥=𝐸𝗂𝗇𝑒. There is no context beneath a lambda, bang, or unselected branch. The six core roots are
(𝜆𝑥.𝑒)𝑣⟼𝑒[𝑣/𝑥]
E-LinBeta
𝗅𝖾𝗍𝑥⊗𝑦=𝑣⊗𝑤𝗂𝗇𝑒⟼𝑒[𝑣/𝑥,𝑤/𝑦]
E-Tensor
𝗅𝖾𝗍∗=∗𝗂𝗇𝑒⟼𝑒
E-One
𝖼𝖺𝗌𝖾(𝗂𝗇𝗅𝑣)𝗈𝖿𝗂𝗇𝗅𝑥⇒𝑒1∣𝗂𝗇𝗋𝑦⇒𝑒2⟼𝑒1[𝑣/𝑥]
E-InL
𝖼𝖺𝗌𝖾(𝗂𝗇𝗋𝑣)𝗈𝖿𝗂𝗇𝗅𝑥⇒𝑒1∣𝗂𝗇𝗋𝑦⇒𝑒2⟼𝑒2[𝑣/𝑦]
E-InR
𝗅𝖾𝗍!𝑥=!𝑣𝗂𝗇𝑒⟼𝑒[𝑣/𝑥]
E-Bang
The one-step relation is their compatible closure 𝐸[𝑒]⟶𝐸[𝑒′].
For the token extension, fix an infinite set 𝖳𝗈𝗄 and a finite live set 𝐻⊆𝖳𝗈𝗄. Add atomic types 𝖥𝗂𝗅𝖾 and 𝖡𝗒𝗍𝖾𝗌, primitive values 𝗈𝗉𝖾𝗇, 𝗋𝖾𝖺𝖽, and 𝖼𝗅𝗈𝗌𝖾, and runtime values 𝖿𝗂𝗅𝖾ℎ,𝖻𝗒𝗍𝖾𝗌ℎ. The four closed typing axioms are
Γ;⋅⊢𝗈𝗉𝖾𝗇:1⊸𝖥𝗂𝗅𝖾
T-Open
Γ;⋅⊢𝗋𝖾𝖺𝖽:𝖥𝗂𝗅𝖾⊸(𝖥𝗂𝗅𝖾⊗𝖡𝗒𝗍𝖾𝗌)
T-Read
Γ;⋅⊢𝖼𝗅𝗈𝗌𝖾:𝖥𝗂𝗅𝖾⊸1
T-Close
Γ;⋅⊢𝖻𝗒𝗍𝖾𝗌ℎ:𝖡𝗒𝗍𝖾𝗌
T-Bytes
There is no closed source typing axiom for 𝖿𝗂𝗅𝖾ℎ. Instead, 𝐻⊩𝑒:𝐴 means that distinct placeholders (𝑥ℎ)ℎ∈𝐻 and a template 𝑒0 satisfy ⋅;(𝑥ℎ:𝖥𝗂𝗅𝖾)ℎ∈𝐻⊢𝑒0:𝐴,𝑒=𝑒0[𝖿𝗂𝗅𝖾ℎ/𝑥ℎ]ℎ∈𝐻. Core steps leave 𝐻 unchanged, and the additional roots are
ℎ∈𝖳𝗈𝗄∖𝐻
(𝐻,𝗈𝗉𝖾𝗇∗)⟶(𝐻∪{ℎ},𝖿𝗂𝗅𝖾ℎ)
E-Open
ℎ∈𝐻
(𝐻,𝗋𝖾𝖺𝖽𝖿𝗂𝗅𝖾ℎ)⟶(𝐻,𝖿𝗂𝗅𝖾ℎ⊗𝖻𝗒𝗍𝖾𝗌ℎ)
E-Read
ℎ∈𝐻
(𝐻,𝖼𝗅𝗈𝗌𝖾𝖿𝗂𝗅𝖾ℎ)⟶(𝐻∖{ℎ},∗)
E-Close
Finally, the affine, relevant, and unrestricted deltas retain all thirteen core rules with a uniform judgment subscript and add only
Γ;Δ⊢𝑎𝑒:𝐴𝑥∉dom(Γ,Δ)
Γ;Δ,𝑥:𝐵⊢𝑎𝑒:𝐴
W-Aff
Γ;Δ,𝑥:𝐴,𝑦:𝐴⊢𝑟𝑒:𝐵𝑧∉dom(Γ,Δ)
Γ;Δ,𝑧:𝐴⊢𝑟𝑒[𝑧/𝑥,𝑧/𝑦]:𝐵
C-Rel
The unrestricted judgment has both rules with subscript 𝑢; the linear judgment has neither.
Rig-indexed dependent comparison
This source-bounded card is McBride’s dependent calculus [McB16], not an extension of the monomorphic linear calculus above. It borrows dependent-function and bidirectional vocabulary from chapter 26, chapter 27. To avoid collision with the chapter’s structural-regime notation, this card alpha-renames source 𝑅,Γ,Δ,𝜌,𝜋 to Q,Θ,Ξ,𝑞,𝑝. A precontext Θ records variables and types. A Θ-context Ξ marks every variable of that same precontext by a quantity in the rig Q; addition and scalar multiplication of contexts are pointwise. The bidirectional judgments are Ξ⊢𝑞𝑇∋𝑡,Ξ⊢𝑞𝑒∈𝑆. Types are checked at quantity zero. The source application rule is
Ξ0⊢𝑞𝑓∈(𝑝𝑥:𝑆)→𝑇Ξ1⊢𝑞𝑝𝑆∋𝑠
Ξ0+Ξ1⊢𝑞𝑓𝑠∈𝑇[𝑠:𝑆/𝑥]
R-App
Both premises mark one precontext, so a variable can remain available for forming the dependent result type even when its run-time quantity in one premise is zero.
The rigid system has no weakening rule. Section 12 of the source separately orders quantities, extends that order pointwise to contexts, and adds
Ξ⊢𝑞𝑇∋𝑡Ξ≤Ξ′
Ξ′⊢𝑞𝑇∋𝑡
R-Weak
Retaining factorization, splitting, substitution, and safe erasure imposes the additional order conditions stated there. Thus zero-priced contemplation and ordered discardability are different rule cards; neither is a proof-irrelevance principle. Lemma 40’s unique-erasure conclusion has the additional hypothesis 𝑞≠0; the erasure development also assumes 𝑞+𝑝=0⇒𝑞=0=𝑝, the book’s rendering of the source’s “absence of negation” condition.