Documentation

HexPermGroup.Search.Trials

A finite sequence of refinement reasons, constructed by index. Even a quadratic family can be searched under a small budget without allocating it.

Instances For
    Equations
    Instances For
      Equations
      Instances For
        def Hex.PermGroup.Search.Trials.map {α β : Type} (f : α → β) (t : Trials α) :
        Equations
        Instances For
          Equations
          Instances For
            def Hex.PermGroup.Search.Trials.product {α β : Type} (s : Trials α) (t : Trials β) :
            Trials (α × β)

            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.

              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.

                Instances For
                  def Hex.PermGroup.Search.Trials.advance {α : Type} {t : Trials α} {test : α → Bool} {start capacity : Nat} (hs : start < t.size) (h : test (t.get ⟨start, hs⟩) = false) (r : t.Run test (start + 1) capacity) :
                  t.Run test start (capacity + 1)
                  Equations
                  • One or more equations did not get rendered due to their size.
                  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
                      def Hex.PermGroup.Search.Trials.find {α : Type} (t : Trials α) (test : α → Bool) :

                      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.
                      Instances For
                        theorem Hex.PermGroup.Search.Trials.find_checked {α : Type} (t : Trials α) (test : α → Bool) (x : α) (h : t.find test = some x) :
                        test x = true
                        theorem Hex.PermGroup.Search.Trials.find_none {α : Type} (t : Trials α) (test : α → Bool) :
                        t.find test = none ↔ ∀ (i : Fin t.size), test (t.get i) = false