Documentation

HexGraphIso.Nauty.Policy.Generic.Stable

def Hex.GraphIso.Nauty.Generic.Past (first : Bool) (tv1 : Nat) (cursor : Option Nat) :

A sweep is strictly past its first child, or is entirely off the first path.

Equations
Instances For
    theorem Hex.GraphIso.Nauty.Generic.Past.next {n : Nat} {first : Bool} {tv1 tv : Nat} {cell : VSet n} (h : first = true → tv1 < tv) :
    Past first tv1 (cell.nextElem (some tv))

    Every later bitset cursor remains past the first child.

    def Hex.GraphIso.Nauty.Generic.stableContract {σ : Type} (n : Nat) (P : σ → Prop) :

    An invariant preserved by off-path calls and later siblings.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      structure Hex.GraphIso.Nauty.Generic.StablePolicy {n : Nat} {σ γ : Type} [Policy σ n] (ctx : γ) (inf tcLevel : Nat) (P : σ → Prop) (validCode : Nat → Prop := fun (x : Nat) => True) (validLeaf : Leaf → σ → Prop := fun (x : Leaf) (x_1 : σ) => True) :

      Local operations outside the first descent preserve a state invariant.

      Instances For
        theorem Hex.GraphIso.Nauty.Generic.StablePolicy.node_step {n : Nat} {σ γ : Type} [Policy σ n] {ctx : γ} {inf tcLevel : Nat} {P : σ → Prop} {validCode : Nat → Prop} {validLeaf : Leaf → σ → Prop} (h : StablePolicy ctx inf tcLevel P validCode validLeaf) {fuel : Nat} {next : SweepFn σ n} (hnext : (stableContract n P).sweepValid fuel (n + 1) next) (level numcells : Nat) (st : σ) (hin : P st) :
        P (nodeStep ctx tcLevel next false level numcells st).snd

        An off-path node preserves the state invariant.

        theorem Hex.GraphIso.Nauty.Generic.StablePolicy.sweep_step {n : Nat} {σ γ : Type} [Policy σ n] {ctx : γ} {inf tcLevel : Nat} {P : σ → Prop} {validCode : Nat → Prop} {validLeaf : Leaf → σ → Prop} (h : StablePolicy ctx inf tcLevel P validCode validLeaf) {fuel cfuel : Nat} {descend : NodeFn σ} {next : SweepFn σ n} (hdescend : (stableContract n P).nodeValid fuel descend) (hnext : (stableContract n P).sweepValid fuel cfuel next) (first : Bool) (level numcells tc tv1 tv index : Nat) (cell : VSet n) (st : σ) (hpast : Past first tv1 (some tv)) (hin : P st) :
        P (sweepStep inf descend next first level numcells tc tv1 tv cell index st).snd.snd

        Once past the first child, all later recursive calls are off-path.

        theorem Hex.GraphIso.Nauty.Generic.StablePolicy.sound {n : Nat} {σ γ : Type} [Policy σ n] {ctx : γ} {inf tcLevel : Nat} {P : σ → Prop} {validCode : Nat → Prop} {validLeaf : Leaf → σ → Prop} (h : StablePolicy ctx inf tcLevel P validCode validLeaf) :
        SoundPolicy ctx inf tcLevel (stableContract n P)

        Local preservation gives the generic invariant contract.

        theorem Hex.GraphIso.Nauty.Generic.node_stable {n : Nat} {σ γ : Type} [Policy σ n] {ctx : γ} {inf tcLevel : Nat} {P : σ → Prop} {validCode : Nat → Prop} {validLeaf : Leaf → σ → Prop} (h : StablePolicy ctx inf tcLevel P validCode validLeaf) (fuel level numcells : Nat) (st : σ) (hin : P st) :
        P (node false ctx inf tcLevel fuel level numcells st).snd

        An off-path node preserves an invariant stable under its local operations.

        theorem Hex.GraphIso.Nauty.Generic.sweep_stable {n : Nat} {σ γ : Type} [Policy σ n] {ctx : γ} {inf tcLevel : Nat} {P : σ → Prop} {validCode : Nat → Prop} {validLeaf : Leaf → σ → Prop} (h : StablePolicy ctx inf tcLevel P validCode validLeaf) (first : Bool) (fuel cfuel level numcells tc tv1 index : Nat) (cursor : Option Nat) (cell : VSet n) (st : σ) (hpast : Past first tv1 cursor) (hin : P st) :
        P (sweep first ctx inf tcLevel fuel cfuel level numcells tc tv1 cursor cell index st).snd.snd

        A later sibling sweep preserves the same invariant.