Documentation

Complexity.Algorithms.WordRAM.ExactTriangle.Catalogue

Computing an ExactTriangle instance catalogue #

The fixed input format is (D,g,n,p) followed by the three signed weight matrices. The program computes residues and query classes, computes the splitting parameters from D,g,n, and concatenates the actual query-chunk descriptors. The caller supplies neither the parameters nor a class, prefix or descriptor table. Subsequent matrix preparation consumes this catalogue.

This is native composition of the existing Theorem 17 residue, parameter, class and chunk kernels. The modulus remains a supplied positive argument; prime selection belongs to the outer ExactTriangle host.

Main definitions #

Main results #

References #

The class/query layout follows the pinned Theorem 17 construction. The native composition and instruction bounds are original.

@[reducible, inline]

Computed maximum vertices per piece, preserved by descriptor enumeration.

Instances For
    @[reducible, inline]

    Computed number of pieces, preserved by descriptor enumeration.

    Instances For

      Existing parameter computation in the lower register bank.

      Instances For

        Internal argument delivery from the fixed D,g,n,p header.

        Instances For

          Internal argument delivery and allocation after the computed query blocks. Copying the count/query pointers precedes overwriting their old registers with the computed piece data.

          Instances For

            All class, parameter and chunk work is performed by actual native instructions.

            Instances For

              One finite instruction graph, independent of runtime sizes and physical width.

              A single explicit bound covering the fourth-power square-root input, all ceiling temporaries and the worst-case descriptor reservation. Signed payloads have a separate bound.

              Instances For

                Every setup, parameter, signed residue, class scan and descriptor instruction is charged; the final halt is added by the flat caller.

                Instances For
                  def Cslib.Algorithms.WordRAM.ExactTriangle.Catalogue.Output (n D g p : ℕ) (values : ℕ → ℤ) (initial y : WordRAM.Data 32) :

                  Exact computed parameters, residue/query arrays, concatenated descriptors and memory frame. This is the readback established by the actual native catalogue execution.

                  Instances For
                    theorem Cslib.Algorithms.WordRAM.ExactTriangle.Catalogue.exec_at {w : ℕ} (n D g p : ℕ) (values : ℕ → ℤ) (initial : WordRAM.Data 32) (hDHeader : initial.mem 1 = D) (hgHeader : initial.mem 2 = g) (hnHeader : initial.mem 3 = n) (hpHeader : initial.mem 4 = p) (hinput : ∀ q < 3 * (n * n), initial.mem (5 + q) = WordRAM.Signed.encode (values q)) (hD : 1 ≤ D) (hDn : D ≤ n) (hg : 1 ≤ g) (hp : 0 < p) (hmod : GenericRAM.Signed.Fits w ↑p) (hvalues : ∀ q < 3 * (n * n), GenericRAM.Signed.Fits w (values q)) (hbudget : WordRAM.Fits (w + 2) (budget n D g p)) :
                    ∃ (y : WordRAM.Data 32), WordRAM.ExecWithin (w + 2) program initial y (cost n D p) ∧ Output n D g p values initial y

                    Prepare the actual catalogue at the fixed header, computing both splitting parameters and every class/chunk. The result contains no supplied layout or execution certificates. The two input-dependent fit premises cover ordinary signed values and the explicit numeric budget.