structure
Hex.GraphIso.Nauty.Generic.ShortPolicy
{n : Nat}
{σ γ : Type}
[Policy σ n]
(P : Nat → σ → Prop)
:
Only leaf emission and cleanup along an unconsumed return must preserve the property. A receiving loop may consume it and resume.
- leaf (ctx : γ) (level numcells : Nat) (st : σ) : let c := Policy.classify ctx level numcells st; ∀ (target : Nat), (Policy.leafExit c.fst level c.snd).fst = Exit.unwind target true → P target (Policy.leafExit c.fst level c.snd).snd
- afterFirst (level tv target : Nat) (st : σ) : P target st → P target (Policy.afterChildFirst level tv st)
Instances For
theorem
Hex.GraphIso.Nauty.Generic.short_resume
{n : Nat}
{σ γ : Type}
[Policy σ n]
{P : Nat → σ → Prop}
{fuel cfuel : Nat}
{next : SweepFn σ n}
(hnext : (shortContract P).sweepValid fuel cfuel next)
(inf : Nat)
(first : Bool)
(level numcells tc tv1 tv : Nat)
(cell : VSet n)
(index : Nat)
(st : σ)
(target : Nat)
:
Resuming a sweep obtains any new short return from its continuation.
theorem
Hex.GraphIso.Nauty.Generic.short_advance
{n : Nat}
{σ γ : Type}
[Policy σ n]
{P : Nat → σ → Prop}
{fuel cfuel : Nat}
{next : SweepFn σ n}
(hnext : (shortContract P).sweepValid fuel cfuel next)
(inf : Nat)
(first : Bool)
(level numcells tc tv1 tv : Nat)
(cell : VSet n)
(index : Nat)
(st : σ)
(exit : Exit)
(hout : ∀ (target : Nat), exit = Exit.unwind target true → P target st)
(target : Nat)
:
An intermediate loop transports an unconsumed short return.
theorem
Hex.GraphIso.Nauty.Generic.short_node
{n : Nat}
{σ γ : Type}
[Policy σ n]
{P : Nat → σ → Prop}
(h : ShortPolicy P)
{fuel : Nat}
{next : SweepFn σ n}
(hnext : (shortContract P).sweepValid fuel (n + 1) next)
(ctx : γ)
(tcLevel : Nat)
(first : Bool)
(level numcells : Nat)
(st : σ)
(target : Nat)
:
A node can emit a short return only at a leaf or through its sweep.
theorem
Hex.GraphIso.Nauty.Generic.short_sweep
{n : Nat}
{σ γ : Type}
[Policy σ n]
{P : Nat → σ → Prop}
(h : ShortPolicy P)
{fuel cfuel : Nat}
{descend : NodeFn σ}
{next : SweepFn σ n}
(hdescend : (shortContract P).nodeValid fuel descend)
(hnext : (shortContract P).sweepValid fuel cfuel next)
(inf : Nat)
(first : Bool)
(level numcells tc tv1 tv : Nat)
(cell : VSet n)
(index : Nat)
(st : σ)
(target : Nat)
:
Cleanup preserves the emitting leaf's property before the loop either transports the return or resumes its continuation.
theorem
Hex.GraphIso.Nauty.Generic.ShortPolicy.sound
{n : Nat}
{σ γ : Type}
[Policy σ n]
{P : Nat → σ → Prop}
(h : ShortPolicy P)
(ctx : γ)
(inf tcLevel : Nat)
:
SoundPolicy ctx inf tcLevel (shortContract P)
The leaf rules instantiate the common recursion's contract.
theorem
Hex.GraphIso.Nauty.Generic.node_short
{n : Nat}
{σ γ : Type}
[Policy σ n]
{P : Nat → σ → Prop}
(h : ShortPolicy P)
(first : Bool)
(ctx : γ)
(inf tcLevel fuel level numcells : Nat)
(st : σ)
(target : Nat)
:
Every short return carries a property of its emitting leaf.
theorem
Hex.GraphIso.Nauty.Generic.sweep_short
{n : Nat}
{σ γ : Type}
[Policy σ n]
{P : Nat → σ → Prop}
(h : ShortPolicy P)
(first : Bool)
(ctx : γ)
(inf tcLevel fuel cfuel level numcells tc tv1 : Nat)
(cursor : Option Nat)
(cell : VSet n)
(index : Nat)
(st : σ)
(target : Nat)
:
An unconsumed short return retains its emitting leaf's property through any number of intermediate sweeps.