avewright/proofwiki-math huggingface dataset:
Theorem: Bijection iff Left and Right Inverse

Let $f: S \to T$ be a mapping.
$f$ is a bijection {{iff}}:
{{begin-eqn}}
{{eqn | n = 1
      | q = \exists g_1: T \to S
      | l = g_1 \circ f
      | r = I_S
}}
{{eqn | n = 2
      | q = \exists g_2: T \to S
      | l = f \circ g_2
      | r = I_T
}}
{{end-eqn}}
where:
:$g_1$ and $g_2$ are mappings
:$\circ$ denotes composition of mappings.
It also follows that it is necessarily the case that $g_1 = g_2$ for such to be possible.

Proof:
=== Necessary Condition ===
Let $f: S \to T$ be a mapping.
Let $f$ be such that:
{{begin-eqn}}
{{eqn | q = \exists g_1: T \to S
      | l = g_1 \circ f
      | r = I_S
}}
{{eqn | q = \exists g_2: T \to S
      | l = f \circ g_2
      | r = I_T
}}
{{end-eqn}}
where both $g_1$ and $g_2$ are mappings.
Then from Left and Right Inverse Mappings Implies Bijection it follows that $f$ is a bijection.
From Left and Right Inverses of Mapping are Inverse Mapping it follows that:
:$g_1 = g_2 = f^{-1}$
where $f^{-1}$ is the inverse of $f$.
Theorem: Inverse of Bijection is Bijection

Let $f: S \to T$ be a bijection in the sense that:
:$(1): \quad f$ is an injection
:$(2): \quad f$ is a surjection.
Then the inverse $f^{-1}$ of $f$ is itself a bijection by the same definition.

Proof:
Let $f$ be both an injection and a surjection.
From Mapping is Injection and Surjection iff Inverse is Mapping it follows that its inverse $f^{-1}$ is a mapping.
From Inverse of Inverse Relation:
:$\paren {f^{-1} }^{-1} = f$
Thus the inverse of $f^{-1}$ is $f$.
But then $f$, being a bijection, is by definition a mapping.
So from Mapping is Injection and Surjection iff Inverse is Mapping it follows that $f^{-1}$ is a bijection.
{{qed}}
Theorem: Inverse Element of Bijection

Let $S$ and $T$ be sets.
Let $f: S \to T$ be a bijection.
Then:
:$\map {f^{-1} } y = x \iff \map f x = y$
where $f^{-1}$ is the inverse mapping of $f$.

Proof:
Suppose $f$ is a bijection.
Because $f^{-1}$ is a bijection from Bijection iff Inverse is Bijection, it is by definition  a mapping.
The result follows directly from Image of Element under Inverse Mapping.
{{qed}}
Theorem: Composite of Bijection with Inverse is Identity Mapping

Let $f: S \to T$ be a bijection.
Then:
{{begin-eqn}}
{{eqn | l = f^{-1} \circ f
      | r = I_S
}}
{{eqn | l = f \circ f^{-1}
      | r = I_T
}}
{{end-eqn}}
where $I_S$ and $I_T$ are the identity mappings on $S$ and $T$ respectively.

Proof:
Let $f: S \to T$ be a bijection.
From Inverse of Bijection is Bijection, $f^{-1}$ is also a bijection.
Let $x \in S$.
From Inverse Element of Bijection:
:$\exists y \in T: y = \map f x \implies x = \map {f^{-1} } y$
Then:
{{begin-eqn}}
{{eqn | l = \map {f^{-1} \circ f} x
      | r = \map {f^{-1} } {\map f x}
      | c = {{Defof|Composition of Mappings}}
}}
{{eqn | r = \map {f^{-1} } y
      | c = {{hypothesis}}
}}
{{eqn | r = x
      | c = {{hypothesis}}
}}
{{eqn | r = \map {I_S} x
      | c = {{Defof|Identity Mapping}}
}}
{{end-eqn}}
From Domain of Composite Relation and Codomain of Composite Relation, the domain and codomain of $f^{-1} \circ f$ are both $S$, and so are those of $I_S$ by definition.
So all the criteria for Equality of Mappings are met and thus $f^{-1} \circ f = I_S$.
Let $y \in T$.
From Inverse Element of Bijection:
:$\exists x \in S: x = \map {f^{-1} } y \implies y = \map f x$
Then:
{{begin-eqn}}
{{eqn | l = \map {f \circ f^{-1} } y
      | r = \map f {\map {f^{-1} } y}
      | c = {{Defof|Composition of Mappings}}
}}
{{eqn | r = \map f x
      | c = {{hypothesis}}
}}
{{eqn | r = y
      | c = {{hypothesis}}
}}
{{eqn | r = \map {I_T} y
      | c = {{Defof|Identity Mapping}}
}}
{{end-eqn}}
From Domain of Composite Relation and Codomain of Composite Relation, the domain and codomain of $f \circ f^{-1}$ are both $T$, and so are those of $I_T$ by definition.
So all the criteria for Equality of Mappings are met and thus $f \circ f^{-1} = I_T$.
{{Qed}}
Theorem: Inverse of Inverse of Bijection

Let $f: S \to T$ be a bijection.
Then:
:$\paren {f^{-1} }^{-1} = f$
where $f^{-1}$ is the inverse of $f$.

Proof:
Let $f: S \to T$ be a bijection.
From Composite of Bijection with Inverse is Identity Mapping we have:
:$f^{-1} \circ f = I_S$
:$f \circ f^{-1} = I_T$
where $I_S$ and $I_T$ are the identity mappings on $S$ and $T$ respectively.
The result follows from Left and Right Inverses of Mapping are Inverse Mapping.
{{qed}}
Theorem: Inverse of Inverse of Bijection

Let $f: S \to T$ be a bijection.
Then:
:$\paren {f^{-1} }^{-1} = f$
where $f^{-1}$ is the inverse of $f$.

Proof:
A mapping is a relation.
Thus it follows that Inverse of Inverse Relation can be applied directly.
{{qed}}
Theorem: Composite of Bijections is Bijection

Let $f$ and $g$ be mappings such that $\Dom f = \Cdm g$.
Then:
:If $f$ and $g$ are both bijections, then so is $f \circ g$
where $f \circ g$ is the composite mapping of $f$ with $g$.

Proof:
As every bijection is also by definition an injection, a composite of bijections is also a composite of injections.
Every composite of injections is also an injection by Composite of Injections is Injection.
As every bijection is also by definition a surjection, a composite of bijections is also a composite of surjections.
Every composite of surjections is also a surjection by Composite of Surjections is Surjection.
As a composite of bijections is therefore both an injection and a surjection, it is also a bijection.
{{Qed}}
Theorem: Composite of Bijections is Bijection

Let $f$ and $g$ be mappings such that $\Dom f = \Cdm g$.
Then:
:If $f$ and $g$ are both bijections, then so is $f \circ g$
where $f \circ g$ is the composite mapping of $f$ with $g$.

Proof:
Let $g: X \to Y$ and $f: Y \to Z$ be bijections.
Then from Bijection iff Inverse is Bijection, both $f^{-1}$ and $g^{-1}$ are bijections.
From Inverse of Composite Relation we have that $g^{-1} \circ f^{-1}$ is the inverse of $f \circ g$.
Then:
:$\paren {f \circ g} \circ \paren {g^{-1} \circ f^{-1} } = I_Z$
:$\paren {g^{-1} \circ f^{-1} } \circ \paren {f \circ g} = I_X$
Hence the result.
Theorem: Inverse of Composite Bijection

Let $f$ and $g$ be bijections such that $\Dom g = \Cdm f$.
Then:
:$\paren {g \circ f}^{-1} = f^{-1} \circ g^{-1}$
and $f^{-1} \circ g^{-1}$ is itself a bijection.

Proof:
$\left({g \circ f}\right)^{-1} = f^{-1} \circ g^{-1}$ is a specific example of Inverse of Composite Relation.
As $f$ and $g$ are bijections then by Bijection iff Inverse is Bijection, so are both $f^{-1}$ and $g^{-1}$.
By Composite of Bijections is Bijection, it follows that $f^{-1} \circ g^{-1}$ is a bijection.
{{qed}}
Theorem: Inverse of Composite Bijection

Let $f$ and $g$ be bijections such that $\Dom g = \Cdm f$.
Then:
:$\paren {g \circ f}^{-1} = f^{-1} \circ g^{-1}$
and $f^{-1} \circ g^{-1}$ is itself a bijection.

Proof:
Let $f: X \to Y$ and $g: Y \to Z$ be bijections.
Then:
{{begin-eqn}}
{{eqn | l = \paren {g \circ f} \circ \paren {f^{-1} \circ g^{-1} }
      | r = g \circ \paren {\paren {f \circ f^{-1} } \circ g^{-1} }
      | c = Composition of Mappings is Associative
}}
{{eqn | r = g \circ \paren {I_Y \circ g^{-1} }
      | c = Composite of Bijection with Inverse is Identity Mapping
}}
{{eqn | r = g \circ g^{-1}
      | c = Identity Mapping is Left Identity
}}
{{eqn | r = I_Z
      | c = Composite of Bijection with Inverse is Identity Mapping
}}
{{end-eqn}}
{{qed|lemma}}
{{begin-eqn}}
{{eqn | l = \paren {f^{-1} \circ g^{-1} } \circ \paren {g \circ f}
      | r = \paren {f^{-1} \circ \paren {g^{-1} \circ g} } \circ f
      | c = Composition of Mappings is Associative
}}
{{eqn | r = \paren {f^{-1} \circ I_Y} \circ f
      | c = Composite of Bijection with Inverse is Identity Mapping
}}
{{eqn | r = f^{-1} \circ f
      | c = Identity Mapping is Right Identity
}}
{{eqn | r = I_X
      | c = Composite of Bijection with Inverse is Identity Mapping
}}
{{end-eqn}}
Hence the result.
{{qed}}
Theorem: Composite of Permutations is Permutation

Let $f, g$ are permutations of a set $S$.
Then their composite $g \circ f$ is also a permutation of $S$.

Proof:
This follows from the fact that a permutation is a bijection. 
The domain and codomain are coincident.
The result follows from Composite of Bijections is Bijection.
{{Qed}}
Theorem: Inverse of Permutation is Permutation

If $f$ is a permutation of $S$, then so is its inverse $f^{-1}$.

Proof:
Let $f: S \to S$ is a permutation of $S$.
By definition, a permutation is a bijection such that the domain and codomain are the same set.
From Bijection iff Inverse is Bijection, it follows $f^{-1}$ is a bijection.
From the definition of inverse relation, the domain of a relation is the codomain of its inverse and vice versa.
Thus the domain and codomain of $f^{-1}$ are both $S$ and it follows that $f^{-1}$ is a permutation.
{{Qed}}
Theorem: Left Inverse Mapping is Surjection

Let $f: S \to T$ be an injection.
Let $g: T \to S$ be a left inverse of $f$.
Then $g$ is a surjection.

Proof:
Let $f: S \to T$ be an injection.
Then from Injection iff Left Inverse there exists at least one left inverse $g: T \to S$ of $f$ such that $g \circ f = I_S$.
$I_S$ is a surjection.
Thus $g \circ f$ is a surjection.
By Surjection if Composite is Surjection it follows that $g$ is also a surjection.
{{Qed}}
Theorem: Right Inverse Mapping is Injection

Let $f: S \to T$ be a mapping.
Let $g: T \to S$ be a right inverse of $f$.
Then $g$ is an injection.

Proof:
By the definition of right inverse:
:$f \circ g = I_T$
where $I_T$ is the identity mapping on $T$.
By Identity Mapping is Injection, $I_T$ is an injection.
By Injection if Composite is Injection, it follows that $g$ is an injection.
{{qed}}
Theorem: Set Equivalence behaves like Equivalence Relation

Set equivalence behaves like an equivalence relation.
That is:
{{begin-axiom}}
{{axiom | q = \forall S
        | t = Reflexivity
        | m = S \sim S
}}
{{axiom | q = \forall S, T
        | t = Symmetry
        | m = S \sim T \implies T \sim S
}}
{{axiom | q = \forall S_1, S_2, S_3
        | t = Transitivity
        | m = S_1 \sim S_2 \land S_2 \sim S_3 \implies S_1 \sim S_3
}}
{{end-axiom}}
where $S, T, S_1, S_2, S_3$ are sets.

Proof:
For two sets to be equivalent, there needs to exist a bijection between them.
In the following, let $\phi$, $\phi_1$ and $\phi_2$  be understood to be bijections.
Theorem: Set Equivalence Less One Element

Let $S$ and $T$ be sets which are equivalent:
:$S \sim T$
Let $a \in S$ and $b \in T$.
Then:
:$S \setminus \set a \sim T \setminus \set b$
where $\setminus$ denotes set difference.

Proof:
As $S \sim T$, there exists a bijection $f: S \to T$.
Let $g: \paren {S \setminus \set a} \to \paren {T \setminus \set b}$ be the mapping defined as follows:
$\forall x \in S \setminus \set a: \map g x =
\begin{cases}
\map f x: \map f x \ne b \\
\map f a: \map f x = b
\end{cases}$
First it is shown that $g$ is an injection.
Let $x, y \in S \setminus \set a$ and $x \ne y$.
The following cases apply:
$(1): \quad \map f x \ne b$ and $\map f y \ne b$
By definition of $g$:
:$\map f x = \map g x$
and:
:$\map f y = \map g y$
It follows from the injectivity of $f$ that:
:$\map g x \ne \map g y$
$(2): \quad \map f x = b$
By definition of $g$:
:$\map g x = \map f a$
We have that:
:$y \in S \setminus \set a$
Therefore by definition of set difference:
:$y \ne a$
So by the injectivity of $f$:
:$\map f y \ne \map f a = \map g x$
Also by the injectivity of $f$:
:$\map f y \ne b$
Thus, by the definition of $g$:
:$\map g y = \map f y \ne \map f a = \map g x$
$(2): \quad \map f y = b$
The proof is the same as that of case $2$, with the roles of $x$ and $y$ reversed.
{{qed|lemma}}
Next it is shown that $g$ is a surjection.
Let $y \in T \setminus \set b$.
By definition of surjectivity of $f$:
:$\exists x \in S: \map f x = y$
It is to be shown that:
:$\exists x' \in S, x \ne a: \map f {x'} = y$
$(1): \quad \map f a = b$
By hypothesis:
:$\map f x = y \ne b$
Then by the rule of transposition:
:$x \ne a$
so let:
:$x' = x$
$(2): \quad \map f a \ne b$
By the rule of transposition:
:$\map {f^{-1} } b \ne a$
where $\map {f^{-1} } b$ denotes the preimage of $b$ under $f$.
:Case $(2.1): \quad \map f a = y$
By the definition of $g$:
:$\map g {\map {f^{-1} } b} = y$
so let:
:$x' = \map {f^{-1} } b$
:Case $(2.2): \quad \map f a \ne y$
By hypothesis:
:$\map f x = y \ne \map f a$
Then by the rule of transposition:
:$x \ne a$
so let:
:$x' = x$
Thus:
:$\forall y \in T \setminus \set b: \exists x \in S \setminus \set a: \map g x = y$
and so $g$ is a surjection.
{{qed|lemma}}
Thus $g$ is both an injection and a surjection, and is by definition a bijection.
{{qed}}
Theorem: Image of Union under Mapping

Let $S$ and $T$ be sets.
Let $f: S \to T$ be a mapping.
Let $A$ and $B$ be subsets of $S$.
Then:
:$f \sqbrk {A \cup B} = f \sqbrk A \cup f \sqbrk B$
This can be expressed in the language and notation of direct image mappings as:
:$\forall A, B \in \powerset S: \map {f^\to} {A \cup B} = \map {f^\to} A \cup \map {f^\to} B$

Proof:
First we have:
{{begin-eqn}}
{{eqn | l = A
      | o = \subseteq
      | r = A \cup B
      | c = Set is Subset of Union
}}
{{eqn | ll= \leadsto
      | l = f \sqbrk A
      | o = \subseteq
      | r = f \sqbrk {A \cup B}
      | c = Image of Subset under Mapping is Subset of Image
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = B
      | o = \subseteq
      | r = A \cup B
      | c = Set is Subset of Union
}}
{{eqn | ll= \leadsto
      | l = f \sqbrk B
      | o = \subseteq
      | r = f \sqbrk {A \cup B}
      | c = Image of Subset under Mapping is Subset of Image
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | ll= \leadsto
      | l = f \sqbrk A \cup f \sqbrk B
      | o = \subseteq
      | r = f \sqbrk {A \cup B}
      | c = Union is Smallest Superset
}}
{{end-eqn}}
{{Qed|lemma}}
Then:
{{begin-eqn}}
{{eqn | l = y
      | o = \in
      | r = f \sqbrk {A \cup B}
      | c = 
}}
{{eqn | ll= \leadsto
      | q = \exists x \in A \cup B
      | l = y
      | r = \map f x
      | c = {{Defof|Image of Subset under Relation}}
}}
{{eqn | ll= \leadsto
      | q = \exists x: x \in A \lor x \in B
      | l = y
      | r = \map f x
      | c = {{Defof|Set Union}}
}}
{{eqn | ll= \leadsto
      | l = y
      | o = \in
      | r = f \sqbrk A \lor y \in f \sqbrk B
      | c = {{Defof|Image of Subset under Relation}}
}}
{{eqn | ll= \leadsto
      | l = y
      | o = \in
      | r = f \sqbrk A \cup f \sqbrk B
      | c = {{Defof|Set Union}}
}}
{{eqn | ll= \leadsto
      | l = f \sqbrk {A \cup B}
      | o = \subseteq
      | r = f \sqbrk A \cup f \sqbrk B
      | c = {{Defof|Subset}}
}}
{{end-eqn}}
{{Qed|lemma}}
Thus we have:
{{begin-eqn}}
{{eqn | l = f \sqbrk A \cup f \sqbrk B
      | o = \subseteq
      | r = f \sqbrk {A \cup B}
      | c = 
}}
{{eqn | l = f \sqbrk {A \cup B}
      | o = \subseteq
      | r = f \sqbrk A \cup f \sqbrk B
      | c = 
}}
{{eqn | ll= \leadsto
      | l = f \sqbrk A \cup f \sqbrk B
      | r = f \sqbrk {A \cup B}
      | c = {{Defof|Set Equality}}
}}
{{end-eqn}}
{{qed}}
Theorem: Image of Union under Mapping

Let $S$ and $T$ be sets.
Let $f: S \to T$ be a mapping.
Let $A$ and $B$ be subsets of $S$.
Then:
:$f \sqbrk {A \cup B} = f \sqbrk A \cup f \sqbrk B$
This can be expressed in the language and notation of direct image mappings as:
:$\forall A, B \in \powerset S: \map {f^\to} {A \cup B} = \map {f^\to} A \cup \map {f^\to} B$

Proof:
As $f$, being a mapping, is also a relation, we can apply Image of Union under Relation:
:$\RR \sqbrk {A \cup B} = \RR \sqbrk A \cup \RR \sqbrk B$
{{qed}}
Theorem: Image of Intersection under Mapping

Let $S$ and $T$ be sets.
Let $f: S \to T$ be a mapping.
Let $S_1$ and $S_2$ be subsets of $S$.
Then:
:$f \sqbrk {S_1 \cap S_2} \subseteq f \sqbrk {S_1} \cap f \sqbrk {S_2}$
This can be expressed in the language and notation of direct image mappings as:
:$\forall S_1, S_2 \in \powerset S: \map {f^\to} {S_1 \cap S_2} \subseteq \map {f^\to} {S_1} \cap \map {f^\to} {S_2}$

Proof:
{{begin-eqn}}
{{eqn | l = S_1 \cap S_2
      | o = \subseteq
      | r = S_1
      | c = Intersection is Subset
}}
{{eqn | ll= \leadsto
      | l = f \sqbrk {S_1 \cap S_2}
      | o = \subseteq
      | r = f \sqbrk {S_1}
      | c = Image of Subset under Mapping is Subset of Image
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = S_1 \cap S_2
      | o = \subseteq
      | r = S_2
      | c = Intersection is Subset
}}
{{eqn | ll= \leadsto
      | l = f \sqbrk {S_1 \cap S_2}
      | o = \subseteq
      | r = f \sqbrk {S_2}
      | c = Image of Subset under Mapping is Subset of Image
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | ll= \leadsto
      | l = f \sqbrk {S_1 \cap S_2}
      | o = \subseteq
      | r = f \sqbrk {S_1} \cap f \sqbrk {S_2}
      | c = Intersection is Largest Subset
}}
{{end-eqn}}
{{qed}}
Theorem: Image of Intersection under Mapping

Let $S$ and $T$ be sets.
Let $f: S \to T$ be a mapping.
Let $S_1$ and $S_2$ be subsets of $S$.
Then:
:$f \sqbrk {S_1 \cap S_2} \subseteq f \sqbrk {S_1} \cap f \sqbrk {S_2}$
This can be expressed in the language and notation of direct image mappings as:
:$\forall S_1, S_2 \in \powerset S: \map {f^\to} {S_1 \cap S_2} \subseteq \map {f^\to} {S_1} \cap \map {f^\to} {S_2}$

Proof:
As $f$, being a mapping, is also a relation, we can apply Image of Intersection under Relation:
:$\RR \sqbrk {S_1 \cap S_2} \subseteq \RR \sqbrk {S_1} \cap \RR \sqbrk {S_2}$
{{qed}}
Theorem: Image of Intersection under Injection

Let $S$ and $T$ be sets.
Let $f: S \to T$ be a mapping.
Then:
:$\forall A, B \subseteq S: f \sqbrk {A \cap B} = f \sqbrk A \cap f \sqbrk B$
{{iff}} $f$ is an injection.
This can be expressed in the language and notation of direct image mappings as:
:$\forall A, B \subseteq S: \map {f^\to} {A \cap B} = \map {f^\to} A \cap \map {f^\to} B$

Proof:
An injection is a type of one-to-one relation, and therefore also a one-to-many relation.
Therefore Image of Intersection under One-to-Many Relation applies:
:$\forall A, B \subseteq S: \RR \sqbrk {A \cap B} = \RR \sqbrk A \cap \RR \sqbrk B$
{{iff}} $\RR$ is a one-to-many relation.
We have that $f$ is a mapping and therefore a many-to-one relation.
So $f$ is a one-to-many relation {{iff}} $f$ is also an injection.
It follows that:
:$\forall A, B \subseteq S: f \sqbrk {A \cap B} = f \sqbrk A \cap f \sqbrk B$
{{iff}} $f$ is an injection.
{{qed}}
Theorem: Image of Intersection under One-to-Many Relation

Let $S$ and $T$ be sets.
Let $\RR \subseteq S \times T$ be a relation.
Then:
:$\forall S_1, S_2 \subseteq S: \RR \sqbrk {S_1 \cap S_2} = \RR \sqbrk {S_1} \cap \RR \sqbrk {S_2}$ 
{{iff}} $\RR$ is one-to-many.

Proof:
=== Sufficient Condition ===
Suppose that:
:$\forall S_1, S_2 \subseteq S: \RR \sqbrk {S_1 \cap S_2} = \RR \sqbrk {S_1} \cap \RR \sqbrk {S_2}$
If $S$ is singleton, the result follows immediately as $\RR$ would ''have'' to be one-to-many.
So, assume $S$ is not singleton.
Suppose $\RR$ is specifically ''not'' one-to-many.
So:
:$\exists x, y \in S: \exists z \in T: \tuple {x, z} \in T, \tuple {y, z} \in T, x \ne y$
and of course $\set x \subseteq S, \set y \subseteq S$.
So:
:$z \in \RR \sqbrk {\set x}$
:$z \in \RR \sqbrk {\set y}$
and so by definition of intersection:
:$z \in \RR \sqbrk {\set x} \cap \RR \sqbrk {\set y}$
But:
:$\set x \cap \set y = \O$
Thus from Image of Empty Set is Empty Set:
:$\RR \sqbrk {\set x \cap \set y} = \O$
and so:
:$\RR \sqbrk {\set x \cap \set y} \ne \RR \sqbrk {\set x} \cap \RR \sqbrk {\set y}$
{{qed|lemma}}
Theorem: One-to-Many Image of Set Difference

Let $\RR \subseteq S \times T$ be a relation.
Let $A$ and $B$ be subsets of $S$.
Then:
:$(1): \quad \RR \sqbrk A \setminus \RR \sqbrk B = \RR \sqbrk {A \setminus B}$
{{iff}} $\RR$ is one-to-many.

Proof:
=== Sufficient Condition ===
First, to show that $(1)$ holds if $\RR$ is one-to-many.
From Image of Set Difference under Relation, we already have:
:$\RR \sqbrk A \setminus \RR \sqbrk B \subseteq \RR \sqbrk {A \setminus B}$
So we just need to show:
:$\RR \sqbrk {A \setminus B} \subseteq \RR \sqbrk A \setminus \RR \sqbrk B$
Let $t \notin \RR \sqbrk A \setminus \RR \sqbrk B$.
Then by De Morgan's Laws:
:$t \notin \RR \sqbrk A \lor t \in \RR \sqbrk B$
{{explain|Go into more detail}}
Suppose $t \notin \RR \sqbrk A$.
Then by definition of a relation:
:$\neg \exists s \in A: \tuple {s, t} \in \RR$
By Image of Subset is Subset of Image:
:$\RR \sqbrk {A \setminus B} \subseteq \RR \sqbrk A$
Thus, by definition of subset and Rule of Transposition:
:$t \notin \RR \sqbrk A \implies t \notin \RR \sqbrk {A \setminus B}$
Now suppose $t \in \RR \sqbrk B$.
Then:
:$\exists s \in B: \tuple {s, t} \in \RR$
Because $\RR$ is one-to-many:
:$\forall x \in S: \tuple {x, t} \in \RR \implies x = s$
and thus:
:$x \in B$
Thus:
:$x \notin A \setminus B$
and hence:
:$t \notin \RR \sqbrk {A \setminus B}$
So by Proof by Cases:
:$t \notin \RR \sqbrk A \setminus \RR \sqbrk B \implies t \notin \RR \sqbrk {A \setminus B}$
The result follows from Set Complement inverts Subsets:
:$S \subseteq T \iff \map \complement T \subseteq \map \complement S$
{{qed|lemma}}
Theorem: Preimage of Union under Mapping

Let $S$ and $T$ be sets.
Let $f: S \to T$ be a mapping.
Let $T_1$ and $T_2$ be subsets of $T$.
Then:
:$f^{-1} \sqbrk {T_1 \cup T_2} = f^{-1} \sqbrk {T_1} \cup f^{-1} \sqbrk {T_2}$
This can be expressed in the language and notation of inverse image mappings as:
:$\forall T_1, T_2 \in \powerset T: \map {f^\gets} {T_1 \cup T_2} = \map {f^\gets} {T_1} \cup \map {f^\gets} {T_2}$

Proof:
As $f$, being a mapping, is also a relation, we can apply Preimage of Union under Relation:
:$\RR^{-1} \sqbrk {T_1 \cup T_2} = \RR^{-1} \sqbrk {T_1} \cup \RR^{-1} \sqbrk {T_2}$
{{qed}}
Theorem: Preimage of Union under Mapping

Let $S$ and $T$ be sets.
Let $f: S \to T$ be a mapping.
Let $T_1$ and $T_2$ be subsets of $T$.
Then:
:$f^{-1} \sqbrk {T_1 \cup T_2} = f^{-1} \sqbrk {T_1} \cup f^{-1} \sqbrk {T_2}$
This can be expressed in the language and notation of inverse image mappings as:
:$\forall T_1, T_2 \in \powerset T: \map {f^\gets} {T_1 \cup T_2} = \map {f^\gets} {T_1} \cup \map {f^\gets} {T_2}$

Proof:
As $f$, being a mapping, is also a relation, we can apply Preimage of Union under Relation: Family of Sets:
:$\ds \RR^{-1} \sqbrk {\bigcup_{i \mathop \in I} T_i} = \bigcup_{i \mathop \in I} \RR^{-1} \sqbrk {T_i}$
where $\RR^{-1} \sqbrk {T_i}$ denotes the preimage of $T_i$ under $\RR^{-1}$.
{{qed}}
Theorem: Preimage of Union under Mapping

Let $S$ and $T$ be sets.
Let $f: S \to T$ be a mapping.
Let $T_1$ and $T_2$ be subsets of $T$.
Then:
:$f^{-1} \sqbrk {T_1 \cup T_2} = f^{-1} \sqbrk {T_1} \cup f^{-1} \sqbrk {T_2}$
This can be expressed in the language and notation of inverse image mappings as:
:$\forall T_1, T_2 \in \powerset T: \map {f^\gets} {T_1 \cup T_2} = \map {f^\gets} {T_1} \cup \map {f^\gets} {T_2}$

Proof:
We have that $f$ is a mapping, and so also a relation.
Thus its inverse $f^{-1}$ is also a relation.
Hence we can apply Image of Union under Relation: Family of Sets:
:$\ds \RR \sqbrk {\bigcup_{i \mathop \in I} T_i} = \bigcup_{i \mathop \in I} \RR \sqbrk {T_i}$
where $\RR \sqbrk {T_i}$ denotes the image of $T_i$ under $\RR$.
{{qed}}
Theorem: Preimage of Intersection under Mapping

Let $f: S \to T$ be a mapping.
Let $T_1$ and $T_2$ be subsets of $T$.
Then:
:$f^{-1} \sqbrk {T_1 \cap T_2} = f^{-1} \sqbrk {T_1} \cap f^{-1} \sqbrk {T_2}$
This can be expressed in the language and notation of inverse image mappings as:
:$\forall T_1, T_2 \in \powerset T: \map {f^\gets} {T_1 \cap T_2} = \map {f^\gets} {T_1} \cap \map {f^\gets} {T_2}$

Proof:
As $f$, being a mapping, is also a many-to-one relation, it follows from Inverse of Many-to-One Relation is One-to-Many that its inverse $f^{-1}$ is a one-to-many relation.
Thus Image of Intersection under One-to-Many Relation applies:
:$\RR \sqbrk {T_1 \cap T_2} = \RR \sqbrk {T_1} \cap \RR \sqbrk {T_2}$
where here $\RR = f^{-1}$.
{{Qed}}