## 3.9. Eggs, basis, clones and varieties

### Eggs

Let us generalize the concept of free
and generating element from actions of monoids to actions of categories.
For any concrete category *C*, or more generally
any category with a given action, let us call *egg of C* (*) an initial object (*M*,*e*)
of the category where
- Objects are all (
*E*,*x*)
where *X* is an object of *C* and *x*∈*E*
- Mor((
*E*,*x*),(*F*,*y*)) =
{*f*∈Mor(*E*,*F*) | *f*(*x*)=*y*}.

In other words, for any object *E* the function
Mor(*M*,*E*) ∋ *f* ↦ *f*(*e*) is bijective to *E*.

For any egg of an acting category, its image in the resulting concrete category is also an egg.

**Proposition.** Any egg (*M*,*e*) (if that exists), can be seen in a unique way as a
monoid (*M*,*e*,•) with an action on every other object
*X* (beyond • on *M* itself), such that for all objects *X*,
*Y*, - Mor(
*X*,*Y*) ⊂ Mor_{M}(*X*,*Y*)
- Mor(
*M*,*X*) = Mor_{M}(*M*,*X*)

Proof. Defining ∀*x*∈*X*, *h*_{x} ∈ Mor(*M*,*X*) ∧
*h*_{x}(*e*) = *x*, provides an *M*-structure on
each *X* which interprets each *a*∈*M* in *X* as defined by the
tuple (*e*,*a*). So they are preserved: Mor(*X*,*Y*) ⊂
Mor_{M}(*X*,*Y*), which implies the axioms of
*M*-acts.

The composition in *M* coming as this
*M*-structure for *M* = *X*, satisfies the same axioms.

The last axiom of monoid, *h*_{e} = Id_{M}
comes from the uniqueness of *h*_{e} obeying its definition,
and ensures the
reverse inclusion:

∀*g*∈Mor_{M}(*M*,*X*),
*g* = *h*_{g(e)} ∴ *g* ∈ Mor(*M*,*X*). ∎

This monoid (*M*,*e*,•) is essentially the opposite of the monoid
End(*M*). Indeed for all *a*, *b*∈*M* we have *h*_{a}
∈ End(*M*), *h*_{b} ∈ End(*M*) and
*h*_{a}০*h*_{b}(*e*) =
*h*_{a}(*b*) = *b*•*a*.

For any object *M* of a category *C*, the action of *C* defined by *M*
has an egg (^{M}M, 1_{M}), with the monoid action
directly given by composition. This just simplifies conventions, taking Mor(*M*,*E*)
as the definition of the set underlying *E* on which the category acts,
instead of saying they are in bijection.
If *C* was already
a concrete category with an egg (*M*,*e*) then ^{M}C
is just a copy of *C* (with correspondence using the choice of *e*).
**Proposition.** For a monoid (*M*,*e*, •) seen as an
*M*-set interpreting • as action, (*M*, *e*) is
an egg of the category of *M*-sets; other eggs are the (*X*,*x*)
where *x* is a free and generating element of *X*.

Proof: by properties of acts
as algebraic structures and inverses,
as *x* is free and generating in *X* if and only if (*X*,*x*) is
isomorphic to (*M*,*e*). ∎

### Basis and algebraic structures

As an egg is a language of function symbols, let us generalize this to
any other arity.

A *basis* of an object *X* of a concrete or acting category *C*, is a family
*b*∈*X*^{I} such that (*X*,*b*) is an egg for the action
of *C* giving
to each object *E* the set *E*^{I}:
∀*u*∈*E*^{I}, ∃!*f*∈Mor(*X*,*E*),
*f*০*b*=*u*.

If an object with several elements exists in the category then any basis *b* is injective,
thus can also be viewed as the subset *B* = Im *b* ⊂ *X* (from which the view
as a family can be restored taking *b* = Id_{B}).

This gives *X* the role of the set of all possible *I*-ary operation symbols *s*
interpreted in each object *E* and preserved in *C*: these are the
structures defined by
each (*b*,*s*) for *s*∈*X*, which are here functional. Its essential
uniqueness means that any two basis in *C* which are equinumerous (a bijection between them exists),
give their objects the role of the same set of operation symbols.

For any objects *M*, *X* of a category *C*, and any *B* ∈
Mor(*M*,*X*)^{I},
(*B* is a basis of ^{M}X in the
concrete category ^{M}C) ⇔ (*X*, *B*) = ^{C}∐_{i∈I} *M*.

Thus, given an egg (*M*, *e*), that is an object *M* with basis a singleton {*e*}
where *e*∈*M*, an object *X* with basis *B* plays the role of the *B*-ary
coproduct (of the constant family),
^{C}∐_{i∈B}
*M*, with the *j*_{i} ∈ Mor(*M*,*X*) defined for each
*i*∈*B* by *j*_{i}(*e*) = *i*.
These *j*_{i} are sections.
### Clones

Putting all arities together gives an algebraic language called the *clone* of *C*:
*L* = ∐_{n∈ℕ} *L*_{n}

where each set *L*_{n}
of *n*-ary symbols is an object of *C* with a chosen basis of *n* elements
1_{n} = (e_{i,n})_{i<n}
∈ *L*_{n}^{n}. Thus, ∀*n*∈ℕ,
*L*_{n} = ^{C}∐_{i<n}
*L*_{1}.Depending on *C*, a clone may exist or not,
but it is essentially unique, serving as the maximal algebraic language for objects of *C*.

Each object *E* of *C*, gets the *L*-algebra structure
φ_{E} = ∐_{n∈ℕ}
φ_{E}^{(n)}, where
φ_{E}^{(n)} : *L*_{n} × *E*^{n}
→ *E* is defined taking as ⃖φ_{E}^{(n)} the inverse of
Mor(*L*_{n},*E*) ∋ *f* ↦
*f*০1_{n} which is bijective to *E*^{n} because
1_{n} is a basis in *C*. This definition is expressible by both axioms
which extend to clones those defining the action of an egg in a category:
- Each e
_{i,n} acts as the *i*-th
projection from *E*^{n} to *E*, i.e. ∀*i*<*n*,
∀*u*∈*E*^{n},
e_{i,n} ⋅ *u* = *u*_{i}.
- ∀
*n*∈ℕ, ⃖φ_{E}^{(n)} :
*E*^{n} → Mor(*L*_{n},*E*).

This implies (for all objects *E*, *F*),
Mor(*E*,*F*) ⊂ Mor_{L}(*E*,*F*)

∀*n*∈ℕ, Mor(*L*_{n},*E*) =
Mor_{L}(*L*_{n},*E*).

Let us recall the proof of Mor_{L}(*L*_{n},*E*)
⊂ Mor(*L*_{n},*E*) previously seen for *n*=1. From
1_{n} being a basis of *L*_{n} and
Id_{Ln} ∈ Mor(*L*_{n},*L*_{n}), comes
- ∀
*x*∈*L*_{n}, *x* = *x*⋅1_{n}

Thus ∀*f*∈Mor_{L}(*L*_{n},*E*),
(∀*x*∈*L*_{n}, *f*(*x*) = *f*(*x*⋅1_{n}) = *x*⋅
(*f*০1_{n}) ∴ *f* =
⃖φ_{E}^{(n)}(*f*০1_{n})
∈ Mor(*L*_{n},*E*).∎
3. implies that 1_{n} generates *L*_{n} in the sense that
〈1_{n}〉_{Ln} = *L*_{n} ∴
〈1_{n}〉_{L} = *L*_{n}.

### Abstract clones and varieties

A clone *L* may be conceived independently of *C*
(like monoids are independent of their actions), as the small concrete category made of the sequence of objects
(*L*_{n})_{n∈ℕ}, called an *abstract clone*. It
defines on *L* a structure of typed algebra with types *L*_{n} and operations
- Constant symbols e
_{i,n}
- An
*L*-algebra structure on each *L*_{n}, that is
a sequence of operations we shall abusively denote the same
• : *L*_{p}
× *L*_{n}^{p} → *C*_{n}
for each *p*∈ℕ.

Generalizing the concept of action to such
a typed algebra, an *L*-*module* (or *representation* of *L*),
is an *L*-algebra *M* satisfying the above 1. and 2. where 2. uses
Mor_{L} :
∀*n*,*p*∈ℕ, ∀*s*∈*L*_{p},
∀*x*∈*L*_{n}^{p}, ∀*u*∈*M*^{n},
(*s*•*x*) ⋅ *u* = *s* ⋅ ((*x*_{i}
⋅ *u*)_{i<p})

The *variety* of *L* is the category of all *L*-modules with Mor = Mor_{L}.

A typed algebra *L* = ∐_{n∈ℕ} *L*_{n} with such symbols, is
an abstract clone if each *L*_{n} satisfies the above axioms 1., 2. and 3. extending to *L*
the axioms of monoid
for *L*_{1}:

- 1. and 2. make
*L*_{n} an *L*-module.
- As 3. was seen to imply ∀
*M*, ∀*f*∈Mor_{L}(*L*_{n},*M*),
*f* =
⃖φ_{M}^{(n)}(*f*০1_{n}), it
completes making 1_{n} a basis of *L*_{n}, equivalently in
the small category *L* with its *L*-morphisms or in its whole variety.

As will be seen later, the general concept of variety
will use algebraic languages that do not need to be abstract clones, and not even
typed algebras. Roughly speaking, a variety is a category of algebras which has a clone
and is equivalent to the variety of this clone. But other equivalent definitions are possible.

(*) I took the initiative to call it "egg" as I am not aware of any existing name for
that concept in the literature.

Set theory and foundations
of mathematics

1. First foundations of
mathematics

2. Set theory (continued)

**3. Algebra 1**

3.1. Morphisms
of relational systems and concrete categories

3.2. Algebras

3.3. Special morphisms

3.4. Monoids

3.5. Actions of monoids

3.6. Invertibility and groups

3.7. Categories

3.8. Initial and final objects

3.9. **Eggs, basis, clones and varieties**

4. Arithmetic and first-order foundations