Main derivation
S01 · implies
Before
(1,2),(2,1),(2,3),(3,4),(2,4),(4,2)
After
\text{each entry has two distinct endpoints in}\ VConditions: none
Rule: mko_graph_def · Uses: G1, G2, mko_graph_def
Leaf basis: mko_graph_def + roster_membership + two_element_set
By MKO assumption a1, both endpoints of every edge must lie in V and be distinct. Check each entry: the endpoints that occur, 1, 2, 3, 4, are in V, and the six entries have endpoints 1≠2, 2≠1, 2≠3, 3≠4, 2≠4, 4≠2. So every entry denotes a legitimate undirected edge, and there are no loops.
S02 · equivalent
Before
\{1,2\},\{2,1\},\{2,3\},\{3,4\},\{2,4\},\{4,2\}After
E=\{\{1,2\},\{2,3\},\{3,4\},\{2,4\}\}Conditions: none
Rule: set_extensionality · Uses: S01, two_element_set, set_extensionality
Leaf basis: set_extensionality + two_element_set
Replace each entry by the undirected edge {u,v}. {1,2} and {2,1} have the same elements, so by set equality they are the same edge; likewise {2,4} and {4,2}. E is a set, in which repeated elements count once, so E={{1,2},{2,3},{3,4},{2,4}}. Normalization creates no new edge and deletes no distinct edge.
S03 · implies
Before
E=\{\{1,2\},\{2,3\},\{3,4\},\{2,4\}\}After
|E|=4
Conditions: none
Rule: finite_counting_basics · Uses: S02, set_extensionality, finite_counting_basics
Leaf basis: set_extensionality + finite_counting_basics
The four edges are pairwise distinct: {1,2} contains 1 while the other three do not; {2,3} contains 3 but not 4; {3,4} contains 4 but not 2; {2,4} contains 2 but not 3. So they are four different sets and |E|=4, not the 6 entries of the input list. |E| also does not exceed the number C(5,2)=10 of two-element subsets of V (N4).
S04 · equivalent
Before
N(1)=\{u\in V\mid\{u,1\}\in E\}After
N(1)=\{2\}Conditions: none
Rule: graph_defs · Uses: S02, graph_defs
Leaf basis: graph_defs + set_extensionality + two_element_set
u∈N(1) exactly when {u,1}∈E. The only edge of E containing 1 is {1,2}, and {u,1}={1,2} with u≠1 forces u=2. So N(1)={2}.
S05 · equivalent
Before
N(2)=\{u\in V\mid\{u,2\}\in E\}After
N(2)=\{1,3,4\}Conditions: none
Rule: graph_defs · Uses: S02, graph_defs
Leaf basis: graph_defs + set_extensionality + two_element_set
The edges of E containing 2 are {1,2}, {2,3}, {2,4}, with other endpoints 1, 3, 4; {3,4} does not contain 2, and {2,5} is not in E. So N(2)={1,3,4}. Both (2,4) and (4,2) appear in the list, but 4 counts once in N(2).
S06 · equivalent
Before
N(3),\ N(4)
After
N(3)=\{2,4\},\ N(4)=\{2,3\}Conditions: none
Rule: graph_defs · Uses: S02, graph_defs
Leaf basis: graph_defs + set_extensionality + two_element_set
The edges containing 3 are {2,3} and {3,4}, so N(3)={2,4}; the edges containing 4 are {3,4} and {2,4}, so N(4)={2,3}.
S07 · equivalent
Before
N(5)=\{u\in V\mid\{u,5\}\in E\}After
N(5)=\varnothing
Conditions: none
Rule: graph_defs · Uses: S02, graph_defs
Leaf basis: graph_defs + set_extensionality
None of the four edges of E contains 5, so no u has {u,5}∈E, and N(5)=∅. 5 is an isolated vertex, but it is still an element of V and part of the graph.
S08 · implies
Before
N(1),N(2),N(3),N(4),N(5)
After
\deg(1)=1,\ \deg(2)=3,\ \deg(3)=2,\ \deg(4)=2,\ \deg(5)=0
Conditions: none
Rule: graph_defs · Uses: S04, S05, S06, S07, graph_defs
Leaf basis: graph_defs + finite_counting_basics
deg(v)=|N(v)|, the number of distinct neighbours: |{2}|=1, |{1,3,4}|=3, |{2,4}|=2, |{2,3}|=2, |∅|=0. An isolated vertex has degree zero.
S09 · implies
Before
\sum_{v\in V}\deg(v),\ 2|E|After
1+3+2+2+0=8=2\cdot 4
Conditions: none
Rule: numeric_evaluation · Uses: S03, S08
Leaf basis: numeric_evaluation + finite_sum_rules
The degree sum is 1+3+2+2+0=8 and 2|E|=2·4=8, so they agree. This example fits the handshake formula, but one example does not prove the general claim; the general proof is in S10.
S10 · theorem_application
Before
G=(V,E)\ \text{finite simple undirected}After
\sum_{v\in V}\deg(v)=2|E|Conditions: V\ \text{finite}; \text{no loops, no multiple edges}
Rule: L_handshake · Uses: S03, S08, L_handshake
Leaf basis: graph_defs + double_counting + two_element_set + finite_sum_rules
Lemma L_handshake holds for every finite simple undirected graph; it is proved in sub-steps S10.1 to S10.3 using only the definitions in graph_defs and double counting, not the handshake statement contained in the MKO. For this example: Σ deg(v)=8=2·4, agreeing with the direct computation in S09.
S11 · implies
Before
|E'|=6\ \text{(counting list entries)}After
2\cdot 6=12\neq 8=\sum_{v}\deg(v)Conditions: none
Rule: contradiction · Uses: S08, S10, contradiction
Leaf basis: contradiction + numeric_evaluation
If (1,2) and (2,1), and (2,4) and (4,2), were each counted as two edges, we would get 6 edges. But the degrees are fixed by the neighbour sets (S08) and sum to 8, while S10 proved that the degree sum of a simple graph must equal 2|E|. Since 12≠8, '6 edges' contradicts the definition of a simple graph; it is a counting error.
S12 · implies
Before
G_0=(\{1,2,3\},\varnothing)After
\deg(v)=0\ \text{for every}\ v,\ \sum_{v}\deg(v)=0=2\cdot 0Conditions: none
Rule: graph_defs · Uses: G3, graph_defs, L_handshake
Leaf basis: graph_defs + finite_sum_rules + numeric_evaluation
The MKO permits the empty graph. Take V₀={1,2,3}, E₀=∅: for every v there is no {u,v}∈∅, so N(v)=∅ and deg(v)=0; the degree sum 0+0+0=0=2·0 agrees with L_handshake. If V is empty as well, the degree sum is the empty sum 0, still equal to 2·0.
S13 · implies
Before
\text{S02, S03, S08, S10, S12}After
|E|=4,\ (\deg(v))_{v=1}^{5}=(1,3,2,2,0),\ \sum_v\deg(v)=2|E|Conditions: none
Rule: and_intro_elim · Uses: S02, S03, S08, S10, S12
Leaf basis: and_intro_elim
Summary: after normalization E={{1,2},{2,3},{3,4},{2,4}} and |E|=4 (S02, S03); the degrees are 1, 3, 2, 2, 0 in order (S08); the handshake formula holds for every finite simple undirected graph, here 8=2·4 (S10); with an empty edge set the degree sum is 0 (S12).
Substeps and lemmas
S10.1 · implies
Before
E_v=\{e\in E\mid v\in e\}After
|E_v|=\deg(v)
Conditions: u\neq v\ \text{for every}\ u\in N(v)
Rule: graph_defs · Uses: graph_defs, two_element_set, set_extensionality
Leaf basis: graph_defs + two_element_set + set_extensionality + injective_surjective_def + finite_counting_basics
Fix v and define φ(u)={u,v}, mapping N(v) to E_v (u∈N(v) means {u,v}∈E, and this edge contains v). Injective: if {u,v}={u′,v}, then since u≠v, u∈{u′,v} forces u=u′. Surjective: if e∈E_v, e is a two-element set containing v, so e={v,w} with w≠v; {w,v}∈E means w∈N(v), and φ(w)=e. φ is a bijection, so by finite counting |E_v|=|N(v)|=deg(v).
S10.2 · implies
Before
\{v\in V\mid v\in e\}\ \text{for}\ e\in EAfter
|\{v\in V\mid v\in e\}|=|e|=2Conditions: none
Rule: two_element_set · Uses: graph_defs, two_element_set
Leaf basis: graph_defs + two_element_set
Fix an edge e={u,w}∈E (u≠w, both endpoints in V). The vertices lying in e are exactly u and w, so this set is e itself, with 2 elements.
S10.3 · implies
Before
I=\{(v,e)\in V\times E\mid v\in e\}After
\sum_{v\in V}\deg(v)=|I|=\sum_{e\in E}2=2|E|Conditions: V,\ E\ \text{finite}
Rule: double_counting · Uses: S10.1, S10.2, double_counting, finite_sum_rules
Leaf basis: double_counting + finite_sum_rules + eq_refl_symm_trans
Count the incidence set I twice: grouped by first coordinate, the group of v is {e ∣ (v,e)∈I}=E_v, of size deg(v) (S10.1), so |I|=Σ_v deg(v); grouped by second coordinate, the group of e is {v ∣ v∈e}, of size 2 (S10.2), so |I|=Σ_e 2=2|E| (a constant multiple in a finite sum). Both expressions equal |I|, so Σ_v deg(v)=2|E|. S10.1 to S10.3 prove Lemma L_handshake.
Error controls and negative controls
Do not count one undirected edge twice
One misconception named by the MKO is counting the two orderings of an undirected edge as two edges. {1,2}={2,1} and {2,4}={4,2}, so the six input entries give only four edges (S02, S03). Counting 6 would give 2·6=12, which disagrees with the degree sum 8 (S11); the handshake formula exposes the error at once.
A crossing in a drawing is not a vertex
The other misconception named by the MKO is treating a crossing of drawn lines as a new vertex. If 1, 2, 3, 4 are drawn at (0,0), (2,2), (0,2), (2,0), the segments of the edges {1,2} and {3,4} cross at (1,1), yet V is still {1,2,3,4,5}; (1,1) is not a vertex and creates no new edge. Adjacency is decided by E alone, not by a drawing.
Degree counts distinct neighbours, and isolated vertices still count
deg(2)=|{1,3,4}|=3, not the 5 occurrences of 2 in the list. 5 has no neighbour and deg(5)=0, but 5 is still a vertex and the degree sum includes it (adding 0). A loop {v,v}={v} is not a two-element set and does not exist in a simple graph.
- (1,2) and (2,1) are two different edges, so |E|=6 →
reject — {1,2}={2,1}; |E|=4, and 2·6=12 disagrees with the degree sum 8. - The point where two drawn edges cross is a new vertex →
reject — The vertex set V is given; a crossing belongs only to the drawing, is not in V, and does not change E. - 5 has no neighbour, so 5 is not a vertex of the graph →
reject — 5∈V; it is an isolated vertex of degree 0. - The edge {3,3} can be added, making deg(3) equal to 3 →
reject — {3,3}={3} has one element and is not a two-element subset; a simple graph has no loops.