Accessibility, Mendler iteration, and guarded observations
appendix sectionrules
Accessibility, Mendler iteration, and guarded observations
Accessibility
For 𝐴:U𝑖, 𝑅:𝐴→𝐴→U𝑗, and 𝑎:𝐴, the selected accessibility family is governed in the fixed order
Γ⊢𝐴:U𝑖Γ⊢𝑅:𝐴→𝐴→U𝑗Γ⊢𝑎:𝐴
Γ⊢𝖠𝖼𝖼𝑅(𝑎):U𝑖⊔𝑗
Acc-form
Γ⊢𝑎:𝐴Γ⊢ℎ:∏𝑏:𝐴𝑏𝑅𝑎→𝖠𝖼𝖼𝑅(𝑏)
Γ⊢𝖺𝖼𝖼𝑎(ℎ):𝖠𝖼𝖼𝑅(𝑎)
Acc-intro
For 𝑃:∏𝑎:𝐴𝖠𝖼𝖼𝑅(𝑎)→U𝑘, abbreviate 𝐻(𝑎):=∏𝑏:𝐴𝑏𝑅𝑎→𝖠𝖼𝖼𝑅(𝑏),𝐾(𝑎,ℎ):=∏𝑏:𝐴∏𝑟:𝑏𝑅𝑎𝑃(𝑏,ℎ𝑏𝑟),𝖲𝗍𝖾𝗉𝑃:=∏𝑎:𝐴∏ℎ:𝐻(𝑎)𝐾(𝑎,ℎ)→𝑃(𝑎,𝖺𝖼𝖼𝑎(ℎ)). Elimination and computation are
Γ⊢𝑃:∏𝑎:𝐴𝖠𝖼𝖼𝑅(𝑎)→U𝑘Γ⊢𝑎:𝐴Γ⊢𝑠:𝖲𝗍𝖾𝗉𝑃Γ⊢𝑝:𝖠𝖼𝖼𝑅(𝑎)
Γ⊢𝖺𝖼𝖼𝗂𝗇𝖽𝑃(𝑠,𝑎,𝑝):𝑃(𝑎,𝑝)
Acc-elim
Put 𝖺𝖼𝖼𝖲𝗍𝖾𝗉𝑃(𝑠,𝑎,ℎ):=𝑠(𝑎,ℎ,𝜆𝑏.𝜆𝑟.𝖺𝖼𝖼𝗂𝗇𝖽𝑃(𝑠,𝑏,ℎ𝑏𝑟)).
Γ⊢𝑃:∏𝑎:𝐴𝖠𝖼𝖼𝑅(𝑎)→U𝑘Γ⊢𝑎:𝐴Γ⊢𝑠:𝖲𝗍𝖾𝗉𝑃Γ⊢ℎ:𝐻(𝑎)
𝖺𝖼𝖼𝗂𝗇𝖽𝑃(𝑠,𝑎,𝖺𝖼𝖼𝑎(ℎ))≡𝖺𝖼𝖼𝖲𝗍𝖾𝗉𝑃(𝑠,𝑎,ℎ):𝑃(𝑎,𝖺𝖼𝖼𝑎(ℎ))
Acc-β
The proof-relevant strict order on naturals used by chapter 32 has constructors
Γ⊢𝑛:ℕ
Γ⊢𝗅𝗍𝖹𝖾𝗋𝗈(𝑛):𝟢<𝗌𝗎𝖼(𝑛)
Lt-zero
Γ⊢𝑝:𝑚<𝑛
Γ⊢𝗅𝗍𝖲𝗎𝖼(𝑝):𝗌𝗎𝖼(𝑚)<𝗌𝗎𝖼(𝑛)
Lt-suc
The selected Mendler interface
For the fixed interface of chapter 84, the complete rule sequence is
Γ⊢𝐹:U𝑖→U𝑖
Γ⊢𝜇𝖬𝐹:U𝑖
Mendler-form
Γ⊢𝑢:𝐹(𝜇𝖬𝐹)
Γ⊢𝗂𝗇𝖬𝐹(𝑢):𝜇𝖬𝐹
Mendler-intro
Γ⊢𝐴:U𝑖Γ⊢𝜙:∏𝑅:U𝑖(𝑅→𝐴)→𝐹(𝑅)→𝐴
Γ⊢𝗆𝖿𝗈𝗅𝖽𝐹(𝜙):𝜇𝖬𝐹→𝐴
Mendler-elim
Γ⊢𝜙:∏𝑅:U𝑖(𝑅→𝐴)→𝐹(𝑅)→𝐴Γ⊢𝑢:𝐹(𝜇𝖬𝐹)
𝗆𝖿𝗈𝗅𝖽𝐹(𝜙)(𝗂𝗇𝖬𝐹(𝑢))≡𝜙(𝜇𝖬𝐹,𝗆𝖿𝗈𝗅𝖽𝐹(𝜙),𝑢):𝐴
Mendler-β
There is no destructor and no implicit 𝐹-action.
Guarded streams and bounded approximants
The complete stream fragment is
Γ⊢𝐴:U𝑖
Γ⊢𝖲𝗍𝗋𝖾𝖺𝗆(𝐴):U𝑖
Stream-form
Γ⊢𝑠:𝖲𝗍𝗋𝖾𝖺𝗆(𝐴)
Γ⊢𝗁𝖾𝖺𝖽(𝑠):𝐴
Head
Γ⊢𝑠:𝖲𝗍𝗋𝖾𝖺𝗆(𝐴)
Γ⊢𝗍𝖺𝗂𝗅(𝑠):𝖲𝗍𝗋𝖾𝖺𝗆(𝐴)
Tail
Γ⊢𝑆:U𝑗Γ⊢ℎ:𝑆→𝐴Γ⊢𝑡:𝑆→𝑆Γ⊢𝑥:𝑆
Γ⊢𝖼𝗈𝗋𝖾𝖼𝐴(𝑆,ℎ,𝑡,𝑥):𝖲𝗍𝗋𝖾𝖺𝗆(𝐴)
Stream-corec
Its computation equations are 𝗁𝖾𝖺𝖽(𝖼𝗈𝗋𝖾𝖼𝐴(𝑆,ℎ,𝑡,𝑥))≡ℎ(𝑥),𝗍𝖺𝗂𝗅(𝖼𝗈𝗋𝖾𝖼𝐴(𝑆,ℎ,𝑡,𝑥))≡𝖼𝗈𝗋𝖾𝖼𝐴(𝑆,ℎ,𝑡,𝑡(𝑥)). For the finite record schema, destructors 𝑜𝑖:𝐶→𝑂𝑖 and 𝑑𝑗:𝐶→𝐶 satisfy 𝑜𝑖(𝖼𝗈𝗋𝖾𝖼𝐶(𝑆,¯ℎ,¯𝑡,𝑥))≡ℎ𝑖(𝑥),𝑑𝑗(𝖼𝗈𝗋𝖾𝖼𝐶(𝑆,¯ℎ,¯𝑡,𝑥))≡𝖼𝗈𝗋𝖾𝖼𝐶(𝑆,¯ℎ,¯𝑡,𝑡𝑗(𝑥)). Every recursive occurrence is the complete result of a 𝑑𝑗 observation.