A graph is a set of pairs. The domain and range are the images of the first and second projection. A set f satisfies the fgraph property if it is a graph and if the first projection is injective. This means that if (a, b) ∈ f and (a,b0) ∈ f then b = b0(claim that will be proved in the next Chapter).
Definition is_graph r := forall y, inc y r -> is_pair y.
Definition domain f := fun_image f P.
Definition range f := fun_image f Q.
Definition fgraph f :=
is_graph f & (forall x y, inc x f -> inc y f -> P x = P y -> x = y).
The domain and range are characterized by the following two lemmas.
Lemma domain0_rw: forall r x, inc x (domain r) = exists y, inc y r & P y =x.
Lemma range0_rw: forall r x, inc x (range r) = exists y, inc y r & Q y =x.
Some properties of a functional graph.
Lemma fgraph_is_graph : forall f, fgraph f -> is_graph f.
Lemma fgraph_pr: forall f x y y’,
fgraph f -> inc (J x y) f -> inc (J x y’) f -> y = y’.
The domain and range are characterized by the following two lemmas.
Lemma domain_rw: forall r x,
is_graph r -> inc x (domain r) = (exists y, inc (J x y) r).
Lemma range_rw: forall r y,
is_graph r -> inc y (range r) = (exists x, inc (J x y) r).
These lemmas are obvious from the definitions.
Lemma inc_pr1_domain : forall f x, inc x f -> inc (P x) (domain f).
Lemma inc_pr2_range : forall f x, inc x f -> inc (Q x) (range f).
The first lemma says that if x is in the graph, then x is a pair whose second component is V (pr1x, f ). The second lemma says that y is in the range if and only if it isV (x, f ) for some x in the domain. If x is in the domain, then (x,V (x, f )) is in the graph.
Lemma in_graph_V : forall f x,
fgraph f -> inc x f -> x = J (P x) (V (P x) f).
Lemma frange_inc_rw : forall f y,
fgraph f -> inc y (range f) = (exists x, inc x (domain f) & y = V x f).
Lemma fdomain_pr1 : forall f x,
fgraph f -> inc x (domain f) -> inc (J x (V x f)) f.
Lemma pr2_V : forall f x,
fgraph f -> inc x f -> Q x = V (P x) f.
Lemma inc_V_range: forall f x,
fgraph f -> inc x (domain f) -> inc (V x f) (range f).
Assume that g is a functional graph, and f ⊂ g . Then f is a functional graph, its domain and range are subsets of the domain and range of g ; its evaluation function is the same. There is a converse: if we have two functional graphs, if the domain of f is a part of the domain of g , and if the evaluation function is the same on the domain of f , then f is a subset of g . From this we deduce an extensionality property.
Lemma sub_graph_fgraph : forall f g, fgraph g -> sub f g -> fgraph f.
Lemma sub_graph_domain : forall f g, sub f g -> sub (domain f) (domain g).
Lemma sub_graph_range : forall f g, sub f g -> sub (range f) (range g).
Lemma sub_graph_ev: forall f g x,
fgraph g -> sub f g -> inc x (domain f) -> V x f = V x g.
Lemma fgraph_sub : forall f g, fgraph f -> fgraph g ->
sub (domain f) (domain g) ->
(forall x, inc x (domain f) -> V x f = V x g) -> sub f g.
Lemma fgraph_exten: forall f g,
fgraph f -> fgraph g -> domain f = domain g ->
(forall x, inc x (domain f) -> V x f = V x g) -> f = g.
Given two sets A and B, the range of the union is the union of the ranges. The same holds for the domain. If the sets are functional graphs, the union is a functional graph, provided that the intersection of the domains is empty.
Lemma range_union2: forall a b,
range (union2 a b) = union2 (range a) (range b).
Lemma domain_union2: forall a b,
domain (union2 a b) = union2 (domain a) (domain b).
Lemma fgraph_union2: forall a b, fgraph a -> fgraph b ->
intersection2 (domain a) (domain b) = emptyset ->
fgraph (union2 a b).
¶ Inverse image of a set a by a graph f , denoted−1f 〈a〉 or simply f−1〈a〉. This is a part of the domain, characterized by the property that x ∈ f−1〈a〉 if and only if V (x, f ) ∈ a.
Definition inverse_image (a f : Set) :=
Zo (domain f) (fun x => inc (V x f) a).
Lemma inverse_image_sub : forall a f, sub (inverse_image a f) (domain f).
Lemma inverse_image_rw : forall a f x,
inc x (inverse_image a f)= ( inc x (domain f) & inc (V x f) a).
Lemma inverse_image_inc : forall a f x,
inc x (domain f) -> inc (V x f) a -> inc x (inverse_image a f).
Lemma inverse_image_pr : forall a f x,
inc x (inverse_image a f) -> inc (V x f) a.
Consider now a function f , and a set x. The set of all pairs (a, f (a)) for a ∈ x will be denoted byLxf . This is a functional graph; its domain is x, and its evaluation function is f . Definition fgraph_create (x : Set) (p : Set) :=
fun_image x (fun y => J y (p y)).
Notation L := function_create.
Lemma L_inc_rw: forall x p y,
inc y (L x p) = exists z, inc z x & J z (p z) = y.
Lemma L_fgraph : forall p x, fgraph (L x p).
Lemma L_domain : forall x p, domain (L x p) = x.
Lemma L_V_rw : forall x p y, inc y x -> V y (L x p) = p y.
The range ofLxf is the image f 〈x〉 (according to Section 2.5; on page 42 we shall define g 〈x〉 where g is a graph). There are some other useful properties.
If v is a graph with domain x and evaluation function f , then v = Lxf . We haveLxf = Lyg if x = y, and f and g agree on x.
Lemma L_range : forall p x, range (L x p) = fun_image x p.
Lemma L_create : forall a f,
L a (fun x => V x (L a f)) = L a f.
Lemma L_range_rw: forall sf f a,
inc a (range (L sf f)) = exists b, inc b sf & f b = a.
Lemma L_V_out : forall x f y,
~inc y x -> V y (L x f) = emptyset.
Lemma L_recovers : forall f,
fgraph f -> L (domain f) (fun x : Set => V x f) = f.
Lemma L_exten1 : forall a b f g,
a = b -> (forall x, inc x a -> f x = g x) ->
L a f = L b g.
¶ We denote by g ◦ f the composition of the two functions. It maps x to g ( f (x)). In the case of graphs, the evaluation function isV (V (x, f ),g); note that the order is reversed. The domain is the set of all x in the domain of f that are mapped to the domain of g , it is the inverse image of the domain of g by f . We do not like this definition, thus introduce an alternate one, that agrees if functions are composable. Note that the last lemma makes no assumptions on f and g . The easy case is when the two objects are composable (in particular, they are functions).
In this case the domain of g ◦ f is the domain of f .
Definition fcomposable (f g : Set) :=
fgraph f & fgraph g & sub (range g) (domain f).
Definition fcompose (f g : Set) :=
L (inverse_image (domain f) g) (fun y => V (V y g) f).
Definition gcompose g f := L(domain f) (fun y => V (V y f) g).
Lemma fcompose_fgraph : forall f g, fgraph (fcompose f g).
Lemma fcompose_domain : forall f g,
domain (fcompose f g) = inverse_image (domain f) g.
Lemma fcompose_range: forall f g, fgraph f ->
sub (range (fcompose f g)) (range f).
Lemma fcomposable_domain : forall f g,
fcomposable f g -> domain (fcompose f g) = domain g.
Lemma alternate_compose: forall g f,
fcomposable g f -> gcompose g f = fcompose g f.
Lemma fcompose_ev : forall x f g,
inc x (domain (fcompose f g)) -> V x (fcompose f g) = V (V x g) f.
An interesting function is the identity function: it maps everything on itself. We consider here the graph of this function. More properties will be given later.
Definition identity_g (x : Set) := L x (fun y : Set => y).
Lemma identity_fgraph : forall x, fgraph (identity_g x).
Lemma identity_domain : forall x, domain (identity_g x) = x.
Lemma identity_range: forall x, range (identity_g x) = x.
Lemma identity_ev : forall x a, inc x a -> V x (identity_g a) = x.
Given two sets f and x, one can consider the set of all y ∈ f satisfying pr1y ∈ x. This makes sense if f is a graph, it is called the restriction of f to x. In fact, since this is a subset of f , it is a functional graph whenever f is. Its domain is the intersection of f and x. On the restriction domain the function takes the same value as the restriction.
Definition restr f x :=
Zo f (fun y=> inc (P y) x).
Lemma restr_inc_rw : forall f x y,
inc y (restr f x) = (inc y f & inc (P y) x).
Lemma restr_sub : forall f x, sub (restr f x) f.
Lemma restr_fgraph : forall f x, fgraph f -> fgraph (restr f x).
Lemma restr_graph: forall x r,
is_graph r -> is_graph (restr r x).
Lemma restr_domain : forall f x,
fgraph f -> domain (restr f x) = intersection2 (domain f) x.
Lemma restr_domain1 : forall f x,
fgraph f -> sub x (domain f) -> domain (restr f x) = x.
Lemma restr_ev : forall f u x,
fgraph f -> sub u (domain f) -> inc x u ->
V x (restr f u) = V x f.
Lemma restr_ev1 : forall f u x,
fgraph f -> inc x (domain f) -> inc x u ->
V x (restr f u) = V x f.
Lemma fgraph_sub_eq : forall r s, fgraph r -> fgraph s -> sub r s ->
sub (domain s) (domain r) -> r = s.
Lemma fgraph_sub_V : forall f g x,
fgraph g -> inc x (domain f) -> sub f g -> V x f = V x g.
Lemma restr_to_domain : forall f g,
fgraph f -> fgraph g -> sub f g -> restr g (domain f) = f.
Lemma restr_to_domain2 : forall x f,
fgraph f -> sub x (domain f) -> L x (fun i => V i f) = restr f x.
Lemma double_restr: forall f a b, fgraph f ->
sub a b -> sub b (domain f) ->
(restr (restr f b) a) = (restr f a).
The union of functional graphs is a graph, provided that some compatibility condition holds. The domain is the union of the domains. The range is the union of the ranges. We consider the special case of a union of a graph and the singleton {(x, y)}.
Lemma domain_union : forall z, domain (union z) = union (fun_image z domain).
Lemma tack_on_domain : forall f x y,
domain (tack_on f (J x y)) = tack_on (domain f) x.
Lemma range_union : forall z, range (union z) = union (fun_image z range).
Lemma tack_on_range : forall f x y,
range (tack_on f (J x y)) = tack_on (range f) y.
Lemma tack_on_fgraph : forall f x y, fgraph f -> ~inc x (domain f) ->
fgraph (tack_on f (J x y)).
Given a function that takes an argument of type x, we know how to convert it to a function defined on the set x. We can then take its graph.
Definition tcreate (x:Set) (f:x->Set) :=
L x (fun y => (Yy (fun (hyp : inc y x) => f (Bo hyp)) emptyset)).
Lemma tcreate_value_type : forall x (f:x->Set) y, V (Ro y) (tcreate f) = f y.
Lemma tcreate_value_inc : forall x (f:x->Set) y (hyp : inc y x), V y (tcreate f) = f (Bo hyp).
Lemma tcreate_domain : forall x (f:x->Set), domain (tcreate f) = x.
Chapter 4
Correspondences
From now on, we follow Bourbaki as closely as possible. The series “Elements of mathe-matics” is divided in 9 books, the first one is called “Theory of sets”. This book is divided into four chapters, the second one is “Theory of sets”. This chapter is divided into 6 sections; we implement here section 3 “Correspondences”. When we talk about Proposition 1, this is to be understood as Proposition 1 of [2] of the current section (i.e., the current Chapter of this report).
We consider here some properties of sections 1 (Collectivizing relations) and 2 (Ordered pairs) not implemented by Carlos Simpson in [2].
A property P(y) is collectivizing if there is a set x such that P(y) is equivalent to y ∈ x.
There are properties that are not collectivizing, for instance y 6∈ y. The second lemma says that there is a set containing no set but there is no set containing all sets.
Lemma not_collectivizing_notin:
~ (exists z, forall y, inc y z = not (inc y y)).
Lemma collectivizing_special :
(exists x, forall y, ~ (inc y x)) & ~ (exists x, forall y, inc y x).
Additional properties of the empty set. We have ; ⊂ x for every x, but the converse is true only if x is the empty set. Since x ∈ ; is absurd, everything can be deduced from it.
Lemma emptyset_pr: forall x, inc x emptyset -> False.
Lemma emptyset_pra: forall x (p: EP), inc x emptyset -> (p x).
Lemma sub_emptyset : forall x, sub x emptyset = (x = emptyset).