Goal and scope
Let A={1,2,3,4}, B={1,2,3,4,5,6}, with function tables f: (1,4),(2,6),(3,1),(4,5); g: (1,4),(2,6),(2,6),(3,4),(4,6); h: (1,4),(2,6),(2,5),(3,1),(4,5). Decide which tables are total functions A→B; decide whether f and g are injective and list their fibers; find g's first collision in lexicographic order; decide whether g restricted to C={1,2} is injective; and treat the empty domain.
Works inside the MKO's scope: finite integer-labelled function tables. First checks total-function qualification, then decides injectivity by complete comparison, and proves two small general lemmas (comparing input pairs x<y suffices; injectivity is equivalent to every fiber having at most one element). Results concern these tables only and are not extended to other functions; infinite domains are not treated; the canonical MKO and its English edition are not changed.
Main derivation
S01 · implies
Before
f:\ (1,4),(2,6),(3,1),(4,5)
After
f:A\to B\ \text{total};\ f(1)=4,\ f(2)=6,\ f(3)=1,\ f(4)=5Conditions: none
Rule: table_function · Uses: G1, G2, table_function
Leaf basis: table_function + roster_membership
MKO paragraph one: first check that the table is total on A. Each of the four inputs 1, 2, 3, 4 occurs in exactly one row, the outputs 4, 6, 1, 5 are in B, and no input is paired with two different outputs. So f is a total function A→B.
S02 · equivalent
Before
\forall x,y\in A:\ f(x)=f(y)\Rightarrow x=y
After
\forall x,y\in A:\ x\neq y\Rightarrow f(x)\neq f(y)
Conditions: none
Rule: contrapositive · Uses: mko_injective_def, contrapositive
Leaf basis: mko_injective_def + contrapositive
By the MKO's definition, injective means 'f(x)=f(y) implies x=y'. Taking the contrapositive for each pair x, y gives 'x≠y implies f(x)≠f(y)': distinct inputs have distinct outputs. This form is used for the pairwise comparison below.
S03 · equivalent
Before
\forall x,y\in A:\ x\neq y\Rightarrow f(x)\neq f(y)
After
\forall x,y\in A:\ x<y\Rightarrow f(x)\neq f(y)
Conditions: A\subseteq\mathbb{Z}
Rule: L_pairs_lt · Uses: S02, L_pairs_lt
Leaf basis: case_analysis + order_basics
By Lemma L_pairs_lt, only input pairs with x<y need comparing; A has C(4,2)=6 such pairs (N2). The case x=y needs no comparison, and the case x>y repeats the case y<x.
S04 · implies
Before
(1,2),(1,3),(1,4),(2,3),(2,4),(3,4)
After
4\neq 6,\ 4\neq 1,\ 4\neq 5,\ 6\neq 1,\ 6\neq 5,\ 1\neq 5;\ f\ \text{injective}Conditions: none
Rule: forall_intro · Uses: S01, S03, forall_intro
Leaf basis: case_analysis + roster_membership + numeric_evaluation + forall_intro
Compare the outputs of the six input pairs: f(1)=4 differs from f(2)=6, f(3)=1 and f(4)=5; f(2)=6 differs from f(3)=1 and f(4)=5; f(3)=1 differs from f(4)=5. Every pair with x<y has different outputs (N1 checks this as a nonzero product of differences); this is a complete check of the finite A, so by S03 f is injective.
S05 · implies
Before
f^{-1}(\{b\})=\{x\in A\mid f(x)=b\},\ b\in BAfter
\{3\},\ \varnothing,\ \varnothing,\ \{1\},\ \{4\},\ \{2\}\quad(b=1,2,3,4,5,6)Conditions: none
Rule: image_preimage_def · Uses: S01, image_preimage_def
Leaf basis: image_preimage_def + roster_membership + numeric_evaluation
List the fiber of each b in B: for b=1 only f(3)=1, so the fiber is {3}; for b=2 and 3 no input maps there, so the fibers are empty; b=4 gives {1}; b=5 gives {4}; b=6 gives {2}. Every fiber has at most one element; the fiber sizes sum to 1+0+0+1+1+1=4=|A| (N8), since every input lies in exactly one fiber.
S06 · theorem_application
Before
|f^{-1}(\{b\})|\le 1\ \text{for all}\ b\in BAfter
f\ \text{injective}Conditions: none
Rule: L_fiber · Uses: S04, S05, L_fiber
Leaf basis: image_preimage_def + eq_refl_symm_trans + mko_injective_def
By Lemma L_fiber, 'every fiber has at most one element' is equivalent to injectivity. The fibers in S05 all have at most one element, so the fiber view also gives that f is injective, in agreement with the pairwise comparison of S04. This is the fiber form stated in the MKO.
S07 · implies
Before
f^{-1}(\{2\})=f^{-1}(\{3\})=\varnothingAfter
f\ \text{injective but not surjective}Conditions: none
Rule: injective_surjective_def · Uses: S05, S04, injective_surjective_def
Leaf basis: injective_surjective_def + image_preimage_def
The codomain elements 2 and 3 have empty fibers and no preimage, so f is not surjective; yet f is still injective (S04, S06). MKO paragraph two: an injection may miss codomain elements, and fiber sizes may be zero or one.
S08 · implies
Before
g:\ (1,4),(2,6),(2,6),(3,4),(4,6)
After
g:A\to B\ \text{total};\ g(1)=4,\ g(2)=6,\ g(3)=4,\ g(4)=6Conditions: none
Rule: table_function · Uses: G1, G2, table_function
Leaf basis: table_function + roster_membership
The table of g lists (2,6) twice. The two rows are identical, a repeated listing of the same ordered pair (MKO paragraph one), not an input paired with different outputs. Each of the four inputs has a unique output in B, so g is a total function A→B.
S09 · implies
Before
g(1)=4=g(3),\ 1\neq 3
After
g\ \text{not injective}Conditions: none
Rule: quantifier_negation · Uses: S08, mko_injective_def, quantifier_negation
Leaf basis: quantifier_negation + exists_intro + mko_injective_def
The negation of injectivity (quantifier negation together with ¬(P⇒Q) ⇔ P∧¬Q) is: there exist x, y∈A with g(x)=g(y) and x≠y. Take x=1 and y=3: g(1)=g(3)=4 (N3) while 1≠3. This collision witness alone shows that g is not injective.
S10 · implies
Before
\{(x,x')\mid x<x',\ g(x)=g(x')\}After
\{(1,3),(2,4)\},\ \text{first}=(1,3)Conditions: none
Rule: lex_order · Uses: S08, lex_order
Leaf basis: lex_order + case_analysis + numeric_evaluation
MKO paragraph three: for the first finite collision take x<x′ and choose the first pair (x,x′) in lexicographic order. Compare the six pairs: (1,2): 4 and 6 differ; (1,3): 4=4, a collision; (1,4): 4 and 6 differ; (2,3): 6 and 4 differ; (2,4): 6=6, a collision; (3,4): 4 and 6 differ (N4, N5). The collision set is {(1,3),(2,4)}; since 1<2, the first pair in lexicographic order is (1,3).
S11 · implies
Before
g^{-1}(\{b\}),\ b\in BAfter
g^{-1}(\{4\})=\{1,3\},\ g^{-1}(\{6\})=\{2,4\},\ \text{others}\ \varnothingConditions: none
Rule: image_preimage_def · Uses: S08, image_preimage_def, L_fiber
Leaf basis: image_preimage_def + roster_membership + numeric_evaluation
The fibers of g: the fiber of 4 is {1,3}, the fiber of 6 is {2,4}, and the fibers of b=1, 2, 3, 5 are empty. The sizes sum to 0+0+0+2+0+2=4=|A| (N9). Two fibers have two elements, so by L_fiber g is again seen not to be injective; each fiber of size 2 corresponds to one collision.
S12 · implies
Before
g|_C,\ C=\{1,2\}After
g|_C(1)=4\neq 6=g|_C(2),\ g|_C\ \text{injective}Conditions: none
Rule: restriction_def · Uses: S08, G3, restriction_def, L_pairs_lt
Leaf basis: restriction_def + case_analysis + numeric_evaluation
Restrict to C={1,2}: g|_C(1)=4 and g|_C(2)=6. The only pair x<y in C is (1,2), and 4≠6 (N6), so by L_pairs_lt g|_C is injective. MKO paragraph three: after restriction only inputs in C are compared, so a non-injective function can have an injective restriction; both collisions (1,3) and (2,4) have at least one input outside C.
S13 · implies
Before
h:\ (2,6),\ (2,5)
After
h\ \text{is not a function}\ A\to BConditions: none
Rule: table_function · Uses: G2, table_function
Leaf basis: table_function + numeric_evaluation
In the table of h the input 2 occurs in the rows (2,6) and (2,5), with outputs 6≠5 (N7). One input paired with different outputs means h is not a function (MKO paragraph one). Injectivity is defined for total functions, so the question whether h is injective does not apply; the correct verdict is 'not a function', not 'not injective'.
S14 · implies
Before
f_0:\varnothing\to B
After
f_0\ \text{injective}Conditions: none
Rule: forall_intro · Uses: G3, mko_injective_def, empty_set_def, forall_intro
Leaf basis: empty_set_def + forall_intro + mko_injective_def
With empty domain, the injectivity condition is ∀x,y∈∅ (f₀(x)=f₀(y)⇒x=y). For any x, x∈∅ is false, and an implication with a false antecedent is true, so the condition holds for every x, y; by ∀-introduction f₀ is injective (MKO assumption a2: injectivity holds for an empty domain).
S15 · implies
Before
\text{S01 to S14}After
f\ \text{injective};\ g\ \text{not, first collision}\ (1,3);\ g|_C\ \text{injective};\ h\ \text{not a function};\ f_0\ \text{injective}Conditions: none
Rule: and_intro_elim · Uses: S01, S04, S07, S08, S09, S10, S12, S13, S14
Leaf basis: and_intro_elim
Summary: f is a total function and injective, with every fiber of size at most one, though 2 and 3 have no preimage (S04 to S07); g is a total function (the repeated row is harmless) and not injective, with collisions (1,3) and (2,4) and first collision (1,3) (S08 to S11); g|_C is injective (S12); h is not a function (S13); f₀:∅→B is injective (S14).