def
Hex.GraphIso.Nauty.Sparse.Sort.children
(start size left right : Nat)
(rest : List (Nat × Nat))
:
The exact two pushes in the indirect sort, with the smaller fragment at the top of the stack. Fragments of size at most one need no work.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Hex.GraphIso.Nauty.Sparse.Sort.indirect_induction
(x y : Array Nat)
(start len : Nat)
(hb : start + len ≤ x.size)
(P : Array Nat → List (Nat × Nat) → Prop)
(hinit : P x (if len > 1 then [(start, len)] else []))
(hins :
∀ (a : Array Nat) (lo size : Nat) (rest : List (Nat × Nat)),
a.size = x.size → lo + size ≤ x.size → size < 11 → P a ((lo, size) :: rest) → P (insertion a y lo size) rest)
(hpart :
∀ (a : Array Nat) (lo size : Nat) (rest : List (Nat × Nat)),
a.size = x.size →
lo + size ≤ x.size →
11 ≤ size →
P a ((lo, size) :: rest) →
P (partition a y lo size).fst
(children lo size (partition a y lo size).snd.fst (partition a y lo size).snd.snd rest))
:
Induction over the actual bounded work-stack loop. A property preserved by its insertion and partition steps holds with an empty final stack: the loop bound cannot truncate pending work on a valid input segment.