Goal and scope
Let A={1,2,3}, B={4,5,6}, and let f, g:A→B be given by tables: f(1)=5, f(2)=6, f(3)=4; g(1)=4, g(2)=4, g(3)=6. First prove, for any total function, the equivalence: bijective ⇔ the fiber of every b∈B has exactly one element. Then list the complete fiber profiles of f and g in the codomain order 4, 5, 6, and decide that f is bijective while g is neither injective nor surjective. Finally answer the different question of whether some bijection exists: one exists A→B (f is one), none exists {1,2,3}→{4,5}, and ∅→∅ has exactly one, the empty bijection.
The fiber characterization (S03 to S05) is proved for total functions on arbitrary sets; everything else is a finite-set exercise under MKO assumptions a1 and a2. On the existence side, A→B is answered by the explicit witness f, the non-existence for {1,2,3}→{4,5} is proved directly in sub-steps, and the general fact that finite sets admit a bijection exactly when they have the same number of elements is taken from the prerequisite rule finite_counting_basics and not reproved. Infinite cardinalities are not treated; the canonical MKO and its English edition are not changed.
Main derivation
S01 · definition
Before
f,g\ \text{given by tables on}\ A=\{1,2,3\}After
f,g:A\to B\ \text{total functions},\ B=\{4,5,6\}Conditions: none
Rule: function_def · Uses: G1, G2
Leaf basis: function_def
First confirm that the data really are total functions: in the table of f, each of 1, 2, 3 appears exactly once, with values 5, 6, 4 in B; the table of g is the same, with values 4, 4, 6 in B. The codomain is the declared B={4,5,6}, not one read off from the values in the table, so 5, which g never takes, still belongs to the codomain.
S02 · definition
Before
b\in B
After
f^{-1}(\{b\})=\{a\in A\mid f(a)=b\}Conditions: none
Rule: fiber_def · Uses: S01
Leaf basis: fiber_def + image_preimage_def + set_builder
For each target b of the codomain, define its fiber: all inputs that f sends to b. The complete fiber profile is indexed by the codomain targets and includes targets with no preimage (empty fibers). f^{-1}({b}) is only preimage notation and makes sense for non-invertible functions too.
S03 · equivalent
Before
f\ \text{injective}After
\forall b\in B:\ |f^{-1}(\{b\})|\le 1Conditions: none
Rule: L_inj_fiber · Uses: S02
Leaf basis: injective_surjective_def + set_builder + eq_refl_symm_trans
By Lemma L_inj_fiber, injectivity is restated as a condition on fibers: every fiber has at most one element. The two directions of the lemma are proved in S03.1 and S03.2 and hold for total functions on any sets, with no finiteness needed.
S04 · equivalent
Before
f\ \text{surjective}After
\forall b\in B:\ |f^{-1}(\{b\})|\ge 1Conditions: none
Rule: L_surj_fiber · Uses: S02
Leaf basis: injective_surjective_def + set_builder
By Lemma L_surj_fiber, surjectivity is restated as: every fiber has at least one element (is nonempty). The proof is in S04.1.
S05 · equivalent
Before
f\ \text{bijective}After
\forall b\in B:\ |f^{-1}(\{b\})|=1Conditions: none
Rule: mko_bijective_def · Uses: S03, S04
Leaf basis: injective_surjective_def + and_intro_elim + order_basics
Bijective means injective and surjective. Replacing each conjunct by the equivalences S03 and S04 gives: every b's fiber has both at most one element and at least one element, which is exactly having one element. This inference does not assume in advance that fibers are finite or that a general function's fiber size is a nonnegative integer. This is the equivalent characterization stated in the MKO.
S06 · equivalent
Before
f^{-1}(\{4\}),\ f^{-1}(\{5\}),\ f^{-1}(\{6\})After
\{3\},\ \{1\},\ \{2\}Conditions: none
Rule: set_builder · Uses: G1, S02
Leaf basis: set_builder + set_extensionality + numeric_evaluation
Scan the three elements of A: f(1)=5, f(2)=6, f(3)=4. Target 4 is reached only from 3, target 5 only from 1, and target 6 only from 2. A is finite and all three elements were checked, so each fiber has been found completely. The fiber profile of f (in the order 4, 5, 6) is (1,1,1).
S07 · implies
Before
|f^{-1}(\{4\})|=|f^{-1}(\{5\})|=|f^{-1}(\{6\})|=1After
f\ \text{bijective}Conditions: B=\{4,5,6\}
Rule: mko_bijective_def · Uses: S05, S06
Leaf basis: mko_bijective_def + forall_intro + and_intro_elim
B has exactly the three targets 4, 5, 6, and S06 shows that each of the three fibers has exactly one element, so 'every b∈B has a fiber with exactly one element' holds; by S05, f is bijective.
S08 · equivalent
Before
g^{-1}(\{4\}),\ g^{-1}(\{5\}),\ g^{-1}(\{6\})After
\{1,2\},\ \varnothing,\ \{3\}Conditions: none
Rule: set_builder · Uses: G2, S02
Leaf basis: set_builder + set_extensionality + numeric_evaluation
Scan g in the same way: g(1)=4, g(2)=4, g(3)=6. Target 4 is reached from 1 and from 2, target 6 only from 3, and target 5 from no input. The complete fiber profile of g (in the order 4, 5, 6) is (2,0,1), and the empty fiber must be listed.
S09 · implies
Before
|g^{-1}(\{4\})|=2After
g\ \text{not injective}Conditions: none
Rule: L_inj_fiber · Uses: S03, S08
Leaf basis: L_inj_fiber + contrapositive
The fiber g^{-1}({4})={1,2} has two elements, violating 'every fiber has at most one element'; by the contrapositive of the ⇒ direction of L_inj_fiber, g is not injective. Concrete witness: g(1)=g(2)=4 while 1≠2.
S10 · implies
Before
g^{-1}(\{5\})=\varnothingAfter
g\ \text{not surjective}Conditions: 5\in B
Rule: L_surj_fiber · Uses: S04, S08
Leaf basis: L_surj_fiber + contrapositive
5 belongs to the declared codomain B, but its fiber is empty; by L_surj_fiber, g is not surjective. So g fails both conditions and falls in the class 'neither'.
S11 · implies
Before
|A|=|B|=3,\ g\ \text{not bijective}After
\neg\,\forall\varphi:A\to B\ (\varphi\ \text{bijective})Conditions: none
Rule: quantifier_negation · Uses: G1, S09
Leaf basis: quantifier_negation + exists_intro
A and B both have three elements, so their sizes are equal; yet S09 shows g is not bijective. Hence the universal claim 'every function between finite sets of equal size is bijective' has the counterexample g and is false. This is MKO assumption a1: a given function cannot be judged from the sizes of the two sets alone.
S12 · implies
Before
|A|=3,\ |C|=2
After
\neg\exists h:A\to C\ \text{bijective}Conditions: none
Rule: L_no_inj_3_2 · Uses: G3
Leaf basis: injective_surjective_def + contrapositive
Turn to the existence question. By Lemma L_no_inj_3_2, no h:A→C is injective, so none is bijective. This agrees with the prerequisite finite_counting_basics (3≠2), but here it is proved directly in S12.1 to S12.3 without that general theorem.
S13 · implies
Before
f:A\to B\ \text{bijective}After
\exists\varphi:A\to B\ \text{bijective}Conditions: none
Rule: exists_intro · Uses: S07
Leaf basis: exists_intro
The existence question 'is there some bijection A→B?' is answered by an explicit witness: S07 proved f is bijective, so one exists. This agrees with finite_counting_basics (|A|=|B|=3). Note that the answer says only 'some', and says nothing about whether g is bijective.
S14 · implies
Before
|A|=|B|=3
After
3^3=27\ \text{functions},\ 3!=6\ \text{bijections}Conditions: none
Rule: count_maps · Uses: G1
Leaf basis: count_maps + numeric_evaluation
By the multiplication principle there are 3^3=27 functions A→B, of which 3!=6 are bijections, so 21 functions are not bijective, and g is one of them. Equal size only guarantees that some bijection exists; it does not make most functions bijective.
S15 · implies
Before
\varnothing\to\varnothing
After
\varepsilon=\varnothing\ \text{is the unique bijection}\ \varnothing\to\varnothingConditions: none
Rule: injective_surjective_def · Uses: G4, function_def
Leaf basis: function_def + injective_surjective_def + cartesian_product_def + forall_intro
A function ∅→∅ is a subset of ∅×∅=∅ in which every domain element has exactly one value; the domain has no elements, so the condition holds vacuously, and the only subset, ∅, is the only function, written ε. Injectivity holds vacuously (there are no two inputs to compare) and so does surjectivity (the codomain has no target to reach), so ε is a bijection; in terms of fibers, the codomain has no targets and 'every fiber has exactly one element' is vacuously true as well. This matches a2: when |∅|=0=|∅| there is the unique empty bijection.
S16 · implies
Before
\text{S07, S09, S10, S12, S13, S15}After
f\ \text{bijective};\ g\ \text{neither};\ \exists\,A\to B;\ \nexists\,A\to C;\ \exists!\,\varnothing\to\varnothingConditions: none
Rule: and_intro_elim · Uses: S07, S09, S10, S12, S13, S15
Leaf basis: and_intro_elim
Collect the results under the two kinds of question. Given functions: f has fiber profile (1,1,1) and is bijective; g has fiber profile (2,0,1) and is neither injective nor surjective. Existence: a bijection A→B exists (witness f), none exists A→C, and exactly one exists ∅→∅.
Substeps and lemmas
S03.1 · implies
Before
f\ \text{injective},\ a,a'\in f^{-1}(\{b\})After
a=a'
Conditions: none
Rule: injective_surjective_def · Uses: S02, injective_surjective_def, set_builder
Leaf basis: injective_surjective_def + set_builder + eq_refl_symm_trans
(⇒) Let f be injective and let a, a′ both lie in the fiber of b. By set-builder notation f(a)=b and f(a′)=b, so f(a)=f(a′); injectivity gives a=a′. Any two elements of the fiber are equal, so it has at most one element.
S03.2 · implies
Before
\forall b:\ |f^{-1}(\{b\})|\le 1,\ f(a)=f(a')After
a=a'
Conditions: none
Rule: injective_surjective_def · Uses: S02, set_builder, function_def
Leaf basis: function_def + set_builder + injective_surjective_def
(⇐) Suppose every fiber has at most one element and f(a)=f(a′). Put b=f(a); since f is a function A→B, b∈B. By set-builder notation a and a′ both lie in the fiber of b, which has at most one element, so a=a′; that is, f is injective. S03.1 and S03.2 together prove Lemma L_inj_fiber.
S04.1 · equivalent
Before
\exists a\in A:\ f(a)=b
After
f^{-1}(\{b\})\neq\varnothingConditions: none
Rule: set_builder · Uses: S02, injective_surjective_def, set_builder
Leaf basis: set_builder + injective_surjective_def
Surjectivity means: every b∈B has some a∈A with f(a)=b. For fixed b, 'some a has f(a)=b' says exactly that the set {a∈A ∣ f(a)=b} has an element, i.e. the fiber is nonempty. Quantifying over all b gives Lemma L_surj_fiber.
S12.1 · case_split
Before
h:\{1,2,3\}\to\{4,5\}After
h(1)=h(2)\ \lor\ h(1)\neq h(2)
Conditions: none
Rule: case_analysis · Uses: G3, function_def
Leaf basis: case_analysis + injective_surjective_def
Take any function h:A→C and split into two cases, which cover every possibility. Case 1, h(1)=h(2): since 1≠2, h is already not injective, and this case is done. Case 2, h(1)≠h(2), is handled in S12.2 and S12.3.
S12.2 · implies
Before
h(1)\neq h(2),\ h(1),h(2)\in\{4,5\}After
\{h(1),h(2)\}=\{4,5\}Conditions: none
Rule: case_analysis · Uses: S12.1, G3
Leaf basis: case_analysis + set_extensionality
Case 2: h(1) is 4 or 5. If h(1)=4 then h(2)≠4 and h(2)∈{4,5}, so h(2)=5; if h(1)=5 then likewise h(2)=4. Both sub-cases give {h(1),h(2)}={4,5}.
S12.3 · implies
Before
h(3)\in\{4,5\}=\{h(1),h(2)\}After
h(3)=h(1)\ \lor\ h(3)=h(2)
Conditions: none
Rule: injective_surjective_def · Uses: S12.2
Leaf basis: injective_surjective_def + case_analysis + forall_intro
h(3) also lies in {4,5}={h(1),h(2)}, so h(3)=h(1) or h(3)=h(2); since 3≠1 and 3≠2, either way injectivity fails. Case 1 (S12.1) and Case 2 both show h is not injective, and h was arbitrary, so S12.1 to S12.3 prove Lemma L_no_inj_3_2.