The digraph of a permutation given by its values
DefinitionRhoMin_OrientLet be the value function of a permutation, extended to all natural numbers. Two positions are P-neighbours if and V-neighbours if . The digraph on has an arc
So every P-edge is directed away from its even end and every V-edge away from its odd end. For a parity-preserving permutation both kinds of edges join positions of different parity, and properly coloured paths become directed paths of this digraph.
Formalization Note The definition is stated for an arbitrary function on , with no parity or bijectivity assumption; those appear as hypotheses of the statements that use it.
import Definitions.Def_RhoMin_Defs import Definitions.Def_RhoMin_Piece import Definitions.Def_RhoMin_Dir 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 namespace RhoMin def PN (u v : ℕ) : Prop := u + 1 = v ∨ v + 1 = u def VN (f : ℕ → ℕ) (u v : ℕ) : Prop := f u + 1 = f v ∨ f v + 1 = f u def Arc (f : ℕ → ℕ) (u v : ℕ) : Prop := (PN u v ∧ u % 2 = 0) ∨ (VN f u v ∧ u % 2 = 1) end RhoMin
Read-back
What the Lean code literally says, in plain math · claude-fable-5-2
The file declares three relations on the natural numbers . None of them refers to a bound , to a permutation, or to any of the definitions of the imported files; the variables range over all natural numbers.
Definition PN (relation ). For natural numbers , the proposition holds if and only if
That is, and differ by exactly . The relation is symmetric and never holds for . For it holds only with .
Definition VN (relation ). For an arbitrary function and natural numbers , the proposition holds if and only if
That is, and differ by exactly . No assumption is placed on : it is not required to be injective, surjective, or a permutation of any set. The relation is symmetric and never holds for ; if is not injective, a given may be related to arbitrarily many .
Definition Arc (relation ). For an arbitrary function and natural numbers , the proposition holds if and only if
where "even" means and "odd" means . Unfolded:
- if is even ( included), holds exactly when or ;
- if is odd, holds exactly when or .
The parity condition is placed on the first argument only; no condition is placed on the parity of . The relation is therefore not symmetric in general: and are governed by the parities of and of respectively. It never holds for .