跳转到内容

用户:CaffeineP/笔记/Types and Programming Languages (Benjamin C. Pierce)

来自维基学院

3 Untyped Arithmetic Expressions

[编辑 | 编辑源代码]

3.2 Syntax

[编辑 | 编辑源代码]

3.2.4 concrete definition of terms

[编辑 | 编辑源代码]

3.2.5 the sets Si are cumulative

[编辑 | 编辑源代码]

𝑡𝑟𝑢𝑒{𝑡𝑟𝑢𝑒{𝗍𝗋𝗎𝖾,𝖿𝖺𝗅𝗌𝖾,0}S0S1i(SiSi+1tSi+1{t{𝗍𝗋𝗎𝖾,𝖿𝖺𝗅𝗌𝖾,0}t1Sit{𝗌𝗎𝖼𝖼 t1,𝗉𝗋𝖾𝖽 t1,𝗂𝗌𝗓𝖾𝗋𝗈 t1}t1Si,t2Si,t3Sit=𝗂𝖿 t1𝗍𝗁𝖾𝗇 t2𝖾𝗅𝗌𝖾 t3t1Si(𝑡𝑟𝑢𝑒t1Si+1{𝗌𝗎𝖼𝖼 t1,𝗉𝗋𝖾𝖽 t1,𝗂𝗌𝗓𝖾𝗋𝗈 t1}Si+2)t1Si,t2Si,t3Si(𝑡𝑟𝑢𝑒{t1,t2,t3}Si+1(𝗂𝖿 t1𝗍𝗁𝖾𝗇 t2𝖾𝗅𝗌𝖾 t3)Si+2)Si+1Si+2)iSiSi+1

3.3 Induction on Terms

[编辑 | 编辑源代码]

3.3.4 induction on terms

[编辑 | 编辑源代码]

sketch of proofs:

induction on depth
[编辑 | 编辑源代码]

sS(rS(𝑑𝑒𝑝𝑡 r<𝑑𝑒𝑝𝑡 sPr)Ps)n(rS(𝑑𝑒𝑝𝑡 r<nPr)sS(𝑑𝑒𝑝𝑡 s=nPs))n(m,m<n,sS(𝑑𝑒𝑝𝑡 s=mPs)sS(𝑑𝑒𝑝𝑡 s=nPs))n,sS(𝑑𝑒𝑝𝑡 s=nPs)sSPs

induction on size
[编辑 | 编辑源代码]

sS(rS(𝑠𝑖𝑧𝑒 r<𝑠𝑖𝑧𝑒 sPr)Ps)n(rS(𝑠𝑖𝑧𝑒 r<nPr)sS(𝑠𝑖𝑧𝑒 s=nPs))n(m,m<n,sS(𝑠𝑖𝑧𝑒 s=mPs)sS(𝑠𝑖𝑧𝑒 s=nPs))n,sS(𝑠𝑖𝑧𝑒 s=nPs)sSPs

structural induction
[编辑 | 编辑源代码]

sS(r(r is a subterm of sPr)Ps)i(j,j<i,sSjPssSiPs)i,sSiPssSPs