If we present the justifications in the right way we can read the rules annotated by them as an attribute grammarattribute grammar (c.f. [101,100,56]) for generating an expression describing the proof called a proof expressionproof expression. Consider the case of the and rules again. Suppose we let pand g denote proof expressions for the subgoals, then
-- |
--, |
If we think of the proof expressions and as being synthesized up from the subtrees, then the complete proof information for the goal sequent is
Organizing this into a more compact expression and recognizing that y is a new bound variable, a suggestive expression is
In the case of , the rule with proof expressions looks like
The justification for will be the term magic(P)magic rule. This is the only justification term that requires the formula as a subterm.
With this basic typed predicate logic as a basis, we will now proceed to add a number of specific types, namely natural numbers, lists, functions, sets over a type, and so-called quotient types. Each of these shows an aspect of typed logic. Note, in these rules we are presupposing that P, Q, and the formulas in are well-formed according to the definition of a formula and that the type expressions are also well-formed in accordance with the typing rules. As we introduce more types, it will be necessary to incorporate typing judgments as subgoals. The Nuprl logic of [28] relies on such subgoals from the beginning so that the caveat just stated for this table of rules is unnecessary there.