- •Sense, Denotation and Semantics
- •Sense and denotation in logic
- •The algebraic tradition
- •The syntactic tradition
- •The two semantic traditions
- •Tarski
- •Heyting
- •Natural Deduction
- •The calculus
- •The rules
- •Interpretation of the rules
- •The Curry-Howard Isomorphism
- •Lambda Calculus
- •Types
- •Terms
- •Operational significance
- •Conversion
- •Description of the isomorphism
- •Relevance of the isomorphism
- •The Normalisation Theorem
- •The weak normalisation theorem
- •Proof of the weak normalisation theorem
- •Degree and substitution
- •Degree and conversion
- •Conversion of maximal degree
- •Proof of the theorem
- •The strong normalisation theorem
- •Sequent Calculus
- •The calculus
- •Sequents
- •Structural rules
- •The intuitionistic case
- •Logical rules
- •Some properties of the system without cut
- •The last rule
- •Subformula property
- •Asymmetrical interpretation
- •Sequent Calculus and Natural Deduction
- •Properties of the translation
- •Strong Normalisation Theorem
- •Reducibility
- •Properties of reducibility
- •Atomic types
- •Product type
- •Arrow type
- •Reducibility theorem
- •Pairing
- •Abstraction
- •The theorem
- •The calculus
- •Types
- •Terms
- •Intended meaning
- •Conversions
- •Normalisation theorem
- •Expressive power: examples
- •Booleans
- •Integers
- •Expressive power: results
- •Canonical forms
- •Representable functions
- •Coherence Spaces
- •General ideas
- •Coherence Spaces
- •The web of a coherence space
- •Interpretation
- •Stable functions
- •Parallel Or
- •Direct product of two coherence spaces
- •The Function-Space
- •The trace of a stable function
- •Representation of the function space
- •The Berry order
- •Partial functions
- •Denotational Semantics of T
- •Simple typed calculus
- •Types
- •Terms
- •Properties of the interpretation
- •Booleans
- •Integers
- •Sums in Natural Deduction
- •Defects of the system
- •Standard conversions
- •The need for extra conversions
- •Subformula Property
- •Extension to the full fragment
- •Commuting conversions
- •Properties of conversion
- •The associated functional calculus
- •Empty type
- •Sum type
- •Additional conversions
- •System F
- •The calculus
- •Comments
- •Representation of simple types
- •Booleans
- •Product of types
- •Empty type
- •Sum type
- •Existential type
- •Representation of a free structure
- •Free structure
- •Representation of the constructors
- •Induction
- •Representation of inductive types
- •Integers
- •Lists
- •Binary trees
- •Trees of branching type U
- •The Curry-Howard Isomorphism
- •Coherence Semantics of the Sum
- •Direct sum
- •Lifted sum
- •dI-domains
- •Linearity
- •Characterisation in terms of preservation
- •Linear implication
- •Linearisation
- •Linearised sum
- •Tensor product and units
- •Cut Elimination (Hauptsatz)
- •The key cases
- •The principal lemma
- •The Hauptsatz
- •Resolution
- •Strong Normalisation for F
- •Idea of the proof
- •Reducibility candidates
- •Remarks
- •Reducibility with parameters
- •Substitution
- •Universal abstraction
- •Universal application
- •Reducibility theorem
- •Representation Theorem
- •Representable functions
- •Numerals
- •Total recursive functions
- •Provably total functions
- •Proofs into programs
- •Formulation of HA2
- •Translation of HA2 into F
- •Representation of provably total functions
- •Semantics of System F
- •What is Linear Logic?
Chapter 11
System F
System F [Gir71] arises as an extension of the simple typed calculus, obtained by adding an operation of abstraction on types. This operation is extremely powerful and in particular all the usual data-types (integers, lists, etc.) are de nable. The system was introduced in the context of proof theory [Gir71], but it was independently discovered in computer science [Reynolds].
The most primitive version of the system is set out here: it is based on implication and universal quanti cation. We shall content ourselves with de ning the system and giving some illustrations of its expressive power.
11.1The calculus
Types are de ned starting from type variables X; Y; Z; : : : by means of two operations:
1. if U and V are types, then U!V is a type.
2. if V is a type, and X a type variable, then X: V is a type.
There are ve schemes for forming terms:
1.variables: xT ; yT ; zT ; : : : of type T ,
2.application: tu of type V , where t is of type U!V and u is of type U,
3.-abstraction: xU : v of type U!V , where xU is a variable of type U and v is of type V ,
4. universal abstraction: if v is a term of type V , then we can form X: v of type X: V , so long as the variable X is not free in the type of a free variable of v.
81
82 |
CHAPTER 11. |
SYSTEM F |
5. |
universal application (sometimes called extraction): if t is a |
term of type |
|
X: V and U is a type, then t U is a term of type V [U=X]. |
|
As well as the usual conversions for application/ -abstraction, there is one for the other pair of schemes:
( X: v) U v[U=X]
Convention We shall write U1!U2! : : : Un!V , without parentheses, for
U1!(U2! : : : (Un!V ) : : :)
and similarly, f u1 u2 : : : un for (: : : ((f u1) u2) : : :) un.
11.2Comments
First let us illustrate the restriction on variables in universal abstraction: if we could form X: xX , what would then be the type of the free variable x in this expression? On the other hand, we can form X: xX : xX of type X: X!X, which is the identity of any type.
The na•ve interpretation of the \ " type is that an object of type X: V is a function which, to every type U, associates an object of type V [U=X].
This interpretation runs up against a problem of size: in order to understandX: V , it is necessary to know all the V [U=X]. But among all the V [U=X] there are some which are (in general) more complex than the type which we seek to model, for example V [ X: V =X]. So there is a circularity in the na•ve interpretation, and one can expect the worst to happen. In fact it all works out, but the system is extremely sensitive to modi cations which are not of a logical nature.
We can nevertheless make (a bit) more precise the idea of a function de ned on all types: in some sense, a function of universal type must be \uniform", i.e. do the same thing on all types. -abstraction accommodates a certain dose of non-uniformity, for example we can de ne a function by cases (if . . . then
. . . else). Such a kind of de nition is inconceivable for universal abstraction: the values taken by an object of universal type on di erents types have to be essentially \the same" (see A.1.3). It still remains to make this vague intuition precise by appropriate semantic considerations.