5 - Syntactic Operations for PPλ
Published online by Cambridge University Press: 17 September 2009
Summary
ML, the meta language of LCF, allows computation on expressions of PPλ, the object language. An ML program may use quotations, an automatic mechanism for constructing well-typed PPλ expressions. At a lower level there are functions for building and taking apart PPλ expressions: for example, a function that maps A ΛB ΛC to the list of formulae A, B, C. The most complicated functions perform substitution or pattern matching.
If you intend to use LCF, now is the time to start. You will find the examples easier to understand if you work them on the computer. Section 5.7 describes how to start and finish a session.
The syntax of PPλ
PPλ expressions include types, terms, formulae, goals, and theorems. The corresponding ML data types are type, term, form, goal, and thm. A function for building formulae might have the type form × form → form.
Syntactic conventions
The abstract syntax of a PPλ expression is not a string of symbols but a tree structure. A tree is not only the most convenient representation conceptually, but gives the most efficient implementation in the computer.
Syntax is specified by BNF equations. Alternative syntax phrases are separated by a vertical bar: |. A phrase that can be repeated zero or more times is enclosed in braces: {, }. Syntactic classes like type-variable appear in italics. Language symbols appear, underlined, in typewriter font to emphasize that they are typed and displayed on computer terminals.
- Type
- Chapter
- Information
- Logic and ComputationInteractive Proof with Cambridge LCF, pp. 139 - 162Publisher: Cambridge University PressPrint publication year: 1987