Church encodingIn mathematics, Church encoding is a means of representing data and operators in the lambda calculus. The Church numerals are a representation of the natural numbers using lambda notation. The method is named for Alonzo Church, who first encoded data in the lambda calculus this way. Terms that are usually considered primitive in other notations (such as integers, booleans, pairs, lists, and tagged unions) are mapped to higher-order functions under Church encoding.
Parametric polymorphismIn programming languages and type theory, parametric polymorphism allows a single piece of code to be given a "generic" type, using variables in place of actual types, and then instantiated with particular types as needed. Parametrically polymorphic functions and data types are sometimes called generic functions and generic datatypes, respectively, and they form the basis of generic programming. Parametric polymorphism may be contrasted with ad hoc polymorphism.
Type theoryIn mathematics, logic, and computer science, a type theory is the formal presentation of a specific type system, and in general, type theory is the academic study of type systems. Some type theories serve as alternatives to set theory as a foundation of mathematics. Two influential type theories that were proposed as foundations are Alonzo Church's typed λ-calculus and Per Martin-Löf's intuitionistic type theory. Most computerized proof-writing systems use a type theory for their foundation, a common one is Thierry Coquand's Calculus of Inductive Constructions.
Closed monoidal categoryIn mathematics, especially in , a closed monoidal category (or a monoidal closed category) is a that is both a and a in such a way that the structures are compatible. A classic example is the , Set, where the monoidal product of sets and is the usual cartesian product , and the internal Hom is the set of functions from to . A non- example is the , K-Vect, over a field . Here the monoidal product is the usual tensor product of vector spaces, and the internal Hom is the vector space of linear maps from one vector space to another.
Hom functorIn mathematics, specifically in , hom-sets (i.e. sets of morphisms between ) give rise to important functors to the . These functors are called hom-functors and have numerous applications in category theory and other branches of mathematics. Let C be a (i.e. a for which hom-classes are actually sets and not proper classes). For all objects A and B in C we define two functors to the as follows: {| class=wikitable |- ! Hom(A, –) : C → Set ! Hom(–, B) : C → Set |- | This is a covariant functor given by: Hom(A, –) maps each object X in C to the set of morphisms, Hom(A, X) Hom(A, –) maps each morphism f : X → Y to the function Hom(A, f) : Hom(A, X) → Hom(A, Y) given by for each g in Hom(A, X).
EvalIn some programming languages, eval , short for the English evaluate, is a function which evaluates a string as though it were an expression in the language, and returns a result; in others, it executes multiple lines of code as though they had been included instead of the line including the eval. The input to eval is not necessarily a string; it may be structured representation of code, such as an abstract syntax tree (like Lisp forms), or of special type such as code (as in Python).
Lambda calculusLambda calculus (also written as λ-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation that can be used to simulate any Turing machine. It was introduced by the mathematician Alonzo Church in the 1930s as part of his research into the foundations of mathematics. Lambda calculus consists of constructing lambda terms and performing reduction operations on them.
Kind (type theory)In the area of mathematical logic and computer science known as type theory, a kind is the type of a type constructor or, less commonly, the type of a higher-order type operator. A kind system is essentially a simply typed lambda calculus "one level up", endowed with a primitive type, denoted and called "type", which is the kind of any data type which does not need any type parameters. A kind is sometimes confusingly described as the "type of a (data) type", but it is actually more of an arity specifier.
Cartesian closed categoryIn , a is Cartesian closed if, roughly speaking, any morphism defined on a of two can be naturally identified with a morphism defined on one of the factors. These categories are particularly important in mathematical logic and the theory of programming, in that their internal language is the simply typed lambda calculus. They are generalized by , whose internal language, linear type systems, are suitable for both quantum and classical computation.
Pure type systemNOTOC In the branches of mathematical logic known as proof theory and type theory, a pure type system (PTS), previously known as a generalized type system (GTS), is a form of typed lambda calculus that allows an arbitrary number of sorts and dependencies between any of these. The framework can be seen as a generalisation of Barendregt's lambda cube, in the sense that all corners of the cube can be represented as instances of a PTS with just two sorts. In fact, Barendregt (1991) framed his cube in this setting.