This theory covers basic properties of function spaces. A set of functions with domain \(X\) and values in the set \(Y\) is denoted in Isabelle as \(X\rightarrow Y\). It just happens that the colon ":" is a synonym of the set membership symbol \(\in\) in Isabelle/ZF so we can write \(f:X\rightarrow Y\) instead of \(f \in X\rightarrow Y\). This is the only case that we use the colon instead of the regular set membership symbol.
Functions in ZF are sets of pairs. This means that if \(f: X\rightarrow Y \) then \(f\subseteq X\times Y\). This section is mostly about consequences of this understanding of the notion of function.
We define the notion of function that preserves a collection here. Given two collection of sets a function preserves the collections if the inverse image of sets in one collection belongs to the second one. This notion does not have a name in romantic math. It is used to define continuous functions in Topology_ZF_2 theory. We define it here so that we can use it for other purposes, like defining measurable functions. Recall that \( f^{-1}(A) \) means the inverse image of the set \(A\).
definition
\( \text{PresColl}(f,S,T) \equiv \forall A\in T.\ f^{-1}(A)\in S \)
A definition that allows to get the first factor of the domain of a binary function \(f: X\times Y \rightarrow Z\).
definition
\( \text{fstdom}(f) \equiv domain(domain(f)) \)
If a function maps \(A\) into another set, then \(A\) is the domain of the function.
lemma func1_1_L1:
assumes \( f:A\rightarrow C \)
shows \( domain(f) = A \) using assms, domain_of_funStandard Isabelle defines a \( function(f) \) predicate. The next lemma shows that our functions satisfy that predicate. It is a special version of Isabelle's fun_is_function.
lemma fun_is_fun:
assumes \( f:X\rightarrow Y \)
shows \( function(f) \) using assms, fun_is_functionA lemma explains what fstdom is for.
lemma fstdomdef:
assumes A1: \( f: X\times Y \rightarrow Z \) and A2: \( Y\neq \emptyset \)
shows \( \text{fstdom}(f) = X \)proofA version of the Pi_type lemma from the standard Isabelle/ZF library.
lemma func1_1_L1A:
assumes A1: \( f:X\rightarrow Y \) and A2: \( \forall x\in X.\ f(x) \in Z \)
shows \( f:X\rightarrow Z \)proofA variant of func1_1_L1A.
lemma func1_1_L1B:
assumes A1: \( f:X\rightarrow Y \) and A2: \( Y\subseteq Z \)
shows \( f:X\rightarrow Z \)proofThere is a value for each argument.
lemma func1_1_L2:
assumes A1: \( f:X\rightarrow Y \), \( x\in X \)
shows \( \exists y\in Y.\ \langle x,y\rangle \in f \)proofThe inverse image is the image of converse. True for relations as well.
lemma vimage_converse:
shows \( r^{-1}(A) = converse(r)(A) \) using vimage_iff, image_iff, converse_iffThe image is the inverse image of converse.
lemma image_converse:
shows \( converse(r)^{-1}(A) = r(A) \) using vimage_iff, image_iff, converse_iffThe inverse image by a composition is the composition of inverse images.
lemma vimage_comp:
shows \( (r\circ s)^{-1}(A) = s^{-1}(r^{-1}(A)) \) using vimage_converse, converse_comp, image_comp, image_converseA version of vimage_comp for three functions.
lemma vimage_comp3:
shows \( (r\circ s\circ t)^{-1}(A) = t^{-1}(s^{-1}(r^{-1}(A))) \) using vimage_compInverse image of any set is contained in the domain.
lemma func1_1_L3:
assumes A1: \( f:X\rightarrow Y \)
shows \( f^{-1}(D) \subseteq X \)proofThe inverse image of the range is the domain.
lemma func1_1_L4:
assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(Y) = X \) using assms, func1_1_L3, func1_1_L2, vimage_iffThe arguments belongs to the domain and values to the range.
lemma func1_1_L5:
assumes A1: \( \langle x,y\rangle \in f \) and A2: \( f:X\rightarrow Y \)
shows \( x\in X \wedge y\in Y \)proofFunction is a subset of cartesian product.
lemma fun_subset_prod:
assumes A1: \( f:X\rightarrow Y \)
shows \( f \subseteq X\times Y \)proofThe (argument, value) pair belongs to the graph of the function.
lemma func1_1_L5A:
assumes A1: \( f:X\rightarrow Y \), \( x\in X \), \( y = f(x) \)
shows \( \langle x,y\rangle \in f \), \( y \in \text{range}(f) \)proofThe next theorem illustrates the meaning of the concept of function in ZF.
theorem fun_is_set_of_pairs:
assumes A1: \( f:X\rightarrow Y \)
shows \( f = \{\langle x, f(x)\rangle .\ x \in X\} \)proofThe range of function that maps \(X\) into \(Y\) is contained in \(Y\).
lemma func1_1_L5B:
assumes A1: \( f:X\rightarrow Y \)
shows \( \text{range}(f) \subseteq Y \)proofThe image of any set is contained in the range.
lemma func1_1_L6:
assumes A1: \( f:X\rightarrow Y \)
shows \( f(B) \subseteq \text{range}(f) \) and \( f(B) \subseteq Y \)proofThe inverse image of any set is contained in the domain.
lemma func1_1_L6A:
assumes A1: \( f:X\rightarrow Y \)
shows \( f^{-1}(A)\subseteq X \)proofImage of a greater set is greater.
lemma func1_1_L8:
assumes A1: \( A\subseteq B \)
shows \( f(A)\subseteq f(B) \) using assms, image_UnAn immediate corollary of vimage_mono from the Isabelle/ZF distribution - the inverse image of a greater set is greater. Note we do not require that \(f\) is a function, so this is true for relations as well.
lemma vimage_mono1:
assumes \( A\subseteq B \)
shows \( f^{-1}(A) \subseteq f^{-1}(B) \) using assms, vimage_monoA set is contained in the the inverse image of its image. There is similar theorem in equalities.thy (function_image_vimage) which shows that the image of inverse image of a set is contained in the set.
lemma func1_1_L9:
assumes A1: \( f:X\rightarrow Y \) and A2: \( A\subseteq X \)
shows \( A \subseteq f^{-1}(f(A)) \)proofThe inverse image of the image of the domain is the domain.
lemma inv_im_dom:
assumes A1: \( f:X\rightarrow Y \)
shows \( f^{-1}(f(X)) = X \)proofA technical lemma needed to make the func1_1_L11 proof more clear.
lemma func1_1_L10:
assumes A1: \( f \subseteq X\times Y \) and A2: \( \exists !y.\ (y\in Y \wedge \langle x,y\rangle \in f) \)
shows \( \exists !y.\ \langle x,y\rangle \in f \)proofIf \(f\subseteq X\times Y\) and for every \(x\in X\) there is exactly one \(y\in Y\) such that \((x,y)\in f\) then \(f\) maps \(X\) to \(Y\).
lemma func1_1_L11:
assumes \( f \subseteq X\times Y \) and \( \forall x\in X.\ \exists !y.\ y\in Y \wedge \langle x,y\rangle \in f \)
shows \( f: X\rightarrow Y \) using assms, func1_1_L10, Pi_iff_oldA set defined by a lambda-type expression is a function. There is a similar lemma in func.thy, but I had problems with lambda expressions syntax so I could not apply it. This lemma is a workaround for this. Besides, lambda expressions are not readable.
lemma func1_1_L11A:
assumes A1: \( \forall x\in X.\ b(x) \in Y \)
shows \( \{\langle x,y\rangle \in X\times Y.\ b(x) = y\} : X\rightarrow Y \)proofThe next lemma will replace func1_1_L11A one day.
lemma ZF_fun_from_total:
assumes A1: \( \forall x\in X.\ b(x) \in Y \)
shows \( \{\langle x,b(x)\rangle .\ x\in X\} : X\rightarrow Y \)proofThe value of a function defined by a meta-function is this meta-function (deprecated, use \( ZF\_fun\_from\_tot\_val(1) \) instead).
lemma func1_1_L11B:
assumes A1: \( f:X\rightarrow Y \), \( x\in X \) and A2: \( f = \{\langle x,y\rangle \in X\times Y.\ b(x) = y\} \)
shows \( f(x) = b(x) \)proofThe next lemma will replace func1_1_L11B one day.
lemma ZF_fun_from_tot_val:
assumes \( f:X\rightarrow Y \), \( x\in X \) and \( f = \{\langle x,b(x)\rangle .\ x\in X\} \)
shows \( f(x) = b(x) \) and \( b(x)\in Y \)proofIdentical meaning as ZF_fun_from_tot_val, but phrased a bit differently.
lemma ZF_fun_from_tot_val0:
assumes \( f:X\rightarrow Y \) and \( f = \{\langle x,b(x)\rangle .\ x\in X\} \)
shows \( \forall x\in X.\ f(x) = b(x) \) using assms, ZF_fun_from_tot_valAnother way of expressing that lambda expression is a function.
lemma lam_is_fun_range:
assumes \( f=\{\langle x,g(x)\rangle .\ x\in X\} \)
shows \( f:X\rightarrow \text{range}(f) \)proofYet another way of expressing value of a function.
lemma ZF_fun_from_tot_val1:
assumes \( x\in X \)
shows \( \{\langle x,b(x)\rangle .\ x\in X\}(x)=b(x) \)proofAn hypotheses-free form of ZF_fun_from_tot_val1: the value of a function \(X\ni x \mapsto p(x)\) is \(p(x)\) for all \(x\in X\).
lemma ZF_fun_from_tot_val2:
shows \( \forall x\in X.\ \{\langle x,b(x)\rangle .\ x\in X\}(x) = b(x) \) using ZF_fun_from_tot_val1The range of a function defined by set comprehension is the set of its values.
lemma range_fun:
shows \( \text{range}(\{\langle x,b(x)\rangle .\ x\in X\}) = \{b(x).\ x\in X\} \)In Isabelle/ZF and Metamath if \(x\) is not in the domain of a function \(f\) then \(f(x)\) is the empty set. This allows us to conclude that if \(y\in f(x)\), then \(x\) must be en element of the domain of \(f\).
lemma arg_in_domain:
assumes \( f:X\rightarrow Y \), \( y\in f(x) \)
shows \( x\in X \)proofWe can extend a function by specifying its values on a set disjoint with the domain.
lemma func1_1_L11C:
assumes A1: \( f:X\rightarrow Y \) and A2: \( \forall x\in A.\ b(x)\in B \) and A3: \( X\cap A = \emptyset \) and Dg: \( g = f \cup \{\langle x,b(x)\rangle .\ x\in A\} \)
shows \( g : X\cup A \rightarrow Y\cup B \), \( \forall x\in X.\ g(x) = f(x) \), \( \forall x\in A.\ g(x) = b(x) \)proofWe can extend a function by specifying its value at a point that does not belong to the domain.
lemma func1_1_L11D:
assumes A1: \( f:X\rightarrow Y \) and A2: \( a\notin X \) and Dg: \( g = f \cup \{\langle a,b\rangle \} \)
shows \( g : X\cup \{a\} \rightarrow Y\cup \{b\} \), \( \forall x\in X.\ g(x) = f(x) \), \( g(a) = b \)proofA technical lemma about extending a function both by defining on a set disjoint with the domain and on a point that does not belong to any of those sets.
lemma func1_1_L11E:
assumes A1: \( f:X\rightarrow Y \) and A2: \( \forall x\in A.\ b(x)\in B \) and A3: \( X\cap A = \emptyset \) and A4: \( a \notin X\cup A \) and Dg: \( g = f \cup \{\langle x,b(x)\rangle .\ x\in A\} \cup \{\langle a,c\rangle \} \)
shows \( g : X\cup A\cup \{a\} \rightarrow Y\cup B\cup \{c\} \), \( \forall x\in X.\ g(x) = f(x) \), \( \forall x\in A.\ g(x) = b(x) \), \( g(a) = c \)proofA way of defining a function on a union of two possibly overlapping sets. We decompose the union into two differences and the intersection and define a function separately on each part.
lemma fun_union_overlap:
assumes \( \forall x\in A\cap B.\ h(x) \in Y \), \( \forall x\in A\setminus B.\ f(x) \in Y \), \( \forall x\in B\setminus A.\ g(x) \in Y \)
shows \( \{\langle x,\text{if }x\in A\setminus B\text{ then }f(x)\text{ else }\text{if }x\in B\setminus A\text{ then }g(x)\text{ else }h(x)\rangle .\ x \in A\cup B\}: A\cup B \rightarrow Y \)proofInverse image of intersection is the intersection of inverse images.
lemma invim_inter_inter_invim:
assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(A\cap B) = f^{-1}(A) \cap f^{-1}(B) \) using assms, fun_is_fun, function_vimage_IntThe inverse image of an intersection of a nonempty collection of sets is the intersection of the inverse images. This generalizes invim_inter_inter_invim which is proven for the case of two sets.
lemma func1_1_L12:
assumes A1: \( B \subseteq Pow(Y) \) and A2: \( B\neq \emptyset \) and A3: \( f:X\rightarrow Y \)
shows \( f^{-1}(\bigcap B) = (\bigcap U\in B.\ f^{-1}(U)) \)proofThe inverse image of a set does not change when we intersect the set with the image of the domain.
lemma inv_im_inter_im:
assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(A \cap f(X)) = f^{-1}(A) \) using assms, invim_inter_inter_invim, inv_im_dom, func1_1_L6AIf the inverse image of a set is not empty, then the set is not empty. Proof by contradiction.
lemma func1_1_L13:
assumes A1: \( f^{-1}(A) \neq \emptyset \)
shows \( A\neq \emptyset \) using assmsIf the image of a set is not empty, then the set is not empty. Proof by contradiction.
lemma func1_1_L13A:
assumes A1: \( f(A)\neq \emptyset \)
shows \( A\neq \emptyset \) using assmsWhat is the inverse image of a singleton?
lemma func1_1_L14:
assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(\{y\}) = \{x\in X.\ f(x) = y\} \) using assms, func1_1_L6A, vimage_singleton_iff, apply_iffA lemma that can be used instead fun_extension_iff to show that two functions are equal
lemma func_eq:
assumes \( f: X\rightarrow Y \), \( g: X\rightarrow Z \) and \( \forall x\in X.\ f(x) = g(x) \)
shows \( f = g \) using assms, fun_extension_iffAn alternative syntax for defining a function: instead of writing \(\{\langle x,p(x)\rangle. x\in X\}\) we can write \(\lambda x\in X. p(x)\).
lemma lambda_fun_alt:
shows \( \{\langle x,p(x)\rangle .\ x\in X\} = (\lambda x\in X.\ p(x)) \)proofIf a function is equal to an expression \(b(x)\) on \(X\), then it has to be of the form \(\{ \langle x, b(x)\rangle | x\in X\}\).
lemma func_eq_set_of_pairs:
assumes \( f:X\rightarrow Y \), \( \forall x\in X.\ f(x) = b(x) \)
shows \( f = \{\langle x, b(x)\rangle .\ x \in X\} \)proofFunction defined on a singleton is a single pair.
lemma func_singleton_pair:
assumes A1: \( f : \{a\}\rightarrow X \)
shows \( f = \{\langle a, f(a)\rangle \} \)proofA single pair is a function on a singleton. This is similar to singleton_fun from standard Isabelle/ZF.
lemma pair_func_singleton:
assumes A1: \( y \in Y \)
shows \( \{\langle x,y\rangle \} : \{x\} \rightarrow Y \)proofThe value of a pair on the first element is the second one.
lemma pair_val:
shows \( \{\langle x,y\rangle \}(x) = y \) using singleton_fun, apply_equalityA more familiar definition of inverse image.
lemma func1_1_L15:
assumes A1: \( f:X\rightarrow Y \)
shows \( f^{-1}(A) = \{x\in X.\ f(x) \in A\} \)proofFor symmetric functions inverse images are symmetric.
lemma symm_vimage_symm:
assumes \( f:X\times X\rightarrow Y \) and \( \forall x\in X.\ \forall y\in X.\ f\langle x,y\rangle = f\langle y,x\rangle \)
shows \( f^{-1}(A) = converse(f^{-1}(A)) \) using assms, func1_1_L15A more familiar definition of image.
lemma func_imagedef:
assumes A1: \( f:X\rightarrow Y \) and A2: \( A\subseteq X \)
shows \( f(A) = \{f(x).\ x \in A\} \)proofIf all elements of a nonempty set map to the same element of the codomain, then the image of this set is a singleton.
lemma image_constant_singleton:
assumes \( f:X\rightarrow Y \), \( A\subseteq X \), \( A\neq \emptyset \), \( \forall x\in A.\ f(x) = c \)
shows \( f(A) = \{c\} \) using assms, func_imagedefA technical lemma about graphs of functions: if we have two disjoint sets \(A\) and \(B\) then the cartesian product of the inverse image of \(A\) and \(B\) is disjoint with (the graph of) \(f\).
lemma vimage_prod_dis_graph:
assumes \( f:X\rightarrow Y \), \( A\cap B = \emptyset \)
shows \( f^{-1}(A)\times B \cap f = \emptyset \)proofFor two functions with the same domain \(X\) and the codomain \(Y,Z\) resp., we can define a third one that maps \(X\) to the cartesian product of \(Y\) and \(Z\).
lemma prod_fun_val:
assumes \( \{\langle x,p(x)\rangle .\ x\in X\}: X\rightarrow Y \), \( \{\langle x,q(x)\rangle .\ x\in X\}: X\rightarrow Z \)
defines \( h \equiv \{\langle x,\langle p(x),q(x)\rangle \rangle .\ x\in X\} \)
shows \( h:X\rightarrow Y\times Z \) and \( \forall x\in X.\ h(x) = \langle p(x),q(x)\rangle \)proofSuppose we have two functions \(f:X\rightarrow Y\) and \(g:X\rightarrow Z\) and the third one is defined as \(h:X\rightarrow Y\times Z\), \(x\mapsto \langle f(x),g(x)\rangle\). Given two sets \(U\), \(V\) we have \(h^{-1}(U\times V) = (f^{-1}(U)) \cap (g^{-1}(V))\). We also show that the set where the function \(f,g\) are equal is the same as \(h^{-1}(\{ \langle y,y\rangle : y\in X\}\). It is a bit surprising that we get the last identity without the assumption that \(Y=Z\).
lemma vimage_prod:
assumes \( f:X\rightarrow Y \), \( g:X\rightarrow Z \)
defines \( h \equiv \{\langle x,\langle f(x),g(x)\rangle \rangle .\ x\in X\} \)
shows \( h:X\rightarrow Y\times Z \), \( \forall x\in X.\ h(x) = \langle f(x),g(x)\rangle \), \( h^{-1}(U\times V) = f^{-1}(U) \cap g^{-1}(V) \), \( \{x\in X.\ f(x) = g(x)\} = h^{-1}(\{\langle y,y\rangle .\ y\in Y\}) \)proofThe image of a set contained in domain under identity is the same set.
lemma image_id_same:
assumes \( A\subseteq X \)
shows \( id(X)(A) = A \) using assms, id_type, id_convThe inverse image of a set contained in domain under identity is the same set.
lemma vimage_id_same:
assumes \( A\subseteq X \)
shows \( id(X)^{-1}(A) = A \) using assms, id_type, id_convWhat is the image of a singleton?
lemma singleton_image:
assumes \( f\in X\rightarrow Y \) and \( x\in X \)
shows \( f\{x\} = \{f(x)\} \) using assms, func_imagedefIf an element of the domain of a function belongs to a set, then its value belongs to the image of that set.
lemma func1_1_L15D:
assumes \( f:X\rightarrow Y \), \( x\in A \), \( A\subseteq X \)
shows \( f(x) \in f(A) \) using assms, func_imagedefRange is the image of the domain. Isabelle/ZF defines \( \text{range}(f) \) as \( domain(converse(f)) \), and that's why we have something to prove here.
lemma range_image_domain:
assumes A1: \( f:X\rightarrow Y \)
shows \( f(X) = \text{range}(f) \)proofThe difference of images is contained in the image of difference.
lemma diff_image_diff:
assumes A1: \( f: X\rightarrow Y \) and A2: \( A\subseteq X \)
shows \( f(X)\setminus f(A) \subseteq f(X\setminus A) \)proofThe image of an intersection is contained in the intersection of the images.
lemma image_of_Inter:
assumes A1: \( f:X\rightarrow Y \) and A2: \( I\neq \emptyset \) and A3: \( \forall i\in I.\ P(i) \subseteq X \)
shows \( f(\bigcap i\in I.\ P(i)) \subseteq ( \bigcap i\in I.\ f(P(i)) ) \)proofThe image of union is the union of images.
lemma image_of_Union:
assumes A1: \( f:X\rightarrow Y \) and A2: \( \forall A\in M.\ A\subseteq X \)
shows \( f(\bigcup M) = \bigcup \{f(A).\ A\in M\} \)proofIf the domain of a function is nonempty, then the codomain is as well.
lemma codomain_nonempty:
assumes \( f:X\rightarrow Y \), \( X\neq \emptyset \)
shows \( Y\neq \emptyset \) using assms, apply_funtypeThe image of a nonempty subset of domain is nonempty.
lemma func1_1_L15A:
assumes A1: \( f: X\rightarrow Y \) and A2: \( A\subseteq X \) and A3: \( A\neq \emptyset \)
shows \( f(A) \neq \emptyset \)proofThe next lemma allows to prove statements about the values in the domain of a function given a statement about values in the range.
lemma func1_1_L15B:
assumes \( f:X\rightarrow Y \) and \( A\subseteq X \) and \( \forall y\in f(A).\ P(y) \)
shows \( \forall x\in A.\ P(f(x)) \) using assms, func_imagedefAn image of an image is the image of a composition.
lemma func1_1_L15C:
assumes A1: \( f:X\rightarrow Y \) and A2: \( g:Y\rightarrow Z \) and A3: \( A\subseteq X \)
shows \( g(f(A)) = \{g(f(x)).\ x\in A\} \), \( g(f(A)) = (g\circ f)(A) \)proofWhat is the image of a set defined by a meta-function?
lemma func1_1_L17:
assumes A1: \( f \in X\rightarrow Y \) and A2: \( \forall x\in A.\ b(x) \in X \)
shows \( f(\{b(x).\ x\in A\}) = \{f(b(x)).\ x\in A\} \)proofWhat are the values of composition of three functions?
lemma func1_1_L18:
assumes A1: \( f:A\rightarrow B \), \( g:B\rightarrow C \), \( h:C\rightarrow D \) and A2: \( x\in A \)
shows \( (h\circ g\circ f)(x) \in D \), \( (h\circ g\circ f)(x) = h(g(f(x))) \)proofA composition of functions is a function. This is a slight generalization of standard Isabelle's comp_fun.
lemma comp_fun_subset:
assumes A1: \( g:A\rightarrow B \) and A2: \( f:C\rightarrow D \) and A3: \( B \subseteq C \)
shows \( f\circ g : A \rightarrow D \)proofThis lemma supersedes the lemma comp_eq_id_iff in Isabelle/ZF. Contributed by Victor Porton.
lemma comp_eq_id_iff1:
assumes A1: \( g: B\rightarrow A \) and A2: \( f: A\rightarrow C \)
shows \( (\forall y\in B.\ f(g(y)) = y) \longleftrightarrow f\circ g = id(B) \)proofA lemma about a value of a function that is a union of some collection of functions.
lemma fun_Union_apply:
assumes A1: \( \bigcup F : X\rightarrow Y \) and A2: \( f\in F \) and A3: \( f:A\rightarrow B \) and A4: \( x\in A \)
shows \( (\bigcup F)(x) = f(x) \)proofStandard Isabelle/ZF defines the notion \( \text{restrict}(f,A) \) of to mean a function (or relation) \(f\) restricted to a set. This means that if \(f\) is a function defined on \(X\) and \(A\) is a subset of \(X\) then \( \text{restrict}(f,A) \) is a function whith the same values as \(f\), but whose domain is \(A\).
What is the inverse image of a set under a restricted fuction?
lemma func1_2_L1:
assumes A1: \( f:X\rightarrow Y \) and A2: \( B\subseteq X \)
shows \( \text{restrict}(f,B)^{-1}(A) = f^{-1}(A) \cap B \)proofA criterion for when one function is a restriction of another. The lemma below provides a result useful in the actual proof of the criterion and applications.
lemma func1_2_L2:
assumes A1: \( f:X\rightarrow Y \) and A2: \( g \in A\rightarrow Z \) and A3: \( A\subseteq X \) and A4: \( f \cap A\times Z = g \)
shows \( \forall x\in A.\ g(x) = f(x) \)proofHere is the actual criterion.
lemma func1_2_L3:
assumes A1: \( f:X\rightarrow Y \) and A2: \( g:A\rightarrow Z \) and A3: \( A\subseteq X \) and A4: \( f \cap A\times Z = g \)
shows \( g = \text{restrict}(f,A) \)proofWhich function space a restricted function belongs to?
lemma func1_2_L4:
assumes A1: \( f:X\rightarrow Y \) and A2: \( A\subseteq X \) and A3: \( \forall x\in A.\ f(x) \in Z \)
shows \( \text{restrict}(f,A) : A\rightarrow Z \)proofA simpler case of func1_2_L4, where the range of the original and restricted function are the same.
corollary restrict_fun:
assumes A1: \( f:X\rightarrow Y \) and A2: \( A\subseteq X \)
shows \( \text{restrict}(f,A) : A \rightarrow Y \)proofA function restricted to its domain is itself.
lemma restrict_domain:
assumes \( f:X\rightarrow Y \)
shows \( \text{restrict}(f,X) = f \)proofSuppose a function \(f:X\rightarrow Y\) is defined by an expression \(q\), i.e. \(f = \{\langle x,y\rangle : x\in X\}\). Then a function that is defined by the same expression, but on a smaller set is the same as the restriction of \(f\) to that smaller set.
lemma restrict_def_alt:
assumes \( A\subseteq X \)
shows \( \text{restrict}(\{\langle x,q(x)\rangle .\ x\in X\},A) = \{\langle x,q(x)\rangle .\ x\in A\} \)proofA composition of two functions is the same as composition with a restriction.
lemma comp_restrict:
assumes A1: \( f : A\rightarrow B \) and A2: \( g : X \rightarrow C \) and A3: \( B\subseteq X \)
shows \( g\circ f = \text{restrict}(g,B)\circ f \)proofA way to look at restriction. Contributed by Victor Porton.
lemma right_comp_id_any:
shows \( r\circ id(C) = \text{restrict}(r,C) \) unfolding restrict_defConstant functions are trivial, but still we need to prove some properties to shorten proofs.
We define constant(\(=c\)) functions on a set \(X\) in a natural way as ConstantFunction\((X,c)\).
definition
\( \text{ConstantFunction}(X,c) \equiv X\times \{c\} \)
Constant function is a function (i.e. belongs to a function space).
lemma func1_3_L1:
assumes A1: \( c\in Y \)
shows \( \text{ConstantFunction}(X,c) : X\rightarrow Y \)proofConstant function is equal to the constant on its domain.
lemma func1_3_L2:
assumes A1: \( x\in X \)
shows \( \text{ConstantFunction}(X,c)(x) = c \)proofAnother way of looking at the constant function - it's a set of pairs \(\langle x,c\rangle\) as \(x\) ranges over \(X\).
lemma const_fun_def_alt:
shows \( \text{ConstantFunction}(X,c) = \{\langle x,c\rangle .\ x\in X\} \) unfolding ConstantFunction_defYet another definition of a constant function: it's a cartesian product of its domain and the singleton of its value.
lemma const_fun_def_alt1:
shows \( \text{ConstantFunction}(X,c) = X\times \{c\} \) using const_fun_def_altIf \(c\in A\) then the inverse image of \(A\) by the constant function \(x\mapsto c\) is the whole domain.
lemma const_vimage_domain:
assumes \( c\in A \)
shows \( \text{ConstantFunction}(X,c)^{-1}(A) = X \)proofIf \(c\) is not an element of \(A\) then the inverse image of \(A\) by the constant function \(x\mapsto c\) is empty.
lemma const_vimage_empty:
assumes \( c\notin A \)
shows \( \text{ConstantFunction}(X,c)^{-1}(A) = \emptyset \)proofIn this section we prove the properties of the spaces of injections, surjections and bijections that we can't find in the standard Isabelle's Perm.thy.
For injections the image a difference of two sets is the difference of images
lemma inj_image_dif:
assumes A1: \( f \in \text{inj}(A,B) \) and A2: \( C \subseteq A \)
shows \( f(A\setminus C) = f(A)\setminus f(C) \)proofFor injections the image of intersection is the intersection of images.
lemma inj_image_inter:
assumes A1: \( f \in \text{inj}(X,Y) \) and A2: \( A\subseteq X \), \( B\subseteq X \)
shows \( f(A\cap B) = f(A) \cap f(B) \)proofFor surjection from \(A\) to \(B\) the image of the domain is \(B\).
lemma surj_range_image_domain:
assumes A1: \( f \in \text{surj}(A,B) \)
shows \( f(A) = B \)proofSurjections are functions that map the domain onto the codomain.
lemma surj_def_alt:
shows \( \text{surj}(X,Y) = \{f\in X\rightarrow Y.\ f(X) = Y\} \)proofBijections are functions that preserve complements.
lemma bij_def_alt:
shows \( \text{bij}(X,Y) = \{f\in X\rightarrow Y.\ \forall A\in Pow(X).\ f(X\setminus A) = Y\setminus f(A)\} \)proofFor injections the inverse image of an image is the same set.
lemma inj_vimage_image:
assumes \( f \in \text{inj}(X,Y) \) and \( A\subseteq X \)
shows \( f^{-1}(f(A)) = A \)proofFor surjections the image of an inverse image is the same set.
lemma surj_image_vimage:
assumes A1: \( f \in \text{surj}(X,Y) \) and A2: \( A\subseteq Y \)
shows \( f(f^{-1}(A)) = A \)proofA lemma about how a surjection maps collections of subsets in domain and range.
lemma surj_subsets:
assumes A1: \( f \in \text{surj}(X,Y) \) and A2: \( B \subseteq Pow(Y) \)
shows \( \{ f(U).\ U \in \{f^{-1}(V).\ V\in B\} \} = B \)proofRestriction of an bijection to a set without a point is a a bijection.
lemma bij_restrict_rem:
assumes A1: \( f \in \text{bij}(A,B) \) and A2: \( a\in A \)
shows \( \text{restrict}(f, A\setminus \{a\}) \in \text{bij}(A\setminus \{a\}, B\setminus \{f(a)\}) \)proofThe domain of a bijection between \(X\) and \(Y\) is \(X\).
lemma domain_of_bij:
assumes A1: \( f \in \text{bij}(X,Y) \)
shows \( domain(f) = X \)proofThe value of the inverse of an injection on a point of the image of a set belongs to that set.
lemma inj_inv_back_in_set:
assumes A1: \( f \in \text{inj}(A,B) \) and A2: \( C\subseteq A \) and A3: \( y \in f(C) \)
shows \( converse(f)(y) \in C \), \( f(converse(f)(y)) = y \)proofFor a bijection between \(Y\) and \(X\) and a set \(A\subseteq X\) an element \(y\in Y\) is in the image \(f(A)\) if and only if \(f^{-1}(y)\) is an element of \(A\). Note this is false with the weakened assumption that \(f\) is an injection, for example consider \(f:\{ 0,1\}\rightarrow \mathbb{N}, f(n)= n+1\) and \(y=3\). Then \(f^{-1}:\{1, 2\}\rightarrow \{ 0,1\}\) and (since \(3\) is not in the domain of the inverse function) \(f^{-1}(3) = \emptyset = 0 \in \{ 0,1\}\), but \(3\) is not in the image \(f(\{ 0,1\})\).
lemma bij_val_image_vimage:
assumes \( f \in \text{bij}(X,Y) \), \( A\subseteq X \), \( y\in Y \)
shows \( y\in f(A) \longleftrightarrow converse(f)(y) \in A \)proofFor injections if a value at a point belongs to the image of a set, then the point belongs to the set.
lemma inj_point_of_image:
assumes A1: \( f \in \text{inj}(A,B) \) and A2: \( C\subseteq A \) and A3: \( x\in A \) and A4: \( f(x) \in f(C) \)
shows \( x \in C \)proofFor injections the image of intersection is the intersection of images.
lemma inj_image_of_Inter:
assumes A1: \( f \in \text{inj}(A,B) \) and A2: \( I\neq \emptyset \) and A3: \( \forall i\in I.\ P(i) \subseteq A \)
shows \( f(\bigcap i\in I.\ P(i)) = ( \bigcap i\in I.\ f(P(i)) ) \)proofAn injection is injective onto its range. Suggested by Victor Porton.
lemma inj_inj_range:
assumes \( f \in \text{inj}(A,B) \)
shows \( f \in \text{inj}(A,\text{range}(f)) \) using assms, inj_def, range_of_funAn injection is a bijection on its range. Suggested by Victor Porton.
lemma inj_bij_range:
assumes \( f \in \text{inj}(A,B) \)
shows \( f \in \text{bij}(A,\text{range}(f)) \)proofA lemma about extending a surjection by one point.
lemma surj_extend_point:
assumes A1: \( f \in \text{surj}(X,Y) \) and A2: \( a\notin X \) and A3: \( g = f \cup \{\langle a,b\rangle \} \)
shows \( g \in \text{surj}(X\cup \{a\},Y\cup \{b\}) \)proofA lemma about extending an injection by one point. Essentially the same as standard Isabelle's inj_extend.
lemma inj_extend_point:
assumes \( f \in \text{inj}(X,Y) \), \( a\notin X \), \( b\notin Y \)
shows \( (f \cup \{\langle a,b\rangle \}) \in \text{inj}(X\cup \{a\},Y\cup \{b\}) \)proofA lemma about extending a bijection by one point.
lemma bij_extend_point:
assumes \( f \in \text{bij}(X,Y) \), \( a\notin X \), \( b\notin Y \)
shows \( (f \cup \{\langle a,b\rangle \}) \in \text{bij}(X\cup \{a\},Y\cup \{b\}) \) using assms, surj_extend_point, inj_extend_point, bij_defA quite general form of the \(a^{-1}b = 1\) implies \(a=b\) law.
lemma comp_inv_id_eq:
assumes A1: \( converse(b)\circ a = id(A) \) and A2: \( a \subseteq A\times B \), \( b \in \text{surj}(A,B) \)
shows \( a = b \)proofA special case of comp_inv_id_eq - the \(a^{-1}b = 1\) implies \(a=b\) law for bijections.
lemma comp_inv_id_eq_bij:
assumes A1: \( a \in \text{bij}(A,B) \), \( b \in \text{bij}(A,B) \) and A2: \( converse(b)\circ a = id(A) \)
shows \( a = b \)proofConverse of a converse of a bijection is the same bijection. This is a special case of converse_converse from standard Isabelle's equalities theory where it is proved for relations.
lemma bij_converse_converse:
assumes \( a \in \text{bij}(A,B) \)
shows \( converse(converse(a)) = a \)proofIf a composition of bijections is identity, then one is the inverse of the other.
lemma comp_id_conv:
assumes A1: \( a \in \text{bij}(A,B) \), \( b \in \text{bij}(B,A) \) and A2: \( b\circ a = id(A) \)
shows \( a = converse(b) \) and \( b = converse(a) \)proofA version of comp_id_conv with weaker assumptions.
lemma comp_conv_id:
assumes A1: \( a \in \text{bij}(A,B) \) and A2: \( b:B\rightarrow A \) and A3: \( \forall x\in A.\ b(a(x)) = x \)
shows \( b \in \text{bij}(B,A) \) and \( a = converse(b) \) and \( b = converse(a) \)proofFor a surjection the union if images of singletons is the whole range.
lemma surj_singleton_image:
assumes A1: \( f \in \text{surj}(X,Y) \)
shows \( (\bigcup x\in X.\ \{f(x)\}) = Y \)proofIn this section we consider functions whose domain is a cartesian product of two sets. Such functions are called functions of two variables (although really in ZF all functions admit only one argument). For every function of two variables we can define families of functions of one variable by fixing the other variable. This section establishes basic definitions and results for this concept.
We can create functions of two variables by combining functions of one variable.
lemma cart_prod_fun:
assumes \( f_1:X_1\rightarrow Y_1 \), \( f_2:X_2\rightarrow Y_2 \) and \( g = \{\langle p,\langle f_1(\text{fst}(p)),f_2(\text{snd}(p))\rangle \rangle .\ p \in X_1\times X_2\} \)
shows \( g: X_1\times X_2 \rightarrow Y_1\times Y_2 \) using assms, apply_funtype, ZF_fun_from_totalA reformulation of cart_prod_fun above in a sligtly different notation.
lemma prod_fun:
assumes \( f:X_1\rightarrow X_2 \), \( g:X_3\rightarrow X_4 \)
shows \( \{\langle \langle x,y\rangle ,\langle f(x),g(y)\rangle \rangle .\ \langle x,y\rangle \in X_1\times X_3\}:X_1\times X_3\rightarrow X_2\times X_4 \)proofProduct of two surjections is a surjection.
theorem prod_functions_surj:
assumes \( f\in \text{surj}(A,B) \), \( g\in \text{surj}(C,D) \)
shows \( \{\langle \langle a_1,a_2\rangle ,\langle f(a_1),g(a_2)\rangle \rangle .\ \langle a_1,a_2\rangle \in A\times C\} \in \text{surj}(A\times C,B\times D) \)proofFor a function of two variables created from functions of one variable as in cart_prod_fun above, the inverse image of a cartesian product of sets is the cartesian product of inverse images.
lemma cart_prod_fun_vimage:
assumes \( f_1:X_1\rightarrow Y_1 \), \( f_2:X_2\rightarrow Y_2 \) and \( g = \{\langle p,\langle f_1(\text{fst}(p)),f_2(\text{snd}(p))\rangle \rangle .\ p \in X_1\times X_2\} \)
shows \( g^{-1}(A_1\times A_2) = f_1^{-1}(A_1) \times f_2^{-1}(A_2) \)proofFor a function of two variables defined on \(X\times Y\), if we fix an \(x\in X\) we obtain a function on \(Y\). Note that if \( domain(f) \) is \(X\times Y\), \( \text{range}(domain(f)) \) extracts \(Y\) from \(X\times Y\).
definition
\( \text{Fix1stVar}(f,x) \equiv \{\langle y,f\langle x,y\rangle \rangle .\ y \in \text{range}(domain(f))\} \)
For every \(y\in Y\) we can fix the second variable in a binary function \(f: X\times Y \rightarrow Z\) to get a function on \(X\).
definition
\( \text{Fix2ndVar}(f,y) \equiv \{\langle x,f\langle x,y\rangle \rangle .\ x \in domain(domain(f))\} \)
We defined Fix1stVar and Fix2ndVar so that the domain of the function is not listed in the arguments, but is recovered from the function. The next lemma is a technical fact that makes it easier to use this definition.
lemma fix_var_fun_domain:
assumes A1: \( f : X\times Y \rightarrow Z \)
shows \( x\in X \longrightarrow \text{Fix1stVar}(f,x) = \{\langle y,f\langle x,y\rangle \rangle .\ y \in Y\} \), \( y\in Y \longrightarrow \text{Fix2ndVar}(f,y) = \{\langle x,f\langle x,y\rangle \rangle .\ x \in X\} \)proofIf we fix the first variable, we get a function of the second variable.
lemma fix_1st_var_fun:
assumes A1: \( f : X\times Y \rightarrow Z \) and A2: \( x\in X \)
shows \( \text{Fix1stVar}(f,x) : Y \rightarrow Z \)proofIf we fix the second variable, we get a function of the first variable.
lemma fix_2nd_var_fun:
assumes A1: \( f : X\times Y \rightarrow Z \) and A2: \( y\in Y \)
shows \( \text{Fix2ndVar}(f,y) : X \rightarrow Z \)proofWhat is the value of \( \text{Fix1stVar}(f,x) \) at \(y\in Y\) and the value of \( \text{Fix2ndVar}(f,y) \) at \(x\in X\)"?
lemma fix_var_val:
assumes A1: \( f : X\times Y \rightarrow Z \) and A2: \( x\in X \), \( y\in Y \)
shows \( \text{Fix1stVar}(f,x)(y) = f\langle x,y\rangle \), \( \text{Fix2ndVar}(f,y)(x) = f\langle x,y\rangle \)proofFixing the second variable commutes with restrictig the domain.
lemma fix_2nd_var_restr_comm:
assumes A1: \( f : X\times Y \rightarrow Z \) and A2: \( y\in Y \) and A3: \( X_1 \subseteq X \)
shows \( \text{Fix2ndVar}(\text{restrict}(f,X_1\times Y),y) = \text{restrict}( \text{Fix2ndVar}(f,y),X_1) \)proofThe next lemma expresses the inverse image of a set by function with fixed first variable in terms of the original function.
lemma fix_1st_var_vimage:
assumes A1: \( f : X\times Y \rightarrow Z \) and A2: \( x\in X \)
shows \( \text{Fix1stVar}(f,x)^{-1}(A) = \{y\in Y.\ \langle x,y\rangle \in f^{-1}(A)\} \)proofThe next lemma expresses the inverse image of a set by function with fixed second variable in terms of the original function.
lemma fix_2nd_var_vimage:
assumes A1: \( f : X\times Y \rightarrow Z \) and A2: \( y\in Y \)
shows \( \text{Fix2ndVar}(f,y)^{-1}(A) = \{x\in X.\ \langle x,y\rangle \in f^{-1}(A)\} \)proofassumes \( f:A\rightarrow C \)
shows \( domain(f) = A \)assumes \( f:X\rightarrow Y \) and \( \forall x\in X.\ f(x) \in Z \)
shows \( f:X\rightarrow Z \)assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(D) \subseteq X \)assumes \( f:X\rightarrow Y \), \( x\in X \)
shows \( \exists y\in Y.\ \langle x,y\rangle \in f \)assumes \( \langle x,y\rangle \in f \) and \( f:X\rightarrow Y \)
shows \( x\in X \wedge y\in Y \)assumes \( f:X\rightarrow Y \), \( x\in X \), \( y = f(x) \)
shows \( \langle x,y\rangle \in f \), \( y \in \text{range}(f) \)assumes \( f:X\rightarrow Y \)
shows \( f \subseteq X\times Y \)assumes \( f:X\rightarrow Y \)
shows \( \text{range}(f) \subseteq Y \)assumes \( f:X\rightarrow Y \) and \( A\subseteq X \)
shows \( A \subseteq f^{-1}(f(A)) \)assumes \( f \subseteq X\times Y \) and \( \exists !y.\ (y\in Y \wedge \langle x,y\rangle \in f) \)
shows \( \exists !y.\ \langle x,y\rangle \in f \)assumes \( f \subseteq X\times Y \) and \( \forall x\in X.\ \exists !y.\ y\in Y \wedge \langle x,y\rangle \in f \)
shows \( f: X\rightarrow Y \)assumes \( f:X\rightarrow Y \), \( x\in X \) and \( f = \{\langle x,b(x)\rangle .\ x\in X\} \)
shows \( f(x) = b(x) \) and \( b(x)\in Y \)assumes \( \forall x\in X.\ b(x) \in Y \)
shows \( \{\langle x,b(x)\rangle .\ x\in X\} : X\rightarrow Y \)assumes \( f=\{\langle x,g(x)\rangle .\ x\in X\} \)
shows \( f:X\rightarrow \text{range}(f) \)assumes \( f:X\rightarrow Y \) and \( f = \{\langle x,b(x)\rangle .\ x\in X\} \)
shows \( \forall x\in X.\ f(x) = b(x) \)assumes \( x\in X \)
shows \( \{\langle x,b(x)\rangle .\ x\in X\}(x)=b(x) \)assumes \( f:X\rightarrow Y \) and \( \forall x\in A.\ b(x)\in B \) and \( X\cap A = \emptyset \) and \( g = f \cup \{\langle x,b(x)\rangle .\ x\in A\} \)
shows \( g : X\cup A \rightarrow Y\cup B \), \( \forall x\in X.\ g(x) = f(x) \), \( \forall x\in A.\ g(x) = b(x) \)assumes \( f:X\rightarrow Y \) and \( a\notin X \) and \( g = f \cup \{\langle a,b\rangle \} \)
shows \( g : X\cup \{a\} \rightarrow Y\cup \{b\} \), \( \forall x\in X.\ g(x) = f(x) \), \( g(a) = b \)assumes \( f:X\rightarrow Y \)
shows \( function(f) \)assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(A)\subseteq X \)assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(A\cap B) = f^{-1}(A) \cap f^{-1}(B) \)assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(f(X)) = X \)assumes \( f: X\rightarrow Y \), \( g: X\rightarrow Z \) and \( \forall x\in X.\ f(x) = g(x) \)
shows \( f = g \)assumes \( f:X\rightarrow Y \)
shows \( f = \{\langle x, f(x)\rangle .\ x \in X\} \)assumes \( f:X\rightarrow Y \) and \( Y\subseteq Z \)
shows \( f:X\rightarrow Z \)assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(\{y\}) = \{x\in X.\ f(x) = y\} \)assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(A) = \{x\in X.\ f(x) \in A\} \)assumes \( f:X\rightarrow Y \) and \( A\subseteq X \)
shows \( f(A) = \{f(x).\ x \in A\} \)assumes \( f:X\rightarrow Y \), \( x\in X \) and \( f = \{\langle x,b(x)\rangle .\ x\in X\} \)
shows \( f(x) = b(x) \) and \( b(x)\in Y \)assumes \( f:X\rightarrow Y \), \( x\in A \), \( A\subseteq X \)
shows \( f(x) \in f(A) \)assumes \( I\neq \emptyset \) and \( \forall i\in I.\ P(i) \subseteq X \)
shows \( ( \bigcap i\in I.\ P(i) ) \subseteq X \)assumes \( f:X\rightarrow Y \) and \( g \in A\rightarrow Z \) and \( A\subseteq X \) and \( f \cap A\times Z = g \)
shows \( \forall x\in A.\ g(x) = f(x) \)assumes \( f:X\rightarrow Y \) and \( A\subseteq X \) and \( \forall x\in A.\ f(x) \in Z \)
shows \( \text{restrict}(f,A) : A\rightarrow Z \)assumes \( f:X\rightarrow Y \) and \( A\subseteq X \)
shows \( \text{restrict}(f,A) : A \rightarrow Y \)assumes \( g:A\rightarrow B \) and \( f:C\rightarrow D \) and \( B \subseteq C \)
shows \( f\circ g : A \rightarrow D \)assumes \( \forall x\in X.\ b(x) \in Y \)
shows \( \{\langle x,y\rangle \in X\times Y.\ b(x) = y\} : X\rightarrow Y \)assumes \( c\in Y \)
shows \( \text{ConstantFunction}(X,c) : X\rightarrow Y \)assumes \( x\in X \)
shows \( \text{ConstantFunction}(X,c)(x) = c \)assumes \( f: X\rightarrow Y \) and \( A\subseteq X \)
shows \( f(X)\setminus f(A) \subseteq f(X\setminus A) \)assumes \( f:X\rightarrow Y \)
shows \( f(X) = \text{range}(f) \)assumes \( f \in \text{surj}(A,B) \)
shows \( f(A) = B \)assumes \( f \in \text{inj}(A,B) \) and \( C \subseteq A \)
shows \( f(A\setminus C) = f(A)\setminus f(C) \)assumes \( f\in X\rightarrow Y \) and \( x\in X \)
shows \( f\{x\} = \{f(x)\} \)assumes \( A\subseteq X \)
shows \( id(X)(A) = A \)assumes \( f \in \text{surj}(X,Y) \) and \( A\subseteq Y \)
shows \( f(f^{-1}(A)) = A \)assumes \( f \in \text{inj}(A,B) \) and \( C\subseteq A \) and \( y \in f(C) \)
shows \( converse(f)(y) \in C \), \( f(converse(f)(y)) = y \)assumes \( f:X\rightarrow Y \) and \( I\neq \emptyset \) and \( \forall i\in I.\ P(i) \subseteq X \)
shows \( f(\bigcap i\in I.\ P(i)) \subseteq ( \bigcap i\in I.\ f(P(i)) ) \)assumes \( f:X\rightarrow Y \)
shows \( f(B) \subseteq \text{range}(f) \) and \( f(B) \subseteq Y \)assumes \( f \in \text{inj}(A,B) \) and \( C\subseteq A \) and \( x\in A \) and \( f(x) \in f(C) \)
shows \( x \in C \)assumes \( f \in \text{inj}(A,B) \)
shows \( f \in \text{inj}(A,\text{range}(f)) \)assumes \( f \in \text{surj}(X,Y) \) and \( a\notin X \) and \( g = f \cup \{\langle a,b\rangle \} \)
shows \( g \in \text{surj}(X\cup \{a\},Y\cup \{b\}) \)assumes \( f \in \text{inj}(X,Y) \), \( a\notin X \), \( b\notin Y \)
shows \( (f \cup \{\langle a,b\rangle \}) \in \text{inj}(X\cup \{a\},Y\cup \{b\}) \)assumes \( converse(b)\circ a = id(A) \) and \( a \subseteq A\times B \), \( b \in \text{surj}(A,B) \)
shows \( a = b \)assumes \( a \in \text{bij}(A,B) \)
shows \( converse(converse(a)) = a \)assumes \( a \in \text{bij}(A,B) \), \( b \in \text{bij}(A,B) \) and \( converse(b)\circ a = id(A) \)
shows \( a = b \)assumes \( g: B\rightarrow A \) and \( f: A\rightarrow C \)
shows \( (\forall y\in B.\ f(g(y)) = y) \longleftrightarrow f\circ g = id(B) \)assumes \( a \in \text{bij}(A,B) \), \( b \in \text{bij}(B,A) \) and \( b\circ a = id(A) \)
shows \( a = converse(b) \) and \( b = converse(a) \)assumes \( f_1:X_1\rightarrow Y_1 \), \( f_2:X_2\rightarrow Y_2 \) and \( g = \{\langle p,\langle f_1(\text{fst}(p)),f_2(\text{snd}(p))\rangle \rangle .\ p \in X_1\times X_2\} \)
shows \( g: X_1\times X_2 \rightarrow Y_1\times Y_2 \)assumes \( f:X_1\rightarrow X_2 \), \( g:X_3\rightarrow X_4 \)
shows \( \{\langle \langle x,y\rangle ,\langle f(x),g(y)\rangle \rangle .\ \langle x,y\rangle \in X_1\times X_3\}:X_1\times X_3\rightarrow X_2\times X_4 \)assumes \( f : X\times Y \rightarrow Z \)
shows \( x\in X \longrightarrow \text{Fix1stVar}(f,x) = \{\langle y,f\langle x,y\rangle \rangle .\ y \in Y\} \), \( y\in Y \longrightarrow \text{Fix2ndVar}(f,y) = \{\langle x,f\langle x,y\rangle \rangle .\ x \in X\} \)assumes \( f : X\times Y \rightarrow Z \) and \( x\in X \)
shows \( \text{Fix1stVar}(f,x) : Y \rightarrow Z \)assumes \( f : X\times Y \rightarrow Z \) and \( y\in Y \)
shows \( \text{Fix2ndVar}(f,y) : X \rightarrow Z \)assumes \( f : X\times Y \rightarrow Z \) and \( x\in X \), \( y\in Y \)
shows \( \text{Fix1stVar}(f,x)(y) = f\langle x,y\rangle \), \( \text{Fix2ndVar}(f,y)(x) = f\langle x,y\rangle \)