Lemma 2.2 — during FOREST, a node v meets E_i exactly for i = 1, …, r(v)
ProvedNagamochiIbaraki.NodeConn.lemma_2_2Let be a graph with and no self-loop (parallel edges allowed), and consider any run of Procedure FOREST on . At every time instant of the run, for every node and every index , write for the set of edges incident to and for the -th class at that instant. Then
Equivalently, for and for : the label counts exactly the classes that have already reached .
This invariant is the basic bookkeeping fact about FOREST; it underlies the forest property of the classes, Lemma 2.4 and the Appendix proof of Lemma 3.1.
Formalization Note The paper states the lemma at the instants when the block of lines 7–10 has been completed for the current node; it is stated here at every state of the run, which is equivalent because the select and finish steps change neither the labels nor the classes.
import Mathlib import Definitions.Def_NagamochiIbaraki_NodeConn_Multigraph import Definitions.Def_NagamochiIbaraki_NodeConn_Forest
namespace NagamochiIbaraki.NodeConn
theorem lemma_2_2
{V E : Type*} [Fintype V] [DecidableEq V] [Fintype E] [DecidableEq E]
(hV : 2 ≤ Fintype.card V)
(ends : E → Sym2 V) (hloop : ∀ e, ¬ (ends e).IsDiag)
(σ : ℕ → State V E) (K : ℕ) (hrun : IsRun ends σ K) :
∀ k, k ≤ K → ∀ (v : V) (i : ℕ), 1 ≤ i → i ≤ Fintype.card E →
((∃ e : E, v ∈ ends e ∧ (σ k).idx e = i) ↔ i ≤ (σ k).r v) := by sorry
end NagamochiIbaraki.NodeConn
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
The setting and hypotheses are:
- finite types (nodes) and (edges), both with decidable equality, where ;
- an endpoint map with no loops, i.e. is never of the form ;
- parallel edges are allowed, since no injectivity of is assumed;
- a sequence of states that is a run of length of the transition system.
The transition system. It starts from the state with all labels , all edge indices , no scanned nodes, no current node and an empty order list. It has three kinds of step:
-
Select. If there is no current node, choose an unscanned node of maximum label among the unscanned nodes as the current node, and append it to the order list.
-
Scan. If the current node is and is an edge of index with :
- set ;
- raise by one if ;
- raise by one.
All three updates use the old values of .
-
Finish. If every edge incident to the current node has nonzero index, mark that node scanned and clear the current node.
A run of length means that is this initial state and that each follows from by one step, for every .
Claim. Fix any time , any node and any integer with . Then:
In words, has an incident edge of index exactly at time iff 's label at time is at least .
Degenerate cases.
- . No satisfies , so the claim is vacuous.
- . Only is covered. All indices and labels are , so both sides are false for every .
- Unconstrained values. The claim says nothing about or , nor about times .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.