# 3. Algebra

This section on algebra will mainly (for about 3/4) be formed of concepts extracted from the existing literature on universal algebra and category theory. This exposition aims to be relatively short, optimized and self-contained, focused on the relatively few basic aspects I found relevant for providing a solid framework for the main concepts of the foundations of mathematics, geometry and physics. In contrast, the literature on the topic appears overloaded by less efficient choices of formalization and many more concepts less relevant to this goal. Not being erudite in it (being discouraged by its size), I cannot check how new are the points and tricks I figured out myself, and for which I coined some original vocabulary and notations.

## 3.1. Galois connections

### Fixed points, idempotent functions

The set of fixed points of any function f is defined as

Fnc f, Fix f = {x∈ Dom f | f(x) = x} ⊂ Dom f ⋂ Im f

Then, ∀Fnc f,g, Im f ⊂ Fix g ⇔ (Im f ⊂ Dom ggf = f)

A function f is called idempotent if, equivalently,

Im f ⊂ Dom fff = f
Im f = Fix f

### Monotone, antitone, strictly monotone functions

Between ordered sets E and F, a function f : EF will be said :
• monotone if ∀x,yE, xyf(x) ≤ f(y)
• antitone if ∀x,yE, xyf(y) ≤ f(x)
• strictly monotone if ∀x,yE, xy ⇔ f(x) ≤ f(y)
• strictly antitone if ∀x,yE, xy ⇔ f(y) ≤ f(x).
Any composite of a chain of monotone or antitone functions, is monotone if the number of antitone functions in the chain is even, or antitone if it is odd.
Any strictly monotone or strictly antitone function is injective.
If fFE and gEF are both monotone (resp. both antitone) and gf = IdE, then f is strictly monotone (resp. strictly antitone).

### Order between functions, extensive functions

For all sets E, F where F is ordered, the set FE is ordered as a product (fg ⇔ ∀xE, f(x) ≤ g(x)).
Then, ∀f,gFE, ∀hEG, fgfhgh, i.e. ffh is always monotone.
The particular case F = V2 is that h is monotone from ℘(E) to ℘(G) for the inclusion order.
If F and G are ordered and uGF is monotone (resp. antitone) then FEfufGE is monotone (resp. antitone).
In an ordered set E, a function fEE is said extensive if IdEf, i.e. xE, xf(x).
The composite of two extensive functions is extensive.

### Galois connections : definition and examples

For any ordered sets E, F, denoting F the set F with the transposed order, the sets of (antitone) Galois connections between E and F, and monotone Galois connections from E to F, are defined by

Gal(E,F) = {(⊥,⊤) ∈ FE×EF|∀xE, ∀yF, xE⊤(y) ⇔ yF ⊥(x)} = tGal(F,E)
Gal+(E,F) = {(u,v) ∈ FE×EF|∀xE, ∀yF, xE v(y) ⇔ u(x) ≤F y} = Gal(E,F)

Lemma. ∀⊥ ∈ FE, !⊤ ∈ EF, (⊥,⊤) ∈ Gal(E,F).
Proof: ∀⊤ ∈ EF, (⊥,⊤) ∈ Gal(E,F) ⇔ ≤E⚬⊤ = ⊥⚬ ≤F, while ≤E is injective.∎

Galois connections between powersets. Any RX×Y defines (⊥,⊤) ∈ Gal(℘(X),℘(Y)) by

AX, ⊥(A) = {yY | ∀xA, x R y} = xA R(x)
BY, ⊤(B) = {xX | ∀yB, x R y} = {xX | BR(x)}

Then, ⊥(∅) = Y and ⊤(∅) = X.
Proof : ∀AX, ∀BFA ⊂ ⊤(B) ⇔ A×BRB ⊂ ⊥(A).∎
This is actually a bijection: Gal(℘(X),℘(Y)) ⥬ ℘(X×Y). Proof:
if (⊥,⊤) ∈ Gal(℘(X),℘(Y)) and R = ∐xX ⊥({x}) then
BY, ∀xX, x ∈ ⊤(B) ⇔ B ⊂ ⊥({x}) = R(x).∎
Monotone Galois connections between powersets. Any relation RX×Y defines a (u,v) ∈ Gal+(℘(X),℘(Y)) by

AX, u(A) = {yY | ∃xA, x R y} = xA R(x)
BY, v(B) = {xX | R(x) ⊂ B}.

This way, the graph of any function f : XY defines

(Af[A], Bf(B)) ∈ Gal+(℘(X),℘(Y))

### Properties of Galois connections

For all (⊥,⊤) ∈ Gal(E,F), the closures Cl =⊤⚬⊥ ∈ EE and Cl′=⊥⚬⊤ ∈ FF satisfy
1. Cl and Cl′ are extensive.
2. ⊥ and ⊤ are antitone
3. Cl and Cl′ are monotone
4. ⊥⚬⊤⚬⊥ = ⊥, and similarly ⊤⚬⊥⚬⊤ = ⊤
5. Im ⊤ = Im Cl = Fix Cl, called the set of closed elements of E.
6. Cl⚬Cl = Cl
7. (⊥ strictly antitone) ⇔ Inj ⊥ ⇔ Cl = IdE ⇔ Im ⊤ = E
8. x,x′∈E, ⊥(x) ≤ ⊥(x′) ⇔ (Im⊤∩ ≤(x) ⊂ ≤(x′)).
9. Denoting K = Im ⊤, ⊤⚬⊥|K = IdK, thus ⊥|K is strictly antitone and ⊥|K−1 = ⊤|Im⊥.
Proofs:
(1.) ∀xE, ⊥(x) ≤ ⊥(x) ∴ x ≤ ⊤(⊥(x)).
(1. ⇒ 2.) ∀x,yE, xy ≤ ⊤(⊥(y))⇒⊥(y) ≤ ⊥(x).
(1.∧2. ⇒ 4.) IdE ≤ Cl ⇒⊥⚬Cl ≤ ⊥ ≤ Cl′⚬⊥ = ⊥⚬⊤⚬⊥.
(4.⇒5.) Cl = ⊤⚬⊥ ∴ Im Cl ⊂ Im⊤ ;
Cl⚬⊤ = ⊤ ∴ Im ⊤ ⊂ Fix Cl ⊂ Im Cl.
2. ⇒ 3. and 4. ⇒ 6. are obvious.
(7.) (Inj ⊥ ∧ ⊥⚬Cl = ⊥) ⇔ Cl = IdE ⇔ (Im ⊤ = E ∧ Cl⚬⊤ = ⊤);
Cl = IdE ⇒ ⊥ strictly antitone ⇒ Inj ⊥.
(8.) ⊥(x) ≤ ⊥(x′) ⇔ (∀yF, x≤⊤(y) ⇒ x′≤ ⊤(y)).
(9.) K = Fix(⊤⚬⊥) ⇒ ⊤⚬⊥⚬IdK = IdK.
Other proof : (⊥|K,⊤) ∈ Gal(K,F) with ⊤ surjective.
In ⊤|Im⊥⚬⊥|K = IdK the roles of ⊤ and ⊥ are symmetrical. ∎

Remark. Properties 1. and 2. conversely imply that (⊥,⊤) ∈ Gal(E,F).

Proof: ∀xE, ∀yF, x ≤ ⊤(y) ⇒ y ≤ ⊥(⊤(y)) ≤ ⊥(x).∎

Analogues of the above properties for monotone Galois connections are obtained by reversing the order in F:
If (u,v) ∈ Gal+(E,F) then u and v are monotone, vu is extensive and uv ≤ IdF.

### Characterization of closures

A closure of an ordered set E is an fEE such that, equivalently:
1. There exists a set F and an (u,v) ∈ Gal(E,F) or Gal+(E,F) such that vu=f
2. f is monotone, idempotent and extensive
3. xE, ∀y∈ Im f, xyf(x) ≤ y, i.e. (f, IdK) ∈ Gal+(E,K) where K = Im f
Proof of equivalence:

3. ⇒ 1. ⇒ 2.
For 2. ⇒ 3., ∀xE,∀yK, xf(x) ≤ yxyf(x) ≤ f(y) = y. ∎

Notes:

• 2.⇒3. is a particular case of the remark: ff = ff⚬IdK ≤ IdK (extensivity of f⚬IdK in K).
• KE, ∀fKE, (f,IdK) ∈ Gal+(E,K) ⇒ Im f = K from the above 7. with IdK injective.

## 3.2. Relational systems and concrete categories

Let us formalize the concept of system, focusing for simplicity on those with only one type. For any number n∈ℕ and any set E, let us denote
• En = E×...×E = EVn, set of all n-tuples of elements of E (n-ary product or exponentiation).
• RelE(n) = ℘(En), set of all n-ary relations in E
• OpE(n) = EEn, set of all n-ary operations in E.
We then denote the set of all operations OpE = ∐n∈ℕ OpE(n), and that of all relations RelE = ∐n∈ℕ ℘(En). Or, we could write OpE with ⋃n∈ℕ since the OpE(n) are pairwise disjoint when E≠∅.

### Languages

A language L is a set of symbols, with the data of the intended arity ns∈ℕ of each sL. For any set E, let

LE = ∐sL Ens

Then ∀AE, ∀(s,x)∈LE, (s,x) ∈ LA ⇔ Im xA.

A relational language is a language L of relation symbols, where each sL aims to be interpreted in any L-system E as an ns-ary relation. These form a family called an L-structure on E, element of

sL ℘(Ens) ⥬ ℘(LE).

For any function f : EF, let Lf : LELF defined by (s,x) ↦ (s,fx). Then

LIdE = IdLE
fncf,g, Im f ⊂ Dom gL(gf) = LgLf
Inj f ⇒ Inj Lf
Im Lf = LIm f

The latter comes by finite choice applied to (AC1)⇒(AC7), as arities of symbols are finite (otherwise it still goes for injective f, or using AC).
We shall omit parenthesis in notations of direct and inverse images in the way Lf = (Lf). Then,

AE, Lf[LA] = L(f[A])
BF, Lf(LB) = L(f(B))

### Relational systems

A relational system with language L, or L-system, is the data (E,E) of a set E with an L-structure ELE.

The case of an algebraic language, whose symbols aim to represent operations, will be studied in 3.3.

Most often, we shall only use one L-structure on each set, so that E can be treated as implicit, determined by E. Precisely, let us imagine given a class of L-systems where each E is the intersection of LE with a fixed class of (s,x), denoted as a predicate s(x) for how it is naturally curried: each symbol sL is interpreted in each system E as the ns-ary relation sE somehow independent of E,

sE = {xEns | s(x)} = E(s)
E = {(s,x)∈LE | s(x)} = ∐sL sE.

### Morphisms

Between any L-systems E,F, we define the set MorL(E,F) ⊂ FE of L-morphisms from E to F by ∀fFE,

f ∈ MorL(E,F) ⇔ ∀(s,x)∈E, (s,fx)∈F
⇔ (∀sL,∀xEns, s(x) ⇒ s(fx))
Lf[E] ⊂ FE ⊂ (Lf)F.

### Concrete categories

The concept of concrete category is what remains of a class of systems with their morphisms, when we forget which are the structures that the morphisms are preserving (as we will see this list of structures can be extended without affecting the sets of morphisms). Let us formalize concrete categories as made of the following data (making this slightly "more concrete" than the official concept of concrete category from other authors)
• a class of sets called objects ;
• a class of functions called morphisms; then for any objects E,F, we define
Mor(E,F) = {fFE | f is a morphism}
satisfying the following axioms:
• Every morphism belongs to some Mor(E,F), i.e. its domain is an object and its image is included in an object (in practice, images of morphisms will be objects too);
• For any object E, IdE ∈ Mor(E,E) ;
• Any composite of morphisms is a morphism: for any 3 objects E,F,G , ∀f ∈ Mor(E,F), ∀g∈Mor(F,G), gf ∈ Mor(E,G).
The last condition is easily verified for L-morphisms : ∀(s,x)∈E, (s,fx)∈F ∴ (s,gfx)∈G.
The simplest example is the category of sets where all sets are objects, and Mor(E,F) = FE.

A category is small if its class of objects is a set.

The official concept of concrete category mainly differs from this by allowing different objects to have the same base set : in the case of relational systems, such objects are systems consisting of different choices of structures on the same set. The above version of the concept may simulate this by taking disjoint copies of a given set for all structures we consider to use on it ; but this construction does not match the use of subsets as objects in their own right. We do not need to specify a fixed consistent formalization as long as we shall not play on the ambiguity in any way which might lead to wrong conclusions. Generally speaking, when we define a system and declare it an object of a category, we only need that some copy of this system is an object.
For example, we shall speak of the category of all L-systems, which gives back the category of sets when L is empty.

### Preservation of some defined structures

A relational symbol s with the data of an interpretation sEEns in every object E of a given concrete category, is said to be preserved if all morphisms of the category are also morphisms for this symbol, i.e. ∀f∈Mor(E,F), ∀xsE, fxsF. From definitions, each symbol in a language L is preserved in any category of L-systems.
In any given category of L-systems, or any concrete category with a given list L of preserved interpreted symbols, any further invariant structure whose defining formula only uses symbols in L and logical symbols ∧,∨,0,1,=,∃, is preserved.
Proof. For any L-morphism f∈MorL(E,F),
• Substituting arguments of a sL by a map σ to n' other variables (∀E,∀xEn', s'(x) ⇔ s(x⚬σ)), works :
s'(x) ⇒ s(x⚬σ) ⇒ s(fx⚬σ) ⇒ s'(fx).
• s,s'∈L, ns = ns' ⇒ ∀xEns, (s(x) ∧ s'(x)) ⇒ (s(fx) ∧ s'(fx))
• s,s'∈L, ns = ns' ⇒ ∀xEns, (s(x) ∨ s'(x)) ⇒ (s(fx) ∨ s'(fx))
• For 0 and 1 it is trivial
• x,yE, x = yf(x) = f(y)
• xEns,(∃yE, s(x,y)) ⇒ (∃z=f(y)∈F, s(fx, z)) ∎
In particular:
• In the nullary case: for any f ∈ MorL(E,F), if a ground formula with language L using only these logical symbols is true in E, then it is also true in F.
• The graph of any operation defined by a term is expressible in this way, and thus also preserved. But the proofs given by the above means are only a schema of one proof for each "small" (concretely written) term. A single proof for the full range of all terms will be given in 4.1.
However, morphisms may no more preserve structures defined with other symbols (¬,⇒,∀).

The above cases of 0, 1, ∨ and ∧ are mere particular cases (the nullary and binary cases) of the following:
• Any union of a family of preserved structures in a concrete category is a preserved structure.
• Any intersection of a family of preserved structures is also a preserved structure.

### Categories of typed systems

While we introduced the notion of morphism in the case of systems with a single type, it may be extended to systems with several types as well. The domain (range of objects) of a typed system may be formalized in set theory, either as a family of sets E = (Ei)i∈τ, or as a set E with a function tE : E → τ giving the type of each element. The translation between both formalizations is obtained one way taking the sum, and in the other way taking the fibers of tE (what we called an indexed partition but allowing empty components).
Then the concept of morphism between systems E,F with a common list τ of types (and interpreting the same language), is respectively and equivalently formalized as follows (aside the condition of having to preserve all structures):
• As a tuple or family of functions (fi)i∈τ, where ∀i∈τ, fi : EiFi ;
• As a τ-morphism f : EF seeing τ as a list of unary relation symbols (like for the use of classes as notions in set theory), i.e. a function such that tFf = tE.

## 3.3. Algebras

### Algebras and their morphisms

Given an algebraic language L, an L-algebra is the data (E,φ) of a set E with an L-algebraic structure φ : LEE, sum of a family of interpretations of each symbol sL as an operation φ⃗(s) ∈ OpE(ns).
Again, we shall usually consider a class of L-algebras with only one choice of algebraic structure φE on each set E, so that an algebra (EE) can be designated in the short form of its underlying set E :

sE : EnsE
φE = ∐sL sE : LEE

(but these sE cannot be the restrictions of a common ns-ary operator to each E, if we want to let constant symbols r and s interpreted in algebras E and F such that rE = sE but rFsF).
Algebras form a concrete category with the following sets of morphisms. For any L-algebras E, F,

MorL(E,F) = {fFE | ∀(s,x)∈LE, sF(fx) = f(sE(x))} = {fFE| φFLf = f⚬φE}.

When cL is a constant symbol (nc = 0), this condition on f says f(cE) = cF.

### Algebras as relational systems

Any category of algebras is identifiable with a category of relational systems with functional structure, as follows.

Let L' be the copy of L as a relational language, where the copy s'L' of each sL has increased arity ns' = ns+1, so that

L'E ⇌ ∐sL Ens×ELE × E = {((s,x),y) | sLxEnsyE}.
sL Gr sE ⇌ Gr φELE × E

Let us call L-system any set E with a structure formalized as ELE × E.
All concepts defined for relational systems are equally applicable through this canonical bijection.

### Qualities of systems with algebraic languages

Further properties of L-systems (E, E) will be named after the qualities of the relation E: let us qualify (E, E) as
• Functional or a partial algebra if E is functional (graph of a function from a subset of LE);
• Serial if Dom E = LE;
• Algebraic if a serial partial algebra, i.e. essentially an algebra (E, φE) by E = Gr φE ;
• Injective if tE is functional ;
• Surjective if Im E = E.
The concept of morphism between algebras (E, φE), (F, φF) is the particular case of the one between systems when they are algebraic :

fFE, (∀(x,y)∈Gr φE, (Lf(x),f(y)) ∈ Gr φF) ⇔ (∀xLE, φF(Lf(x)) = fE(x))).

Similarly, between a partial algebra (E, Gr φE) and an injective system (F, tGr ψF), sets of morphisms are defined by

MorL(E,F) = {fFE | Im f⚬φE ⊂ Dom ψFLf|Dom φE = ψFf⚬φE}
MorL(F,E) = {fEF | Im Lf⚬ψF ⊂ Dom φE ∧ φELf⚬ψF = f|Dom ψF}

If there exists a injective morphism from E to F then
• If F is functional then E is functional;
• If F is injective then E is injective.
If there exists a surjective morphism from E to F then
• If E is serial then F is serial;
• If E is surjective then F is surjective.

### Stable subsets and subalgebras

Any subset AE of an L-system (E, E), forms a system with structure A = E ∩ (LA × A). If E is functional or injective then A has the same property.
We shall say that A is L-stable, if E(LA) ⊂ A. The set of stable subsets of E is written SubL E:

SubL E = {AE | E(LA) ⊂ A} = {AE | ∀((s,x),y)∈E, Im xAyA}.

We have E ∈ SubL E.
If E is serial and A is L-stable then A is serial.
If E is algebraic and A is L-stable then A is algebraic, thus called an L-subalgebra of E. As an L-algebra, its structure is φA = φE|LA.
Conversely, any algebraic subset of a partial algebra is stable.
If a formula of the form (∀(variables), formula without binder) is true in an L-algebra, then it is true in each of its L-subalgebras. A very abstract and general formulation of this will come in 3.9.

### Diverse properties of stability

Intersections of stable subsets.X ⊂ SubLE, ⋂X ∈ SubL E where ⋂X {xE | ∀BX, xB}.

Proof: ∀(x,y)∈E, xLX ⇒ (∀BX, xLByB) ⇒ y∈⋂X. ∎

Other way: E(LX) = E(⋂BX LB) ⊂ ⋂BX E(LB) ⊂ ⋂X.

Stable set generated by a subset.AE, we denote 〈AL,E or simply 〈AL, the smallest L-stable subset of E including A (called L-subalgebra of E generated by A if E is an algebra):

AL = {xE | ∀B∈ SubLE, ABxB} = ⋂{B∈ SubLE | AB} ∈ SubLE

For fixed E and L, the function A↦〈AL is the closure, with image SubLE, from the relation ∈ between E and SubLE:

XE, ∀Y⊂SubLE, X ⊂ ⋂Y ⇔ (∀BY, XB) ⇔ Y ⊂ {B∈ SubLE | XB}.

We say that A generates E or is a generating subset of E if 〈AL = E.

Stability of equalizers. The equalizer Eq(f, g) = {xE | f(x) = g(x)} of any two L-morphisms f,g∈MorL(E,F) from an L-system E to a partial L-algebra F, is L-stable.

Proof : LEq(f, g) = {(s,x)∈LE | fx = gx} = {xLE | Lf(x) = Lg(x)}
∀(x,y)∈E, (Lf(x) = Lg(x) ∧ (Lf(x), f(y)) ∈ F ∧ (Lg(x), g(y)) ∈ F) ⇒ f(y) = g(y). ∎
Proof when F is an algebra : ∀(x,y)∈E, Lf(x) = Lg(x) ⇒ f(y) = φF(Lf(x)) = g(y).

### Minimal systems

For any L-system E, its minimal stable subset is defined as

MinLE = 〈∅〉L,E = ⋂ SubL E ∈ SubL E.

It is called minimal subalgebra if E is an L-algebra.

An L-system E is minimal when E = MinL E, or equivalently SubLE = {E}.

For any minimal L-system E and any partial L-algebra F, !: MorL(E,F).

For any L-system E and any AE,

• B∈ SubLE, AB ∈ SubL A
• MinL A ⊂ MinL E
• A is minimal ⇒ A ⊂ MinL E
• A ∈ SubLEE(LA) ∈ SubLE ∩ ℘(A) = SubLA
• A ∈ SubLE ⇒ MinLA = MinLE
• A = MinLE ⇔ (A is minimal ∧ A∈ SubLE) ⇒ E(LA) = A
In particular, any minimal system is surjective.
• AL = MinLA E where A is seen as a set of constants.
• AE(LA) ⊂ 〈AL = AE(LAL)
• EALA ⇒ MinL A = A ∩ MinL E
For the last property, we already know MinL AA ∩ MinL E; for the converse, using MinL A ∈ SubL A,
EALA ⇒ MinL A ∪ (E\A) ∈ SubL E ⇒ MinL E ⊂ MinL A ∪ (E\A) ⇒ A ∩ MinL E ⊂ MinL A.∎

### Cantor-Bernstein theorem

If there exist injections f: EF and g: FE then there exists a bijection between E and F.

Proof. 〈∁E Im g{gf} = A = (∁E Im g) ∪ g[f[A]] ⇒ ∁E A = g[∁F f[A]] ⇒ (ExxA ? f(x) : g-1(x)) : EF

## 3.4. Special morphisms

Let us introduce diverse qualifications for morphisms between objects of diverse concrete categories.

### Isomorphisms, endomorphisms, automorphisms.

Between objects E and F of a concrete category, an isomorphism is a bijective morphism f whose inverse is also a morphism :

f ∈Mor(E,F) ∧ (f : EF) ∧ f -1∈Mor(F,E).

This will be later generalized to other (abstract) categories, where the following other concepts are directly applicable.

Two objects E, F are said to be isomorphic (to each other) if there exists an isomorphism between them. This is an equivalence predicate, i.e. it works as an equivalence relation on the class of objects in this category.
The isomorphism class of an object in a category, is the class of all objects which are isomorphic to it. Then an isomorphism class of objects is a class of objects which is the isomorphism class of some object in it (independently of the choice).

An endomorphism of an object E, is an element of Mor(E,E) = End(E). It is called non-trivial if it differs from IdE.

An automorphism of E is an isomorphism of E to itself:

Automorphism ⇔ (Endomorphism ∧ Isomorphism)

### Embeddings

Let L a relational language, and two L-systems E and F.
A relation symbol r interpreted as rE in E and rF in F is called strongly preserved by a function fFE, if both r and ¬r are preserved :

xEnr, xrEfxrF.

If f ∈ MorL(E,F) strongly preserves all structures (E = Lf(F)), it will be called a pre-embedding. The construction of the order quotient of a preorder (2.9) forms a general example of pre-embedding.
An embedding is an injective pre-embedding. Injectivity can be made a consequence of the pre-embedding condition by adding = to the language (as injectivity means strongly preserving =). Yet if this = symbol is not required to keep its standard interpretation, but may be interpreted as any relation fitting the axioms of equality, then any pre-embedding can still fit the condition, only playing a role of embedding relatively to the use of this symbol in guise of equality, which reflects that it becomes a true embedding after quotienting the systems by this equivalence relation (this quotient reduces the interpretation of = to the standard one, and strongly preserves other structures).

For any subset AF of a relational system F, we define its structure by restriction : A = FLA. It is the only structure on A such that, equivalently

• IdA : AF is an embedding ;
• For any system E, MorL(E,A) = {h∈MorL(E,F) | Im hA}
Thus any f ∈ MorL(E,F) is the composite of 2 morphisms IdAf where A = Im f and f ∈ MorL(E,A).
Then f is an embedding into F if and only if it is an isomorphism to A. In particular, isomophisms are the bijective embeddings.

From IdA∈MorL(A,F), we deduce for all systems N, MorL(A,N) ⊂ {g|A | g∈MorL(F,N)} but generally without equality (details in 3.8).

### Elementary embeddings

Pre-embeddings also strongly preserve structures defined with symbols in L and logical symbols ∧,∨,0,1,¬, and also = in the case of embeddings.
Thus, they also preserve invariant structures defined using symbols of L and ∧,∨,0,1,¬,∃ but where all occurrences of ∃ precede those of ¬.
Removing this restriction on the order of logical symbols, gives the full use of first-order logic. Then a morphism that (strongly) preserves all invariant structures, is called an elementary embedding.

Isomorphism ⇒ Elementary embedding ⇒ Embedding ⇒ Injective morphism

An elementary subsystem of a system F is an AF such that IdA : AF is an elementary embedding, i.e. the value of any formula with parameters in A is the same whether its quantifiers range all in F or all in A.

Elementary equivalence. Different systems are said to be elementarily equivalent, if they have all the same properties.
The existence of an elementary embedding between systems implies that they are elementarily equivalent.

Non-surjective elementary embeddings, and more generally the diversity of elementarily equivalent but non-isomorphic systems, play special roles in high-level studies of the foundations of mathematics, as we shall see with Skolem's paradox and non-standard models of arithmetic. However they are ignored by the most usual practice of mathematics, because of how far-fetched (hard to find) they usually are.
Here is an aspect of such "difficulties" which is very easy to prove. If an elementary embedding f : EE is invariant then it is surjective, thus an automorphism :

Im f is also invariant (defined by ∃yE, f(y) = x)
xE, x ∈ Im ff(x) ∈ Im f
Im f = E. ∎

### The Galois connection (End, Inv)

For any set E and any n∈ℕ, the preservation relation (∀xR, fxR) between fEE and R∈RelE(n) gives a Galois connection (End, Inv(n)) between their powersets, where Inv(n)(M) is the set of n-ary relations invariant by MEE. In particular, Inv(1) M = SubM :

MEE, ∀F⊂℘(E), M ⊂ EndFE ⇔ (∀fM, ∀AF, f[A] ⊂ A) ⇔ F ⊂ SubME.

Gathering all arities forms the Galois connection (End, Inv) with

Inv = ⊓n∈ℕ Inv(n) : ℘(EE) → ∏n∈ℕ ℘(RelE(n)) ⥬ ℘(RelE).

This concept of "invariance" is a priori distinct from the one previously introduced and used above (definability without parameters) ; yet both are related, and versions of these will be effectively linked by implications and even some equivalences, as will be seen later. This is basically because the concept of definability without parameters is a closure function, which to a given set of "primitive symbols" gives the set of all symbols generated by it through the definition process, and thus may be compared to other closure functions such as Inv ⚬ End.

### Morphisms of algebras

For an algebraic language L, let us qualify a morphism f ∈ MorL(E,F) between L-systems as full if

xLE, ∀yF, (Lf(x),y) ∈ F ⇒ ∃zE, f(z) = y ∧ (x,z)∈E.

Equivalently, ∀ALE, f[E(A)] = F(Lf[A]) which implies ∀AE, f[E(LA)] = F(L(f[A])).
Any morphism from a serial system to a partial algebra is full. In particular, any morphism between algebras is full.
Any injective full morphism is an embedding.
There is a more direct way to check that any injective morphism between algebras is an embedding :

FLf = f⚬φE ∧ Inj f) ⇒ ∀(x,y)∈LE×E, f(y) = φF(Lf(x)) ⇒ y = φE(x).

Similarly, one can directly check that any injective morphism from a serial system to a partial algebra, or from a surjective system to an injective one, is an embedding.

Conversely, if f is a pre-embedding and (E is surjective, or some sE is injective for one of its arguments) then f is injective.
Bijective morphisms between algebras are isomorphisms. This can also be deduced by

(Lf)-1 = L(f -1) ∴ φELf -1 = f -1f ⚬ φELf -1 = f -1 ⚬ φFLfLf -1 = f -1 ⚬ φF.

### Images and preimages with algebraic languages

The direct image of a stable subset by a full morphism is stable:

AE, E(LA) ⊂ AF(L(f[A])) ⊂ f[A]
A∈ SubLE, f[A] ∈ SubLF

In particular,

Images of algebras. For any two L-algebras E,F, ∀f ∈MorL(E,F), Im f ∈ SubLF.

Proof : φF[LIm f] = φF[Im Lf] = Im (f⚬φE) ⊂ Im f
Also, the image of a morphism from an algebra to a partial algebra is stable and an algebra.

Preimages of stable subsets.f∈MorL(E,F), ∀B∈ SubLF, f(B) ∈ SubL E.

Proof. Let A=fB.
For L-algebras, ∀(s,x)∈LA, fxBnsf(sE(x)) = sF(fx) ∈BsE(x)∈A.
For L-systems, ∀(x,y)∈E, (Lf(x),f(y))∈F∴ (xLALf(x)∈LBf(y)∈ByA).∎

Proposition. For any L-systems E, F, ∀f ∈MorL(E,F),

1. f [MinLE] is minimal (thus f [MinLE] ⊂ MinLF).
2. AE, f[〈AL] = 〈f[A]〉L,f[〈AL] ⊂ 〈f[A]〉L
Proof of 1. M = MinLE ⇒ ∀B ∈ SubL f[M], f(B) ∈ SubL Mf(B) = MB = f[M].
1. ⇒ 2. by adding A as a set of constants into L.∎

Thus when f is full (in particular when E, F are algebras) we have equalities:

f [MinLE] = MinLF
AE, f [〈AL] = 〈f [A]〉L.

## 3.5. Monoids

### Transformations monoids

A transformation of a set E, is a function from E to E. The full transformation monoid of E is the set EE of all transformations of E, seen as an algebra with two operations: the constant Id, and the binary operation ⚬ of composition.
A transformation monoid of E is a {Id,⚬}-algebra M ∈ Sub{Id,⚬}EE of transformations of E :
• IdEM
• f,gM, gfM.
The set End(E) of endomorphisms of any object E in a concrete category, is a transformation monoid. Any transformation monoid can be seen as a concrete category with only one object.

### Monoids

A monoid is an algebra behaving like a transformation monoid, but without specifying a set which its elements may transform. As both symbols Id and ⚬ lose their natural interpretation, they are respectively renamed as e and •. So, the concept of monoid is the theory with only one type and
• Two operation symbols
• a constant symbol e of "identity"
• a binary operation • of "composition"
• Axioms
• Associativity : ∀x,y,z, x•(yz) = (xy)•z so that either term can be written xyz
• Identity axiom : ∀x, xe = x = ex
Both equalities in the identity axiom may be taken separately, forming two different concepts :
• A left identity of a binary operation • is an element e such that ∀x, ex = x ;
• A right identity of • is an element e' such that ∀x, xe' = x.
If both a left identity e and a right identity e' exist then they are equal : e = ee' = e' which makes it the identity of • (the unique identity element on either side). The existence of a right identity thus implies the uniqueness of a left identity, but otherwise several left identities may coexist (and similarly with sides reversed).

From any associative operation on a set E we can form a monoid by adding the identity e as an extra element, E' = E ⊔ {e}, to which the interpretation of • is extended as determined by the identity axiom. This preserves associativity; but any identity element from E loses its status of identity in E'.

Any {e,•}-subalgebra of a monoid is a monoid, thus called a submonoid.

### Cancellativity

An element x is left cancellative for a binary operation • if the transformation •(x) (called left composition by x) is injective:

y,z, xy = xzy = z.

Similarly x is right cancellative if •(x) is injective:

y,z, yx = zxy = z.

A cancellative operation is an operation where all elements are cancellative on both sides.
For example the monoid of addition in {0,1, several} is not cancellative as 1+several = several+several.
Any submonoid of a cancellative monoid is cancellative.
The existence of a left cancellative element implies the uniqueness of a right identity :

ae' = a = aee' = e.

### Other concepts of submonoids and morphisms

Modifying the formalization of monoid by replacing the status of e as a constant by ∃e in the identity axiom, would weaken the concepts of submonoids and morphism (allowing more of them) as follows.
For any monoid (M,e,•), any set X with a binary operation ▪, and any morphism of composition f ∈ Mor((M,•),(X,▪)),
• its image is a monoid (A,a,▪) where A = Im f and a = f(e)
• f is a morphism of monoid from M to this monoid A.
If the target forms a monoid (X,e',▪) then (by uniqueness of the identity in A)

f ∈ Mor{e}(M,X) ⇔ a = e'e'AA ∈ Sub{e, ▪} X

but these equivalent formulas may still be false, unless a is cancellative on one side (aa = a = ae'a = e').

Anti-morphisms. The opposite of a monoid is the monoid with the same base set but where composition is replaced by its transpose. An anti-morphism from (M,e,•) to (X,e',▪) is a morphism f from one monoid to the opposite of the other (or equivalently vice-versa):

f(e) = e'
a,bM, f(ab) = f(b)▪f(a)

### Commutants and centralizers

The commutant of any subset AE for a binary operation • in E, is defined as

C(A) = {xE|∀yA, xy = yx}.

This forms a Galois connection :

A,BE, BC(A) ⇔ AC(B).

Such A,B are said to commute, as each element of A commutes with each element of B.

If • is associative then ∀AE, C(A) ∈ Sub{•}F.
Proof: ∀x,yC(A), (∀zA, xyz = xzy = zxy) ∴ xyC(A).

Commutants in monoids are called centralizers. They are more precisely sub-monoids as obviously eC(A).
This can be understood as an intersection of submonoids in the case of a transformation monoid MXX :

AM, CM(A) = M ∩ EndA X

(Compared to the (End, Inv(2)) connection, this one comes by restricting the preservation relation to the set of graphs of functions in M).

A binary operation • in a set E, is called commutative when • = t•, i.e. C(E) = E.

If AC(A) and 〈A{•} = E then • is commutative.
Proof: AC(A)∈ Sub{•}FE = C(A) ⇒ AC(E) ∈ Sub{•}FC(E) = E.∎

In the case of monoids the conditions AC(A) and 〈A{e,•} = E suffice.

### Categories

The concept of monoid came as an abstraction of transformation monoids (= concrete categories with a single object). Now, the concept of category (or abstract category) does the same with pluralities of objects : it differs from the concept of concrete category, by forgetting that objects are sets and that morphisms are functions. So, a category C is made of:
• the class of its "objects" ; the category is small if this class is a set;
• to any objects E,F is given a set Mor(E,F) of «morphisms from E to F»; these are usually regarded as pairwise disjoint;
• to any object E is given a constant symbol 1E ∈ Mor(E,E);
• to any triple of objects E,F,G is given a "composition" operation (abusively all denoted by the same symbol)

∘ : Mor(F,G)×Mor(E,F) → Mor(E,G)

satisfying both axioms of identity and associativity, where quantifiers ∀C mean to range in the class of objects :
• C E,F, ∀x∈Mor(E,F), x∘1E = x = 1Fx
• C E,F,G,H, x∈Mor(E,F), ∀y∈Mor(F,G),∀z∈Mor(G,H), (zy)∘x = z∘(yx) ∈ Mor(E,H)
For display convenience, composition may also be written transposed, by the semicolon notation from computer science :

; = t∘ : Mor(E,F)×Mor(F,G) → Mor(E,G)
x;y = yx

The set End(E) = Mor(E,E) of endomorphisms of any object E, can be seen as a monoid in both opposite ways, by restriction of either ∘ or ;.

The concept of opposite category is defined similarly to opposite monoids, as re-reading the category with sides reversed, the Mor(E,F) of the one serving as the Mor(F,E) of the other. For any concept relative to a given category, its dual will mean the similar concept following the same definition with sides reversed, which amounts to applying this concept to the opposite category; it will usually be called by appending the prefix co- to the concept's name.

## 3.6. Actions of monoids and categories

### Actions of monoids

Since monoids lost their role as sets of transformations, such a role can be given back to them as follows.
An action (or left action) of a monoid (M,e, •) on a set X, is an operation ⋅ : M×XX such that ∈ Mor{e,•}(M, XX) :
• xX, ex = x
• a,bM, ∀xX, (ab)⋅x = a⋅(bx)
Examples:
• Any monoid naturally acts on itself by its composition operation.
• Any transformation monoid (or other acting monoid) M on a set E, also acts by restriction on any M-stable subset AE (preserved unary predicate in the concrete category M with object E).
• In particular, the monoid of endomorphisms of any typed system E = ∐iI Ei, acts on every type Ei it contains.

### Acts as algebraic structures

For any sets M, X with M-algebra structures • : M×MM and ⋅ : M×XX (seeing M as a set of function symbols), ∀xX,

x(e) = xex = x
x ∈ MorM(M,X) ⇔ ∀a,bM, (ab)⋅x = a⋅(bx)
e = IdM ⇔ (∀aM, ae = a) ⇒ ∀g∈ MorM(M,X), ⋅g(e) = g

where the last ⇒ comes by ∀aM, ag(e) = g(ae) = g(a). So in the following equivalence

xX, ∀gXM, g = ⋅x ⇔ (g ∈ MorM(M,X) ∧ g(e) = x)

⇒ expresses the axioms of action of M on X ; an M-algebra X satisfying these is called an M-set.
⇐ is implied by the last monoid axiom (•e = IdM); conversely, the variant of ⇐ replacing (X, ⋅) by (M, •) implies this axiom :

(IdM ∈ MorM(M,M) ∧ IdM(e) = e) ∴ •e = IdM

### Effectiveness and free elements

An action of M on X is said effective if ⋅ : MXX :

a,bM, (∀xX, a·x = b·x) ⇒ a = b

An effective action is a way of seeing a monoid as a transformation monoid (Im ⋅ ∈ Sub{Id,⚬}XX), by using this action in guise of function evaluator. Indeed, the effectiveness condition is similar to the axiom (=Fnc), making unique the function with given domain E fitting any definition of the form (∀xE, f(x) =...)
This way, the axioms of action amount to defining e and • as playing with this action, the same roles as those of Id and ⚬ with the function evaluator.

An element xX of an M-set (X, ·), is free if ⋅x : MX. The existence of a free element implies the effectiveness of the action :

(∃xX, ∀abM, a·xb·x) ⇒ (∀abM, ∃xX, a·xb·x)
Inj(πx ⚬ ⋅ ) ⇒ Inj ⋅

For the natural action of a monoid on itself, the identity element is free. Thus, this action is effective.

### Trajectories

The trajectory of an element xE by a monoid M acting on E, can be defined in 2 equivalent ways:

〈{x}〉M = {ax | aM} = Im ⋅xE

Indeed, 〈{x}〉M ⊂ Im ⋅x because x = ⋅x(e) ∈ Im ⋅x ∈ SubM E.
The converse is obvious.

### Right actions

A right action, also called co-action, of a monoid M on a set X, is like an action with sides switched: it is an operation ⋅ : X × MX such that
• xX, xe = x
• a,bM, ∀xX, (xa)⋅b = x ⋅(ab)
It amounts to an action of the opposite monoid, and defines an anti-morphism from M to XX.

The commutation of 2 submonoids of XX looks like an associativity formula when written as acting by opposite sides on X: aM acting on X commutes with bN co-acting on X when

xX, (ax)⋅b = a⋅(xb)

### Actions of categories

Generalizing from the above case of monoids, an action α of a category C gives for each object X of C a set Xα, and for each morphism f ∈ Mor(X,Y) a function fα : XαYα, preserving identities and compositions:

CX, (1X)α = IdXα
CX,Y,Z, ∀f∈ Mor(X,Y), ∀g∈ Mor(Y,Z), (gf)α = gαfα

The category C with the action α will be called an acting category and denoted Cα.
An acting category Cα is effective if ∀CX,Y, Inj(Mor(X,Y)∋ ffα).
An effective acting category is synonymous with a concrete category. Even if not effective, an acting category Cα defines a concrete category |Cα| with objects the sets Xα, and with sets of morphisms

Mor(Xα, Yα) = {fα | f∈Mor(X,Y)}

Dually, a co-action β of a category C (forming a co-acting category Cβ) gives for each object X of C a set Xβ, and for each morphism f ∈ Mor(X,Y) a function fβ : YβXβ, preserving identities, and anti-preserving compositions:

CX, (1X)β = IdXβ
CX,Y,Z, ∀f∈ Mor(X,Y), ∀g∈ Mor(Y,Z), (gf)β = fβgβ

In the literature, co-actions of categories are called presheafs.
Actions and co-actions of a category may be seen as typed meta-algebras with types given by its objects, and function symbols given by its morphisms.

### Some constructions of actions

Given an action α of C, a sub-action of α is an action β of C defined by restriction of α to a preserved unary predicate:

CX, XβXα
CX,Y, ∀f∈ Mor(X,Y), fα[Xβ] ⊂ Yβfβ = fα|Xβ.

Generalizing the natural actions of monoids on themselves, every choice of an object M defines an action C(M) of C called action from M, where

CX, X(M) = Mor(M,X)
f∈Mor(X,Y), f(M) = Hom(M, f) = ∘(f)|Mor(M,X) : X(M)Y(M)

and a co-acting category C(M) of co-action to M where

CX, X(M) = Mor(X,M)
f∈Mor(X,Y), f(M) = Hom(f,M) = ∘(f)|Mor(Y,M) : Y(M)X(M)

If C is a concrete category then C(M) is a sub-action of CM (which to each X gives XM), and C(M) is a sub-co-action of CM (which to each X gives MX).

The axioms for monoids M and M-sets X can be read as contained in the axioms of categories. Namely, pick an object K of a category C, and let M = End(K). Then any object E defines an M-set X = K(E) = E(K). As actions by composition on opposite sides commute by associativity, morphisms in the co-acting category C(K) preserve this M-structure :

f ∈Mor(E,F), f(K) ∈ MorM(F(K), E(K))
xX=Mor(E,K), x(K) = ⋅x ∈ MorM(K(K), E(K)).

### Trajectories of tuples in concrete categories

For any concrete category C and any number n∈ℕ, trajectories of the action Cn of C are preserved relations : for any fixed n-tuple t of elements of an object K, the trajectory s of t by C, interpreted as CE, sE = {ft | f ∈ Mor(K,E)}, is preserved.

Proof : ∀g∈Mor(E,F), ∀xsE, ∃f∈Mor(K,E), (x = ftgf ∈ Mor(K,F)) ∴ gx = gftsF.∎

With an inclusion between objects EF, the so defined sE may differ from the restriction of sF to E, but we shall usually not face this kind of issue.

## 3.7. Invertibility and groups

### Permutation groups

A permutation of a set E is a bijective transformation of E.
The set 𝔖E = {fEE| f : EE} of all permutations of E, is a transformation monoid of E called the symmetric group of E.
A permutation group of a set E, is a {Id,⚬, -1}-subalgebra of 𝔖E.
In a permutation group, trajectories are usually called orbits. The binary relation on a set E defined by trajectories by any transformation monoid (or acting monoid) M,

xE 〈{x}〉M

is a preorder on E (as seen in example in 2.9). If M is a group then this preorder is an equivalence relation, whose partition of E is the set of orbits.

While the concepts of full transformation monoid and symmetric group depend on the powerset, those of transformation monoid and permutation group do not use it, being expressed as first-order theories.

### Inverses

In a monoid (M,e,•), the formula xy = e is read "x is a left inverse of y", or "y is a right inverse of x"; this x is right invertible (it has a right inverse), and y is left invertible.
An element x is called invertible if it is so both sides. Then its left and right inverses are equal, thus unique, called the inverse of x and written x-1:

yx = e = xzy = yxz = z

If x commutes with an invertible element y then it also commutes with its inverse z:

xy = yxx = yxzzx = xz

An element x of a monoid is called involutive if it is its own inverse: xx = e.

### Transpositions

Here are the simplest permutations beyond the identity of each set. A transposition of a set E is a permutation of E that swaps two elements and leaves all others fixed :

x,yE, (x y)E = (Ez ↦ (z = x ? y : (z = y ? x : z))) = (y x)E ∈ 𝔖E

thus (x x)E = IdE which is not called a transposition.
Any transposition is involutive (this may give the simplest formal proof that it is a permutation).

### Groups

The concept of group is the theory obtained by adding to that of monoid, equivalently
• The axiom that all elements are invertible, or
• The function symbol -1 of inversion, with the axiom ∀x, xx-1 = x-1x = e
Indeed this latter axiom determines the interpretation of -1 from • and e.
If a transformation monoid is a group then it is a permutation group (as any inverse of a transformation in the sense of monoids is also its inverse as a function).
A subgroup of a group is a {e, •,-1}-subalgebra, or equivalently a sub-monoid which is a group (while sub-monoids of group are not all groups, for example ℕ in ℤ).
The core of a monoid M, is its set of invertible elements; it is a sub-monoid of M and a group:
• e is its own inverse.
• If x, y have inverses x-1, y-1, then xy has inverse y-1x-1.
• Any inverse x-1 is invertible, with (x-1)-1 = x (inversion is an involutive transformation of any group).
Its subgroups are all the submonoids of M which are groups, which may then be called the subgroups of M.
Between groups, a group morphism is equivalently an {e,•,-1}-morphism, or an {e,•}-morphism, as the latter also preserve inversion. More generally any {e,•}-morphism from a group to a monoid preserves the inversion relation {(x,y) | xy = e = yx}, thus its image is a group.

In a group, the subgroup generated by a subset A coincides with the submonoid generated by A∪-A where -A = {x-1|xA}. (It is stable by inversion because its definition is unchanged by inversion, which is involutive)

Any submonoid of a group is cancellative. This has no general converse, but some partial ones, such as: any commutative cancellative monoid has an embedding to a commutative group (this is not very easy to prove).

### Special actions

An element x of an M-set X will be called regular if it is both free and generating. This means that the M-morphism ⋅x is both injective and surjective, thus an M-isomorphism from M to X. The identity element of M is regular for the natural action of M on itself.
Let us qualify an action after this: an M-set will be called monogenic if it is a trajectory (it is generated by a singleton), and regular if it has a regular element.

If an M-set is both monogenic and generated by the set of its free elements, then it is regular (there is a free element that generates it).
Proof: as a generator is in the set generated by that of free elements, it must be in the trajectory of one of them, which is thus also generating.∎
(A monogenic action of a monoid may have free elements without being generated by them ; but if a monogenic action of a group has a free element then all its elements are free).

The trajectory Y of any element x of an M-set X is M-stable, and thus an M-set. It is generated by x, and stays so when replacing the language M by its image as a transformation monoid NYY.
Now if N is commutative (which is the case if M is commutative) then x is free for the action of N (thus Y is a regular N-set). The proof is easy and left as an exercise.

An action of a group G on a set X, is equivalently an action of monoid, or a group morphism from G to 𝔖X.
As inversion is an anti-morphism, it switches any action ⋅ of G on X into a co-action ▪ by ∀xX, ∀gG, x▪g = g-1x.
If an action of group is monogenic then every element is generating; if it is regular then every element is regular.

### The Galois connection (Aut, sInv)

For any set E, the relation of strong preservation between its set RelE of relations and its set 𝔖E of permutations, defines a Galois connection (Aut, sInv) similar to (End, Inv), where sInv gives the set of strong invariants :

P⊂𝔖E, sInv P = Inv (P ∪ -P) = Inv (P) ∩ Inv(-P) ⊂ RelE
L⊂RelE, ∀P⊂ 𝔖E, L ⊂ sInv PP ⊂ AutL E.

For any permutation group G, sInv G = Inv G. Definability without parameters implies invariance by automorphisms, as will be explained in 4.10.

### Isomorphisms

An isomorphism between objects E and F in any category, is an invertible morphism :

Iso(E,F) = {f∈Mor(E,F) | ∃g∈Mor(F,E), gf = 1Efg = 1F)}

This g is unique, called the inverse of f and written f -1.

A groupoid is a category where all morphisms are invertible. Groups are the groupoids with only one object, and the monoid of endomorphisms of any object of a groupoid is a group.
Generalizing from monoids, the core of a category is the groupoid with the same objects and only accepting isomorphisms as morphisms.
An automorphism of an object E, is an isomorphism from E to itself. Their set Aut(E), core of End(E), is a group called the automorphism group of E.

## 3.8. Properties in categories

### Monomorphisms, Epimorphisms

The concepts of cancellativity are generalized to any category C as follows.

A morphism f∈Mor(E,F) is called monic, or a monomorphism, if all f(X) are injective:

CX, ∀g,h∈Mor(X,E), fg = fhg = h.

In the category of sets, monomorphisms are the injections.

Dually, a morphism f∈Mor(E,F) is called epic, or an epimorphism, if all f(X) are injective :

CX, ∀g,h∈Mor(F,X), gf = hfg = h
CX, f(X) : F(X)E(X)
f(C) : C(F)C(E).

As actions by composition on opposite sides commute, an epimorphism f defines a meta-embedding between acting categories C(F) and C(E), seen as C-typed Mor-algebras. In particular, f is a free element of the End(F)-set F(E).
In the category of sets, epimorphisms are the surjections.

### Sections, retractions

The concepts of invertibility are generalized to any category C as follows. For any f∈Mor(E,F) and g∈Mor(F,E), the condition f;g = 1E is read: "f is a section of g", or "g is a retraction of f".
Then a g∈Mor(F,E) is called a retraction (or retraction on E if the category is concrete), if, equivalently
1. f∈Mor(E,F), f;g = 1E
2. For any action α of C, gα is surjective (Im gα = Eα).
3. g(E) is surjective, i.e. Im g(E) = End(E).
Proof.
1. ⇒ 2. : ∀xEα, x = gα(fα(x)), i.e. right invertible functions are surjective.
2. ⇒ 3. obvious;
3. ⇒ 1. as 1E ∈ Im g(E).∎

Dually, f∈Mor(E,F) is a section (or section in F if the category is concrete), if, equivalently,

1. g∈Mor(F,E), f;g = 1E.
2. For any co-action β of C, fβ is surjective (Im fβ = Eβ).
3. f(E) is surjective, i.e. Im f(E) = End(E).
Since left invertible functions are injective,
• All actions of sections are injective; thus, all sections are monic;
• All co-actions of retractions are injective; thus, all retractions are epic.
Gathering the results, the qualities of morphisms in concrete categories are ordered as

Section ⇒ Injective morphism ⇒ Monomorphism
Retraction ⇒ Surjective morphism ⇒ Epimorphism

### Modules

For any b∈Mor(X,Y), an object M will be called a b-module if b(M) : Y(M)X(M).

If b is an isomorphism then all objects are b-modules, i.e. b is an epic section, and

CX, (b(M)-1 = b-1(M)) ∧ (b(M) -1 = b-1 (M)).

Conversely, if b is a section and b(Y) is injective then b is an isomorphism.
Proof : ∃g∈Mor(Y,X), b;g = 1Xb;g;b = 1X;b = b;1Yg;b = 1Y.∎

Thus :

• If both X,Y are b-modules then all other objects are also b-modules ;
• Epic section ⇔ Isomorphism ⇔ Monic retraction ;
• If an element of a monoid is both left invertible and right cancellative, then it is invertible.
To say Y is a b-module, is another way of saying b is a regular element of the End(Y)-set X(Y). Yet b(Y) being an End(Y)-isomorphism from Y(Y) to X(Y), does not ensure its inverse to come as g(Y) for some g∈Mor(Y,X), such as an inverse of b if it was an isomorphism in C.

### Examples of modules

The concept of b-module will be more often used when b is epic, thus distinguishing the M such that the injection b(M) is also surjective (while not all objects are b-modules, i.e. b is not a section, i.e. X is not a b-module). In particular, for any algebraic language L, if 〈Im bL = Y then b is epic in any category included in that of partial L-algebras.

An important kind of examples is when b is bijective (and thus epic), in the category of relational systems for a given language L. To simplify, let b be the identity IdX into Y with larger structure Y = XZ.

For example, given a binary symbol rL, the properties of reflexivity, symmetry and transitivity of the interpretation of r in a system M, are respectively expressible as M being a Re-module, a Sy-module and a Tr-module, where the morphisms Re, Sy and Tr are respectively defined by

• (Re) : X = {0}, X = ∅, Z = {(r,(0,0))}
• (Sy) : X = {0,1}, X = {(r,(0,1))}, Z = {(r,(1,0))}
• (Tr) : X = {0,1,2}, X = {(r,(0,1)), (r,(1,2))}, Z = {(r,(0,2))}
Similarly, antisymmetry is expressible as being a module by a non-injective morphism.

So formalized, this general case of a bijective b can be thought of as giving Z the role of a set of L-typed X-ary algebraic symbols, which for every set M gives to LM the Z-structure {((s,Lu|X),Lu(s)) | (s,u) ∈ Z×MX}, so that

(M, M) is a b-module ⇔ M ∈ SubZ LM.

More examples will be given in 3.11.

### Subobjects

With our initial concept of concrete category allowing for inclusion between objects, we need to write HomY(f, X) as f may not suffice to determine Y. From there, more concepts also need this parameter:
• The anti-preservation of ⚬ by C(X) is written HomF(f, X) ⚬ HomG(g, X) = HomG(gf, X).
• f∈Mor(E,F) is F-epic, or an F-epimorphism, if all HomF(f,X) are injective.
In any concrete category, any injective morphism is monic, and any morphism with image F is F-epic. The converses may hold or not depending the considered concrete category.

Let us analyze the concept of an object S being included in an object E of a concrete category, to re-express it as a separate object X with an isomorphism to S (by which references to target sets of morphisms could be omitted). This concept has 2 variants.

The "weak" version is the concept of subobject (by the standard terminology), applicable to any abstract category. It amounts to only requiring the inclusion morphism of the subobject S in E (usually IdS : SE in concrete categories) to be monic, and not even necessarily injective.

Namely, a subobject of E is formalized by a presentation in the form (X,u) where u ∈ Mor(X,E) is monic (indirect description of Im u seen as isomorphic to X, thus defining the morphisms to and from Im u as copied from those X, but this direct meaning is lost in abstract categories).
The class of presentations (X,u) of subobjects of an object E, is meta-preordered by

(X, u) ⊆ (Y, v) ⇔ ∃ϕ∈Mor(X,Y), u = v∘ϕ

while (!ϕ∈Mor(X,Y), u = v∘ϕ) because v is monic.
Then, ϕ is also monic because u is :

g,h∈Mor(Z,X), ϕ∘g = ϕ∘hug = v∘ϕ∘g = v∘ϕ∘h = uhg = h.

Such (X, u) and (Y, v) are said to present the same subobject if they are equivalent for this meta-preorder :

(X, u) ≡ (Y, v) ⇔ ((X, u) ⊆ (Y, v) ∧ (Y, v) ⊆ (X, u)) ⇔ (∃ϕ∈Iso(X,Y) | u = v∘ϕ).

Between subobjects of a given object, the order ⊆/≡ is called inclusion.

The "strong" version requires u to be an embedding. This concept of embedding, first introduced for relational systems in 3.4, will be generalized to any concrete category in 3.9 (while expressible classes of monomorphisms in abstract categories which may play a similar role are not equivalent).

### Representation theorem

Theorem. Any small category is isomorphic to one made of a family of typed algebras with all morphisms between them.

Its precise construction forms the small category version of Yoneda’s embedding (which expresses it at the meta level: any category is isomorphic to a category of typed meta-algebras).
The proof essentially repeats the formulas on acts as algebraic structures, transposed.
From the given small category, a family of typed algebras is formed as follows.
• As a set T of types, we can take a copy of the set of objects, but one type per isomorphism class suffices.
• Each object E is interpreted as a typed set ∐tT E(t).
• L = ∐t,t'T Mor(t',t) seeing Mor(t',t) as a set of functions symbols from t to t', co-acting on each E.
Each u ∈ Mor(E,F) acts as ψ(u) = ∐tT jtu(t) : ∐tT E(t) → ∐tTF(t).
Let us prove that ψ : Mor(E,F) ↔ MorL(E,F).
Im ψ ⊂ MorL(E,F) by associativity (ψ commutes with the action of L).
The existence of an isomorphism kE(t) ensures that ψ is injective (as k is epic) and MorL(E,F) ⊂ Im ψ:
g∈MorL(E,F), (∀xE, g(x) = g(kk-1x) = g(k)∘k-1x) ∴ g = ψ(g(k)∘k-1).∎

In particular,

• any monoid is isomorphic to the monoid of endomorphisms of an algebra on a language of function symbols;
• any group is isomorphic to an automorphism group of such an algebra.
Yet, not all categories can be concrete.

Notice the symmetry of roles (called duality) between sides, which not only switches the orientation of morphisms between two objects, but also lets a category be somehow reworded as a special kind of mathematical theory (so viewing category theory as a weak version of one-theory theory, despite contextual differences):

• "Objects" in categories become "types",
• "Morphisms" become "invariant functions", implicitly generated by a language of function symbols only.
The weakness of that kind of "theory" is balanced by the development of concepts at a meta level above it. This symmetry leads to diverse insights:
• An epimorphism b ∈ Mor(X,Y) gives to Y a role of sub-type of X, so that a b-module is an object whose component of type X is filled by Y.
• To link both concepts of invariance : for any monoid M (resp. small category) generated by a set thought of as a language of (typed) function symbols (so M is made of functions expressible as terms in this language), there exists a (set I of) algebraic interpretation(s), i.e. actions, where M coincides with the category M' of all functions (resp. interpreted function symbols) which are invariant by all endomorphisms (resp. by all morphisms between interpretations in I). Anyway in any interpretation, the concrete image of M is included in the corresponding M', because the set M' of invariant functions by any given set of functions is (Id, ⚬)-stable (this can be dually rephrased by qualifying M' as the set of morphisms there).
A reference of book chapter by George M. Bergman presenting such concepts of category theory in more traditional terms: an old version; the new version is chapter 8 of his book.

## 3.9. Initial and final objects

In any category, an object X is called an initial object if all Mor(X,Y) are singletons. While isomorphic objects have all the same properties, here is a small converse : any 2 initial objects are isomorphic, by a unique isomorphism (so, initial objects form either a single isomorphism class, or none):
For any initial objects X, Y, ∃f∈Mor(X,Y), ∃g∈Mor(Y,X), {gf, 1X} ⊂ Mor(X,X) ∴ gf = 1X.
Similarly, fg = 1Y. Thus f is an isomorphism, unique as ∃!:Mor(X,Y). ∎
By this unique isomorphism, X and Y may be treated as identical to each other. Initial objects are said to be essentially unique.
Dually, an object X is called a final object if all Mor(Y,X) are singletons.
For example, in any category of relational systems with a given language where every isomorphism class of possible systems has representatives :
• The empty set where Boolean constants are false is the initial system ;
• Final systems (with a single type) are the singletons where all relations are constantly true;
• Final multi-type systems are made of one singleton per type.
Exercise. Given two fixed sets A and B, consider the category where
• Objects are all (X,ϕ) where X is a set and ϕ: X×AB ;
• Mor((X,ϕ),(Y,ϕ') = {fYX | ∀xX,∀aA, ϕ(x,a) = ϕ'(f(x),a)}.
Does it have an initial object ? a final object ?

### Eggs

(This is called universal element in the literature; I use the name "egg" to fit with that of clone.)

Generalizing the concept of regular element, let us call egg of an acting category Cα, any (M,e) where M is an object and eMα, such that

CE, (Mor(M,E) ∋ ffα(e)) : E(M)Eα.

Equivalently, it is an initial object of the category of elements of Cα where
• Objects are all data (E,x) of an object E of C and xEα
• Mor((E,x),(F,y)) = {f∈Mor(E,F) | fα(x) = y}
Dually, a co-egg of a co-acting category Cβ is an egg of the opposite acting category, i.e. a final object of its category of co-elements (E,x) where xEβ and Mor((E,x),(F,y)) = {f∈Mor(E,F) | fβ(y) = x}.
Again, an action (resp.co-action) will be called regular if it has an egg (resp. a co-egg); it is called representable elsewhere in the literature.

If (M,e) is an egg of Cα then (Mα,e) is an egg of |Cα|.
For any object M of C, (M, 1M) is an egg of C(M) and a co-egg of C(M).

In the literature (wikipedia), a category of elements of some C(M) is called an undercategory and denoted M/C, while a category of co-elements of some C(M) is called an overcategory and denoted C/M.

Yoneda's lemma can be expressed in our terminology as follows : if (M,x) is a (co-)egg of a (co-)action α of a category C, then (α,x) is an egg of the action on M of the meta-category of all (co-)actions of C.
Precisely, for any object M, any action β of C and any xMβ, the unique meta-morphism ϕ from C(M) to Cβ such that ϕM(1M) = x is defined by

CE, ∀yE(M), ϕE(y) = yβ(x)

Proof of (meta-morphism ⇒ defining formula): ϕE(y) = ϕE(y∘1M) = yβM(1M)) = yβ(x).
The proof of the converse is as easy and left to the reader.
When (M,x) is an egg, this gives a meta-isomorphism (like any bijective morphism between algebras is an isomorphism). ∎

Obviously, the image of ϕ is the trajectory of x in Cβ.

Exercise. Consider the category of sets and their functions acting by direct images on the powersets of its objects (Set). Does it have an egg ?
Similarly, consider its co-action on these powersets by preimages (Set). Does it have a co-egg ?
Hint : use the numbers of elements of involved finite sets.

### Subobjects as sub-co-actions

Any f∈Mor(E,F) defines by composition a meta-morphism f(C) from C(E) to C(F), which is injective precisely when f is monic.
Any presentation (E,f) of a subobject of F is also a co-egg of the sub-co-action Im f(C) of C(F).
Inversely, any sub-co-action of C(F) with a co-egg (E,f) is the trajectory of (E,f) and meta-isomorphic to C(E) by f(C), and f is monic from E to F.
So, the notion of subobject of F can be re-defined as that of a regular sub-co-action of C(F), whose co-eggs are its presentations. So conceived, it becomes strictly independent of a choice of presentation (but ontologically more expensive).

Diverse operations usually involving subsets, such as direct images and preimages by morphisms, can be extended to subobjects, by literally applying them to sub-co-actions, then presenting the resulting sub-co-action as a subobject if it is regular. This regularity condition often holds depending on the category, and can be verified in diverse kinds of categories, especially categories of systems, by explicitly describing the result as a subsystem.
Things especially works like this for the operation of preimage.

Strictly applying this method, the direct image of a subobject of E with presentation (X,u) by an f∈Mor(E,F), would be given by the trajectory Im fu(C) of (X,fu) in C(F), and thus presented by fu if it is monic. In particular, this holds when f is itself monic.
However, many categories of systems have a construction of direct images of subsystems which remains naturally applicable even when that image trajectory fails to be regular (a simple example can be found in the category of relational systems with 2 unary relation symbols). Such a direct image can still be characterized in terms of pure categories, as the subobject generated by fu, i.e. the smallest regular sub-co-action which contains it.

### Embeddings in concrete categories

While the concepts of embedding and pre-embedding were introduced for categories of relational systems, let us generalize them to any concrete category C.
A morphism f ∈ Mor(E,F) will be called a pre-embedding if

CX, Mor(X,E) = {gEX | fg ∈ Mor(X,F)}

This formula actually implies f∈Mor(E,F).

In other words, while f∈Mor(E,F) makes (E, IdE) an element of the co-action giving to each X the set {gEX | fg ∈ Mor(X,F)} (sub-co-action of CE), f is a pre-embedding when (E, IdE) is a generator and thus also a co-egg of this co-action.

Then, an embedding is an injective pre-embedding, i.e. an f : EF such that, equivalently

CX, Mor(X,E) = {f -1h | h ∈ Mor(X,F) ∧ Im h ⊂ Im f}
CX, {h ∈ Mor(X,F) | Im h ⊂ Im f} = {fg | g∈Mor(X,E)}

Let us introduce a related concept. Any fixed subset AF defines a sub-co-action C(A) of C(F) by

CX, X(A) = {gX(F) | Im gA}

Now let us call quasi-embedding any f∈Mor(E,F) such that (E,f) is a co-egg of some C(A) and thus also of C(Im f) :

CX, ∀g∈Mor(X,F), Im g ⊂ Im f ⇒ ∃!ϕ∈Mor(X,E), f ⚬ ϕ = g

(Inj f implies one side of this condition: ∀g∈Mor(X,F), !ϕ∈Mor(X,E), f ⚬ ϕ = g)
In most useful concrete categories, all quasi-embeddings will be embeddings ; exceptions are easy to build in other categories designed for this purpose.

### Dependencies between some properties of morphisms

The diverse properties of a morphism f∈Mor(E,F) in a concrete category C, are related as follows.
1. If Im fAF then
((E,f) is co-egg of C(A)) ⇔ (f is a quasi-embedding and ∀g∈Mor(E,F), Im gA ⇒ Im g ⊂ Im f)
2. Injection ⇒ (pre-embedding ⇔ quasi-embedding)
3. Quasi-embedding ⇒ monomorphism
4. (Monomorphism ∧ pre-embedding) ⇒ injection
5. Section ⇒ embedding
Proofs.
1. xE, ϕ = (Ey ↦ (f(y) = f(x) ? x : y)) ⇒ f ⚬ ϕ = f ⇒ (ϕ ∈ End E ∴ ϕ = IdE).
2. h∈Mor(F,E), hf = 1E ∴ ∀gEX, fg ∈ Mor(X,F) ⇒ g = hfg ∈ Mor(X,E).∎
Let f∈Mor(E,F) a quasi-embedding. If there exists a pre-embedding g∈Mor(X,F) with the same image Im g = Im f = AF and ACA holds then f is an embedding.

Proof.

hXA, gh = IdAghf = f ∈ Mor(E,F) ∴ hf ∈ Mor(E,X)
∃ϕ∈Mor(X,E), f⚬ϕ = gf⚬ϕ⚬hf = ghf = f ∴ ϕ⚬hf = IdE.∎
A subobject (X,u) of E will be qualified as embedded (resp. quasi-embedded) if u is an embedding (resp. a quasi-embedding) from X to E. This does not depend on the choice of presentation of a given subobject.

If a subset A of an object F is the image of an embedding f∈Mor(E,F), this gives A the status of an embedded subobject (A, IdA) ≡ (E,f). (For a quasi-embedding we can do similarly with a copy of E attached to A and thought of as independent of E).
Then for any object X, we can define Mor(X,A) from Mor(X,F) directly as X(A), while Mor(A,X) is only directly defined from Mor(F,X) if f is a section, as {g|A | g∈Mor(F,X)}.

### Equalizers

The equalizer Eq(f, g) ⊂ E of any two functions f,g with domain E, was defined in 3.3; it was noticed to be a subalgebra when f,g are morphisms in a category of algebras.
The more general concept of equalizer Eq(f, g) of f,g∈Mor(E,F) in any category C, means the subobject of E defined by the sub-co-action C(f=g) of C(E) where

CX, X(f=g) = {hX(E) | fh = gh}

(if it is regular; it is anyway a sub-co-action by stability of equalizers)
In any concrete category, all equalizers are quasi-embedded subobjects, since X(f=g) = X(Eq(f, g)) where Eq(f, g) ⊂ E is the equalizer of the functions f, g in the category of sets.

Any section f∈Mor(E,F) is an equalizer: if g∈Mor(F,E) and gf = 1E then f is an equalizer of (1F, fg).

### Submodules

For any b∈Mor(X,Y), let us call b-submodule of an object F, any subobject (E,f) of F such that E is a b-module. Equivalently,

h∈Mor(X,E), ∃!j∈Mor(Y,E), fjb = fh

When F is itself a b-module, ∃!g∈Mor(Y,F), gb = fh and the submodule condition becomes equivalent to each of
1. k∈ Im f(X), ∃g∈ Im f(Y), gb = k
2. g∈Mor(Y,F), gb∈ Im f(X)g∈Im f(Y)
This is a stability condition on Im f(C), namely b(F)-1[Im f(X)] ⊂ Im f(Y).

Even if F is not a b-module, the formula 2. (no more equivalent to other conditions) is still a stability condition on Im f(C), namely by the transpose of Gr b(F).
It holds in particular if b is epic and f is an equalizer (precisely, when f is an equalizer of a pair in Mor(F,G) and b(G) : Y(G)X(G)).
Let us apply this stability concept to the case of quasi-embedded subobjects in a concrete category: a subset A of an object F will be called b-stable if b(F)⋆(X(A)) ⊂ Y(A), or more explicitly

g∈Mor(Y,F), Im gbA ⇒ Im gA

In particular:
• In any category made of L-systems for some algebraic language L, for any b∈Mor(X,Y) such that 〈Im bL = Y,
• any L-stable subset is b-stable;
• in particular, any L-stable subset of a b-module is a b-module.
• If b is surjective then all subsets of objects are b-stable.
For any b-module F and f∈ Mor(E,F),
1. If f is a pre-embedding and b is bijective then E is a b-module;
2. If f is a quasi-embedding and Im f is b-stable then (E,f) is a b-submodule.
Proofs:
1. u∈Mor(X,E), fub-1 ∈ Mor(Y,F) ∴ ub-1∈Mor(Y,E).
2. u∈Mor(X,E), (∃!g∈Mor(Y,F), gb = fu ∴ Im g ⊂ Im f)
∴ (∃!h∈Mor(Y,E), fhb = fu) ∴ (∃!h∈Mor(Y,E), hb = u).∎

## 3.10. Products of systems

We shall now introduce the concept of product of a family of objects in a category, and its particular uses in diverse concrete categories. This generalizes the concept of product of a family of sets, as both will essentially coincide in the case of the category of sets.

It can be thought of as the dual concept to that of product of types in a given theory.
The concept of product of an n-tuple of types, namely the condition for a type to play this role, was formalized in 2.3 ("Tuples" and "Tuples axiom"). It consisted in introducing or distinguishing an n-tuple of function symbols (serving as projections), an n-ary operation symbol (tuples definer), and axioms making both the inverse of each other. But, it needs to be adapted to the framework of category theory, weaker than one-theory theory. The formalization in category theory keeps the projection symbols (which are function symbols), but needs to re-express the tuples definer in terms of "invariant functions" alone. The solution is to use the concept of product of functions (2.8). The product of any family of invariant functions is also invariant (thinking of it as defined using the tuples definer). This naturally leads to the standard concept of product in category theory, which we shall formalize below.

### Products of actions

Given a family of actions (αi)iI of a category C, their product is an action β = ∏iI αi of C defined by

CX, Xβ = ∏iI Xαi
CX,Y, ∀f∈ Mor(X,Y), f β = ⨉iI f αi = ⊓iI f αi ⚬ πi
xXβ, ∀yYβ, f β(x) = y ⇔ ∀iI, f αi(xi) = yi

Products of families of co-actions are defined in the same way.
The action CM mentioned in 3.6 was the constant M-ary product of the primitive action of C.

### Products in categories

A product of a family (Ei)iI of objects in a category C, written CiI Ei, is a co-egg (P, π) of the product of co-actions ∏iI C(Ei).
In other words, it is the data of an object P with a family π ∈ ∏iI Mor(P,Ei) making bijective all functions of the form (f ↦ (πif)iI) where the f are morphisms with target P :

CF, ⊓iI πi(F) : P(F) ↔ ∏iI Ei(F)

Their inverses define the products of morphisms, generalizing the concept of product of functions ⊓ to any category beyond the category of sets :

⊓ : ∏iI Mor(F, Ei) ↔ Mor(F, P)

The products in C of the empty family (I = ∅) are the final objects of C.

### Products in concrete categories

In a concrete category C, a product (P, π) of a family of objects has a natural function into the set theoretical product, given by the product of functions

⊓π : P → ∏iI Ei

Its image is the common target set of all set theoretical products of morphisms fi∈Mor(F, Ei) for a fixed object F and variable iI.

If C is regular then this ⊓π is bijective. This generally holds for acting categories, obviously from definitions when written as C(F) for some object F.
The bijectivity of ⊓π lets the role of categorical product (P,π) be played by the product of sets ∏iI Ei with its natural family of projections π = ⊓ IdP.
Then in particular, final objets are singletons (even if among objects there may be other, non-isomorphic singletons).

On the other hand, if the product as sets P = ∏iI Ei of objects in a concrete category C is otherwise given a role of object, then the condition for it to serve as the product in C is that

F, ⊓[Mor(F,P)] = ∏iI Mor(F,Ei).

The inclusion side of this equality is equivalent to (∀iI, πi ∈ Mor(P,Ei)). Indeed,
i)iI = ⊓ IdP ∈ ⊓[Mor(P,P)] ⊂ ∏iI Mor(P,Ei) ⇒ ∀iI, πi ∈ Mor(P,Ei).
Conversely (simple reason) : ∀iI, πi ∈ Mor(P,Ei) ⇒ ∀f∈Mor(F,P), πif ∈ Mor(F,Ei).
Other presentation : ∀F, ⊓[Mor(F,P)] = Im ⊓iI πi(F) ⊂ ∏iI Mor(F,Ei). ∎
By essential uniqueness of products, this also determines all Mor(P,F) from the category.

In a concrete category, for any family of elements ((Ei,xi))iI, if the family of objects (Ei)iI has a product (P, π) then the existence of a product of the (Ei,xi) in the category of elements is equivalent to ∃!: ⊓π(x) and implies that ((P, ℩⊓π(x)),π) is such a product. (The proof is straightforward and left as an exercise)
Thus, if a set-product of concrete objects also serves as their categorical product then the family definer is also what provides the representatives there of the products in the category of elements.

In a concrete category C with products, the claim that (M,e) is an egg can be re-expressed as

CE, ∃!f∈Mor(M,EE), f(e) = IdE.

### Products of modules

For any morphism b∈Mor(X,Y) in any category C, any product of b-modules is also a b-module.
Proof. Let (P, π) a product of a family (Ei)iI of b-modules. Then ∀f∈Mor(X,P),
(∀iI, ∃!g∈Mor(Y, Ei), gb = πif)
∴ ∃!h∈Mor(Y,P), ∀iI, πihb = πif.
By Inj ⊓iI πi(X) we conclude ∃!h∈Mor(Y,P), hb = f. ∎
If C has products, the condition for an object M to be a b-module can be re-expressed as

∃!h∈Mor(Y, CMor(X,M) M), ∀u∈Mor(X,M), πuhb = u.

If moreover C is concrete, this formula (∀u∈Mor(X,M), ∀xX, πu(h(b(x))) = u(x)) can also be written

xX, h(b(x)) = πx|Mor(X,M)

### Products of relational systems

In a category of all relational L-systems (with fixed L), any family of systems (Ei, Ei) has a product P given by the product of sets, with structure

P = ⋂iI Lπi(Ei) = ∐sL ⊓[ ∏iI si]

For a binary product of L-systems G = E×F these structures are

sG = {xy | xsEysF} = {zGns | π0z sE ∧ π1zsF}

To check that it forms a product in this category, for any L-system F and any f = ⊓iI fiPF, i.e. ∀iI, fi = πifEiF,

f ∈ MorL(F,P) ⇔ Lf[F] ⊂ P ⇔ ∀iI, Lf[F] ⊂ Lπi(Ei)
⇔ ∀iI, fi ∈ MorL(F,Ei) ⇔ ⊓f ∈ ∏iI MorL(F,Ei)

For a symbol s of trajectory of a tuple in a concrete category, sP ⊂ ⊓[ ∏iI si] with equality if ACI holds.

### Products of algebras

With an algebraic language L, the product P = ∏iI Ei of a family of L-algebras (Ei, φi) has L-algebra structure φP defined by

(∀iI, πi ∈ MorL(P,Ei)) ⇔ (∀iI, φiLπi = πi⚬φP) ⇔ φP = ⊓iI φiLπi

Indeed, for any L-system F and any f = ⊓iI fiPF,

f ∈ MorL(F,P) ⇔ φPLf = f⚬φF ⇔ ∀iI, φiLfi = φiLπiLf = fi⚬φF
⇔ ∀iI, fi ∈ MorL(F,Ei) ⇔ ⊓f ∈ ∏iI MorL(F,Ei)

This comes as a particular case of product of relational systems :

∀(x,y)∈LP×Py = φP(x) ⇔ ∀iI, yi = φi(Lπi(x))

The structure φP of a constant product P = EI of an L-algebra E can be written

LP∋(s,x) ↦ sE ⚬ ⊓x

The product of a family of actions of a given monoid, particular case of product of actions of a category, is also a particular case of product of algebras (precisely modules among these).

Among systems, aside the case of algebras, any product of partial algebras is a partial algebra ; any product of injective systems is an injective system ; if ACI holds then any product over I of serial systems is serial. But the surjectivity of a product system cannot be ensured unless it is achieved by a single symbol in L.

### Graphs of morphisms

For any morphism f∈ Mor(E,F) in a category with products, the morphism IdEf from E to a product G = E×F is a section, thus defining the graph of f as an embedded subobject of G if the category is concrete. Let us review some more specific properties of graphs of morphisms between systems.

Let L an algebraic language, and E, F two L-systems.
If F is algebraic then

MorL(E,F) = {fFE | Gr f ∈ SubL(E×F)}

This result may be split in two parts (whose proofs are left as exercises):
1. (F serial ∧ Gr f ∈ SubL(E×F)) ⇒ f ∈ MorL(E,F)
2. (F functional ∧ f ∈ MorL(E,F)) ⇒ Gr f ∈ SubL(E×F)
When both E,F are algebraic (and thus E×F too), these may be seen as deducible from previous results:
1. (Gr f ∈ SubL(E×F) ∧ π0|Gr f ∈ MorL(Gr f, E)) ⇒ IdEf = (π0|Gr f)-1 ∈ MorL(E, Gr f) ⊂ MorL(E, E×F).
2. f ∈ MorL(E,F) ⇔ IdEf ∈ MorL(E,E×F) ⇒ Gr f = Im(IdEf ) ∈ SubL(E×F).∎
and it gives another proof of the stability of equalizers
f,g∈MorL(E,F), (Gr f ∩ Gr g) ∈ SubL (E×F) ∴ Eq(f,g) = π0 [Gr f ∩ Gr g] ∈ SubL E.∎
On the other hand (with no algebraicity condition), denoting H = Gr fG = E×F, we have ∀fFE,

(E injective ∧ HG(LH)) ⇒ f ∈ MorL(E,F)
(E surjective ∧ f ∈ MorL(E,F)) ⇒ HG(LH)

### Fiber products

An important kind of concrete categories with products whose underlying sets differ from the products of sets, are the categories of typed systems. The effect of a categorical product between systems of a given kind which has multiple types, is dual to that of a product between types in a theory interpreted across multiple systems: it behaves as a product of sets for each type taken separately.
So, re-using the notations of 3.2, given a set τ of types and a family of typed concrete objects Ei = ∐t∈τ Et,i for each iI, their product will have base set

t∈τiI Et,i.

This is identifiable to a subset of ∏iI Ei if I ≠ ∅ but a copy of τ if I = ∅.
Our other formalization of the category of typed sets expressed its objects in the form (E, hE) where hE : E → τ, and morphisms from (E, hE) to (F, hF) are the f : EF such that hFf = hE. As already mentioned, such a category (with a fixed list τ of types) is an overcategory Set/τ of the category of sets.

A wide pullback or wide fiber product of a nonempty family (fi)iI of morphisms fi ∈ Mor(Ei , T) to a fixed object T in a category C, is their product in the overcategory C/T. So it is a final object of the category whose objects are the triples of

• an object P of C,
• a q ∈ Mor(P,T)
• and a family p ∈ ∏iI Mor(P,Ei) such that ∀iI, fipi = q
and whose morphisms from such an object to a similar (P', q', (p'i)iI) are the h ∈ Mor(P, P') such that

iI, p'ih = pi

which implies q'h = q.
Indeed since I ≠ ∅, with a chosen kI we have q'h = fkp'kh = fkpk = q.

An equivalent formalization of wide pullbacks eliminates the use of q replaced by fkpk for a fixed kI (independently of this choice), or all of them:

i,kI, fipi = fkpk.

Hence the simpler definition in the binary case (when I is a pair): a pullback or fiber product of two morphisms f ∈ Mor(E, T), g ∈ Mor(F, T), is a co-egg of the sub-co-action of the product co-action C(E)×C(F), giving to each X the set of all (p0,p1) ∈ Mor(X, E)× Mor(X, F) such that fp0 = gp1.

In terms of co-actions, this is an equalizer inside a product. So, the same can be said in terms of categories when (E, F) has a product (G, π0, π1) where π0∈ Mor(G, E), π1∈ Mor(G, F). Namely, the pullback of (f,g) is identifiable with the subobject Eq(f∘π0,g∘π1) of G, that is the sub-co-action C(f∘π0=g∘π1) of C(G) made of the p0p1 ∈ Mor(X, G) for the (p0,p1) that fit the above condition.

Thus, any category with binary products and equalizers also has pullbacks; and in any concrete category where the underlying sets of products and equalizers are the set-like versions of these (such in as categories of all algebras or all systems over a given language), the same goes for its pullbacks obtained from these. In particular, any category of all typed algebras with a given set τ of types, has products given by the wide pullback over τ (which plays the role of final object of such a category).

Conversely, any category with binary products and pullbacks also has equalizers: any equalizer e = Eq(f, g) where f, g∈ Mor(E, F) can be extracted from a pullback in two ways:

• Pullbacks of (f⊓1E, g⊓1E) are of the form (e,e);
• Pullbacks of (fg, 1F⊓1F) are of the form (e, fe).
Products can themselves come as particular cases of wide pullbacks in categories with final objects.

There is a special use of pullbacks, namely to construct fiber bundles, where in the pullback (p0, p1) of (f,g), f and p1 serve as the components of a single morphism along two types, while g and p0 interpret a single function symbol in two systems.

### Intersections of subobjects

Applying the concept of wide pullback to families of monomorphisms fi ∈ Mor(Ei , F), gives an operation between subobjects of F, called their intersection.
Indeed, the resulting morphism to F is also monic, it is related to the "inclusion" between subobjects the same way an intersection of sets is characterized from set inclusion, and it coincides with the operation of intersection between sub-co-actions.

In any concrete category, any intersection of quasi-embedded subobjects is quasi-embedded, with image the greatest image of a morphism into the intersection of images of given subobjects.

### Intersections of submodules

For a given b∈Mor(X,Y), an intersection of a family of b-submodules (Ei,ei) of F indexed by I can be deduced to be also a b-submodule under either additional assumption:
1. if F is a b-module ;
2. or, if I ≠ ∅ and b is epic.
The simple proof with 1. is that an intersection of stable subsets is stable.
A more complex proof would use the above result on products of modules in the category of co-elements of C(F). This requires to prove that the condition for a subobject of F to be a b-submodule in C, is equivalent to it being a bh-module in the category of co-elements of C(F) for every h∈Mor(Y,F), where bh is the copy of b in Mor((X,hb), (Y,h)).

The proof for case 2. comes from the fact any wide pullback can be expressed as an intersection of equalizers inside a product (which anyway exist as co-actions). This can be lengthily written as follows.
Let us denote (A,a) this intersection, with ϕi∈Mor(A,Ei) such that a = ei∘ϕi for each iI.
Let u∈Mor(X,A). As b is epic we just need to prove (∃w∈Mor(Y,A), wb = u).
iI, ∃v∈Mor(Y,Ei), vb = ϕiu
jI, ∃!w∈Mor(Y,Ej), wb = ϕjuejwb = ej∘ϕju = au = ei∘ϕiu = eivbejw = eiv.
As (A,a) is an intersection of the (Ej,ej),
w∈Mor(Y,A), aw = eivawb = eivb = ei∘ϕiu = auwb = u.∎

### Intersections of subsystems

In any category of relational systems, subobjects of a system (F, F) are bijectively represented by its subsystems (E, E) in the sense that EFEF, with the monomorphism IdE : EF. Then, the intersection of a family of subobjects (Ei, Ei) of (F, F) is represented by (⋂II Ei, ⋂II Ei) if we use the cateogry of all systems with a given language, or more generally if this system belongs to the considered category (which will be usually the case for categories defined as those of systems which are modules for some morphisms). This has two important special cases :

• Intersections of embedded subsystems (∀iI, Ei = FLEi): these are also embedded;
• Intersections of structures on the same system (∀iI, Ei = F).
In the latter case, for a bijective b, the fact an intersection of b-module structures is a b-module structure can be seen as a case of the fact any intersection of stable subsets is stable.

As first noted in 2.9 for a binary relation symbol, an intersection of preimages of structures by some functions from a given set, coincides with the preimage of the product structure by the product function.

## 3.11. Basis

### Eggs as acting monoids

For any monoid (M,e, •), the eggs of the category of M-sets are (M, e) and other regular elements.

Conversely, for any egg (M,e) of a concrete category, seeing M as a set of function symbols, there is a unique M-algebra structure on every object X satisfying both axioms of action and MorM(M,X) ⊂ Mor(M,X). This structure • on M makes (M,e,•) a monoid acting on all objects and CX,Y, Mor(X,Y) ⊂ MorM(X,Y), with equality for X = M.

This can be seen as another use of Yoneda's lemma, but let us write a separate proof.
The hypothesis imply ∀xX, ⋅x ∈ Mor(M,X) ∧ ⋅x(e) = x.
As (M,e) is an egg, this defines the structure ⋅ on X interpreting each aM as the trajectory of (e,a). Thus ∀X,Y, Mor(X,Y) ⊂ MorM(X,Y). Thus it actually satisfies both axioms of action.
The last monoid axiom comes as IdM fits the definition of •e.
We conclude MorM(M,X) ⊂ Mor(M,X) by ∀g∈ MorM(M,X), g = ⋅g(e) ∈ Mor(M,X).∎

In a concrete category with products, the definition of ⋅ can be written

∈ Mor(M,XX) ∧ ⋅(e) = IdX.

Anyway ⋅ ∈ MorM(M,XX).

This monoid (M,e,•) is essentially the opposite of the monoid End(M). Indeed

x,yM, •x ∈ End(M) ∧ •y ∈ End(M) ∧ •x ⚬ •y (e) = •x(y) = yx.

For any object M of a category C, the action of the egg M(M) of C(M) on each object E(M) coincides with the co-action of End(M) on Mor(M,E) by composition.

### Algebraic structures on modules

The role of an egg as a set of function symbols in a concrete category, has diverse generalizations giving sets of operation symbols interpreted as algebraic structures on objects.
For the most general case, consider a concrete category U, a morphism b∈ Mor(V,K), and a class C of b-modules, forming a concrete category with the same sets of morphisms between given objects :

CE, ∀uE(V), ∃!f∈Mor(K,E), fb = u

Seeing V as a set of variables and K as a set of V-ary operation symbols, each object E of C, being a b-module, gets a partial K-algebra structure φE with domain K×E(V) defined for each sK as the trajectory of (b,s):

CE, ∀uE(V), φE(u) = ℩{f∈Mor(K,E) | fb = u} = b(E)-1(u)
∴ Mor(K,E) = {φE(u) | uE(V)}
CE,F, Mor(E,F) ⊂ MorK(E,F)

On a product of b-modules, this K-structure is the product of those on components, independently of the axiom of choice.
Elements of Im b play the role of projection symbols (∀xV, πx = b(x)), behaving as such in C.

As Mor(K,E) was expressed from φE, it will more precisely coincide with MorK(K,E), once K is given a proper K-structure. A minimal natural candidate is the trajectory of (b,s), which depends on End(K); but the choice of End(K) (fitting axioms of categories with fixed Mor(K,E)) will not matter.
Indeed, the smallest End(K) = {IdK} gives to K its smallest trajectories-defined K-structure {((s,b),s) | sK}. This gives the greatest candidate MorK(K,E), equal to Mor(K,E); but the reverse inclusion Mor(K,E) ⊂ MorK(K,E) is another natural requirement (preservation of the K-structure). So the equality is necessary.

For φE to be algebraic, we shall assume V to be structureless, which means ∀E, E(V) = EV. For this to hold with K-morphisms (MorK(V,E) = EV),

• The empty structure V = ∅ ensures it in all U in any case (then K ≠ ∅ ⇒ MorK(K,V) = ∅).
• For example V = {((πx,IdV),x) | xV} still gives MorK(V,E) = Mor(V,E) for b-modules E structured by trajectories ; precisely, MorK(V,E) = EV when all πx work in E as projections from EV to E.
With a structureless V, a non-injective b would only let singletons and ∅ as possible objects in C. Excluding this case, we usually take b = IdV : VK, so that fb = f|V.

### Basis

From the above with fixed choices of U, C and a structureless V, let b and K vary : let B be the class of (K,b) where K is in U and bKV, such that all objects in C are b-modules; equivalently, these are the elements in UV having a unique morphism to any element in CV.
If moreover K is in C then b is called a basis of K in C. Equivalently, (K,b) is an egg of CV. Then it is a final object of B.

For any object K in C with a chosen basis b, and any possible symbol s of (preserved) V-ary operation in objects of C, the element s' = sK(b) ∈ K is the unique element of K whose role of operation in all objects of C (trajectory of (b,s')) coincides with s. In particular for any (X,a) in B and any sX, this s' is the image of s by the unique morphism from (X,a) to (K,b).

Any operation s with lower arity also has a copy s' = sK(x) for any injective substitution of variables x : VnsV. Such a s' plays the same role as s with unused extra variables (∀CE, ∀uEV, s'E(u) = sE(ux)), except for the inability of languages without constants to replace the role of a constant symbol to exclude ∅ (the empty algebra) from the considered category.

### Coproducts

Similarly to products with sides reversed, a coproduct in C of a family (Ei)iI of objects of C, written

(K, j) : CiI Ei

is an egg (K, j) of the product of actions C(Ei), thus an object K with j ∈ ∏iI Mor(Ei, K) making all f ↦ (fji)iI bijective :

CF, ⊓iI ji (F) : K(F) ↔ ∏iI Ei (F)

The coproducts in C of the empty family are the initial objects of C.
While the general definions of product and coproduct only determine their isomorphism classes, we shall usually speak of the product and the coproduct of any family of objects in explicitly described categories, to refer to the most natural explicit construction of a specific representative of each such class, which could be written in the given category.

The category of sets has coproducts given by the disjoint union with its natural injections (iI FEiFiI Ei).
In categories of all relational systems with fixed language L, the coproduct is given by the disjoint union, with structure iI Lji[Ei].

In other concrete categories, the underlying sets of coproducts may differ from disjoint unions, more often than those of products differ from the products of sets. The injectivity of each ji often remains, but already fails in categories of partial algebras (4.2).

### Basis and coproducts

For any objects M, K of any category C, and any b ∈ Mor(M,K)V,

(b is a basis of K(M) in C(M)) ⇔ (K, b) : CxV M.

Similarly in a concrete category with an egg (M, e) : a constant V-ary coproduct (K,j) : CxV M is an object K with basis b = ⊓j(e). Equivalently, j = (⋅b(x))xV where ⋅ is the action of (M, e).
These jx are sections, as the set of left inverses of jx has a natural bijection with {uMV | u(x) = e} (while the components of j in non-constant coproducts are not always sections).

Products and coproducts have associativity properties like first seen with the product of sets : any product of products of objects, is naturally isomorphic to a simple product indexed by the disjoint union of indexing sets; and the same for coproducts.
In particular, a coproduct (K, j) : CiI Ei of objects Ei with respective basis bi : ViEi, is an object with a basis indexed by the disjoint union ∐iI Vi of these bases.

### Equational systems

Let us specify the above by taking an algebraic language L and a category U of L-systems with Mor = MorL.
Let us call L-equational system any data of a structureless set V, an L-system K and a bKV, such that 〈Im bL = K. This implies
1. Any L-stable subset of an L-system is b-stable
2. Thus, any L-stable subset of a b-module is a b-module.
3. For any partial L-algebra E, Inj b(E), i.e. ∀uEV, !g∈MorL(K,E), gb = u.
Proof of 3. By stability of equalizers, ∀uEV, ∀g,h∈MorL(K,E),
gb = u = hb ⇒ Im b ⊂ {xK | g(x) = h(x)} ∈ SubLKg = h.∎

So, equational systems may be used to distinguish among algebras (or partial algebras) E, those for which the injection b(E) is also surjective. In many cases L has no projection symbol, obliging the chosen L-structure of V to be empty.

Examples
• If all symbols in L are n-ary, then VnVnL with structure {((s, IdVn), s) | sL} is an equational system, whose modules among L-systems are the algebraic ones ;
• Any monoid K forms a K-equational system with V = {e}; then, the K-sets are the partial K-algebras which are b-modules. Indeed any b-module E gets a K-set structure included in E, then equality is deduced from the functionality of E.
• In the construction of algebraic structures on modules we described K as a K-equational system.
• The axiom of identity on a system is expressible as it being a module by an equational system with V a singleton, and K a pair (details are left as an exercise to the reader) ;
• Similarly for associativity with a 3-elements V and a 6-elements K.
Beyond equational systems, the concept of module by some b ∈ MorL(X,Y) where 〈Im bL = Y but X has non-empty structure, is an expression of axioms using ⇒, such as left cancellativity (of a constant, or of all elements). The systematic understanding of these facts relies on the formalization of L-terms as L-systems, which will be presented in 4.1 and 4.3.

## 3.12. Composition of relations

### The category of relations

This category extends the category of sets, keeping the same objets (the sets) and defining Mor(E,F) as the set ℘(E×F) of all relations between E and F. Their composition is defined by

grR,S, R;S = {(x0,y1) | (x,y)∈R×Sx1=y0}
RE×F, ∀SF×G, R;S = {(x,z)∈E×G | ∃yF, xRyySz}
= ∐xE SR(x)

This extends the composition of functions coming as functional relations, with the same identity elements (1E = 𝛿E = Gr IdE).
(This is the only natural way to extend composition, as the other expression of the composite of functions by their graphs, with ∀yF, xRyySz, would lose associativity in non-functional cases).
This category faithfully acts by direct images () on the powersets of its objects, and co-acts on them by preimages (): ∀RE×F, ∀SF×G,

AE, (SR)A = S(RA)
BG, (R;S)B = R(SB)

For this action, each object (set) E has a basis made of its singletons : ({x})xE, following the canonical bijection (℘(F))E ⥬ ℘(E×F).
Thus, coproducts in this category are given by the disjoint unions of objects (which operate as products on the powersets acted on). So, a coproduct of pairwise disjoint sets Ei is given by their union, with the morphisms 𝛿Ei from each Ei to it.
By symmetry of duality, this disjoint union also serves as a product.
The eggs of this action are the ({x}, {x}) for any x. A standard choice of singleton is given by the notations ＊ = {•}. Then, direct and inverse images can be re-expressed in terms of composition: ∀RE×F, ∀AE, ∀BF,

＊×(RA) = (＊×A);R
(RB)×＊ = R;(B×＊)

By these action and co-action, morphisms in this category behave as a third form of expression of Galois connections (after the ordinary and monotone ones). Indeed by associativity of composition,

(＊×A);R;(B×＊) = ∅ ⇔ AR(B) = ∅ ⇔ BR(A) = ∅
(∁FR, ∁ER) ∈ Gal(℘(E), ℘(F))
(R, ∁ER⚬∁F) ∈ Gal+(℘(E), ℘(F))

### Re-expressing properties of relations

Each side (curried form) of the composition of relations, behaves similarly to direct images, which it can be seen as made of: ∀grR,S,T,

RSR;TS;T
RST;RT;S
(RS);T = R;TS;T
T;(RS) = T;RT;S

and for any family of graphs Ri indexed by I and any graph T,

T;iI Ri = iI T;Ri
TiI Ri = iI TRi

The reflexivity (𝛿ER) of a relation R on a set E, implies

SE×F, SR;S
SF×E, SS;R

The transitivity of R can be written R;RR.
Thus if R is a preorder then R;R = R but the converse does not always hold.

### Generated preorders

The role of sets of transformations of E as defining stability conditions on subsets AE, reflected by the Galois connection (End, Sub)∈ Gal(℘(℘(E)), ℘(EE)) introduced in 3.4, is equivalent to that of single relations RE2 (non-functional structures named by a single function symbol) in the Galois connection (Po, Sub)∈ Gal(℘(℘(E)), ℘(E2)) defined as relating any AE to (x,y)∈E2 by (xAyA):

A ∈ SubR ERAA ⇔ (∀(x,y)∈R, xAyA) ⇔ ∁E A ∈ SubtR E

Indeed any set of transformations can be replaced by the union of their graphs; inversely, any (x,y)∈E2 can be replaced by

Ez ↦ (z=x ? y : z).

The set Im Po of closed elements of ℘(E2) there, is the set of preorders of E. Indeed, for any set K and any GK×E,

x,yE, (x,y)∈Po(G[K]) ⇔ (∀zK, zGxzGy) ⇔ G(x)⊂G(y)

which, according to 2.9, gives all preorders on E (intersections of preimages of the natural order on {0,1}).
Now the inclusion order on any S⊂℘(E) appears that way with {(A,x)∈S×E|xA}. Namely, ∈ defines a pre-embedding from (E,Po(S)) to (℘(S),⊂).

The closure Po(SubRE) of any RE2 is called the preorder on E generated by R; we shall write it ⌈R⌉.

### Generated stable subsets

Lemma. Any union of R-stable subsets is R-stable.
(This does not generalize to structures with other arities).

First proof. (∀iI, RAiAi) ⇒ RiI Ai = iI RAiiI Ai
Second proof. Use A ∈ SubR E ⇔ ∁E A ∈ SubtR E and the similar property with intersections.∎

Proposition.AE, 〈AR = ⌈RA.

Proof. First, when A is a singleton {x}, both definitions coincide :

yE, xRy ⇔ (∀A∈SubRE, xAyA) ⇔ y∈〈{x}〉R

Then, ⌈RA = xA 〈{x}〉R ⊂ 〈AR because A ↦ 〈AR is monotone.
We conclude by ⌈RA ∈ SubR E from the above lemma.∎

From the end of 3.3 we get ∀AE, 〈AR = ARAR.
By the faithfulness of the action, it can also be written

R⌉ = 𝛿ER⚬⌈R

An easy consequence of the above is that for any sets K, E and any GK×E and RE2, ⌈R⌉⚬G is the smallest SK×E such that GRSS, and it is a case of equality (GRS = S).

### Transitive closure

For any RE2, the smallest transitive TE2 such that RT (which exists as transitivity is preserved by intersections), called the transitive closure of R, is

T = R⚬⌈R⌉ = ⌈R⌉⚬R.

Proof. By hypothesis, RT and RTTTT, thus ⌈R⌉⚬RT by the above result (⌈R⌉⚬R is the smallest T such that RRTT).
Then, ⌈R⌉⚬R fulfills both conditions for which T is smallest : R ⊂ ⌈R⌉⚬R, and transitivity:

R⚬⌈R⌉ ⊂ ⌈R⌉ = ⌈R⌉⚬⌈R⌉ ∴ ⌈R⌉⚬R⚬⌈R⌉⚬R ⊂ ⌈R⌉⚬⌈R⌉⚬R = ⌈R⌉⚬R

Hence T = ⌈R⌉⚬R. By duality, T = R⚬⌈R⌉.∎

### Well-founded relations

A relation RE2 is called well-founded if ∀AE, ARAA = ∅.
This does not depend on E such that RE2 for a given graph R, and implies that any SR is also well-founded.
Any well-founded relation is irreflexive : ∀x, xR{x}.

Proposition. The transitive closure T of any well-founded relation R is also well-founded.

Proof. If RE2 is well-founded, T = RP and P = 𝛿ET (namely, P=⌈R⌉), then T is well-founded:

AE, ATAPA = ATA = RPA = ∅ ∎

Note: the well-foundedness of R implies the uniqueness of P such that P = 𝛿ERP.
The proof goes by considering A = {xE | P(x) ≠ P'(x)} for P and P' with this property ; this is an example of a definition by well-founded induction, concept which will be developed later.

Proposition. If R is well-founded then ⌈R⌉ is an order, whose strict order coincides with the transitive closure of R.

Proof. The transitive closure T of R, being both transitive and irreflexive, is a strict order, and ⌈R⌉ = 𝛿ET.∎
(The antisymmetry of a well-founded R can also be deduced by ∀x,y,¬{x,y}⊂R{x,y})

### Well-order

A relation RE2 is called a strict well-order on E if

AE, A = ∅ ∨ ∃!:A\(RA)

It is easy to see that any strict well-order is a well-founded strict total order; conversely, any well-founded RE2 whose complement ∁E2 R is antisymmetric, is a strict well-order on E.
Given that the corresponding total order ≤ equals ∁E2 tR, the condition for a relation ≤ to be a well-order, which means a total order whose strict version is a strict well-order on E, can be written

AE, A = ∅ ∨ ∃!xA, A ⊂ ≤(x)

or equivalently : it is antisymmetric and ∀AE, A = ∅ ∨ ∃xA, A ⊂ ≤(x).

### Greatest and least elements

In any ordered set (E,≤), an xE is called a lower bound (resp. upper bound) of a subset AE if A ⊂ ≤(x) (resp. A ⊂ ≤(x)). If moreover xA, it is then called a least element (resp. greatest element) of A, which we shall denote x :min A (resp. x :max A). These concepts only depend on the set A ordered by restriction of ≤, ignoring the rest of E and ≤.
By antisymmetry of ≤, these relations are functional from ℘(E) to E, which is why they are usually denoted as functions min (the least element) and max (the greatest element): ∀AE, ∀xE,

x :min A ⇔ (xAA ⊂ ≤(x)) ⇔ (A∈ Dom min ∧ x = min A)
x :max A ⇔ (xAA ⊂ ≤(x)) ⇔ (A∈ Dom max ∧ x = max A)

### The successor function

In any ordered set (E,≤) with strict order <, the successor is the functional relation S on E defined by ∀x,yE,

xSyy :min <(x) ⇔ ≤(y) = <(x)

This last equivalence is easy to check.
If the order is total then S is injective and its definition is symmetric in the sense that

xSyx :max <(y) ⇔ ≤(x) = <(y)

If it is a well-order then ∀xE, x ∉ Dom S ⇔ <(x) = ∅ ⇔ x :max E.
Set theory and foundations of mathematics
1. First foundations of mathematics
2. Set theory (continued)
3. Algebra 1
4. Arithmetic and first-order foundations
5. Second-order foundations
6. Foundations of Geometry