Common.Set.Function #
Additional theorems around functions defined on sets.
Produce a new function that swaps the outputs of the two specified inputs.
Equations
- Set.Function.swap f x₁ x₂ x = if x = x₁ then f x₂ else if x = x₂ then f x₁ else f x
Instances For
Swapping the same input yields the original function.
Swapping a function twice yields the original function.
If f : A → B
, then a swapped variant of f
also maps A
into B
.
The converse of swap_MapsTo_self
.
If f : A → B
, then f
maps A
into B
iff a swap of f
maps A
into
B
.
If f : A → B
is one-to-one, then a swapped variant of f
is also one-to-one.
The converse of swap_InjOn_self
.
If f : A → B
, then f
is one-to-one iff a swap of f
is one-to-one.
If f : A → B
is onto, then a swapped variant of f
is also onto.
The converse of swap_SurjOn_self
.
If f : A → B
, then f
is onto iff a swap of f
is onto.
If f : A → B
is a one-to-one correspondence, then a swapped variant of f
is
also a one-to-one correspondence.
The converse of swap_BijOn_self
.
If f : A → B
, f
is a one-to-one correspondence iff a swap of f
is a
one-to-one correspondence.