Main derivation
S01 · definition
Before
G\ \text{is a tree}After
V\neq\varnothing\ \land\ \forall u,v\in V\ \exists\ \text{path}\ u\to v\ \land\ \neg\exists\ \text{simple cycle}Conditions: none
Rule: mko_tree_def · Uses: G1, G2, mko_tree_def
Leaf basis: mko_tree_def + def_unfold
By the MKO's definition, proving that G is a tree requires three things: V is nonempty, any two vertices are joined by a path, and there is no simple cycle. Counting edges is not part of the definition.
S02 · implies
Before
E=\{\{1,2\},\{2,3\},\{2,4\},\{4,5\},\{4,6\}\}After
G\ \text{finite simple},\ |V|=6,\ |E|=5,\ V\neq\varnothingConditions: none
Rule: graph_basics · Uses: G1, graph_basics
Leaf basis: graph_basics + numeric_evaluation
Check each edge: both endpoints are in V and distinct, so there are no loops; the five edges are pairwise different as two-element sets, so there are no multiple edges; undirected edges ignore direction and each is listed once (the normalization of MKO assumption a1). So G is a finite simple undirected graph with |V|=6>0.
S03 · implies
Before
N(v)\ \text{for}\ v\in VAfter
\deg(1),\deg(2),\deg(3),\deg(4),\deg(5),\deg(6)=1,3,1,3,1,1
Conditions: none
Rule: graph_basics · Uses: S02, graph_basics
Leaf basis: graph_basics + numeric_evaluation
List neighbours: N(1)={2}, N(2)={1,3,4}, N(3)={2}, N(4)={2,5,6}, N(5)={4}, N(6)={4}. The degree is the number of neighbours. Handshake check: 1+3+1+3+1+1=10=2·5=2|E| (N1).
S04 · equivalent
Before
\{v\in V:\ \deg(v)=1\}After
\{1,3,5,6\}Conditions: none
Rule: def_unfold · Uses: S03, mko_tree_def
Leaf basis: def_unfold + set_builder
By the definition of a leaf (degree exactly 1), check all 6 vertices: 1, 3, 5, 6 have degree 1, while 2 and 4 have degree 3. The leaf set, in increasing order, is {1,3,5,6}.
S05 · implies
Before
\text{vertex}\ 1After
(1),\ (1,2),\ (1,2,3),\ (1,2,4),\ (1,2,4,5),\ (1,2,4,6)
Conditions: none
Rule: exists_intro · Uses: S03, G2, walk_path_cycle
Leaf basis: exists_intro + walk_path_cycle
Write one path from vertex 1 to each vertex. In each sequence consecutive vertices form edges of E ({1,2}, {2,3}, {2,4}, {4,5}, {4,6}) and no vertex repeats; (1) is the zero-edge path to itself.
S06 · implies
Before
\forall u,v\in V:\ \text{walk}\ u\to 1\to vAfter
\forall u,v\in V\ \exists\ \text{path}\ u\to vConditions: none
Rule: L_walk_path · Uses: S05, L_walk_path
Leaf basis: walk_path_cycle + well_ordering + contradiction
For any u, v: reverse the path from 1 to u of S05 (edges are undirected, so the reverse is still a walk), then append the path from 1 to v, giving a walk from u to v. By Lemma L_walk_path (proved in S06.1 and S06.2) there is a path from u to v. For example u=3, v=6: the walk (3,2,1,2,4,6) repeats 2, and the lemma's shortening gives the path (3,2,4,6). So G is connected.
S07 · equivalent
Before
G\ \text{has a simple cycle}After
G_1=(\{2,4\},\{\{2,4\}\})\ \text{has a simple cycle}Conditions: \deg(v)\le 1\ \text{at each removal}
Rule: L_leaf_cycle · Uses: S03, L_leaf_cycle, delete_vertex
Leaf basis: logic_chain + delete_vertex + graph_basics
Delete leaves one at a time, each time using Lemma L_leaf_cycle (proved in S07.1 and S07.2). In G, deg(1)=1, so G has a simple cycle ⇔ G−1 has one. In G−1, vertex 3 still has 2 as its only neighbour, degree 1, so delete it; then 5 (only neighbour 4) and 6 (only neighbour 4). Each deletion removes one edge, and after four of them the vertices {2,4} and the single edge {2,4} remain. Chaining the equivalences gives the claim.
S08 · equivalent
Before
G_1=(\{2,4\},\{\{2,4\}\})\ \text{has a simple cycle}After
(\{4\},\varnothing)\ \text{has a simple cycle}Conditions: \deg_{G_1}(2)=1
Rule: L_leaf_cycle · Uses: S07, L_leaf_cycle
Leaf basis: delete_vertex + graph_basics
In G_1 vertex 2 has the single neighbour 4, degree 1; one more use of the lemma deletes 2 and leaves the single-vertex graph ({4},∅).
S09 · implies
Before
G\ \text{has a simple cycle}\iff(\{4\},\varnothing)\ \text{has one}After
G\ \text{has no simple cycle}Conditions: none
Rule: logic_chain · Uses: S07, S08, walk_path_cycle
Leaf basis: logic_chain + walk_path_cycle
A simple cycle needs at least 3 distinct vertices; ({4},∅) has one vertex and no edges, so it has no simple cycle. Chaining the equivalences of S07 and S08, G has no simple cycle either.
S10 · implies
Before
V\neq\varnothing,\ \text{connected},\ \text{no simple cycle}After
G\ \text{is a tree}Conditions: none
Rule: mko_tree_def · Uses: S02, S06, S09, mko_tree_def
Leaf basis: mko_tree_def + and_intro_elim
S02 gives V nonempty, S06 gives connectivity and S09 gives no simple cycle; together these are exactly the MKO's definition of a tree.
S11 · implies
Before
3,\ 6\in V
After
(3,2,4,6)\ \text{is a path from 3 to 6}Conditions: none
Rule: exists_intro · Uses: S03, walk_path_cycle
Leaf basis: exists_intro + walk_path_cycle
{3,2}, {2,4} and {4,6} are in E and the four vertices 3, 2, 4, 6 are pairwise distinct, so (3,2,4,6) is a path from 3 to 6. Following MKO paragraph 1 it is written in its actual vertex order, not as the sorted set {2,3,4,6}.
S12 · implies
Before
P\ \text{any path from 3 to 6}After
P=(3,2,4,6)
Conditions: none
Rule: case_analysis · Uses: S03, S11, walk_path_cycle
Leaf basis: case_analysis + walk_path_cycle + graph_basics
Let P be any path from 3 to 6 with vertices p_0=3 through p_m=6. S12.1 to S12.3 exhaust every possible next vertex at each stage and show that P can only be (3,2,4,6).
S13 · implies
Before
e=\{3,6\}After
3,6\in V,\ 3\neq 6,\ e\notin E;\ G+e=(V,\,E\cup\{e\})Conditions: none
Rule: graph_basics · Uses: G1, S10, graph_basics
Leaf basis: graph_basics
Check the add-an-edge premise of MKO assumption a3: the original graph is a tree (S10); 3 and 6 are in V and distinct; {3,6} is not among the five edges of E. So G+e is still a simple graph, with 6 edges.
S14 · implies
Before
(3,2,4,6)\ \text{in}\ G,\ e=\{6,3\}After
C=(3,2,4,6,3)\ \text{is a simple cycle in}\ G+eConditions: k=4\ge 3
Rule: walk_path_cycle · Uses: S11, S13, walk_path_cycle
Leaf basis: walk_path_cycle + exists_intro
Start at the smaller end label 3, follow the original path to 6, and return to 3 by the new edge: the length is k=4≥3, the first four vertices 3, 2, 4, 6 are pairwise distinct, {3,2}, {2,4}, {4,6} are in E and {6,3}=e. So C is a simple cycle of G+e, written according to the output convention of MKO paragraph 1.
S15 · implies
Before
D\ \text{any simple cycle in}\ G+eAfter
D=C\ \text{up to starting point and direction}Conditions: none
Rule: case_analysis · Uses: S09, S12, S14
Leaf basis: case_analysis + contradiction + walk_path_cycle
If D did not use e, all its edges would be in E and it would be a simple cycle of G, contradicting S09; so D uses e. Since the vertices of D (apart from the repeated endpoint) are pairwise distinct, 3 and 6 each occur once and e is used exactly once. Rotate D, reversing it if needed, so that it starts at 3 and its last edge is e from 6 back to 3; removing that edge leaves a path from 3 to 6 that uses only edges of E. By S12 that path is (3,2,4,6), so D is C.
S16 · implies
Before
H=(\{1,2,3,4\},\{\{1,2\},\{2,3\},\{1,3\}\})After
|E_H|=|V_H|-1,\ \text{no path}\ 1\to 4;\ H\ \text{is not a tree}Conditions: none
Rule: mko_tree_def · Uses: G3, walk_path_cycle, mko_tree_def
Leaf basis: mko_tree_def + contradiction + graph_basics
|V_H|=4 and |E_H|=3=4−1, the same edge count pattern as the main example, but deg(4)=0. A path from 1 to 4 has at least one edge (1≠4) and its last edge contains 4, which is impossible; so H is not connected. Moreover (1,2,3,1) is a simple cycle. H is not a tree.
S17 · implies
Before
K=(\{7\},\varnothing)After
K\ \text{is a tree},\ \text{leaves}(K)=\varnothingConditions: none
Rule: mko_tree_def · Uses: G2, G3, mko_tree_def
Leaf basis: mko_tree_def + walk_path_cycle
V={7} is nonempty; the only pair (7,7) is joined by the zero-edge path (7) (G2); a simple cycle needs at least 3 distinct vertices, so there is none. K is a tree. But deg(7)=0≠1, so by the definition K has no leaf (MKO assumption a2).
Substeps and lemmas
S06.1 · implies
Before
\text{the set of lengths of walks}\ u\to v\ \text{is nonempty}After
\exists\ \text{a walk}\ W\ \text{from}\ u\ \text{to}\ v\ \text{of least length}\ kConditions: none
Rule: well_ordering · Uses: walk_path_cycle, well_ordering
Leaf basis: well_ordering
Assume there is a walk from u to v. The lengths of all such walks form a nonempty subset of ℕ, which by well-ordering has a least element k; take a walk W of length k with vertices w_0=u through w_k=v.
S06.2 · implies
Before
w_i=w_j\ (i<j)\ \text{in the least walk}\ WAfter
\text{a walk of length}\ k-(j-i)<k,\ \text{contradiction; so}\ W\ \text{is a path}Conditions: i<j
Rule: contradiction · Uses: S06.1, contradiction
Leaf basis: contradiction + walk_path_cycle + order_basics
Suppose W repeats a vertex, w_i=w_j with i<j. Delete w_{i+1} through w_j, keeping w_0 to w_i followed by w_{j+1} to w_k; since w_i=w_j is adjacent to w_{j+1} (or, if j=k, the walk simply stops at w_i=v), this is still a walk from u to v, of length k−(j−i)<k, contradicting the minimality of k. So W repeats no vertex and is a path. S06.1 and S06.2 together prove Lemma L_walk_path.
S07.1 · implies
Before
C\ \text{simple cycle in}\ G-vAfter
C\ \text{simple cycle in}\ GConditions: none
Rule: subset_def · Uses: delete_vertex, walk_path_cycle
Leaf basis: subset_def + delete_vertex
(The ⇐ direction) The vertices and edges of G−v all belong to G, so the same vertex sequence still meets every condition of a simple cycle in G.
S07.2 · implies
Before
C\ \text{simple cycle in}\ G,\ \deg_G(v)\le 1After
v\notin C,\ C\ \text{simple cycle in}\ G-vConditions: k\ge 3
Rule: contrapositive · Uses: walk_path_cycle, graph_basics
Leaf basis: contrapositive + graph_basics + walk_path_cycle
(The ⇒ direction) In a simple cycle of length k≥3, each w_j (0≤j<k) has two cycle neighbours w_{j−1} and w_{j+1} (indices mod k), which differ because w_0 to w_{k−1} are pairwise distinct and k≥3; so every vertex of C has degree at least 2 in G. Contrapositively, a vertex v with deg_G(v)≤1 is not on C, no edge of C contains v, and C is a simple cycle of G−v. S07.1 and S07.2 together prove Lemma L_leaf_cycle.
S12.1 · implies
Before
p_0=3\neq 6
After
p_1=2
Conditions: none
Rule: graph_basics · Uses: S03, walk_path_cycle
Leaf basis: graph_basics
3≠6, so P has at least one edge; p_1 must be a neighbour of 3, and N(3)={2}, so p_1=2.
S12.2 · case_split
Before
p_1=2\neq 6
After
p_2=4
Conditions: none
Rule: case_analysis · Uses: S12.1, S03
Leaf basis: case_analysis + contradiction + graph_basics
2≠6, so P continues; p_2∈N(2)∖{3}={1,4} (a path repeats no vertex). Case p_2=1: 1≠6, so P must continue, but N(1)∖{3,2}=∅, so there is nowhere to go, a contradiction. Hence p_2=4.
S12.3 · case_split
Before
p_2=4\neq 6
After
p_3=6,\ m=3,\ P=(3,2,4,6)
Conditions: none
Rule: case_analysis · Uses: S12.2, S03
Leaf basis: case_analysis + contradiction + graph_basics
4≠6, so P continues; p_3∈N(4)∖{3,2}={5,6}. Case p_3=5: 5≠6, so P must continue, but N(5)∖{3,2,4}=∅, a contradiction. Hence p_3=6; 6 occurs only once in the path and is its end, so m=3 and P=(3,2,4,6).