The Principal Type-Scheme of an Object in Combinatory Logic
暂无分享,去创建一个
One of the aims of combinatory logic is to study the most basic properties of functions and other concepts, with as few restrictions as possible; hence in the simplest form of combinatory logic there is nothing to stop a function being applied to itself; thus XX is an ob for all obs X. However it is also natural to look at the consequences of introducing type-restrictions, formulated by assigning types to the obs according to certain rules, to be described later. Each type is a linguistic expression representing a set of functions, and for any type a the statement " X has type a" is intended to mean that the ob X represents a member of the set represented by a. Given types a and /, the set of all functions from the set a into the set 8 is represented by the type " Fa/3" (using Curry's notation). Now consider the ob l; if X has type a, then the ob I X must also have type a. Hence I represents a function from a into a, and so it must be given the type Faa, for each type a. Thus I has not just one type, but a whole class of types. This might seem strange, but it comes from the fact that I represents the abstract notion of " identity-function", rather than one particular identity-function for a particular set. The identity-function involves basically the same concept, no matter what we are applying it to. Similarly the other two basic combinators S and K (see later, or [1, ?5A]) represent certain simple operations which can be performed on almost any functions, and thus they too have an infinite class of types (see ?1 later for details, and ?5 for comment). To denote classes of types, we can use variables a, b, c; then the fact that I has every type of form Faa can be expressed by assigning to I the type-scheme
[1] Andrzej Grzegorczyk. Recursive Objects in all Finite Types , 1964 .
[2] J. A. Robinson,et al. A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.
[3] H. B. Curry. Modified basic functionality in combinatory logic , 1969 .