The leaves and generators a state holds #
Bookkeeping for the optimality proof, one layer above Jump.lean.
commonPrefix_comm— the backjump depth does not depend on which of the two leaves is "current".ancReach— the leaves below the depth-jancestor of a path, phrased throughnodePathso that it only depends onpath.toList.take j.Node.ancestor_targetCellsays an interior node of a path is never a leaf, which is what rules out one leaf's path being a prefix of another's.Chld/SubR/reach_iff_subR— a node's leaves are exactly the leaves of its children, andmem_extract_cell'identifies the children with the entries of the child list.invAuto— the inverse of a permutation array, needed because orbit pruning has to move leaves back along a generator.LeafNode/StGood/dfsNode_good— every leaf a state records is a genuine leaf of the tree, and every generator it records is a genuine automorphism.
commonPrefix is symmetric #
Ancestors as a function of the path #
def
IsoGraph.Canon.ancReach
(n : ℕ)
(f : ℕ → ℕ → Bool)
(path : Array ℕ)
(j : ℕ)
(k : List (List UInt64))
:
The leaves below the depth-j ancestor of path.
Equations
- IsoGraph.Canon.ancReach n f path j k = IsoGraph.Canon.Reach n f (IsoGraph.Canon.nodePath n f (List.take j path.toList)).1 (IsoGraph.Canon.nodePath n f (List.take j path.toList)).2 k
Instances For
Children #
Which automorphisms a leaf update can add #
theorem
IsoGraph.Canon.leafUpdate_autos
{P : Array ℕ → Prop}
{G : Graph}
{path : Array ℕ}
{invPath : Array UInt64}
{lab : Array ℕ}
{st : St}
(hst : ∀ g ∈ st.autos, P g)
(hl :
∀ (l : Leaf),
st.first = some l ∨ st.best = some l → lexCmpU64 (certOf G lab) l.cert = Ordering.eq → P (autoOf G.n lab l.lab))
(g : Array ℕ)
:
g ∈ (leafUpdate G path invPath lab st).autos → P 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
- IsoGraph.Canon.invAuto n g = IsoGraph.Canon.autoOf n g (Array.range n)
Instances For
The leaves the search records are genuine tree leaves #
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.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)