Documentation

HexGraphIso.Nauty.Policy.Generic.Reach

structure Hex.GraphIso.Nauty.Generic.FrameEq {n : Nat} {σ : Type} (view : σ → Search n) (st out : σ) :

The four arrays read by the partition-effect contract are unchanged.

Instances For
    theorem Hex.GraphIso.Nauty.Generic.FrameEq.out {n k : Nat} {σ : Type} {view : σ → Search n} {G : Colored n k} {B level : Nat} {base st out : σ} (h : FrameEq view st out) (hbefore : SearchOut G B level (view base) (view st)) :
    SearchOut G B level (view base) (view out)

    Bookkeeping changes preserve an already established call effect.

    structure Hex.GraphIso.Nauty.Generic.Local {n k : Nat} {σ : Type} (G : Colored n k) (view : σ → Search n) (level numcells : Nat) (st out : σ) :

    A local operation preserves the live partition and moves labels only within its current cells, including any newly installed leaf references.

    • ok : SearchOk G level numcells (view out)
    • effect : SearchOut G level level (view st) (view out)
    Instances For
      theorem Hex.GraphIso.Nauty.Generic.Local.trans {n k : Nat} {σ : Type} {G : Colored n k} {view : σ → Search n} {level numcells : Nat} {st middle out : σ} (h₁ : Local G view level numcells st middle) (h₂ : Local G view level numcells middle out) :
      Local G view level numcells st out

      Compose two local operations.

      def Hex.GraphIso.Nauty.Generic.Target {n : Nat} {σ : Type} (view : σ → Search n) (level tc : Nat) (cell : VSet n) (st : σ) :

      A surviving target set consists of vertices in one nontrivial cell. The empty set needs no target-cell witness.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Hex.GraphIso.Nauty.Generic.Target.subset {n : Nat} {σ : Type} {view : σ → Search n} {level tc : Nat} {cell smaller : VSet n} {st : σ} (h : Target view level tc cell st) (hsub : ∀ (v : Nat), smaller.mem v = true → cell.mem v = true) :
        Target view level tc smaller st

        Removing target vertices preserves the target-cell witness.

        theorem Hex.GraphIso.Nauty.Generic.Target.of_out {n k : Nat} {σ : Type} {view : σ → Search n} {G : Colored n k} {level tc : Nat} {cell : VSet n} {st out : σ} (h : Target view level tc cell st) (hout : SearchOut G level level (view st) (view out)) :
        Target view level tc cell out

        A sweep's frame effect transports membership of every remaining target vertex into the returned labelling.

        structure Hex.GraphIso.Nauty.Generic.ReachPolicy {n k : Nat} {σ γ : Type} [Policy σ n] (G : Colored n k) (ctx : γ) (inf tcLevel : Nat) (view : σ → Search n) :

        Partition rules for the local policy operations. The child and refinement rules compose their own changes with the finer recursive effect; recovery restores the parent's level convention.

        Instances For
          def Hex.GraphIso.Nauty.Generic.reachContract {n k : Nat} {σ : Type} (G : Colored n k) (view : σ → Search n) :

          Entry and exit assertions for partition reachability. They apply also to truncated searches: exhaustion preserves all frame facts.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Hex.GraphIso.Nauty.Generic.ReachPolicy.finish {n k : Nat} {σ γ : Type} [Policy σ n] {G : Colored n k} {ctx : γ} {inf tcLevel : Nat} {view : σ → Search n} (h : ReachPolicy G ctx inf tcLevel view) {fuel : Nat} {next : SweepFn σ n} (hnext : (reachContract G view).sweepValid fuel (n + 1) next) (first : Bool) (level numcells tc size : Nat) (cell : VSet n) (st : σ) (hlevel : 1 ≤ level) (hok : SearchOk G level numcells (view st)) (htarget : Target view level tc cell st) :
            have tv := cell.nextElem none; have r := next first level numcells tc (tv.getD 0) tv cell 0 st; SearchOut G level level (view st) (view (match r.fst with | Exit.done => pure (Exit.unwind (level - 1) false, Policy.afterSweep first level size r.snd.fst r.snd.snd) | x => pure (r.fst, r.snd.snd)).run.snd)

            Finishing a node's child sweep preserves its frame for every exit.

            theorem Hex.GraphIso.Nauty.Generic.ReachPolicy.node_step {n k : Nat} {σ γ : Type} [Policy σ n] {G : Colored n k} {ctx : γ} {inf tcLevel : Nat} {view : σ → Search n} (h : ReachPolicy G ctx inf tcLevel view) {fuel : Nat} {next : SweepFn σ n} (hnext : (reachContract G view).sweepValid fuel (n + 1) next) (first : Bool) (level numcells : Nat) (st : σ) (hlevel : 1 ≤ level) (hok : SearchOk G level numcells (view st)) :
            SearchOut G (level - 1) level (view st) (view (nodeStep ctx tcLevel next first level numcells st).snd)

            Local partition rules compose across refinement and one node's decisions, assuming the child sweep has its frame effect.

            theorem Hex.GraphIso.Nauty.Generic.ReachPolicy.advance {n k : Nat} {σ γ : Type} [Policy σ n] {G : Colored n k} {ctx : γ} {inf tcLevel : Nat} {view : σ → Search n} (h : ReachPolicy G ctx inf tcLevel view) {fuel cfuel : Nat} {next : SweepFn σ n} (hnext : (reachContract G view).sweepValid fuel cfuel next) (first : Bool) (level numcells tc tv1 tv index : Nat) (cell : VSet n) (base out : σ) (exit : Exit) (hlevel : 1 ≤ level) (hok : SearchOk G level numcells (view base)) (htarget : Target view level tc cell base) (hout : SearchOut G level level (view base) (view out)) :
            SearchOut G level level (view base) (view (Generic.advance inf next first level numcells tc tv1 tv cell index out exit).snd.snd)

            Consume a child's exit, prune the remaining target, and recover the parent before continuing the sweep.

            theorem Hex.GraphIso.Nauty.Generic.ReachPolicy.sweep_step {n k : Nat} {σ γ : Type} [Policy σ n] {G : Colored n k} {ctx : γ} {inf tcLevel : Nat} {view : σ → Search n} (h : ReachPolicy G ctx inf tcLevel view) {fuel cfuel : Nat} {descend : NodeFn σ} {next : SweepFn σ n} (hdescend : (reachContract G view).nodeValid fuel descend) (hnext : (reachContract G view).sweepValid fuel cfuel next) (first : Bool) (level numcells tc tv1 tv index : Nat) (cell : VSet n) (st : σ) (hlevel : 1 ≤ level) (hok : SearchOk G level numcells (view st)) (htarget : Target view level tc cell st) (htv : cell.mem tv = true) :
            SearchOut G level level (view st) (view (sweepStep inf descend next first level numcells tc tv1 tv cell index st).snd.snd)

            One sweep iteration preserves its parent frame when both recursive continuations preserve theirs.

            theorem Hex.GraphIso.Nauty.Generic.ReachPolicy.sound {n k : Nat} {σ γ : Type} [Policy σ n] {G : Colored n k} {ctx : γ} {inf tcLevel : Nat} {view : σ → Search n} (h : ReachPolicy G ctx inf tcLevel view) :
            SoundPolicy ctx inf tcLevel (reachContract G view)

            The local partition rules instantiate the generic recursion contract.

            theorem Hex.GraphIso.Nauty.Generic.node_reach {n k : Nat} {σ γ : Type} [Policy σ n] {G : Colored n k} {ctx : γ} {inf tcLevel : Nat} {view : σ → Search n} (h : ReachPolicy G ctx inf tcLevel view) (first : Bool) (fuel level numcells : Nat) (st : σ) (hlevel : 1 ≤ level) (hok : SearchOk G level numcells (view st)) :
            SearchOut G (level - 1) level (view st) (view (node first ctx inf tcLevel fuel level numcells st).snd)

            Every policy satisfying the local partition rules preserves node reachability.

            theorem Hex.GraphIso.Nauty.Generic.sweep_reach {n k : Nat} {σ γ : Type} [Policy σ n] {G : Colored n k} {ctx : γ} {inf tcLevel : Nat} {view : σ → Search n} (h : ReachPolicy G ctx inf tcLevel view) (first : Bool) (fuel cfuel level numcells tc tv1 index : Nat) (cursor : Option Nat) (cell : VSet n) (st : σ) (hlevel : 1 ≤ level) (hok : SearchOk G level numcells (view st)) (htarget : Target view level tc cell st) (hcursor : ∀ (v : Nat), cursor = some v → cell.mem v = true) :
            SearchOut G level level (view st) (view (sweep first ctx inf tcLevel fuel cfuel level numcells tc tv1 cursor cell index st).snd.snd)

            Every policy satisfying the local partition rules preserves sweep reachability.