Lectures onType Theory
Graded bases, temporal typing, and soft logic
appendix sectionrules

Graded bases, temporal typing, and soft logic

Chapter 54: two graded bases

Linear Base has types K, AB, and rA, with linear assumptions x:A and graded assumptions x:[A]r. Context sum is partial: linear domains must be disjoint, while repeated graded assumptions have equal types and add grades. Its complete rule signature is

x:ALx:A
L-Var
Γ,x:ALt:B
ΓLλx.t:AB
L-Abs
Γ1Lt:ABΓ2Lu:A
Γ1+Γ2Ltu:B
L-App
ΓLt:Agr0(Γ)
Γ+ΓLt:A
L-Weak
Γ,x:ALt:B
Γ,x:[A]1Lt:B
L-Der
ΓLt:Agr(Γ)
rΓL[t]:rA
L-Prom
Γ1Lt:rAΓ2,x:[A]rLu:B
Γ1+Γ2Llet[x]=tinu:B
L-Let
Γ,x:[A]rLt:Brqs
Γ,x:[A]sLt:B
L-Approx

Its principal call-by-name steps are (λx.t)uLt[u/x] and let[x]=[t]inuLu[t/x], with function- and scrutinee-position congruence.

Graded Base has ArB and only assumptions x:rA. Its complete rules are

x:1AGx:A
G-Var
ΔGt:A
Δ,0ΔGt:A
G-Weak
Δ,x:rAGt:Brqs
Δ,x:sAGt:B
G-Approx
Δ,x:rAGt:B
ΔGλx.t:ArB
G-Abs
Δ1Gt:ArBΔ2Gu:A
Δ1+rΔ2Gtu:B
G-App

Its principal step is (λx.t)uGt[u/x], and graded substitution concludes Δ+rΘGt[u/x]:B.

The direct translation sends ArB to rL[[A]]L[[B]], boxes every argument, and unboxes at every abstraction. The reverse CPS translation sends rA to (G[[A]]rK)1K.

The separate combined effect–coeffect calculus has A::=oABTeADrA. Context sum repeats only discharged assumptions, adding their coeffect grades; r[Γ] scales a fully discharged context. Its complete typing rules are

x:Ax:A
EC-Ax
Γt:AΓ<:ecΓA<:ecB
Γ,[Δ]0t:B
EC-Sub
Γ,x:At:B
Γλx.t:AB
EC-Abs
Γt:ABΔu:A
Γ+Δtu:B
EC-App
Γt:A
Γt:T1A
EC-Unit
Γt1:TeAΔ,x:At2:TfB
Γ+Δletx=t1int2:TefB
EC-LetT
Γ,x:At:B
Γ,x:[A]1t:B
EC-Der
[Γ]t:B
r[Γ][t]:DrB
EC-Pr
Γt1:DrAΔ,x:[A]rt2:B
Γ+Δlet[x]=t1int2:B
EC-LetD
distr,eϕ:Fr,eϕAGr,eϕA
EC-Dist
op:Aop
EC-Op

Subtyping is generated by reflexivity, arrow variance, pointwise context variance, and A<:ecAefTeA<:ecTfAA<:ecAsrDrA<:ecDsAA<:ecAsr[A]r<:ec[A]s. Linear substitution replaces x:A and adds the substituted context; coeffectful substitution replaces x:[A]r and adds r[Δ].

Chapter 55: Simply RaTT

Contexts contain assumptions, one optional lock , and one optional tick , with the tick to the right of the lock. Its complete chapter rule card is

tokenFree(Γ)
Γ,x:A,Γx:A
RaTT-Var
Γ,x:At:BtickFree(Γ)
Γλx.t:AB
RaTT-Abs
Γt:ABΓu:A
Γtu:B
RaTT-App
Γ,t:A
Γdelayt:A
RaTT-Delay
Γt:AΓ,,Γctx
Γ,,Γadvt:A
RaTT-Adv
Γ,t:A
Γboxt:A
RaTT-Box
Γt:AtokenFree(Γ)
Γ,,Γunboxt:A
RaTT-Unbox
Γt:AAstableΓ,,Γctx
Γ,,Γprogresst:A
RaTT-Progress
Γt:AAstableΓ,,Γctx
Γ,,Γpromotet:A
RaTT-Promote
Γ,,x:At:A
Γfixx.t:A
RaTT-Fix

Stable types are generated by unit, naturals, boxed types, products, and sums.

The source-gated temporal-resource calculus uses ΓV:X and ΓM:X!τ. Its four temporal typing rules are

ΓM:X!τΓ,τ,x:XN:Y!τ
Γlet x=M in N:Y!(τ+τ)
TR-Let
Γ,τM:X!τ
Γdelay τ M:X!(τ+τ)
TR-Delay
Γ,τV:XΓ,x:[τ]XN:Y!τ
Γbox[τ]V as x in N:Y!τ
TR-Box
ττΓΓτV:[τ]XΓ,x:XN:Y!τ
Γunbox[τ]V as x in N:Y!τ
TR-Unbox

Its state rules for delay, box, and unbox are the three transitions printed in section 55.6; ordinary application, matching, let, operations, and handlers use the paper’s fine-grain call-by-value rules.

Chapter 56: SLL2

The non-exponential ILL2 rules retained by SLL2 are

AA
Id
ΓAΔ,AC
Γ,ΔC
Cut
Γ,A,B,ΔC
Γ,B,A,ΔC
Exch
Γ,AB
ΓAB
μltimapR
ΓAΔ,BC
Γ,Δ,ABC
μltimapL
ΓAΔB
Γ,ΔAB
⊗R
Γ,A,BC
Γ,ABC
⊗L
1
1R
ΓC
Γ,1C
1L
ΓAΓB
ΓA&B
&R
Γ,AC
Γ,A&BC
&L_1
Γ,BC
Γ,A&BC
&L_2
ΓAαfv(Γ)
Γα.A
Γ,A[B/α]C
Γ,α.AC

SLL2 replaces the ordinary exponential rules by exactly

A1,,AmB
!A1,,!Am!B
Soft-Promotion
Γ,A,,AnC
Γ,!AC
Multiplexing

There is no digging. Proof-net weight is defined by atomic right cells of weight 1, left cells and multiplexors of weight 0, and Wu&v=Wu+Wv+1,W!u=XWu+1,Wα.u=Wu+1. For a rank-n net, every external reduction strictly decreases Wu(n).

Search the book

Type to search the local edition.