Lectures onType Theory
Accessibility, Mendler iteration, and guarded observations
appendix sectionrules

Accessibility, Mendler iteration, and guarded observations

Accessibility

For A:Ui, R:AAUj, and a:A, the selected accessibility family is governed in the fixed order

ΓA:UiΓR:AAUjΓa:A
ΓAccR(a):Uij
Acc-form
Γa:AΓh:b:AbRaAccR(b)
Γacca(h):AccR(a)
Acc-intro

For P:a:AAccR(a)Uk, abbreviate H(a):=b:AbRaAccR(b),K(a,h):=b:Ar:bRaP(b,hbr),StepP:=a:Ah:H(a)K(a,h)P(a,acca(h)). Elimination and computation are

ΓP:a:AAccR(a)UkΓa:AΓs:StepPΓp:AccR(a)
ΓaccindP(s,a,p):P(a,p)
Acc-elim

Put accStepP(s,a,h):=s(a,h,λb.λr.accindP(s,b,hbr)).

ΓP:a:AAccR(a)UkΓa:AΓs:StepPΓh:H(a)
accindP(s,a,acca(h))accStepP(s,a,h):P(a,acca(h))
Acc-β

The proof-relevant strict order on naturals used by chapter 32 has constructors

Γn:N
ΓltZero(n):0<suc(n)
Lt-zero
Γp:m<n
ΓltSuc(p):suc(m)<suc(n)
Lt-suc

The selected Mendler interface

For the fixed interface of chapter 84, the complete rule sequence is

ΓF:UiUi
ΓμMF:Ui
Mendler-form
Γu:F(μMF)
ΓinFM(u):μMF
Mendler-intro
ΓA:UiΓϕ:R:Ui(RA)F(R)A
ΓmfoldF(ϕ):μMFA
Mendler-elim
Γϕ:R:Ui(RA)F(R)AΓu:F(μMF)
mfoldF(ϕ)(inFM(u))ϕ(μMF,mfoldF(ϕ),u):A
Mendler-β

There is no destructor and no implicit F-action.

Guarded streams and bounded approximants

The complete stream fragment is

ΓA:Ui
ΓStream(A):Ui
Stream-form
Γs:Stream(A)
Γhead(s):A
Head
Γs:Stream(A)
Γtail(s):Stream(A)
Tail
ΓS:UjΓh:SAΓt:SSΓx:S
ΓcorecA(S,h,t,x):Stream(A)
Stream-corec

Its computation equations are head(corecA(S,h,t,x))h(x),tail(corecA(S,h,t,x))corecA(S,h,t,t(x)). For the finite record schema, destructors oi:COi and dj:CC satisfy oi(corecC(S,h¯,t¯,x))hi(x),dj(corecC(S,h¯,t¯,x))corecC(S,h¯,t¯,tj(x)). Every recursive occurrence is the complete result of a dj observation.

For α:Size, bounded approximants have

ΓA:UjΓα:Size
ΓStreamα(A):Uj
Sized-Stream-form
Γs:Streamα(A)
Γheadα(s):A
Sized-head
Γr:β<sαΓs:Streamα(A)
Γtailα,β(r,s):Streamβ(A)
Sized-tail

Given the S,h,t of definition 85.22,

Γx:S(α)
ΓcorecAα(S,h,t,x):Streamα(A)
Sized-corec

Its head computes to h(α,x); its tail at r:β<sα computes to corecAβ(S,h,t,t(α,β,r,x)).

Search the book

Type to search the local edition.