|
A new "gst-fun" theory is created as a child of "gst-ax".
The theory will contain the definitions of ordered pairs, relations and functions and related material for general use.
|
|
We now introduce ordered pairs, which are required for representing functions as graphs.
|
|
A relation is defined as a set of ordered pairs.
Cartesian product and relation space are defined.
|
|
The domain, range and field of a relation are defined.
|
|
|
Definition of partial and total functions and the corresponding function spaces.
|
|
Functional abstraction is defined as a new variable binding construct yeilding a functional set.
|
|
In this section we define function application and show that functions are extensional.
|
|
Finalisation of a proof context.
|
|
|
|
|
Motivation
Most of the specification work which I am likely to do with galactic set theory will make use of functions.
My first application of the functions will be in the theory of pure functors, which is frivolous and unlikely to be widely
applied, and so I am creating this theory first so that more generally applicable results which are required for the theory
of pure functors will be available separately.
I have no clear idea of what this theory will contain, it will initially contain basic materials about functions, but will
be augmented by anything else that turns out to be necessary elsewhere and which can appropriately be placed here.
|
|
|
The Theory gst-fun
The new theory is first created, together with a proof context which we will build up as we develop the theory.
|
xl-sml
open_theory "gst-ax";
force_new_theory "gst-fun";
force_new_pc "gst-fun";
merge_pcs ["xl_cs_ _conv"] "gst-fun";
set_merge_pcs ["basic_hol", "gst-ax", "gst-fun"];
|
|
|
|
Ordered Pairs
|
xl-sml
declare_infix (240," g");
|
This is more abstract than the usual definition since it conceals the way in which ordered pairs are encoded.
We can't hide everything about the representation, because we will need to know at least that galaxies are closed under formation
of ordered pairs, usually a much tighter constraint is known but I will say nothing stronger until I know why it is needed.
Behind the scenes the usual definition is used to prove that this looser definition is a conservative extension.
|
|
Projections
The following functions may be used for extracting the components of ordered pairs.
|
|
|
Cartesian Product
The following theorem is required to introduce the conservative specification of cartesian product.
The witness for the proof is shown, involving a double application of replacement.
This is necessary because the loose specification of ordered pair does not provide sufficient information for a more conventional
definition using separation.
|
|
After completing this proof cartesian product can be specified by conservative extension as follows:
|
|
|
Pair-Projection inverse theorem
|
|
Var in Product theorem
|
|
|
|
Relation Space
This is the set of all relations over some domain and codomain, i.e. the power set of the cartesian product.
|
xl-sml
declare_infix(240," g");
|
|
|
Relation Subset Product Theorem
We prove here that relations are subsets of cartesian products.
|
|
|
Relation Space Non-Empty
We prove here that the empty set is a member of every relation space.
|
|
|
Another Pair-Projection Inverse Theorem
Couched in terms of membership of relation spaces.
|
|
|
Member of Relation Theorem
|
|
|
Relational Composition
|
xl-sml
declare_infix (250,"og");
|
|
|
|
domain
The domain is the set of elements which are related to something under the relationship.
|
|
|
|
Relation Subset of Cartesian Product
|
|
|
|
|
The field of the empty set
|
|
|
Partial Function Space
This is the set of all partial functions (i.e. many one mapings) over some domain and codomain.
|
xl-sml
declare_infix (240, " g");
|
|
|
|
Partial Function Space Non-Empty
First the theorem that the empty set is a partial function over any domain and codomain.
And then that every partial function space is non-empty.
|
|
|
Function Space
This is the set of all total functions over some domain and codomain.
|
xl-sml
declare_infix (240, " g");
|
|
|
Function Space Non-Empty
First, for the special case of function spaces with empty domain we prove the theorem that the empty set is a member:
|
|
Then that whenever the codomain is non-empty the function space is non-empty.
|
|