Documentation

Noperthedron.SolutionTable.Basic

structure Noperthedron.Solution.Row.ValidSplitParam (tab : Table) (row : Row) (param : Param) :
Instances For
    theorem Noperthedron.Solution.Row.validSplitParam_iff (tab : Table) (row : Row) (param : Param) :
    ValidSplitParam tab row param row.ID < row.IDfirstChild ∃ (children_in_table : row.IDfirstChild + row.nrChildren Array.size tab) (nonzero_children : row.nrChildren 0), ∀ (n : Fin row.nrChildren), tab[row.IDfirstChild + n].interval = Interval.nth_part param row.interval row.nrChildren n
    @[implicit_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      Instances For
        @[implicit_reducible]
        instance Noperthedron.Solution.Table.instDecidableHasIntervals (tab : Table) (start : ) (intervals : List Interval) :
        Decidable (tab.HasIntervals start intervals)
        Equations
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          inductive Noperthedron.Solution.Row.Valid (tab : Table) (row : Row) :
          Instances For
            Equations
            Instances For
              Equations
              Instances For
                theorem Noperthedron.Solution.Table.RowsValid.valid_at {tab : Table} (htab : tab.RowsValid) {i : } (hi : i < Array.size tab) :
                Row.ValidIx tab i tab[i]

                Parallel validity checking #

                Table.rowsValidParB splits the index range into chunks and checks them concurrently via Task.spawn. Since Task.spawn fn is definitionally ⟨fn ()⟩, the parallelism is invisible to the logic, and correctness is proved exactly as for the sequential checker. This matters for Noperthedron.exists_solution_table, where native_decide runs this check over a table with ~18.7 million rows.

                Check all rows of the table for validity, splitting the work into nTasks chunks of size chunkSize that run concurrently via Task.spawn. The leading decide guard ensures that the chunks cover the whole table, so that Table.rowsValid_of_rowsValidChunkedB holds for arbitrary (even nonsensical) values of nTasks and chunkSize.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem Noperthedron.Solution.Table.rowsValid_of_rowsValidChunkedB {tab : Table} {nTasks chunkSize : } (h : tab.rowsValidChunkedB nTasks chunkSize = true) :

                  Parallel analogue of Table.rowsValidB, splitting the table into nTasks chunks of (near-)equal size.

                  Equations
                  Instances For
                    theorem Noperthedron.Solution.Table.rowsValidParB_eq_true_iff {tab : Table} {nTasks : } (hn : 0 < nTasks) :

                    The parallel checker is complete: for a positive number of tasks it agrees with Table.RowsValid. (Soundness, which is the direction the final proof needs, holds for any nTasks; see Table.rowsValid_of_rowsValidParB.)

                    The minimum endpoint of an Interval, viewed as a Pose via Rat.cast.

                    Equations
                    Instances For

                      The maximum endpoint of an Interval, viewed as a Pose via Rat.cast.

                      Equations
                      Instances For

                        Each component of iv.toReal.center (real) is the Rat.cast of the corresponding iv.center (rational).

                        @[implicit_reducible]

                        The set of poses lying in the rational interval, defined as Set.Icc of the min/max endpoints; agrees definitionally with iv.toReal.

                        Equations
                        Instances For
                          theorem Noperthedron.Solution.cube_fold_nonempty_aux {α β : Type} {fs : List (αββ)} (hfs : fs []) (b : β) (as : List α) :
                          0 < (cubeFold fs b as).length
                          theorem Noperthedron.Solution.cube_fold_nonempty {α β : Type} {fs : List (αββ)} (hfs : fs []) (b : β) (as : List α) :
                          1 (cubeFold fs b as).length
                          theorem Noperthedron.Solution.cube_fold_halves (h : Param) (tl : List Param) (iv : Interval) (lower upper : ParamIntervalInterval) :
                          cubeFold [lower, upper] iv (h :: tl) = cubeFold [lower, upper] (lower h iv) tl ++ cubeFold [lower, upper] (upper h iv) tl
                          theorem Noperthedron.Solution.has_intervals_start_in_table (tab : Table) (n : ) (ivs : List Interval) (hivs : 1 ivs.length) (hi : tab.HasIntervals n ivs) :
                          theorem Noperthedron.Solution.has_intervals_concat (tab : Table) (start : ) (ivs1 ivs2 : List Interval) :
                          tab.HasIntervals start (ivs1 ++ ivs2) tab.HasIntervals start ivs1 tab.HasIntervals (start + ivs1.length) ivs2