structure
Hex.GraphIso.Nauty.Sparse.Replay.Valid
{n : Nat}
(G : SparseGraph n)
(B : Key n)
(leaves : List (SpecLeaf n))
(attained : Bool)
:
A successful replay bounds every leaf and records whether the claimed key is attained. The label witness comes from an executed tree leaf.
- bound (l : SpecLeaf n) : l ∈ leaves → (SpecLeaf.key G l).Le B
Instances For
Combine all child checks, propagating rejection and recording attainment. The explicit recursion also reduces after importing the checker.
Equations
- Hex.GraphIso.Nauty.Sparse.Replay.all check [] = some false
- Hex.GraphIso.Nauty.Sparse.Replay.all check (x_1 :: xs) = do let a ← check x_1 let b ← Hex.GraphIso.Nauty.Sparse.Replay.all check xs pure (a || b)
Instances For
theorem
Hex.GraphIso.Nauty.Sparse.Replay.all_valid
{n : Nat}
{α : Type u_1}
{G : SparseGraph n}
{B : Key n}
{check : α → Option Bool}
{leaves : α → List (SpecLeaf n)}
{xs : List α}
{a : Bool}
(hcheck : ∀ (x : α), x ∈ xs → ∀ (b : Bool), check x = some b → Valid G B (leaves x) b)
(h : all check xs = some a)
:
Valid G B (List.flatMap leaves xs) a
def
Hex.GraphIso.Nauty.Sparse.Replay.leaf
{n : Nat}
(G : SparseGraph n)
(B : Key n)
(l : SpecLeaf n)
:
Check one actual leaf against a claimed upper bound.
Equations
- Hex.GraphIso.Nauty.Sparse.Replay.leaf G B l = match (Hex.GraphIso.Nauty.Sparse.SpecLeaf.key G l).cmp B with | Ordering.gt => none | Ordering.eq => some true | Ordering.lt => some false