In proof theory, a coherent space (also coherence space) is a concept introduced in the semantic study of linear logic.
In Proofs and Types, coherent spaces are called coherence spaces. A footnote explains that although in the French original they were "espaces cohérents", the translation used "coherence space", because spectral spaces are sometimes called "coherent spaces".
The original definition by Jean-Yves Girard is a family of sets, satisfying the following closure conditions:
Down-closure: if and , then .
Binary completeness: for every , if for all , then .
The elements of the sets in are tokens. The set of tokens isWe say that each is a coherent set of tokens. If a set is given in advance, and the elements of are presented as subsets of , then one also requires for every . This intuitively states that any token is coherent at least to itself.
Given such a family, one obtains a reflexive, symmetric relation on , called coherence modulo, by settingThe elements of are then precisely the subsets of whose elements are pairwise related by .
The coherent sets are partially ordered under inclusion. By binary completeness and Zorn's lemma, any coherent set is contained in a maximally coherent set. Consequently, it is only necessary to specify the maximally coherent sets, , then perform a down-closure:The only condition on is that any two , if they are distinct, then neither contains the other.
Given a coherence space , its associated graph, called the web of , has vertex set . Its edges are the unordered pairs such that . Note that we require each vertex to have a self-edge purely as a convenient convention.
Conversely, given an undirected graph where each vertex has a self-edge, one obtains a coherence space by taking to be the family of all cliques of the graph:That is, the elements of are the sets of vertices whose elements are pairwise adjacent.
Given a stable function, its trace is defined asThat is, each is such that is a minimal coherent set needed to produce token . By stability, any must have a finite .
Conversely, each stable function is determined by its trace:
The intuition of a coherent space is that each token is a trait that an object might possess, and a coherent set of tokens is a set of traits that is possessed by some object simultaneously. There is no object that can possess an incoherent set of tokens as its traits. One explores an object by observing more and more of its traits. The set of observed traits grows, but will always remain coherent.
Any coherent space can be specified by its maximally coherent sets. Any union of two distinct maximally coherent sets is incoherent.
Given a coherent space , its polar is still a coherent space. This is a dual object construction in category theory.
Given any set , we have the discrete/minimal coherent space , and the indiscrete/maximal coherent space .
Given two coherent spaces , there is a coherent space (pronounced "A and B"). It is defined as a graph. The set of tokens is the disjoint union of the two sets of tokens:and the edges of is the union of the edges in , the edges in , and . More generally, given a family of coherent spaces, , we can define similarly.
Given two coherent spaces , there is a coherent space . The set of tokens is still and the edges of is the union of the edges in , the edges in . This is the coproduct. This can be defined in general for a family of coherent spaces, .
Given two sets , the set of partial functions of type can be modelled by a coherent space. The token set is , and the edges are for all . Equivalently, for each , define to be the discrete/minimal coherent space of . Then is the coherent space that we constructed.
This can be intuitively understood as follows: a partial function has the set of traits . A maximally coherent set is the set of traits of a total function. As we enumerate the values of a partial function, we enumerate the set of traits, which is coherent at every step. This is useful when is computed by a Turing machine that might fail to halt on some entries. If does not halt, then we simply never observe the trait during trait-enumeration. The set of observed traits will remain coherent at all steps of our enumeration.
Now, define to be the discrete/minimal coherent spaces. Then is a stable function iff there is a partial function , such thatand can be identified with its set of traits, which is a coherent set in . Thus, is a coherent space.
In general, we have a functor , contravariant in the first argument and covariant in the second argument, such thatThat is, given any two coherent spaces , the hom-set between them is structured as a coherent space as well. This makes the category enriched over itself.
The token set is , where is the set of nonempty finite coherent sets in . Two tokens are coherent iff
If , then .
If and , then .
Note that, if , then for any . That is, we only demand coherence in given coherence in . If there is no coherence in , then we make no demands on coherence in .
Coherence spaces can act as an interpretation for types in type theory where points of a type are points of the coherence space . This allows for some structure to be discussed on types. For instance, each term of a type can be given a set of finite approximations which is in fact, a directed set with the subset relation. With being a coherent subset of the token space (i.e. an element of ), any element of is a finite subset of and therefore also coherent, and we have
Functions between types are seen as stable functions between coherence spaces. A stable function is defined to be one which respects approximants and satisfies a certain stability axiom. Formally, is a stable function when
In order to be considered stable, functions of two arguments must satisfy the criterion 3 above in this form: which would mean that in addition to stability in each argument alone, the pullback
is preserved with stable functions of two arguments. This leads to the definition of a product space which makes a bijection between stable binary functions (functions of two arguments) and stable unary functions (one argument) over the product space. The product coherence space is a product in the categorical sense i.e. it satisfies the universal property for products. It is defined by the equations:
(i.e. the set of tokens of is the coproduct (or disjoint union) of the token sets of and .
Tokens from differents sets are always coherent and tokens from the same set are coherent exactly when they are coherent in that set.
Girard, J.-Y. (2004), "Between logic and quantic: a tract", in Ehrhard; Girard; Ruet; et al. (eds.), Linear logic in computer science(PDF), Cambridge University Press.