Documentation

LeanPool.IsoGraph.Canon.Leaves

The leaves and generators a state holds #

Bookkeeping for the optimality proof, one layer above Jump.lean.

commonPrefix is symmetric #

theorem IsoGraph.Canon.commonPrefixFrom_comm (a b : Array ) (m fuel i : ) :
commonPrefixFrom a b m fuel i = commonPrefixFrom b a m fuel i

Ancestors as a function of the path #

theorem IsoGraph.Canon.nodePath_take_succ (n : ) (f : Bool) (path : Array ) {j : } (hj : j < path.size) :
nodePath n f (List.take (j + 1) path.toList) = (childInv (Graph.ofOracle n f) (nodePath n f (List.take j path.toList)).1 (nodePath n f (List.take j path.toList)).2 path[j]!, (child (Graph.ofOracle n f) (nodePath n f (List.take j path.toList)).2 path[j]!).1)
def IsoGraph.Canon.ancReach (n : ) (f : Bool) (path : Array ) (j : ) (k : List (List UInt64)) :

The leaves below the depth-j ancestor of path.

Equations
Instances For
    theorem IsoGraph.Canon.ancReach_congr {n : } {f : Bool} {a b : Array } {j : } (h : List.take j a.toList = List.take j b.toList) (k : List (List UInt64)) :
    ancReach n f a j k ancReach n f b j k
    theorem IsoGraph.Canon.Node.ancestor_targetCell {n : } {f : Bool} {path : Array } {invPath : Array UInt64} {p : Part} (h : Node n f path invPath p) (j : ) :
    j < path.size(nodePath n f (List.take j path.toList)).2.targetCell n none

    Interior nodes of a path are not leaves.

    Children #

    def IsoGraph.Canon.Chld (n : ) (p : Part) (w : ) :

    w is a child of the node p: a vertex of its target cell.

    Equations
    Instances For
      def IsoGraph.Canon.SubR (n : ) (f : Bool) (invPath : Array UInt64) (p : Part) (w : ) (k : List (List UInt64)) :

      The leaves below the child w.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem IsoGraph.Canon.reach_iff_subR {n : } {f : Bool} {invPath : Array UInt64} {p : Part} {c : } (htc : p.targetCell n = some c) (k : List (List UInt64)) :
        Reach n f invPath p k ∃ (w : ), Chld n p w SubR n f invPath p w k
        theorem IsoGraph.Canon.mem_extract_cell' {n : } {p : Part} (hp : Part.WF n p) {c v : } (hc : c < n) (hcst : p.cst[c]! = c) (hv : v < n) (hcell : p.cst[p.pos[v]!]! = c) :

        Membership in the child list is exactly Chld.

        Which automorphisms a leaf update can add #

        theorem IsoGraph.Canon.addAuto_mem {st : St} {g x : Array } (h : x (st.addAuto g).autos) :
        x st.autos x = g
        theorem IsoGraph.Canon.addAuto_P {P : Array Prop} {st : St} {a : Array } (hst : gst.autos, P g) (ha : P a) (g : Array ) :
        g (st.addAuto a).autosP g
        theorem IsoGraph.Canon.leafUpdate_autos {P : Array Prop} {G : Graph} {path : Array } {invPath : Array UInt64} {lab : Array } {st : St} (hst : gst.autos, P g) (hl : ∀ (l : Leaf), st.first = some l st.best = some llexCmpU64 (certOf G lab) l.cert = Ordering.eqP (autoOf G.n lab l.lab)) (g : Array ) :
        g (leafUpdate G path invPath lab st).autosP g

        Every automorphism a leaf update adds is autoOf against one of the recorded leaves.

        Inverse automorphisms #

        The inverse of a permutation array, built with the same machinery as autoOf.

        Equations
        Instances For
          theorem IsoGraph.Canon.invAuto_get {n : } {g : Array } (hg : PermArr n g) {i : } (hi : i < n) :
          (invAuto n g)[g[i]!]! = i
          theorem IsoGraph.Canon.invAuto_isAuto {n : } {f : Bool} {g : Array } (hg : IsAutoArr n f g) :
          IsAutoArr n f (invAuto n g)

          The leaves the search records are genuine tree leaves #

          def IsoGraph.Canon.LeafNode (n : ) (f : Bool) (l : Leaf) :

          l really is a leaf of the search tree: its path individualises down to a discrete partition, and its labelling and certificate are that partition's.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem IsoGraph.Canon.LeafNode.permArr {n : } {f : Bool} {l : Leaf} (h : LeafNode n f l) :
            theorem IsoGraph.Canon.LeafNode.cert_eq {n : } {f : Bool} {l : Leaf} (h : LeafNode n f l) :
            def IsoGraph.Canon.StGood (n : ) (f : Bool) (st : St) :

            Everything a state remembers is genuine: both recorded leaves, and every generator.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem IsoGraph.Canon.unwind_autos (path : Array ) (st : St) :
              (unwind path st).autos = st.autos
              theorem IsoGraph.Canon.StGood.unwind {n : } {f : Bool} {st : St} (h : StGood n f st) (path : Array ) :
              StGood n f (Canon.unwind path st)
              theorem IsoGraph.Canon.pruneNode_good {n : } {f : Bool} {invPath : Array UInt64} {st st' : St} (h : pruneNode invPath st = some st') (hst : StGood n f st) :
              StGood n f st'
              theorem IsoGraph.Canon.leafUpdate_good {n : } {f : Bool} {path : Array } {invPath : Array UInt64} {lab : Array } {st : St} (hl : LeafNode n f { path := path, invPath := invPath, cert := certOf (Graph.ofOracle n f) lab, lab := lab }) (hst : StGood n f st) :
              StGood n f (leafUpdate (Graph.ofOracle n f) path invPath lab st)
              theorem IsoGraph.Canon.dfsNode_good (n : ) (f : Bool) (fuel : ) (path : Array ) (invPath : Array UInt64) (p : Part) (st : St) :
              Node n f path invPath pStGood n f stStGood n f (dfsNode (Graph.ofOracle n f) fuel path invPath p st)

              Everything the search records is genuine.