Coherent semantics
(making the two CE defs more consistent) |
(CS is a CCC) |
||
Line 5: | Line 5: | ||
A further achievement of coherent semantics was that it allowed to endow the set of stable functions from <math>X</math> to <math>Y</math> with a structure of domain, thus closing the category of coherent spaces and stable functions. However the most interesting point was the discovery of a special class of stable functions, ''linear functions'', which was the first step leading to Linear Logic. |
A further achievement of coherent semantics was that it allowed to endow the set of stable functions from <math>X</math> to <math>Y</math> with a structure of domain, thus closing the category of coherent spaces and stable functions. However the most interesting point was the discovery of a special class of stable functions, ''linear functions'', which was the first step leading to Linear Logic. |
||
− | == Preliminary definitions and notations == |
+ | = The cartesian closed structure of coherent semantics = |
There are two equivalent definitions of coherence spaces: the first one, coherent spaces as domains, is interesting from a historical point of view as it emphazises the fact that coherent spaces are particular cases of Scott domains. The second one, coherent spaces as graphs, is the most commonly used and will be our "official" definition in the sequel. |
There are two equivalent definitions of coherence spaces: the first one, coherent spaces as domains, is interesting from a historical point of view as it emphazises the fact that coherent spaces are particular cases of Scott domains. The second one, coherent spaces as graphs, is the most commonly used and will be our "official" definition in the sequel. |
||
− | === Coherent spaces === |
+ | == Coherent spaces == |
− | ==== As domains ==== |
+ | === As domains === |
{{Definition|title=Coherent space| |
{{Definition|title=Coherent space| |
||
Line 22: | Line 22: | ||
A coherent space is thus ordered by inclusion; one easily checks that it is a domain. In particular finite elements of <math>X</math> correspond to compact elements. |
A coherent space is thus ordered by inclusion; one easily checks that it is a domain. In particular finite elements of <math>X</math> correspond to compact elements. |
||
− | ==== As graphs ==== |
+ | === As graphs === |
{{Definition|title=Coherent space| |
{{Definition|title=Coherent space| |
||
Line 32: | Line 32: | ||
A coherent space in the domain sense is seen to be a coherent space in the graph sense by setting <math>a\coh_X b</math> iff <math>\{a,b\}\in X</math>; conversely one easily checks that cliques in the graph sense are subset closed and satisfy the binary compatibility condition. |
A coherent space in the domain sense is seen to be a coherent space in the graph sense by setting <math>a\coh_X b</math> iff <math>\{a,b\}\in X</math>; conversely one easily checks that cliques in the graph sense are subset closed and satisfy the binary compatibility condition. |
||
− | === Stable functions === |
+ | A coherent space is completely determined by its web and its coherence relation, or equivalently by its web and its strict coherence. |
+ | |||
+ | == Stable functions == |
||
{{Definition|title=Stable function| |
{{Definition|title=Stable function| |
||
Line 55: | Line 55: | ||
Let <math>X</math> and <math>Y</math> be coherent spaces. The function space <math>X\rightarrow Y</math> is defined by: |
Let <math>X</math> and <math>Y</math> be coherent spaces. The function space <math>X\rightarrow Y</math> is defined by: |
||
* <math>\web{X\rightarrow Y} = \mathcal{C}_{\mathrm{fin}}(X)\times \web Y</math>, |
* <math>\web{X\rightarrow Y} = \mathcal{C}_{\mathrm{fin}}(X)\times \web Y</math>, |
||
− | * <math>(x_0, a)\coh_{X\rightarrow Y}(y_0, b)</math> iff <math>\begin{cases}\text{if } x_0\cup y_0\in X\text{ then } a\coh_Y y,\\ |
+ | * <math>(x_0, a)\coh_{X\rightarrow Y}(y_0, b)</math> iff <math>\begin{cases}\text{if } x_0\cup y_0\in X\text{ then } a\coh_Y b,\\ |
− | \text{if } x_0\cup y_0\in X\text{ and } x_0\neq y_0 \text{ then } a\scoh_Y b\end{cases}</math>. |
+ | \text{if } x_0\cup y_0\in X\text{ and } a = b\text{ then } x_0 = y_0\end{cases}</math>. |
}} |
}} |
||
+ | One could equivalently define the strict coherence relation on <math>X\rightarrow Y</math> by: <math>(x_0,a)\scoh_{X\rightarrow Y}(y_0, b)</math> iff <math>x_0\cup y_0\in X</math> and <math>x_0\neq y_0</math> entails that <math>a\scoh_Y b</math>. |
||
+ | |||
{{Definition|title=Trace of a stable function| |
{{Definition|title=Trace of a stable function| |
||
− | Let <math>F:X\mapsto Y</math> be a function (from the cliques of <math>X</math> to the cliques of <math>Y</math>). The ''trace'' of <math>F</math> is the set: |
+ | Let <math>F:X\mapsto Y</math> be a function. The ''trace'' of <math>F</math> is the set: |
<math>\mathrm{Tr}(F) = \{(x_0, b), x_0</math> minimal such that <math> b\in F(x_0)\}</math>. |
<math>\mathrm{Tr}(F) = \{(x_0, b), x_0</math> minimal such that <math> b\in F(x_0)\}</math>. |
||
Line 66: | Line 68: | ||
{{theorem| |
{{theorem| |
||
− | If <math>F</math> is stable then <math>\mathrm{Tr}(F)</math> is a clique of the function space <math>X\rightarrow Y</math> |
+ | <math>F</math> is stable iff <math>\mathrm{Tr}(F)</math> is a clique of the function space <math>X\rightarrow Y</math> |
}} |
}} |
||
In particular the continuity of <math>F</math> entails that if <math>x_0</math> is minimal such that <math>b\in F(x_0)</math>, then <math>x_0</math> is finite. |
In particular the continuity of <math>F</math> entails that if <math>x_0</math> is minimal such that <math>b\in F(x_0)</math>, then <math>x_0</math> is finite. |
||
− | + | {{Definition|title=The evaluation function| |
|
+ | Let <math>f</math> be a clique in <math>X\rightarrow Y</math>. We define a function <math>\mathrm{Fun}\,f:X\mapsto Y</math> by: <math>\mathrm{Fun}\,f(x) = \{b\in Y,</math> there is <math>x_0\subset x</math> such that <math>(x_0, b)\in f\}</math>. |
||
+ | }} |
||
+ | |||
+ | {{Theorem| |
||
+ | The function <math>\mathrm{Fun}\, f</math> defined above is stable (if <math>f</math> is a clique). |
||
+ | }} |
||
+ | |||
+ | == Cartesian product == |
||
+ | |||
+ | {{Definition|title=Cartesian product| |
||
+ | Let <math>X_1</math> and <math>X_2</math> be two coherent spaces. Their cartesian products <math>X_1\with X_2</math> is the coherent space defined by: |
||
+ | * the web is the disjoint union of the webs: <math>\web{X_1\with X_2} = \{1\}\times\web X_1\cup \{2\}\times\web X_2</math>; |
||
+ | * the coherence relation is the serie composition of the relations on <math>X_1</math> and <math>X_2</math>: <math>(i, a)\coh_{X_1\with X_2}(j, b)</math> iff <math>i\neq j</math> or <math>i=j</math> and <math>a\coh_{X_i} b</math>. |
||
+ | }} |
||
+ | |||
+ | This definition is just the way to put a coherent space structure on the cartesian product. Indeed one easily shows the |
||
+ | |||
+ | {{Theorem| |
||
+ | Given cliques <math>x_1</math> and <math>x_2</math> in <math>X_1</math> and <math>X_2</math>, we define the subset <math>\langle x_1, x_2\rangle</math> of <math>\web{X_1\with X_2}</math> by: <math>\langle x_1, x_2\rangle = \{1\}\times x_1\cup \{2\}\times x_2</math>. Then <math>\langle x_1, x_2\rangle</math> is a clique in <math>X_1\with X_2</math>. |
||
+ | |||
+ | Conversely, given a clique <math>x\in X_1\with X_2</math>, for <math>i=1,2</math> we define <math>\pi_i(x) = \{a\in X_i, (i, a)\in x\}</math>. Then <math>\pi_i(x)</math> is a clique in <math>X_i</math> and the function <math>\pi_i:X_1\with X_2\mapsto X_i</math> is stable. |
||
+ | |||
+ | Furthemore these two operations are inverse of each other: <math>\pi_i(\langle x_1, x_2\rangle) = x_i</math> and <math>\langle\pi_1(x), \pi_2(x)\rangle = x</math>. In particular any clique in <math>X_1\with X_2</math> is of the form <math>\langle x_1, x_2\rangle</math>. |
||
+ | }} |
||
+ | |||
+ | Altogether the results above (and a few other more that we shall leave to the reader) allow to get: |
||
+ | |||
+ | {{Theorem| |
||
+ | The category of coherent spaces and stable functions is cartesian closed. |
||
+ | }} |
||
+ | |||
+ | In particular this means that if we define <math>\mathrm{Eval}:(X\rightarrow Y)\with X\mapsto Y</math> by: <math>\mathrm{Eval}(\langle f, x\rangle) = \mathrm{Fun}\,f(x)</math> then <math>\mathrm{Eval}</math> is stable. |
||
− | === Linear functions === |
+ | = Linear functions = |
Revision as of 14:27, 8 February 2009
Coherent semantics was invented by Girard in the paper The system F, 15 years later with the objective of building a denotationnal interpretation of second order intuitionnistic logic (aka polymorphic lambda-calculus).
Coherent semantics is based on the notion of stable functions that was initially proposed by Gérard Berry. Stability is a condition on Scott continuous functions that expresses the determinism of the relation between the output and the input: the typical Scott continuous but non stable function is the parallel or because when the two inputs are both set to true, only one of them is the reason why the result is true but there is no way to determine which one.
A further achievement of coherent semantics was that it allowed to endow the set of stable functions from X to Y with a structure of domain, thus closing the category of coherent spaces and stable functions. However the most interesting point was the discovery of a special class of stable functions, linear functions, which was the first step leading to Linear Logic.
Contents |
The cartesian closed structure of coherent semantics
There are two equivalent definitions of coherence spaces: the first one, coherent spaces as domains, is interesting from a historical point of view as it emphazises the fact that coherent spaces are particular cases of Scott domains. The second one, coherent spaces as graphs, is the most commonly used and will be our "official" definition in the sequel.
Coherent spaces
As domains
Definition (Coherent space)
A coherent space X is a family of subsets of a given set (the web of X), which satisfies:
- subset closure: if then ,
- singletons: for
- binary compatibility: if A is a family of pairwise compatible elements of X, that is if for any , then .
A coherent space is thus ordered by inclusion; one easily checks that it is a domain. In particular finite elements of X correspond to compact elements.
As graphs
Definition (Coherent space)
A coherent space X is a family of subsets of a given set (the web of X) which satisfies that there is a reflexive and symetric relation on (the coherence relation) such that iff , for any . In other terms X is the set of complete subgraphs of the simple unoriented graph of the relation. For this reason, the elements of X are called cliques.
The strict coherence relation on X is defined by: iff and .
A coherent space in the domain sense is seen to be a coherent space in the graph sense by setting iff ; conversely one easily checks that cliques in the graph sense are subset closed and satisfy the binary compatibility condition.
A coherent space is completely determined by its web and its coherence relation, or equivalently by its web and its strict coherence.
Stable functions
Definition (Stable function)
Let X and Y be two coherent spaces. A function is stable if it satisfies:
- it is non decreasing: for any if then ;
- it is continuous (in the Scott sense): if A is a directed family of cliques of X, that is if for any there is a such that , then ;
- it satisfies the stability condition: if are compatible, that is if , then .
This definition is admitedly not very tractable. An equivalent and most useful caracterisation of stable functions is given by the following theorem.
Theorem
Let be a non-decreasing function from the coherent space X to the coherent space Y. The function F is stable iff it satisfies: for any , , if then there is a finite clique such that:
- ,
- for any if then (x0 is the minimum sub-clique of x such that ).
Note that the stability condition doesn't depend on the coherent space structure and can be expressed more generally for continuous functions on domains. However, as mentionned in the introduction, the restriction to coherent spaces allows to endow the set of stable functions from X to Y with a structure of coherent spaces.
Definition (The space of stable functions)
Let X and Y be coherent spaces. The function space is defined by:
- ,
- iff .
One could equivalently define the strict coherence relation on by: iff and entails that .
Definition (Trace of a stable function)
Let be a function. The trace of F is the set:
Tr(F) = {(x0,b),x0 minimal such that .
Theorem
F is stable iff Tr(F) is a clique of the function space
In particular the continuity of F entails that if x0 is minimal such that , then x0 is finite.
Definition (The evaluation function)
Let f be a clique in . We define a function by: there is such that .
Theorem
The function defined above is stable (if f is a clique).
Cartesian product
Definition (Cartesian product)
Let X1 and X2 be two coherent spaces. Their cartesian products is the coherent space defined by:
- the web is the disjoint union of the webs: ;
- the coherence relation is the serie composition of the relations on X1 and X2: iff or i = j and .
This definition is just the way to put a coherent space structure on the cartesian product. Indeed one easily shows the
Theorem
Given cliques x1 and x2 in X1 and X2, we define the subset of by: . Then is a clique in .
Conversely, given a clique , for i = 1,2 we define . Then πi(x) is a clique in Xi and the function is stable.
Furthemore these two operations are inverse of each other: and . In particular any clique in is of the form .
Altogether the results above (and a few other more that we shall leave to the reader) allow to get:
Theorem
The category of coherent spaces and stable functions is cartesian closed.
In particular this means that if we define by: then Eval is stable.