Lectures onType Theory
Indexed signatures, records, and descriptions
appendix sectionrules

Indexed signatures, records, and descriptions

Vec, Fin, and valid case trees

For A:Ui the indexed family is formed and introduced by ΓA:UiΓn:NΓVec(A,n):UiVecform ΓA:UiΓvnil:Vec(A,0)Vecintro0 Γn:NΓa:AΓxs:Vec(A,n)Γvcons(n,a,xs):Vec(A,suc(n))Vecintros. Writing P0=P(0,vnil) and Ps=P(suc(n),vcons(n,a,xs)), elimination is Γ,n:N,v:Vec(A,n)P(n,v):UjΓp0:P0Γ,n:N,a:A,xs:Vec(A,n),q:P(n,xs)ps:PsΓm:NΓys:Vec(A,m)Γvind(P;p0;ps;m,ys):P(m,ys)Vecelim. Its two computations are printed separately to expose their constructor premises. Abbreviate rn,xs:=vind(P;p0;ps;n,xs) and Vn,a,xs:=vind(P;p0;ps;suc(n),vcons(n,a,xs)). ΓP motiveΓp0:P0Γvind(P;p0;ps;0,vnil)p0:P0Veccomp1 Γn:NΓa:AΓxs:Vec(A,n)ΓVn,a,xsps[n,a,xs,rn,xs]:PsVeccomp2

Finind has fz(n):Finind(suc(n)) and fs(n,k):Finind(suc(n)) from k:Finind(n). For Q(n,k):Uj, methods qz:(n:N)Q(suc(n),fz(n)),qs:(n:N)(k:Finind(n))Q(n,k)Q(suc(n),fs(n,k)). give the full elimination rule Γ,n:N,k:Finind(n)Q(n,k):UjΓqz:(n:N)Q(suc(n),fz(n))Γqs:(n:N)(k:Finind(n))Q(n,k)Q(suc(n),fs(n,k))Γm:NΓl:Finind(m)Γfind(Q;qz;qs;m,l):Q(m,l)Finelim. Its computations are find(Q;qz;qs;suc(n),fz(n))qz(n),find(Q;qz;qs;suc(n),fs(n,k))qs(n,k,find(Q;qz;qs;n,k)).

Put CompC(f):=(t:Δ)(u:T).CTC(t,u)ftu[f/f]. The case-tree compiler has the theorem rule f:(t:Δ)T has a valid case tree CC uses no deletionevery injectivity step first self-unifies the constructor indexf:(t:Δ)T.CompC(f)Compile. Validity also includes well-typed leaves, dependency-preserving unifier factorizations, structural recursion, and the proof-relevant basic-analysis, specialization, and no-confusion transitions of definition 78.15. These are premises, not consequences of an unrestricted coverage checker.

For IR signatures, intro:ES(IR(S),El)IR(S) and El(intro(x))FS(x). IIR adds an index to IR and to the decoder. The context/type IIT has simultaneous Con and Ty:ConU eliminators with the four computations for empty, extension, universe, and decoding recorded in section 78.5.

Pollack true records

ΓL typeΓ,l:LA typeΓL,r:A typeRecform ΓL,r:A typeΓl:LΓa:A(l)Γl,r=a:L,r:ARecintro. Restriction removes the visible field and projection returns it: Γl:L,r:AΓl|r:LRecrestΓl:L,r:AΓl.r:A[l|r/x]Recproj. The computation equations, including right-to-left passing, are l,r=a|rl,l,r=a.ra,l|p(l|r)|p(rp),l.p(l|r).p(rp). The pass-typing schemas reconstruct the recursively established searched field type P: Γl:L,r:AΓ(l|r)|p:PrpΓl|p:PRecrestpass Γl:L,r:AΓ(l|r).p:PrpΓl.p:PRecprojpass. Repeated labels select the rightmost occurrence. There is no width rule and no judgmental record eta.

Regular and indexed description codes

The finite regular normal form has one, K(A), X(j), sum, product, and finite-tag sigma(A,F). For X:IUi its interpretation is [[one]](X):=1,[[K(A)]](X):=A,[[X(j)]](X):=X(j),[[D+E]](X):=[[D]](X)+[[E]](X),[[D×E]](X):=[[D]](X)×[[E]](X),[[sigma(A,F)]](X):=a:A[[F(a)]](X). For D:IDesci(I), fixed-point formation, introduction, and observation are ΓI:UiΓ,j:ID(j):Desci(I)ΓMu(D):IUiMuform Γj:IΓu:[[D(j)]](Mu(D))Γrollj(u):Mu(D)(j)Muintro outj:Mu(D)(j)[[D(j)]](Mu(D)) with outj(rollj(u))u. For P:(j:I)Mu(D)(j)Uk, define All structurally, with AllX(j)(P,x)=P(j,x) and products of hypotheses at product codes. The induction rule and computation are s:(j:I)(u:[[D(j)]](Mu(D)))AllD(j)(P,u)P(j,rollj(u))t:Mu(D)(j)indD(P,s;j,t):P(j,t)Descind indD(P,s;j,rollj(u))sj(u,callsD(j)(P,indD(P,s),u)). The principal MAG universe separately has input variables, 0, 1, Σf, Πf, and μ. Its Σf interpretation stores a witness, an equality f(o)=o, and the branch payload; Πf quantifies over such witnesses. Decidable equality is defined only on the finite EqDesc grammar of unit, decidable constants, recursive positions, sums, and products.

Search the book

Type to search the local edition.