5.1   Introduction to lambda calculus

As we have seen in Chapter 4 in the case of the propositional intuitionistic logic and its proof theory, the leading theme has been the so-called Curry–Howard correspondence, known as the “formulae-as-types” analogy as well, which exploits the connection between proof theory and type theory, and has been the main methodological tool both for understanding the relation between intuitionistic logic and typed lambda calculus, and for the design of new functional languages with powerful-type systems.

The lambda calculus notation has been explicitly introduced by Alonzo Church [ 20 ], a formalism provided to develop a general theory of computable functions (Church defined the notion of computable function via this system). At first, its expressions represent both a program and its data, which on their turn, evolve by simple rules ( β and η -reduction) to instantaneous descriptions of intermediate computational results possibly ending in output. These features, however, are also present in term rewriting systems. Lambda calculus has two extra qualities setting it apart from these other rewriting systems:

  • First, it is applicative, in that an expression may be applied to another expression, giving them the possibility to act both as a function and as an argument.

  • Second, lambda calculus has abstraction built in, meaning that the expressions are closed under explicit definitions.

Lambda calculus as a model of computation can be introduced in an untyped fashion: arbitrary expressions may be applied to each other. A similarly flat approach to computing was present in the early assembly languages. In computer science, the lambda calculus made its first appearance in programming language LISP, which has been also the first formal programming language to use the procedures as objects of the language. Consequently, in LISP the programs and data are not distinguished, but they are all elements of a unique untyped universe (the universe of λ -terms for the λ -calculus, called the universe of S-expressions in LISP). Anyway, in each programming practice, the types arise naturally, even starting from untyped universes, when the programming objects are categorized according to their usage or behavior. Since the first appearance of types in the programming language Algol 60, when the typing of variables was introduced to check at compile time the connection of instances of use with associated declarations, typing has been considered an essential method that guides a programmer in a design of a programming code.

Functional programming languages , like Miranda, ML, etc. are based on lambda calculus. An early (although somewhat hybrid) example of such a language is LISP as explained above. Reduction machines are specifically designed for the execution of these functional languages in an analog way as the Turing machines 1 (1936), which defined the notion of a computable function via these machines.

The first basic operation of the λ -calculus is application , with expression M · N or M N , which denotes the data M as an algorithm applied to the data N . The theory is type-free: it allows us to consider expressions like M M , i. e., M is applied to itself. The other basic operation is abstraction : if M is an expression containing a variable x (e. g., 5 ∗ x − 3 ∗ y + 32 ), then λ x . M denotes the function x ↦ M . Abstraction is said to bind the free variable x in M (the variable y in M remains free). Substitution is only performed for the occurrences of free variables as usual. Lambda calculus, as treated so far, is usually referred to as a type-free theory. This is so, because every expression (considered as a function) may be applied to every other expression (considered as an argument). For example, the identity function I ≡ λ x . x may be applied to any argument x to give as a result that same x . In particular, I may be applied to itself.

There are also typed versions of lambda calculus. These are introduced essentially in Curry [ 21 ] (for the so-called combinatory logic, a variant of lambda calculus) and in Church [ 22 ]. Types are usually objects of a syntactic nature and may be assigned to lambda terms. If M is such a term and a type a is assigned to M , then we say “ M has type a ” or “ M in a ”; the denotation used for this is M : a .

Although the analogy is not perfect, the type assigned to a term may be compared to the dimension of a physical entity. These dimensions prevent us from wrong operations like adding 3 volts to 2 ampere. In a similar way, types assigned to lambda terms provide a partial specification of the algorithms that are represented and are useful for showing partial correctness. Types may also be used to improve the efficiency of compilation of terms representing functional algorithms. If, for example, it is known (by looking at types) that a subexpression of a term (representing a functional program) is purely arithmetical, then fast evaluation is possible.

The Curry and Church approaches to typed lambda calculus correspond to two paradigms in programming. In the first of these, a program may be written without typing at all. Then a compiler should check whether a type can be assigned to the program. This will be the case if the program is correct. A well-known example of such a language is ML. The style of typing is called implicit typing .

The other paradigm in programming is called explicit typing and corresponds to the Church version of typed lambda calculi. Here, a program should be written together with its type. For these languages, type-checking is usually easier, since no types have to be constructed. Examples of such languages are Algol 68 and Pascal. It is the case that terms that do have a type always possess a normal form. By the unsolvability of the halting problem this implies that not all computable functions can be represented by a typed term. This is not so bad as it sounds, because in order to find such computable functions that cannot be represented, one has to stand on one’s head.

Considering terms and types as programs and their specifications is not the only possibility. A type a can also be viewed as a proposition and a term M in a as a proof of this proposition. This so-called propositions-as-types interpretation is independently due to de Bruijn [ 23 ] and Howard [ 24 ] (both papers were conceived in 1968). Hints in this direction were given in Curry and Feys [ 25 ].

The Church-typed lambda calculus is a collection of type labels T L , over a ground set of atomic type symbols A t , and hence is defined inductively by

  • A t ⊆ T L ;

  • If a , b ∈ T L , then a ⇒ b ∈ T L ;

  • If a , b ∈ T L , then a × b ∈ T L .

For every type a ∈ T L , there exists a denumerable number of variables, ranged over by lowercase letters near the end of alphabet, x , y , z , … , while the metavariables for terms are used upper case letters M , N , P , … . So, the fact that a term M has type a is denoted with expression M : a . The well-defined terms (w. d. t) and their associated types, are defined according to the following formation rules:

1.

every variable x : a is a w. d. t.

2.

if x : a is a variable, and M : b is a w. d. t., then λ x : a . M : a ⇒ b is a w. d. t.

3.

if M : a ⇒ b is a w. d. t and N : a is a w. d. t., then M N : b is a w. d. t.

4.

if M : a is a w. d. t and N : b is a w. d. t., then ⟨ M , N ⟩ : a × b is a w. d. t.

5.

if M : a × b is a w. d. t, then fst ( M ) : a is a w. d. t.

6.

if M : a × b is a w. d. t, then snd ( M ) : b is a w. d. t.

For more details about the free-variables of terms and the substitution [ M / x ] N : b of a proof M : a for a generic x : a in a proof N : b , a reader can use a more specific books dedicated to typed lambda calculus.

We consider an equational theory of proofs, defined as the minimal congruence relation ′ \= ′ which satisfies the following axiom schemas:

( α )

λ x : a . M \= λ y : a . [ y / x ] M

( → β )

( λ x : a . M ) N \= [ N / x ] M

( → η )

λ x : a . ( M x ) \= M , if x is not a free variable

( × β 1 )

fst ( ⟨ M , N ⟩ ) \= M

( × β 2 )

snd ( ⟨ M , N ⟩ ) \= N

( × η )

⟨ fst ( P ) , snd ( P ) ⟩ \= P

If we read these equations from left to right, then we obtain a rewriting system, which defines the operational semantics of typed lambda calculus as a programming language.

The rewriting rules associated with ( → β ), ( × β 1 ) and ( × β 2 ) are called β -reductions, and those associated with ( → η ) and ( × η ) are called η -reductions. From the point of view of the Curry–Howard correspondence, both η -reductions and β -reductions (which play a major rule) have an interpretation in terms of proof normalization. A term is in normal form (resp., β -normal form), if it is no more reducible (resp., β -reducible): the β -reduction relation is confluent and Noetherian.

So, it is easy to see that the categorial model for the typed lambda calculus is given by a category with objects equal to lambda types and arrow to lambda terms, such that × is the categorial product and for each to objects (lambda types) we have the exponential object a ⇒ b , while fst and snd are represented by the first and second product projections π 1 and π 2 , respectively. The following result is well known [ 11 ], [ 26 ]:

“ Any CCC with enough points C and any collection a i ∈ A t of objects in C yield a model of typed lambda calculus λ β η π t . ”

The typed lambda calculus is strongly normalizable , i. e., every computation terminates and the computation is independent from the evaluation strategy: thus, in the design of programming code one does not have to consider the operational evolution of reduction, but to concentrate only to the denotation of the program. Obviously, not all Turing-computable functions (e. g., the Ackermann functions) are computable by typed lambda calculus language, but it does not worry anybody: the primitive recursive functions are enough for most interesting applications.

Example 14 (Sequent system for intuitionistic logic).

Let us consider the sequent systems of natural deduction and propositional intuitionistic logic considered in Chapter 4 .

There is a bijective correspondence between logical formulae and types of the typed lambda calculus with explicit pairs. We can associate every formula b with a λ -term M of the respective type, which intuitively represent its proofs. In particular, if x 1 : a , … , x n : a n are the free variables in M , then M : b is a proof of M depending on the hypothesis Γ \= { a 1 , … , a n } . Thus, if M is a proof of b , possibly depending on a generic proof x : a , one gets a proof of a ⇒ b by “abstraction on x : a ,” i. e., λ x : a . M : a ⇒ b . Juxtaposition of proofs corresponds to their sequential composition. So, if we have a proof M : a ⇒ b , and we apply it to a proof N : a , then we obtain a proof M N of b . A proof of a × b is given by a pair of distinct proofs for a and b .

The inference rules of calculus exactly formalize this process of constructing the complex proofs by means of simpler ones. A variable x : a is a generic proof of a . So, an intuitionistic sequent in Section 4.3 has the following λ -calculus syntactic structure:

x 1 : a 1 , … , x n : a n ⊢ M : b

where x 1 : a 1 , … , x n : a n is a finite list of distinct generic proofs, and M : b is a proof of b whose free variables are among x 1 , … , x n . Every formula in the left-hand side has an associated distinct variable, and hence no confusion can arise between formulae, even if they have the same name (symbol).

The intuitive interpretation of the sequent Γ ⊢ M : b , for Γ \= x 1 : a 1 , … , x n : a n , is that of a process, which builds a proof M of b , as soon as it has the proofs for a 1 , … , a n .

If Γ ⊢ M : b is the end sequent of a cut-free derivation (deduction), then the proof M : b is in β -normal form: The cut-elimination theorem shows that if D is a derivation of Γ ⊢ M : b . Then there is a cut-free derivation D ′ of the sequent Γ ⊢ N : b , where N is the β -normal form of M .

It is possible to show by pure simply typed λ -calculus can compute all the arithmetic functions, i. e., all the functions that are defined by compositions of the previous ones (the predecessor function is not representable, for example). However, simply typed λ -calculus cannot be considered as a real programming language, but only as a paradigm for strongly typed functional programming languages. There are two types of extensions:

  • The first is a “polimorphic” extension (of the “second order”), which still has the nice property of strong normalization together with a great formal expressiveness, but imposes to the programmer a completely new approach to design of the programming code.

  • The second is a simple extension by means of fixpoints operators, which enables us to write recursive definitions of functions.

Models of the untyped λ -calculus may be defined either as reflexive objects in Cartesian closed categories (categorial models) or as combinatory algebras satisfying the five axioms of Curry and the Meyer–Scott axiom ( λ -models). Concerning categorial models (interesting in our approach), it has been shown that each of them can be presented as a λ -model, even when the underlying category does not have enough points.

Next, we will consider an extension of the language by fixed-point operators .

Definition 22.

A fixed point of type b is a term Θ b of type ( b ⇒ b ) ⇒ b such that, for every term M : b ⇒ b , we obtain

(5.1) M : b ⇒ b ( Θ b M : b ⇒ b ) \= Θ b M : b ⇒ b .

By fixed-point operators, we can simulate recursive definitions. The combined use of these operators with a reasonable set of arithmetic primitives gives to this language its full computational power . However, such an extension has a consequence that the fixed-point operators have no logical formula correspondent which limits the Curry–Howard analogy. That is, by introducing the fixed-point operators we obtain the full expressive power and the elegance of programming by “recursive definitions” but cannot use more the “types as formulae” paradigm.

5.2   Reflexive objects in the Cartesian closed categories

It has been shown by Lambek that Cartesian Closed Categories (CCC) can be identified with extensional typed λ -calculus and another interesting connection between CCC and λ -calculus is Scott’s embedding of λ -theory into a CCC (referred as Scott embedding) [ 27 ], [ 28 ]. So, the general concept of λ -models is made clear by presenting an elegant first-order presentation. This is done by using yet another equivalent notion, given by several authors; namely, the functional λ -models which is a set b and collection of functions b ⇒ b (which are formally definable) on it such that b ⇒ b < b (so that b is a reflexive object with enough points in a CCC, and hence a strong motivation for the categorial approach).

Given a λ -model, it is always possible to define a CCC where it can be viewed as a reflexive object with enough points [ 11 ], and by using Koymans construction [ 29 ] based on work of Scott, arbitrary reflexive object in a CCC give rise to λ -algebras and to all of them: it turns out that the λ -models are exactly those λ -algebras that come from reflexive objects with enough points. It was demonstrated that any reflexive object of an arbitrary CCC gives rise to a λ -model, when choosing in Koymans construction appropriately the underlying combinatory algebra (e. g., in [ 30 ], [ 31 ] the authors provide reflexive objects in categories of games, hence also without enough points).

Consequently, in order to define a categorial interpretation of the fixed-point operators, we consider the CCC which are categorial models of the lambda calculus, and define new constraints that they has to satisfy in order to be able to represent the fixed-point operators and the equations ( 5.1 ), which in a category are expressed by the commutative diagrams where the lambda terms are represented by the arrows and their types by the objects. Hence, we introduce the following definition.

Proposition 10.

Let C be a CCC. A fixed-point operator, for a given object b of C , is an arrow fix b : ( b ⇒ b ) → b such that fix b \= eval b , b ∘ ⟨ id b ⇒ b , fix b ⟩ : ( b ⇒ b ) → b , corresponding to the following commutative diagram:

such that

(5.3) fix b \= eval b , b ∘ ⟨ id b ⇒ b , in 2 ⟩ ∘ Λ ( eval b , b ∘ ( id b ⇒ b × ( eval b , b ∘ ⟨ id b ⇒ b , in 2 ⟩ ∘ out 2 ) ) ) .

A category has fixed-point operators if each object b has a fixed-point operator fix b .

Proof.

Let us denote fix b \= h 1 ∘ h 2 as composition of two morphisms, h 1 \= eval b , b ∘ ⟨ id b ⇒ b , in 2 ⟩ : ( b ⇒ b ) → b and h 2 \= Λ ( eval b , b ∘ ( id b ⇒ b × ( h 1 ∘ out 2 ) ) ) , so that we have

fix b \= h 1 ∘ h 2 \= eval b , b ∘ ⟨ id , in 2 ⟩ ∘ Λ ( eval b , b ∘ ( id × ( h 1 ∘ out 2 ) ) ) \= eval b , b ∘ ⟨ Λ ( eval b , b ∘ ( id × ( h 1 ∘ out 2 ) ) ) , in 2 ∘ Λ ( eval b , b ∘ ( id × ( h 1 ∘ out 2 ) ) ) ⟩ \= eval b , b ∘ ( Λ ( eval b , b ∘ ( id × ( h 1 ∘ out 2 ) ) ) × id ) ∘ ⟨ id , in 2 ∘ Λ ( eval b , b ∘ ( id × ( h 1 ∘ out 2 ) ) ) ⟩ \= eval b , b ∘ ( id × ( h 1 ∘ out 2 ) ) ∘ ⟨ id , in 2 ∘ Λ ( eval b , b ∘ ( id × ( h 1 ∘ out 2 ) ) ) ⟩ \= eval b , b ∘ ⟨ id , ( h 1 ∘ out 2 ) ∘ in 2 ∘ Λ ( eval b , b ∘ ( id × ( h 1 ∘ out 2 ) ) ) ⟩ \= eval b , b ∘ ⟨ id , h 1 ∘ Λ ( eval b , b ∘ ( id × ( h 1 ∘ out 2 ) ) ) ⟩ \= eval b , b ∘ ⟨ id , h 1 ∘ h 2 ⟩ \= eval b , b ∘ ⟨ id , fix b ⟩

so that diagram (5.2) commutes.  □

Thus, e. g., if we consider the example of a CCC category where the object b is a set and arrows are the functions, and b ⇒ b represent the set of all functions from the set b into the same set, for each point (a function) g : b → b of the object b ⇒ b , for the fixed-point operator (a function) fix b , we obtain that the commutative diagram (5.2) represents, for a function g , for some x 0 ∈ b , the equation

x 0 ≜ fix b ( g ) \= eval b , b ∘ ⟨ id b ⇒ b , fix b ⟩ ( g ) \= eval b , b ( g , fix b ( g ) ) \= g ( fix b ( g ) ) \= g ( x 0 ) ,

and hence, ( g ∘ g ) ( x 0 ) \= g ( g ( x 0 ) ) \= g ( x 0 ) so that g is idempotent. Thus, we are interesting for idempotent elements (functions) g of the exponent object b ⇒ b . In a more general setting, the existence of exponents b ⇒ b suggests the investigation of those objects that “contain,” as retract, 2 their own function space: namely, the reflexive objects . It has been demonstrated that if a category C is a CCC, then and object b is reflexive iff

( b ⇒ b ) < b .

These nontrivial reflexive objects does not exist in each CCC; e. g., in the category Set which is a CCC where the object b ⇒ b is the set of all functions from b into b , and hence is strictly bigger than the cardinality of the object (a set) b . However, if instead of (simple, unstructured) sets used as the object of a CCC, for a CCC we use the objects that have enough reach internal structure, e. g., the set with a binary reflexive and transitive relation ≤ between its elements, and impose some restrictions for the well-defined arrows between such objects (e. g., to be the monotonic functions that preserves this ordering between domain and codomain object, then the cardinality of such arrows can be less than the cardinality of the arrows between these two objects considered as simple sets of elements).

For still more complex internal structures of the objects (like Scott domains introduced in Definition 23 , or the tree structures of labeled transition systems, for example), we can impose also another restrictions for the well-defined morphisms, which preserves the internal properties of such complex object, so that the object b ⇒ b , which represent all such endomorphisms for a given object b can have significatively less cardinality from the cardinality of elements in this object b .

The retracts and exponents has been considered for definition of categorial models of type-free languages, where the programs are viewed as data or, semantically, exponents may be retracted into (source and target) objects. Note that if ( g 1 , g 2 ) , for g 1 : a → d and g 2 : d → a , is a retraction pair such that g 2 ∘ g 1 \= id a : a → a , then the arrow f \= g 1 ∘ g 2 : d → d is a split idempotent : in fact,

f ∘ f \= ( g 1 ∘ g 2 ) ∘ ( g 1 ∘ g 2 ) \= g 1 ∘ ( g 2 ∘ g 1 ) ∘ g 2 \= g 1 ∘ id b ∘ g 2 \= g 1 ∘ g 2 \= f .

The most well-known example of CCC with fixed-point operators is probably the category CPO , with complete partial orders for objects and continuous functions for arrows. 3 We can show, e. g., that such CCC with reflexive objects can have also the categorial symmetry as, e. g., the CCC category Set (which, however, has no reflexive objects).

Example 15.

A CCC with conceptual categorial symmetry and with reflexive objects as well:

Let us consider a category C where the objects are Scott’s domains, and the arrows are continuous functions between them (as specified in Definition 23 ). So, we can define the symmetry-closure functor T e : C ↓ C → C , such that for an arrow f : a → b (a continuous function between to Scott’s domains), we obtain a conceptualized object f ˜ \= T e 0 ( J ( f ) ) defined by the graph of this continuous function, i. e.,

(5.4) f ˜ \= T e 0 ( J ( f ) ) ≜ { ( i , f ( i ) ) ∣ i ∈ dom ( f ) }

Thus, the conceptualized object are partial orders ( f ˜ , ≤ f ) with bottom element ( ⊥ , f ( ⊥ ) ) (where ⊥ is bottom element of Scott’s domain a \= dom ( f ) ), determined by the partial order ( a , ≤ a ) of the object a \= dom ( f ) , such that for any two elements ( i , f ( i ) ) and ( j , f ( j ) ) of the conceptualized object f ˜ , we have that

(5.5) ( i , f ( i ) ) ≤ f ( j , f ( j ) ) iff i ≤ a j ,

and hence iff f ( i ) ≤ b f ( j ) , form the fact that f : a → b is a continuous, and hence monotonic, as well, function. From ( 5.5 ) and the first projection π 1 ( f ˜ ) \= a , which is Scott’s domain, also ( f ˜ , ≤ f ) is down-bounded and directed: for each ( i , f ( i ) ) , ( j , f ( j ) ) ∈ f ˜ , from the fact that a \= dom ( f ) is Scott’s domain (which is directed), there is k ∈ a such that i ≤ k and j ≤ k , and hence ( i , f ( i ) ) ≤ f ( k , f ( k ) ) and ( j , f ( j ) ) ≤ f ( k , f ( k ) ) .

It is complete (it is a CPO ) because for every directed subset S ⊆ f ˜ there exists the least upper bound ⋎ f S \= ( ⋎ ( π 1 ( S ) ) , f ( ⋎ ( π 1 ( S ) ) ) ) .

A point ( i , f ( i ) ) of ( f ˜ , ≤ f ) is compact (finite) if for every directed S such that ( i , f ( i ) ) ≤ f ⋎ S there is an element ( j , f ( j ) ) ∈ S such that ( i , f ( i ) ) ≤ f ( j , f ( j ) ) , i. e., i ≤ j in Scott’s domain a \= dom ( f ) .

Let Y 0 denote the collection of compact elements of f ˜ . The c.p.o ( f ˜ , ≤ f ) is algebraic because Scott’s domain a \= dom ( f ) is algebraic, i. e., for every ( i , f ( i ) ) ∈ f ˜ , the set

↓ ( i , f ( i ) ) \= { ( j , f ( j ) ) ∈ Y 0 ∣ ( j , f ( j ) ) ≤ f ( i , f ( i ) ) } \= { ( j , f ( j ) ) ∣ j ≤ i }

is directed. In fact, for each i ∈ a \= dom ( f ) , the set ( i , f ( i ) ) \= { ( j , f ( j ) ) ∈ Y 0 ∣ j ∈ a is compact in a and j ≤ i } is directed because a \= dom ( f ) is c.p.o and

⋎ f ↓ ( i , f ( i ) ) \= ( ⋎ ( ↓ i ) , f ( ⋎ ( ↓ i ) ) ) \= ( i , f ( i ) )

because it holds that ⋎ ( ↓ i ) \= i from the fact that a \= dom ( f ) is Scott’s domain (and hence algebraic CPO ).

So, from the fact that the poset relation ≤ f preserves the poset relation ≤ a of the Scott’s domain ( a , ≤ a ) , and f is continuous function, it holds that also the conceptual object f ˜ as a partial order with ≤ f satisfies all requirements as the Scott’s domain ( a , ≤ a ) . Thus, also the poset ( f ˜ , ≤ f ) is a Scott’s domain (bounded complete algebraic CPO ) with the bottom element ( ⊥ , f ( ⊥ ) ) , and hence well-defined object of C .

Moreover, for each identity arrow id a : a → a (which is obviously a continuous function) of the object a (Scott’s domain) of C , the conceptualized object obtained from it is

id ˜ a \= { ( x , id a ( x ) ) ∣ x ∈ a } \= { ( x , x ) ∣ x ∈ a } ,

and hence it is isomorphic to the Scott’s domain a , as required by the conceptual symmetry representation requirement, and this isomorphic arrow φ ( a ) : id ˜ a ≃ a , which maps each element ( x , x ) of id ˜ a into the element x of a is continuous function as well in C .

For any commutative diagram in C , g ∘ k 1 \= k 1 ∘ f , composed by the continuous functions, the arrow component T e 1 of the functor, for the arrow ( k 1 ; k 2 ) : J ( f ) → J ( g ) defines the function T e 1 ( k 1 ; k 2 ) : f ˜ → g ˜ in C , such that for any element ( x , f ( x ) ) of the conceptualized object f ˜ , it holds that

(5.6) T e 1 ( k 1 ; k 2 ) ( x , f ( x ) ) ≜ ( k 1 ( x ) , k 2 ( f ( x ) ) ) ∈ g ˜

so that, from the fact that both k 1 and k 2 are continuous functions, the function T e 1 ( k 1 ; k 2 ) is monotonic and continuous as well, and hence a well-defined arrow in C .

Note that in the same way we can show that also each CPO , which is a CCC, is conceptually closed category by the symmetry-closure functor T e defined by ( 5.4 ) and ( 5.4 ). The Scott continuous semantics corresponds to the class of λ -models having cpo’s (complete partial orders) as underlying sets and representing all Scott continuous functions. By applying a construction due to Koymans [ 29 ] and based on work of Scott, arbitrary reflexive objects in CCC’s give rise to λ -algebras and to all of them.

Based on these considerations, we can define the categories of idempotents, by using the conceptual categorial symmetry, and hence different from the categories Ret b , defined previously as particular subcategories of the Karoubi envelope [ 32 ] obtained by fixing a single object b of a category C , and used for the fixed-point operators (see [ 11 ], for example). Thus, as a first step, we introduce these categories of idempotents (used by Scott in [ 28 ], [ 29 ]).

Definition 24.

Given a reflexive object b in a category C , the category Ret b of idempotents on b is so defined:

1.

Ob Ret b \= { f ∈ C ( b , b ) ∣ f ∘ f \= f }

2.

Mor Ret b \= { ( f , k , g ) ∣ f , g ∈ Ob Ret b , k ∈ C ( b , b ) , k \= g ∘ k ∘ f }

3.

dom ( f , k , g ) \= f , cod ( f , k , g ) \= g

4.

id f \= ( f , f , f )

5.

( f , k , g ) ∘ ( g ′ , k ′ , f ) \= ( g ′ , k ∘ k ′ , g )

It is easy to verify that each arrow ( f , k , g ) : f → g , defined in point 2, satisfy the following commutative diagram with two idempotent arrows f and g :

in the category C such that, from point 2 of Definition 24 , k \= g ∘ k ∘ f , so that we obtain that, from the idempotent property, f \= f ∘ f and g \= g ∘ g :

g ∘ k \= g ∘ ( g ∘ k ∘ f ) \= g ∘ k ∘ f \= k , and k ∘ f \= ( g ∘ k ∘ f ) ∘ f \= g ∘ k ∘ f \= k ,

i. e.,

(5.8) g ∘ k \= k ∘ f

so that the original commutative diagram (5.7) is equivalent to the more convenient (for application of the conceptual categorial symmetry) following commutative diagram:

where the last vertical arrow is a candidate for a symmetry-extended category C (see Definition 14 in Section 3.4 ) with vertical composition of natural transformations ( 3.35 ), ․ τ − 1 ∙ τ \= ψ : F st ․ S nd , with the functor T e : C ↓ C → C , which generates the conceptualized objects f ˜ and g ˜ from the arrows f and g . In this case, we obtain also the conceptual difference between the arrows f (the programs) and the consideration of them as “data” by using their form as conceptualized objects f ˜ , also in the type-free languages.

Note that for each object b , at least its identity arrow f \= id b : b → b is idempotent, and that from the isomorphism τ J ( id b ) : b ≃ id b ˜ with its inverse arrow τ J ( id b ) − 1 : id b ˜ → b we have that τ J ( id b ) ∘ τ J ( id b ) − 1 \= id id b ˜ , i. e., id ˜ b < b , which satisfies the requirements for the symmetry-extended category C . So, the definition above is well-defined.

Thus, by using the category Ret b , we can define the subcategory of a conceptually-closed category C , which objects are only the conceptualized objects obtained from the idempotent arrows.

Proposition 11.

Given a reflexive object b in a conceptually closed category C , from Definition 7 in Section 3.3 , let ER b be its subcategory such that:

1.

Each object is a conceptualized object f ˜ \= T e 0 ( J ( f ) ) obtained from an idempotent arrow f : b → b in C .

2.

Each arrow ( f , k , g ) in Ret b , such that k \= g ∘ k ∘ f , corresponding to the arrow ( k ; k ) : J ( f ) → J ( g ) in C ↓ C , is represented in ER b by the arrow T e 1 ( k ; k ) : f ˜ → g ˜ , where f ˜ \= T e 0 ( J ( f ) ) and f ˜ \= T e 0 ( J ( f ) ) are the conceptualized objects of ER b obtained from the symmetry-closure functor T e : C ↓ C → C .

Thus, the composition of objects ′ ∗ ′ (defined in CoCC category C ) of ER b returns with an idempotent object, and hence ER b is a category of idempotents on b.

Proof.

Let us show that all objects of ER b are idempotent . For the duality operator of arrow compositions, B ⊤ \= T e 0 J (each symmetry-extended category is perfectly symmetric as well, and we can use the operation ∗ of corresponding composition of conceptualized objects in ( 3.5 ), we have that B ⊤ ( g ∘ f ) \= B ⊤ ( g ) ∗ B ⊤ ( f ) ), and hence we obtain

f ˜ ∗ f ˜ \= B ⊤ ( f ) ∗ B ⊤ ( f ) \= B ⊤ ( f ∘ f ) from (3.5) \= B ⊤ ( f ) from idempotent arrow , f \= f ∘ f \= f ˜

i. e., f ˜ is an idempotent conceptualized object (this is the duality property w. r. t. the composition of idempotent arrows f : b → b ).  □

From Definition 24 of Ret b , it holds that the arrow k between two idempotent arrows f , g : b → b , satisfies the property k \= g ∘ k ∘ f , and hence the commutative diagram (5.7), so that the commutative diagram in (5.9) is represented by the arrow ( k ; k ) : J ( f ) → J ( g ) in C ↓ C , for which we have the following commutative diagram in C :

such that the middle vertical arrow is an arrow of ER b , ( f ˜ , T e 1 ( k ; k ) , g ˜ ) , analog to the arrow ( f , k , g ) in Ret b , from the fact that in both cases they represent the commutativity k ∘ f \= g ∘ k , represented by the arrow ( k ; k ) : J ( f ) → J ( g ) in category C ↓ C .

The composition of the arrows in Ret b , ( f , k , g ) ∘ ( g ′ , k ′ , f ) \= ( g ′ , k ∘ k ′ , g ) , given by point 5 of Definition 24 , now is represented by this commutative diagram:

Consequently, the category ER b is a well-defined substitution of the category of idempotents Ret b by the category heaving conceptual categorial symmetry and clear distinction between (conceptualized) objects obtained from the idempotent arrows and the arrows also for the type-free languages. Next, we will show how ER b can support the fixed-point operators.

5.3   Conceptually-closed CCC and its subcategories of idempotents

It was shown [ 11 ] that if a category C is a CCC with reflexive object b then, derived from it, the category of idempotents Ret b in Definition 24 is a CCC as well, and hence can support the fixed-point operators. However, in this category of idempotents Ret b , both objects and arrows are the arrows of C , with only difference that the objects of Ret b are idempotent arrows of C . Hence, the category Ret b does not distinguish epistemologically the concepts of objects from the concept of arrows (e. g., the programs from their usage as data). It can be useful still to distinguish these two fundamental concepts at least epistemologically, and still be able to consider the type-free languages (where both “data” and ‘programs” can be viewed as data). Typical example when also the programs are viewed as data are the fixed-point operators, where a program (expressed as an arrow of a given category) is considered as data for the fixed-point operator represented by another arrow in the same category.

Now, if we would like to use the categorial model for the fixed-point operators, such that in that category when a program f is viewed as such and represented by an arrow that elaborates the data of its domain and represent its results in its codomain object, from the case when f is considered as data for another programs (arrows in this category) and hence represented as an object of this category (the conceptualized object f ˜ ), then instead of the CCC category Ret b we would like to use the category ER b in which this epistemic difference is explicit and visible.

For such a possibility, for a given conceptually-closed CCC category C with a reflexive object b , from which we derive its subcategory ER b , we need first to demonstrate that also ER b is CCC, and hence able to support the fixed-point operators.

Proposition 12.

Let a CCC category C be conceptually-closed by a functor T e : C ↓ C → C , and with a reflexive object b. Then its subcategory ER b of idempotents on b is a CCC.

Proof.

Let b be a reflexive object in a CCC category C , i. e., ( b ⇒ b ) < b , for the exponent object b ⇒ b in this CCC, and it is well known that also the terminal object t and categorial product b × b in C are the retracts of b , via retract pairs:

  • t < b via in , out , so that out ∘ in \= id t ;

  • b × b < b via in 1 , out 1 , so that out 1 ∘ in 1 \= id b × b ;

  • ( b ⇒ b ) < b via in 2 , out 2 , so that out 2 ∘ in 2 \= id b ⇒ b ;

for the product functors × : C × C → C and exponential functor ⇒ : C OP × C → C .

Now we can define the terminal object, Cartesian product ⊗ and exponents in the category ER b , by

  • Terminal object is conceptualized object id t ˜ , for the idempotent identity arrow id t : t → t , because for the conceptually closed category C , we have the isomorphic arrow φ ( t ) : id t ˜ → t , from the natural isomorphism ( 3.13 ), with its inverse φ − 1 ( t ) : t → id t ˜ , and hence we have the retract id t ˜ < b via in 0 , out 0 , such that in 0 \= in ∘ φ ( t ) and out 0 \= φ − 1 ( t ) ∘ out (in fact, it holds that out 0 ∘ in 0 \= ( φ − 1 ( t ) ∘ out ) ∘ ( in ∘ φ ( t ) ) \= φ − 1 ( t ) ∘ φ ( t ) \= id id t ˜ ).

    Thus, id t ˜ < b via in 0 , out 0 .

  • For any two idempotent arrows f , g : b → b and their conceptualized objects f ˜ \= T e 0 ( J ( f ) ) and g ˜ \= T e 0 ( J ( g ) ) of ER b , we define their product by f ˜ ⊗ g ˜ \= h ˜ where h : b → b is the following arrow in C :

    (5.11) h ≜ in 1 ∘ ( f × g ) ∘ out 1

    equal to idempotent arrow used to define the product of f and g in Ret b . In fact, h ∘ h \= in 1 ∘ ( f × g ) ∘ out 1 ∘ in 1 ∘ ( f × g ) ∘ out 1 \= in 1 ∘ ( f × g ) ∘ ( f × g ) ∘ out 1 \= in 1 ∘ ( ( f ∘ f ) × ( g ∘ g ) ) ∘ out 1 \= in 1 ∘ ( f × g ) ∘ out 1 \= h .

  • For any two idempotent arrows f , g : b → b and their conceptualized objects f ˜ \= T e 0 ( J ( f ) ) and g ˜ \= T e 0 ( J ( g ) ) of ER b , we define their exponent by g f ˜ where g f : b → b is the following arrow in C :

    (5.12) g f ≜ in 2 ∘ Λ ( h 0 ) ∘ out 2 , where h 0 \= g ∘ eval b , b ∘ ( id b ⇒ b × f ) : ( b ⇒ b ) × b → b

    equal to idempotent arrow used to define the exponent of f and g in Ret b . In fact,

    Λ ( h 0 ) ∘ Λ ( h 0 ) \= Λ ( g ∘ eval b , b ∘ ( id × f ) ) ∘ Λ ( g ∘ eval b , b ∘ ( id × f ) ) \= Λ ( g ∘ eval b , b ∘ ( id × f ) ∘ Λ ( g ∘ eval b , b ∘ ( id × f ) ) × id ) from ( β ) reduction \= Λ ( g ∘ eval b , b ∘ Λ ( g ∘ eval b , b ∘ ( id × f ) ) × id ∘ ( id × f ) ) \= Λ ( g ∘ ( g ∘ eval b , b ∘ ( id × f ) ) ∘ ( id × f ) ) \= Λ ( ( g ∘ g ) ∘ eval b , b ∘ ( id × ( f ∘ f ) ) ) \= Λ ( h 0 ) , so that g f is idempotent, g f ∘ g f \= in 2 ∘ Λ ( h 0 ) ∘ out 2 ∘ in 2 ∘ Λ ( h 0 ) ∘ out 2 \= in 2 ∘ Λ ( h 0 ) ∘ Λ ( h 0 ) ∘ out 2 \= g f .

Note that in any CCC category C , such that the following product limit in C commutes:

where, for the product projections π 1 and π 2 , the unique vertical arrow for this commutative diagram define the pairing operation ⟨ _ , _ ⟩ in a CCC,

(5.13) k \= ⟨ f ∘ π 1 , g ∘ π 2 ⟩ \= f × g

with the compositional properties

(5.14) ⟨ f ∘ m , g ∘ m ⟩ \= ⟨ f , g ⟩ ∘ m , ( m × n ) ∘ ⟨ f , g ⟩ \= ⟨ m ∘ f , n ∘ g ⟩ ,

and hence it holds that

(5.15) f ∘ π 1 \= π 1 ∘ ( f × g ) , g ∘ π 2 \= π 2 ∘ ( f × g ) .

Thus we have to show that these definitions of products and exponents in ER b are well-defined:

1. Proof for the products ⊗ in ER b :

Let us consider the following commutative diagram in CCC conceptually closed category C , for three idempotent arrows: the top and bottom horizontal arrows g , f and middle horizontal arrow given by ( 5.11 ),

h \= ( in 1 ∘ ( f × g ) ) ∘ ( f × g ) ∘ out 1 \= in 1 ∘ ( f × g ) ∘ out 1

Thus, the two new arrows in diagram (5.16),

(5.17) fst \= π 1 ∘ ( f × g ) ∘ out 1 , snd \= π 2 ∘ ( f × g ) ∘ ∘ out 1

satisfy the requirement for the arrows of Ret b (see in the diagram above the two arrows in C ↓ C ), i. e.,

f ∘ fst ∘ h \= f ∘ ( π 1 ∘ ( f × g ) ∘ out 1 ) ∘ in 1 ∘ ( f × g ) ∘ out 1 \= f ∘ π 1 ∘ ( f × g ) ∘ out 1 \= π 1 ∘ ( f × g ) ∘ ( f × g ) ∘ out 1 from (5.15) \= π 1 ∘ ( f × g ) ∘ out 1 \= fst

and analogously, snd \= g ∘ snd ∘ h . It is easy to verify, from ( 5.13 ), that also f ∘ π 1 \= fst ∘ in 1 ∘ ( f × g ) and g ∘ π 2 \= snd ∘ in 1 ∘ ( f × g ) , so that diagram in (5.16) commutes.

Consequently, the first and second projections of the (limit) products in ER b are defined by symmetry-closure functor (see ( 3.12 ), and hence the “isomorphism” T e 1 ( f ; f ) ≅ f ),

(5.18) π 1 ER b ≜ T e 1 ( fst ; fst ) , π 2 ER b ≜ T e 1 ( snd ; snd )

such that for any two arrows ( j ; j ) : J ( m ) → J ( f ) and ( l ; l ) : J ( m ) → J ( g ) , for a given idempotent arrow m : b → b of C , from the diagram (5.16), the following limit (product) diagrams commute:

where k \= in 1 ∘ ⟨ j , l ⟩ for the pairing operation ⟨,⟩ in C . From the requirement for the arrows j and l in Ret b , from the left-hand side of diagram above it holds that j \= f ∘ j ∘ m and l \= g ∘ l ∘ m , and hence for the arrow k , we obtain

h ∘ k ∘ m \= ( in 1 ∘ ( f × g ) ∘ out 1 ) ∘ ( in 1 ∘ ⟨ j , l ⟩ ) ∘ m \= in 1 ∘ ( f × g ) ∘ ⟨ j ∘ m , l ∘ m ⟩ \= in 1 ∘ ⟨ f ∘ j ∘ m , g ∘ l ∘ m ⟩ \= in 1 ∘ ⟨ j , l ⟩ \= k ,

and hence also k is well-defined arrow w. r. t. the category Rev b .

That this definition is correct for the commutative diagram above, we can verify, from j \= f ∘ j ∘ m and l \= g ∘ l ∘ m , by

fst ∘ k \= ( π 1 ∘ ( f × g ) ∘ out 1 ) ∘ ( in 1 ∘ ⟨ j , l ⟩ ) \= π 1 ∘ ⟨ f ∘ j , g ∘ l ⟩ \= π 1 ∘ ⟨ j , l ⟩ \= j , snd ∘ k \= ( π 2 ∘ ( f × g ) ∘ out 1 ) ∘ ( in 1 ∘ ⟨ j , l ⟩ ) \= π 2 ∘ ⟨ f ∘ j , g ∘ l ⟩ \= π 2 ∘ ⟨ j , l ⟩ \= l ,

so that the pairing operation ⟨ , ⟩ ER b in ER b is defined by

(5.19) ⟨ T e 1 ( j ; j ) , T e 1 ( l ; l ) ⟩ ER b ≜ T e 1 ( k ; k ) \= T e 1 ( in 1 ∘ ⟨ j , l ⟩ ; in 1 ∘ ⟨ j , l ⟩ )

Let us now define also the arrow component of the product functor ⊗, and consider any two arrows T e 1 ( h i ; h i ) : f ˜ i → g ˜ i , for i \= 1 , 2 , in ER b , so that it is satisfied,

(5.20) g i ∘ h i \= h i ∘ f i , i \= 1 , 2 ,

then for two idempotent arrows f \= in 1 ∘ ( f 1 × f 2 ) ∘ out 1 , g \= in 1 ∘ ( g 1 × g 2 ) ∘ out 1 , and the arrow k \= in 1 ∘ ( ( h 1 ∘ f 1 ) × ( h 2 ∘ f 2 ) ) ∘ out 1 , we obtain

g ∘ k \= ( in 1 ∘ ( g 1 × g 2 ) ∘ out 1 ) ∘ ( in 1 ∘ ( ( h 1 ∘ f 1 ) × ( h 2 ∘ f 2 ) ) ∘ out 1 ) \= in 1 ∘ ( ( g 1 ∘ h 1 ∘ f 1 ) × ( g 2 ∘ h 2 ∘ f 2 ) ) ∘ out 1 \= in 1 ∘ ( ( h 1 ∘ f 1 ∘ f 1 ) × ( h 2 ∘ f 2 ∘ f 2 ) ) ∘ out 1 from (5.20) \= in 1 ∘ ( ( h 1 ∘ f 1 ) × ( h 2 ∘ f 2 ) ) ∘ ( f 1 × f 2 ) ∘ out 1 \= in 1 ∘ ( ( h 1 ∘ f 1 ) × ( h 2 ∘ f 2 ) ) ∘ out 1 ∘ in 1 ∘ ( f 1 × f 2 ) ∘ out 1 \= k ∘ f

and hence, the following diagram commutes:

Thus, from the last vertical arrow in ER b , we obtain the definition of the product of two arrows in ER b , T e 1 ( h i ; h i ) : f ˜ i → g ˜ i , for i \= 1 , 2 ,

(5.22) T e 1 ( h 1 ; h 1 ) ⊗ 1 T e 1 ( h 2 ; h 2 ) ≜ T e 1 ( k ; k ) : f ˜ 1 ⊗ 0 f ˜ 2 → g ˜ 1 ⊗ 0 g ˜ 2

where k \= in 1 ∘ ( ( h 1 ∘ f 1 ) × ( h 2 ∘ f 2 ) ) ∘ out 1 .

2. Proof for the exponents in ER b :

We have defined the exponent objects in ER b by conceptualized object g f ˜ obtained from the idempotent arrow in ( 5.12 ), g f \= in 2 ∘ Λ ( h 0 ) ∘ out 2 , where both f , g : b → b in CCC category C are idempotent arrows.

Thus, in order to satisfy the requirements for an exponent object, we need to have in ER b also the evaluation arrow eval f , g ER b : g f ˜ ⊗ 0 f ˜ → g ˜ , where from ( 5.11 ) the product g f ˜ ⊗ 0 f ˜ \= p ˜ is obtained as conceptualized object of the arrow

(5.23) p \= in 1 ∘ ( g f × f ) ∘ out 1 \= in 1 ∘ ( ( in 2 ∘ Λ ( h 0 ) ∘ out 2 ) × f ) ∘ out 1

and we has to show that it is idempotent arrow in order to have that p ˜ is a well-defined object of ER b , as follows:

p ∘ p \= ( in 1 ∘ ( g f × f ) ∘ out 1 ) ∘ ( in 1 ∘ ( g f × f ) ∘ out 1 ) \= in 1 ∘ ( g f × f ) ∘ ( g f × f ) ∘ out 1 \= in 1 ∘ ( ( g f ∘ g f ) × ( f ∘ f ) ) ∘ out 1 \= in 1 ∘ ( g f × f ) ∘ out 1 \= p ,

from the fact that both g f and f are idempotent arrows. This idempotent arrow p : b → b is represented as the upper horizontal arrow in the following commutative diagram in C :

where the left commutative diagram defines the arrow ev : b → b of C by

(5.25) ev ≜ h 0 ∘ ( out 2 × id b ) ∘ out 1 \= g ∘ eval b , b ∘ ( out 2 × f ) ∘ out 1 .

So, it is enough to prove that the right-hand side of this diagram commutes as well,

ev ∘ in 1 ∘ ( in 2 × id ) ∘ ( Λ ( h 0 ) × f ) \= ( g ∘ eval b , b ∘ ( out 2 × f ) ∘ out 1 ) ∘ in 1 ∘ ( in 2 × id ) ∘ ( Λ ( h 0 ) × f ) \= g ∘ eval b , b ∘ ( out 2 × f ) ∘ ( in 2 × id ) ∘ ( Λ ( h 0 ) × f ) \= g ∘ eval b , b ∘ ( id × f ) ∘ ( Λ ( h 0 ) × f ) \= g ∘ eval b , b ∘ ( Λ ( h 0 ) × ( f ∘ f ) ) \= g ∘ ( eval b , b ∘ ( Λ ( h 0 ) × id ) ) ∘ ( id × ( f ∘ f ) ) \= g ∘ h 0 ∘ ( id × ( f ∘ f ) ) by ( β ) reduction \= g ∘ ( g ∘ eval b , b ∘ ( id b ⇒ b × f ) ) ∘ ( id × ( f ∘ f ) ) by (5.12) \= g ∘ ( g ∘ eval b , b ∘ ( id b ⇒ b × f ) ) by the idempotent arrow f \= g ∘ h 0

i. e., also this part commutes, and hence, the whole diagram in (5.24) commutes, i.e, ev ∘ p \= g ∘ ev , and hence, from fact that g is idempotent,

g ∘ ( ev ∘ p ) \= g ∘ ( g ∘ ev ) \= g ∘ ev \= ev ,

from the definition of ev in ( 5.25 ) so that ( p , ev , g ) is a well-defined arrow in Ret b , and hence we can use the arrow ( ev ; ev ) : J ( p ) → J ( g ) in the category C ↓ C , and by using the symmetry-closure functor T e , we obtain that the evaluation arrow in ER b represented by the vertical arrow in diagram above, such that

(5.26) eval f , g ER b ≜ T e 1 ( ev ; ev ) : g f ˜ ⊗ f ˜ → g , ˜

and from ( 3.12 ), with the “isomorphism” T e 1 ( ev ; ev ) ≅ ev , where the exponent object is

g f ˜ \= T e 0 ( J ( in 2 ∘ Λ ( h 0 ) ∘ out 2 ) ) \= T e 0 ( J ( in 2 ∘ Λ ( g ∘ eval b , b ∘ ( id b ⇒ b × f ) ) ∘ out 2 ) ) ,

and hence from ( 5.25 ),

eval f , g ER b \= T e 1 ( g ∘ eval b , b ∘ ( out 2 × f ) ∘ out 1 ; g ∘ eval b , b ∘ ( out 2 × f ) ∘ out 1 ) .

Moreover, for a given idempotent arrow m and any arrow ( k ; k ) : J ( in 1 ∘ ( m × f ) ∘ out 1 ) → J ( g ) of C ↓ C , such that ( in 1 ∘ ( m × f ) ∘ out 1 , k , g ) is an arrow in Ret b , i. e.,

(5.27) k \= g ∘ k ∘ ( in 1 ∘ ( m × f ) ∘ out 1 ) ,

and hence with the commutativity

(5.28) g ∘ k \= k ∘ ( in 1 ∘ ( m × f ) ∘ out 1 )

where m : b → b is an idempotent arrow in C , by application of the functor T e to the arrow ( k ; k ) , we obtain the following arrow in ER b :

(5.29) T e 1 ( k ; k ) : m ˜ ⊗ 0 f ˜ → g ˜

Let us define the arrow

(5.30) j ≜ in 2 ∘ Λ ( k ∘ in 1 ) : b → b

and we can show that the arrow ( g f , j , m ) in Ret b is well-defined, i. e.,

g f ∘ j ∘ m \= ( in 2 ∘ Λ ( g ∘ eval b , b ∘ ( id × f ) ) ∘ out 2 ) ∘ ( in 2 ∘ Λ ( k ∘ in 1 ) ) ∘ m \= in 2 ∘ Λ ( g ∘ eval b , b ∘ ( id × f ) ) ∘ Λ ( k ∘ in 1 ∘ ( m × id ) ) by Curry \= in 2 ∘ Λ ( g ∘ eval b , b ∘ ( id × f ) ∘ ( Λ ( k ∘ in 1 ∘ ( m × id ) ) × id ) ) by Curry \= in 2 ∘ Λ ( g ∘ eval b , b ∘ ( Λ ( k ∘ in 1 ∘ ( m × id ) ) × id ) ∘ ( id × f ) ) \= in 2 ∘ Λ ( g ∘ k ∘ in 1 ∘ ( m × id ) ∘ ( id × f ) ) by ( β ) reduction \= in 2 ∘ Λ ( g ∘ k ∘ in 1 ∘ ( m × f ) ) \= in 2 ∘ Λ ( ( g ∘ k ∘ in 1 ∘ ( m × f ) ∘ out 1 ) ∘ in 1 ) \= in 2 ∘ Λ ( k ∘ in 1 ) by (5.30) \= j ,

and hence, the following diagram commutes:

Thus, based on the last vertical arrow in diagram (5.31), we can define the abstraction operation Λ RE b in ER b for the arrow in ( 5.29 ),

(5.32) Λ RE b ( T e 1 ( k ; k ) ) ≜ T e 1 ( j ; j ) : m ˜ → g f ˜ with j \= in 2 ∘ Λ ( k ∘ in 1 )

from ( 3.12 ), with the isomorphism T e 1 ( j ; j ) ≅ j , in our candidate exponential diagram in ER b ,

where the identity arrow id f ˜ \= T e 1 ( id b ; id b ) , so that from definition of the product of the arrows in ( 5.22 ), we define T e 1 ( l ; l ) ≜ Λ RE b ( T e 1 ( k ; k ) ) ⊗ 1 id f ˜ \= T e 1 ( j ; j ) ⊗ 1 T e 1 ( id b ; id b ) , i. e.,

(5.34) l ≜ in 1 ∘ ( ( j ∘ m ) × ( id b ∘ f ) ) ∘ out 1 ,

and hence, from ( 5.30 ), we obtain this detailed expression,

(5.35) l \= in 1 ∘ ( ( in 2 ∘ Λ ( k ∘ in 1 ) ∘ m ) × f ) ∘ out 1 .

Let us show that it corresponds to the arrow ( in 1 ∘ ( m × f ) ∘ out 1 , l , p ) in Ret b , i. e.,

p ∘ l ∘ in 1 ∘ ( m × f ) ∘ out 1 \= p ∘ in 1 ∘ ( ( j ∘ m ) × f ) ∘ out 1 ∘ in 1 ∘ ( m × f ) ∘ out 1 by (5.34) \= p ∘ in 1 ∘ ( ( j ∘ m ∘ m ) × ( f ∘ f ) ) ∘ out 1 \= p ∘ in 1 ∘ ( ( j ∘ m ) × f ) ∘ out 1 by the idempotent arrows m and f \= ( in 1 ∘ ( g f × f ) ∘ out 1 ) ∘ in 1 ∘ ( ( j ∘ m ) × f ) ∘ out 1 by (5.23) \= in 1 ∘ ( ( ( g f ∘ j ) ∘ m ) × f ) ∘ out 1 \= in 1 ∘ ( ( ( j ∘ m ) ∘ m ) × f ) ∘ out 1 by the commutative diagram (5.31) \= in 1 ∘ ( ( j ∘ m ) × f ) ∘ out 1 \= l by (5.34),

and hence, the following diagram commutes:

From the fact that from ( 5.26 ), eval f , g RE b \= T 1 1 ( ev ; ev ) , let us show that the exponential diagram (5.33) commutes. In fact, we have from ( 5.25 ) and ( 5.35 ),

ev ∘ l \= ( g ∘ eval b , b ∘ ( out 2 × f ) ∘ out 1 ) ∘ ( in 1 ∘ ( ( in 2 ∘ Λ ( k ∘ in 1 ) ∘ m ) × f ) ∘ out 1 ) \= g ∘ eval b , b ∘ ( ( out 2 ∘ in 2 ∘ Λ ( k ∘ in 1 ) ∘ m ) × ( f ∘ f ) ) ∘ out 1 \= g ∘ eval b , b ∘ ( ( Λ ( k ∘ in 1 ) ∘ m ) × f ) ∘ out 1 \= g ∘ eval b , b ∘ ( ( Λ ( k ∘ in 1 ) × id ) ∘ ( m × f ) ) ∘ out 1 \= g ∘ k ∘ in 1 ∘ ( m × f ) ∘ out 1 by ( β ) reduction \= k from (5.27) .

Let us verify that the exponential diagram (5.33) in ER b is directly derived from the following commutative diagram in C , where the top horizontal arrow is p \= in 1 ∘ ( g f × f ) ∘ out 1 from ( 5.23 ), where from ( 5.12 ) g f \= in 2 ∘ Λ ( h 0 ) ∘ out 2 , with h 0 \= g ∘ eval b , b ∘ ( id b ⇒ b × f ) , such that the conceptualized object is p ˜ \= g f ˜ ⊗ 0 f ˜ , while the conceptualized object m ˜ ⊗ f ˜ , for a given idempotent arrow m : b → b is obtained from the bottom horizontal arrow:

The upper rhombus is the commutative diagram (5.24) with ev ∘ p \= g ∘ ev . So, for the arrow k : b → b for which we assume the commutativity of the lower rhombus, and the commutativity of the left/right small triangles, k \= ev ∘ l is shown above in this diagram.

This completes the proof that ER b is a CCC.  □

5.4   Internal categorial symmetry and fixed-point operators

In this section, we will provide the final theorem, which uses the definition of the fixed-point operators fix b in a CCC category C , specified in Proposition 10 in Section 5.2 with the commutative diagram (5.2), i. e.,

(5.38) fix b \= eval b , b ∘ ( id b ⇒ b × fix b ) : ( b ⇒ b ) → b .

However, it is valid only for the reflexive objects b in C , and hence, C has no fixed-point operators because not all objects of C are reflexive.

Consequently, in order to obtain a category, which has fixed-point operators (from Proposition 10 ), we can use the idempotent categories ER b for which we have demonstrated that are CCC as well, because in ER b every object has the fixed-point operators, as we can demonstrate by the following theorem.

Theorem 9. Every object f ˜ in ER b has a fixed-point operator Fix f ER .

Proof.

We recall that each object f ˜ of ER b is a conceptualized object equal to T e 0 ( J ( f ) ) where f : b → b is an idempotent morphism of the conceptually closed CCC category C by the symmetry-closure functor T e : C ↓ C → C .

Let fix b : ( b ⇒ b ) → b be a fixed-point operator for the reflexive object b in C . We can define the following morphism in the CCC category C :

(5.39) k ≜ fix b ∘ out 2 ∘ f f : b → b

where from ( 5.12 ), f f \= in 2 ∘ Λ ( h 0 ) ∘ out 2 : b → b , with h 0 \= f ∘ eval b , b ∘ ( id b ⇒ b × f ) : ( b ⇒ b ) × b → b , and we can verify that it is good definition (as required by the arrows in Ret b , i. e., that holds k \= f ∘ k ∘ f f , so that the following diagram in the conceptually-closed CCC category C commutes:

where the fixed-point operator Fix f ER for the object f ˜ in ER b corresponds to the right-hand side vertical arrow in the diagram above, i. e.,

(5.41) Fix f ER b ≜ T e 1 ( k ; k ) \= T e 1 ( fix b ∘ out 2 ∘ f f ; fix b ∘ out 2 ∘ f f ) : f f ˜ → f ˜ .

Let us show that the diagram above commutes indeed, and hence, we define an auxiliary arrow h 1 \= eval b , b ∘ ⟨ id b ⇒ b , in 2 ⟩ ∘ out 2 : b → b and also

h \= eval b , b ∘ ( id b ⇒ b × f ) ∘ ( out 2 × h 1 ) : b × b → b ,

so that we obtain

k \= fix b ∘ out 2 ∘ f f \= eval ∘ ⟨ id , in 2 ⟩ ∘ Λ ( eval ∘ ( id × h 1 ) ) ∘ out 2 ∘ f f by substitution of (5.3) \= eval ∘ ⟨ id , in 2 ⟩ ∘ Λ ( eval ∘ ( id × h 1 ) ∘ ( ( out 2 ∘ f f ) × id ) ) by Curry \= eval ∘ ⟨ id , in 2 ⟩ ∘ Λ ( eval ∘ ( ( out 2 ∘ f f ) × h 1 ) ) \= eval ∘ ⟨ id , in 2 ⟩ ∘ Λ ( eval ∘ ( Λ ( f ∘ eval b , b ∘ ( id × f ) ) × id ) ∘ ( out 2 × h 1 ) ) by f f \= eval ∘ ⟨ id , in 2 ⟩ ∘ Λ ( f ∘ eval b , b ∘ ( id × f ) ∘ ( out 2 × h 1 ) ) by ( β ) \= eval ∘ ⟨ id , in 2 ⟩ ∘ Λ ( f ∘ h ) \= eval ∘ ⟨ Λ ( f ∘ h ) , in 2 ∘ Λ ( f ∘ h ) ⟩ by (5.14) \= eval ∘ ( Λ ( f ∘ h ) × id ) ∘ ⟨ id , in 2 ∘ Λ ( f ∘ h ) ⟩ by (5.14) \= f ∘ h ∘ ⟨ id , in 2 ∘ Λ ( f ∘ h ) ⟩ by ( β )

i. e.,

(5.42) k \= f ∘ h ∘ ⟨ id , in 2 ∘ Λ ( f ∘ h ) ⟩ ,

and hence,

f ∘ k ∘ f f \= f ∘ ( f ∘ h ∘ ⟨ id , in 2 ∘ Λ ( f ∘ h ) ⟩ ) ∘ f f \= ( f ∘ h ∘ ⟨ id , in 2 ∘ Λ ( f ∘ h ) ⟩ ) ∘ f f , by idempotent f \= k ∘ f f by (5.42) \= ( fix b ∘ out 2 ∘ f f ) ∘ f f by (5.39) \= fix b ∘ out 2 ∘ f f ) by idempotent f f \= k by (5.39)

so that k is a well-defined arrow in Ret b , and hence, the diagram in (5.40) commutes.

What we need now is to obtain the commutative diagram for this fixed-point operator Fix f ER in ER b , analog to the diagram (5.2) for the fixed-point operator fix b of the reflexive object b in conceptually closed CCC category C . That is, the commutative diagram of the left-hand side, as a result of application of the functor T e to the right-hand side diagram below, by an appropriate definition of the arrow l : b → b used for the arrow ( l ; l ) : J ( f f ) → J ( p ) in C ↓ C , where p \= in 1 ∘ ( f f × f ) ∘ out 1 such that, from ( 5.23 ), T e 0 ( J ( p ) ) \= f f ˜ ⊗ 0 f ˜ ,

where id ER b \= T e 1 ( f f ; f f ) , and the right-hand side commutative diagram in C ↓ C above corresponds to the following commutative diagram in C , analog to the diagram in (5.37),

The upper rhombus is the commutative diagram (5.24) for g \= f , with ev ∘ p \= f ∘ ev , while the lower rhombus corresponds to the commutativity of the diagram in (5.40). Let us show also the commutativity of the left/right small triangles, k \= ev ∘ l , by defining the arrow l : b → b based on definition ( 5.19 ) of pairing operation ⟨ _ , _ ⟩ ER b in ER b , by

(5.45) l ≜ in 1 ∘ ⟨ f f , k ⟩

where, from ( 5.39 ), k \= fix b ∘ out 2 ∘ f f : b → b . In fact, from ( 5.25 ) in this case when g \= f , we have that ev \= f ∘ eval b , b ∘ ( out 2 × f ) ∘ out 1 , and hence,

ev ∘ l \= ( f ∘ eval b , b ∘ ( out 2 × f ) ∘ out 1 ) ∘ ( in 1 ∘ ⟨ f f , k ⟩ ) \= f ∘ eval b , b ∘ ⟨ ( out 2 ∘ f f ) × ( f ∘ k ) ⟩ \= f ∘ eval b , b ∘ ⟨ ( out 2 ∘ f f ) × k ⟩ by (5.42) and idempotent f , f ∘ k \= k \= f ∘ eval b , b ∘ ⟨ ( out 2 ∘ f f ) × ( fix b ∘ out 2 ∘ f f ) ⟩ by (5.39) \= f ∘ ( eval b , b ∘ ⟨ id × fix b ⟩ ) ∘ out 2 ∘ f f \= f ∘ ( fix b ∘ out 2 ∘ f f ) from commutativity in (5.2) \= f ∘ k \= k ∘ f f from commutativity in (5.40) \= ( fix b ∘ out 2 ∘ f f ) ∘ f f \= fix b ∘ out 2 ∘ f f from idempotent arrow f f \= k .

Thus, the complete diagram in (5.44) commutes, and hence, also the diagrams in (5.43), which define the fixed-point operators in ER b . This completes the proof of this theorem.  □

Consequently, if we use a CCC category C such that is also a CoCC (conceptually-closed category), then we obtain a simplified model for untyped lambda calculus.

Corollary 12.

A CCC category C with reflexive objects, which is a conceptually closed category (CoCC) as well, with the symmetry-closure functor T e : C ↓ C → C , is a model for a type-free lambda calculus with fixed-point operators.

It holds directly from Theorem 9 and fact that for each reflexive object b of C , the idempotent category ER b is a strict subcategory of C .

The category Ret b , obtained from a CCC category C with a reflexive object b , has a fundamentally different internal structure from C , and hence, such categorial models for fixed-point operators does not permit the unification of a typed lambda calculus with fixedpoint operator extensions into a unique category (a model).

With this alternative way provided by Theorem 9 above, instead, by introducing the CoCC (conceptual symmetry closure) property for a CCC category C with reflexive objects, this category is a model both for standard typed lambda calculus, but supports also the fixed-point operators for a more general type-free language able to support the full expressive calculus power and programming with “recursive definitions.”

However, the conceptual categorial symmetry permits to distinguish a program (an arrow f of C ), viewed as such, from the same program viewed as data (expressed by the conceptualized object f ˜ \= T e 0 ( J ( f ) ) of C ). That is, also in such a type-free language extension of the lambda calculus, we have the explicit difference in such a categorial framework from a program and the same program seen as data for another programs.

5.5   Topological K-theory, idempotent completion and internal categorial symmetry

In mathematics, topological K-theory is a branch of algebraic topology. It was founded to study vector bundles on topological spaces, by means of ideas now recognised as (general) K-theory that were introduced by Alexander Grothendieck in his formulation of Riemann–Rock theorem, an important theorem in mathematics, specifically in complex analysis and algebraic geometry, for the computation of the dimension of the space of meromorphic functions with prescribed zeros and allowed poles.

It relates the complex analysis of a connected compact Riemann surface with the surface’s purely topological genus g (the number of “holes” of a surface, so that a sphere S 2 and a disc both have genus zero, and a torus has genus 1), in a way that can be carried over into purely algebraic settings. A Riemann surface X is a topological space that is locally homeomorphic to an open subset of C , the set of complex numbers. In addition, the transition maps between these open subsets are required to be holomorphic. The latter condition allows one to transfer the notions and methods of complex analysis dealing with holomorphic and meromorphic functions on C to the surface X . For the purposes of the Riemann–Roch theorem, the surface X is always assumed to be compact .

The early work on topological K-theory is due to Michael Atiyah [ 33 ] and Friedrich Hirzebruch. The starting point of K-theory was a simple idea of Grothendieck [ 34 ]. If M is a semigroup, one can “symmetrize” it in the same way that we define Z from the semigroup N of natural integers. As a matter of fact, the semigroup M is difficult to compute in the applications we have in mind, whereas S ( M ) is reachable through standard techniques of algebra and topology. Let A be a not necessarily commutative ring with unit (e. g., in topology, A is the ring of (real or complex) continuous functions on a compact space X ) and let M \= φ ( A ) be the set of finitely generated projective (right) A -modules up to isomorphism: The group S ( M ) obtained from M by symmetrization is called the K-theory of A and denoted by K ( A ) . One should notice that K ( A ) is a “functor”: a ring homomorphism f : A → B induces a group map K ( A ) → K ( B ) .

Despite the apparent simplicity of this definition, K-theory has been very useful in many parts of mathematics. The category of projective modules over any ring is the Karoubi envelope of its full subcategory of free modules. The category of vector bundles over any paracompact space is the Karoubi envelope of its full subcategory of trivial bundles. This is in fact a special case of the previous example by the Serre–Swan theorem, and conversely this theorem can be proved by first proving both of these facts—the observation that the global sections functor is an equivalence between trivial vector bundles over X and free modules over C ( X ) and then using the universal property of the Karoubi envelope.

Let X and Y be two topological spaces (for instance, metric spaces). Two continuous maps f 0 and f 1 from Y to X are homotopic (similar) if we can find a continuous map f : Y × [ 0 , 1 ] → X such that f ( y , i ) \= f i ( y ) for i \= 0 , 1 . This is an equivalence relation and we denote by [ Y , X ] the set of equivalence classes. This set is difficult to compute explicitly in general, even for spaces as simple as spheres. Two spaces Y and X are homotopically equivalent (or have the same homotopy type) if there exist two maps h : Y → X and g : X → Y such that k ∘ g is homotopic to id X and g ∘ k is homotopic to id Y . The idea behind this definition is the notion of “shape” of a space, which is just another word for “homotopy type.” Roughly speaking, two spaces have the same shape if they can be deformed one into another.

A variant of these considerations is to take spaces X with a “base point” x 0 , and maps preserving base points. For instance, in the definition above of homotopic maps we assume moreover that f ( y 0 , t ) \= x 0 . One reason for this variant is the definition of the homotopy groups of a space X (with a fixed base point). These are defined when Y is a sphere S n (with a fixed base point) and play an important role in algebraic topology. More precisely, the homotopy classes of base point preserving maps from the sphere S n to X is the set of path connected components if n \= 0 , form a group if n > 0 , which is Abelian if n > 1 . The homotopy groups of a space are quite difficult to compute. However, as it was pointed out by Bott (Bott’s theorem, Bott periodicity), the homotopy groups of Lie groups (with the obvious topology and metric induced by the natural embedding in a Euclidean space of a suitable dimension) might be easier to determine in certain circumstances.

The Brouwer fixed-point theorem was one of the early achievements of algebraic topology, and is the basis of more general fixed-point theorems, which are important in functional analysis. The theorem proved its worth in more than one way. During the 20th century, numerous fixed-point theorems were developed, and even a branch of mathematics is called fixed-point theory. Brouwer’s theorem is among the foundational theorems on the topology of topological manifolds.

Brouwer’s fixed-point theorem was generalized to Banach spaces. This generalization is known as Schauder’s fixed-point theorem, a result generalized further by S. Kakutani to multivalued functions. The proofs of Brouwer theorems are not constructive, and Brouwer’s dissatisfaction with this is partly what led him to articulate the idea of constructivity. He became the originator and zealous defender of a way of formalizing mathematics that is known as intuitionism .

A proof using homology uses the observation that the boundary of the n -disk D n is S n − 1 , the ( n − 1 ) -sphere. Suppose, for contradiction, that a continuous function f : D n → D n has no fixed point. This means that, for every point x ∈ D n , the points x and f ( x ) are distinct. Because they are distinct, for every point x ∈ D n , we can construct a unique ray from f ( x ) to x and follow the ray until it intersects the disc’s boundary S n − 1 . By calling this intersection point F ( x ) , we define a function F : D n → S n − 1 sending each point in the disk to its corresponding intersection point on the boundary. As a special case, whenever x itself is on the boundary, then the intersection point F ( x ) must be x (a fixed point of F ).

Consequently, F is a special type of continuous function known as a retraction : every point of the codomain (in this case S n − 1 ) is a fixed point of F . In effect, we have seen a particular case of the lambda calculus for which we use the reflexive objects b of a CCC category C with retraction ( b ⇒ b ) < b via retraction pair of functions ( in , out ) in order to define the category of idempotents Ret b and its equivalent category ER b in the case when C is a conceptually closed category (CoCC) as well, as a particular categorial topology satisfying conceptual categorial symmetry.

In effect, Scott applied a more general Karoubi envelope in order to define this category of idempotents Ret b (Definition 24 in Section 5.2 ) by idempotent completion of CCC. Another example of using a Karoubi envelope, which is a general idempotent completion of different kinds of categories is in the case of the exact categories [ 35 ]. In this case, the Karoubi envelope is used for the idempotent completion of the additive categories , with a result that the additive category is idempotent complete iff every idempotent has a kernel: every additive category A can be fully faithfully embedded into an idempotent complete additive category (Remark (6.3) in [ 35 ]).

Karoubi idempotent completion for the split idempotents (as for the retracts) corresponds to Cauchy completion [ 36 ]. Thus, this general idempotent completion and relative embedding can be formally specified as follows.

Definition 25.

The Karoubi envelope C ˆ of a category C , is defined by:

1.

The objects of category C ˆ are the pairs ( b , f ) consisting of an object b of C and idempotent endomorphism f : b → b of C , such that f ∘ f \= f .

2.

A morphism in C ˆ from ( b , f ) to ( c , g ) is a morphism h : b → c such that h \= g ∘ h ∘ f . For any object ( b , f ) in C ˆ , its identity arrow is id ( b , f ) \= f .

3.

The canonical embedding functor E \= ( E 0 , E 1 ) : C → C ˆ is defined by

E 0 ( b ) \= ( b , id b ) , for each object b of C E 1 ( h ) \= h , for each morphism h in C .

Now we can show how Karoubi reduces (an implosion) in the case when C is CoCC category.

Corollary 13.

Let C be a conceptually-closed category (CoCC) with symmetry-closure functor T e : C ↓ C → C . Then its Karoubi envelope can be defined by setting each object ( b , f ) \= f ˜ and morphism from h : ( b , f ) → ( c , g ) such that h \= g ∘ h ∘ f to morphism T e 1 ( h ; h ) : f ˜ → g ˜ .

Consequently, we obtain that Karoubi envelope category is a strict subcategory of C , when the canonical embedding functor E becomes the endofunctor T e ∘ ▲ : C → C .

Proof.

We only substitute each arrow h : ( b , f ) → ( c , g ) of the Karoubi envelope category (such that h \= g ∘ h \= h ∘ f , represented by the arrow ( h ; h ) : J ( f ) → J ( g ) in C ↓ C and use the symmetry-closure functor T e ) by the arrow T e 1 ( h ; h ) : f ˜ → g ˜ between idempotent conceptualized objects f ˜ \= T e 1 ( J ( f ) ) and g ˜ \= T e 1 ( J ( g ) ) in C .

The same arrow h : ( b , f ) → ( c , g ) is represented in C ↓ C also by ( h ; h ) : J ( id b ) → J ( id c ) , and hence, by T e 1 ( h ; h ) : id b ˜ → id c ˜ in C , which is equal to E 1 ( h ) : E 0 ( b ) → E 0 ( c ) . Thus, the Karoubi envelope reduces to a subcategory of idempotent objects of C .  □

With this result, for the Karoubi envelopes that generalize the theory of fixed-point operators for lambda calculus in relationship with the internal categorial symmetry theory, we finish this chapter.