In this theory we have available both composition and application.
Probably one can manage with only composition, but its easier for me to have both.
|
xl-sml
declare_infix (240, "o");
new_const("o", F → F → F⌝);
declare_infix (240, "a");
new_const("a", F → F → F⌝);
|
We also have a membership relation which asserts that a morphism is a member of a category.
|
xl-sml
declare_infix (240, "∈f");
new_const("∈f", F → C → BOOL⌝);
|
Before we can say much at all we also need the domain and codomain functions.
These yield objects (categories) not morphisms (functors) and an injection morphism function is also provided.
Identity functors are special cases of injections defined as follows:
|
xl-holconst id: C → F
|
∀c: C• id c = inj c (λf•T)
|
We are now in a position to give the first axioms.
First we assert that functors and categories are extensional.
Composition is given as a total function rather than a partial one.
The axioms will however speak only about the values of the function in the cases where the partial composition we expect in
categories would be defined.
That is reflected first in the axiom which asserts that composition is associative.
|
xl-sml
val comp_assoc_axiom = new_axiom (["comp_assoc_axiom"], ⌜
∀f1 f2 f3:F• cod f1 = dom f2 ∧ cod f2 = dom f3 ⇒ (f1 o f2) o f3 = f1 o (f2 o f3)
⌝);
|
Two key properties of categories and functors respectively are now asserted, viz. that categories are closed under composition
and functors respect composition.
Categories are also closed under left and right identity.
First we define membership as a relation between categories.
|
xl-sml
declare_infix (240, "∈c");
|
|
xl-holconst $∈c: C → C → BOOL
|
∀c1 c2: C• c1 ∈c c2 ≡ (id c1) ∈f c2
|
|
xl-sml
val cat_id_axiom = new_axiom (["cat_id_axiom"], ⌜
∀c: C; f:F• f ∈f c ⇒ (dom f) ∈c c ∧ (cod f) ∈c c
⌝);
|
The following axiom tells us that, given a category c and a predicate p over functors which defines a subcategory of c, ⌜inj
c p⌝ is a functor which injects that subcategory into c.
This is not only an injection in the sense of a one-one function, but also an identity functor.
The next axiom asserts well-foundedness.
It is probably unnecessary for the development of mathematics in this system, but is valuable in giving insight into the underlying
model which has inspired the rest of the axioms.