Lectures onType Theory
Modular, linear, quantitative, and graded dependent systems
appendix sectionrules

Modular, linear, quantitative, and graded dependent systems

The λΠ-calculus modulo rewriting

The frozen framework rules are

x:AΓ
Σ;Γx:A
Mod-Var
c:AΣ
Σ;Γc:A
Mod-Const
Σ;Γ ctx
Σ;ΓType:Kind
Mod-Type
Σ;ΓA:TypeΣ;Γ,x:AB:s
Σ;Γx:AB:s
Mod-Pi
Σ;ΓA:TypeΣ;Γ,x:At:BBKind
Σ;Γλx:A.t:x:AB
Mod-Lam
Σ;Γf:x:ABΣ;Γu:A
Σ;Γfu:B[u/x]
Mod-App
Σ;Γt:AAβΣBΣ;ΓB:s
Σ;Γt:B
Mod-Conv
rΣθ:dom(Δ)Term
C[θ]ΣC[rθ]
Mod-Rewrite
C[(λx:A.t)u]βC[t[u/x]]
Mod-Beta

For Mod-Rewrite, the declaration card also requires a constant-headed, lambda-free, left-linear, algebraic left side, exactly the variables of Δ, and Σ;Δ:T together with Σ;Δr:T. Both reductions are raw and compatible under capture-avoiding one-hole contexts; typing enters only through subject reduction.

Linear dependent type theory

Formation sees only the shape of a state-bearing argument:

Φ,x:Sh(A)B[x]:
Φ(x:A)B[x]:
LD-μltimap-F
Φ,x:Sh(A)B[x]:
Φ(x:A)B[x]:
LD-⊗-F
Φ,x:P1P2[x]:
Φ(x:P1)P2[x]:
LD-→-F
ΦA:
Φ!A:
LD-!-F

The term rules that expose resource splitting are

0Γ,x:1A,0Γ ctx
0Γ,x:1A,0Γx:A
LD-Var
Γ,x:kAM:B[x]k1A=P
Γλx.M:(x:A)B[x]
LD-Lam
Γ1M:(x:A)B[x]Γ2N:A
Γ1+Γ2MN:B[Sh(N)]
LD-App
Γ1M:AΓ2N:B[Sh(M)]
Γ1+Γ2(M,N):(x:A)B[x]
LD-Pair
Γ1M:(x:A)B[x]Γ2,x:k1A,y:k2B[x]N:Ck1=0A=P1k2=0B[x]=P2[x]
Γ1+Γ2let(x,y)=MinN:C
LD-Let
ΦM:A
ΦliftM:!A
LD-Lift
ΓM:!A
ΓforceM:A
LD-Force
Φ,x:P1R:P2[x]
Φλx.R:(x:P1)P2[x]
LD-Param-Lam
ΦR1:(x:P1)P2[x]ΦR2:P1
ΦR1@R2:P2[R2/x]
LD-Param-App
ΦR:!A
ΦforceR:Sh(A)
LD-Param-Force

The evaluation and semantic-conversion roots are

Mλx.MNVM[V/x]W
MNW
LD-Eval-App
M(V1,V2)N[V1/x,V2/y]W
let(x,y)=MinNW
LD-Eval-Let
ΓM:A[R]RevR
ΓM:A[R]
LD-ConvEval

Quantitative dependent type theory

For the selected semiring, the variable rule and the dependent function and tensor rules are

0Γ,x:σS,0Γ
0Γ,x:σS,0Γx:σS
QTT-Var

where σ{0,1}, followed by

0ΓS0Γ,x:0ST
0Γ(x:πS)T
QTT-Π-F
Γ,x:σπSM:σT
Γλx.M:σ(x:πS)T
QTT-Lam
Γ1M:σ(x:πS)TΓ2N:σSσ=0(π=0 or σ=0)
Γ1+πΓ2MN:σT[N/x]
QTT-App
0ΓS0Γ,x:0ST
0Γ(x:πS)T
QTT-⊗-F
Γ1M:σSΓ2N:σT[M/x]σ=0(π=0 or σ=0)
πΓ1+Γ2(M,N):σ(x:πS)T
QTT-Pair
0Γ1,z:0((x:πS)T)UΓ1P:σ(x:πS)TΓ2,x:σπS,y:σTN:σU[(x,y)/z]0Γ1=0Γ2
Γ1+Γ2let(x,y)=PinN:σU[P/z]
QTT-Let

Graded modal dependent type theory

The universe and variable roots are

ΔΓ
(Δ00)ΓTypel:Typesucl
G-Type
Δ1,σ,Δ2Γ1,x:A,Γ2|Δ1|=|Γ1|
(Δ1,σ,Δ20|Δ1|,1,0σ,0,0)Γ1,x:A,Γ2x:A
G-Var

The exact function rules used in the chapter are

(Δσ10)ΓA:Typel1(Δ,σ1σ2,r0)Γ,x:AB:Typel2
(Δσ1+σ20)Γ(x:(s,r)A)B:Typel1l2
G-Π-F
(Δ,σ1σ3,r0)Γ,x:AB:Typel(Δ,σ1σ2,sσ3,r)Γ,x:At:B
(Δσ2σ1+σ3)Γλx.t:(x:(s,r)A)B
G-Lam
(Δ,σ1σ3,r0)Γ,x:AB:Typel(Δσ2σ1+σ3)Γf:(x:(s,r)A)B(Δσ4σ1)Γu:A
(Δσ2+sσ4σ3+rσ4)Γfu:B[u/x]
G-App

The dependent tensor rules are

(Δσ10)ΓA:Typel(Δ,σ1σ2,r0)Γ,x:AB:Typel
(Δσ1+σ20)Γ(x:rA)B:Typel
G-⊗-F
(Δ,σ1σ3,r0)Γ,x:AB:Typel(Δσ2σ1)Γt1:A(Δσ4σ3+rσ2)Γt2:B[t1/x]
(Δσ2+σ4σ1+σ3)Γ(t1,t2):(x:rA)B
G-Pair
(Δσ3σ1+σ2)Γt1:(x:rA)B(Δ,σ1+σ2σ5,r0)Γ,z:(x:rA)BC:Typel(Δ,σ1,(σ2,r)σ4,s,sσ5,r,r)Γ,x:A,y:Bt2:C[(x,y)/z]
(Δσ4+sσ3σ5+rσ3)Γlet(x,y)=t1int2:C[t1/z]
G-Let

The modality rules are

(Δσ0)ΓA:Typel
(Δσ0)ΓsA:Typel
G-Box-F
(Δσ1σ2)Γt:A
(Δsσ1σ2)Γboxt:sA
G-Box-I
(Δ,σ2σ4,r0)Γ,z:sAB:Typel(Δσ1σ2)Γt1:sA(Δ,σ2σ3,sσ4,sr)Γ,x:At2:B[boxx/z]
(Δσ1+σ3σ4+rσ1)Γletboxx=t1int2:B[t1/z]
G-Box-E

The beta roots are let(x,y)=(t,u)invβv[t/x,u/y] and letboxx=boxtinuβu[t/x]. No tensor or box eta rule is imported. Appendix D records that the strong-normalization use is restricted to GrTT0,1.

Search the book

Type to search the local edition.