Orientation Lemma: a PC path is a directed path in one of its two directions
ProvedRhoMin.alt_to_arcLet be a permutation of . The graph on has P-edges and V-edges with consecutive integers. A PC path is a sequence of distinct vertices whose consecutive vertices are joined by edges of alternating colours, and is the largest number of vertices of a PC path of .
Suppose is parity-preserving: for all . Let be the digraph on in which every P-edge is directed away from its even end and every V-edge away from its odd end.
Let be a sequence of vertices whose steps alternate in colour, the first step having colour . If is V exactly when is odd, then every step is an arc of . Otherwise every reversed step is an arc of .
Hence every PC path, read in one of its two directions, is a directed path of .
Formalization Note The permutation is accompanied by a function with for and for all natural numbers ; the digraph is Arc f on and the path is mapped to its list of natural-number positions.
import Definitions.Def_RhoMin_Defs
import Definitions.Def_RhoMin_Dir
import Definitions.Def_RhoMin_Piece
import Definitions.Def_RhoMin_Orient
import Mathlib.Data.Fintype.Perm
import Mathlib.Data.Fintype.Card
import Mathlib.Data.List.Nodup
import Mathlib.Data.Nat.Find
import Mathlib.Data.List.FinRange
import Mathlib.Data.Finset.Lattice.Fold
import Mathlib.Data.Finset.Card
import Mathlib.Data.List.Count
open RhoMin
variable {n : ℕ}theorem RhoMin.alt_to_arc (σ : Equiv.Perm (Fin n)) (f : ℕ → ℕ) (hf : ∀ i : Fin n, (σ i).val = f i.val)
(hpar : ∀ u, f u % 2 = u % 2) :
∀ (l : List (Fin n)) (x : Fin n) (c : Bool), Alt σ c (x :: l) →
(c = decide (x.val % 2 = 1) → Walk (Arc f) ((x :: l).map Fin.val)) ∧
(c = !decide (x.val % 2 = 1) → Walk (fun u v => Arc f v u) ((x :: l).map Fin.val)) := by sorryRead-back
What the Lean code literally says, in plain math · claude-fable-5-2
Setting. Let be a natural number and let be a permutation of . Let be a function defined on all natural numbers.
Hypotheses.
- extends : for every , as natural numbers.
- preserves parity everywhere: for every natural number (including every ), .
Definitions used.
On :
- are P-adjacent if or .
- are V-adjacent if or .
- For a Boolean and a list of elements of , the list is -alternating if for every the pair is adjacent in the relation determined by the colour of step , where the colours of the steps are and colour means V-adjacent, colour means P-adjacent. A list with zero or one entries is -alternating for both values of . No distinctness of entries is required.
On : there is an arc (with respect to ) if
where abbreviates " or ", and likewise for . The parity condition is on the tail only. A list of natural numbers is a walk for a binary relation if holds for every ; lists with zero or one entries are walks, and no distinctness is required.
Conclusion. For every list of elements of , every , and every Boolean : if the list (that is, followed by ) is -alternating, then, regarding the entries of as natural numbers, both of the following implications hold:
- If exactly when is odd (i.e. odd and the first step is a V-step, or even and the first step is a P-step), then is a walk along arcs: there is an arc for every consecutive pair of .
- If exactly when is even (i.e. even and the first step is a V-step, or odd and the first step is a P-step), then is a walk along reversed arcs: there is an arc for every consecutive pair of .
For any given and exactly one of the two premises holds, so exactly one of the two implications has content.
Remarks on what the quantifiers include.
- The two hypotheses together force for every . If does not preserve parity of positions, no such exists and the statement is vacuous for that . The values of outside are constrained only by the parity condition.
- For there is no , so the statement is vacuous.
- If is empty, is -alternating for both , and both conclusions hold trivially (a one-entry list is a walk).
- is not assumed to have distinct entries, and the conclusion asserts nothing about distinctness.