Equations
- Hex.PermGroup.Search.Trials.empty = { size := 0, get := Fin.elim0 }
Instances For
Equations
- Hex.PermGroup.Search.Trials.singleton x = { size := 1, get := fun (x_1 : Fin 1) => x }
Instances For
Equations
- Hex.PermGroup.Search.Trials.range n = { size := n, get := id }
Instances For
Row-major candidate order, without constructing a list of pairs.
Equations
Instances For
inductive
Hex.PermGroup.Search.Trials.Result
{α : Type}
(t : Trials α)
(test : α → Bool)
(start : Nat)
:
A scan either finds the first successful test, checks every remaining test, or stops with no completeness claim.
- found {α : Type} {t : Trials α} {test : α → Bool} {start : Nat} (i : Fin t.size) (after : start ≤ ↑i) (valid : test (t.get i) = true) (earlier : ∀ (j : Fin t.size), start ≤ ↑j → ↑j < ↑i → test (t.get j) = false) : t.Result test start
- clear {α : Type} {t : Trials α} {test : α → Bool} {start : Nat} (checked : ∀ (i : Fin t.size), start ≤ ↑i → test (t.get i) = false) : t.Result test start
- incomplete {α : Type} {t : Trials α} {test : α → Bool} {start : Nat} : t.Result test start
Instances For
structure
Hex.PermGroup.Search.Trials.Run
{α : Type}
(t : Trials α)
(test : α → Bool)
(start capacity : Nat)
:
used counts calls of the refinement test. An incomplete scan has spent
its entire allowance and still has an unvisited candidate.
- result : t.Result test start
- used : Nat
- depleted : self.result = Result.incomplete → self.used = capacity
Instances For
def
Hex.PermGroup.Search.Trials.scan
{α : Type}
(t : Trials α)
(test : α → Bool)
(start capacity : Nat)
:
t.Run test start capacity
Stop before the next test if the allowance is exhausted. Reaching the end of an empty candidate suffix needs no allowance and proves completeness.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Unbounded refinement discovery uses precisely the same scan as its budgeted counterpart, with enough allowance for every candidate.
Equations
- One or more equations did not get rendered due to their size.