Documentation

CslibFrontier.Algorithms.WordRAM.Yates

Yates's fast zeta and Möbius transforms on the word RAM #

Checked standard-basis word-RAM (Cslib.WordRAM.Basis.standard) implementations of Yates's algorithm (CslibFrontier.Algorithms.Lean.Yates) running in O((n + 1) · 2 ^ n) instructions:

All three transforms instantiate one parameterized Memory.Prog in-place butterfly (butterflyProg) realized via realize and lifted to Basis.standard. Each coordinate pass 0 ≤ i < n visits the 2 ^ (n - 1) aligned pairs (loIdx (2 ^ i) p, hiIdx (2 ^ i) p) without bitwise instructions, updating the input buffer starting at address 2 in place, writing the output length 2 ^ n to address 1, and returning 1. The in-place word-RAM butterfly realization, memory layout, and word-size envelopes are original to this formalization over [BHK09] and [Wil14].

Word-size conditions #

Main definitions #

Main results #

References #

Problem instances #

A table of 2 ^ n natural numbers for the unsigned fast zeta transform.

  • n : ℕ

    Number of coordinates n.

  • entries : Vector ℕ (2 ^ self.n)

    Table entries indexed by k < 2 ^ n (maskSet n k).

Flat Word-RAM input [n] ++ entries.toList.

Sum of all table entries, bounding every intermediate and final zeta entry.

Word-size envelope covering indices, addresses, and all intermediate zeta sums.

@[reducible, inline]

Width admissibility predicate for NatInstance.

Every table entry is bounded by I.totalSum.

Every width satisfying I.FitsWidth w admits the flat input I.encode.

A table of 2 ^ n signed integers for the signed fast zeta and Möbius transforms.

  • n : ℕ

    Number of coordinates n.

  • entries : Vector ℤ (2 ^ self.n)

    Integer table entries indexed by k < 2 ^ n (maskSet n k).

Flat Word-RAM input [n] ++ entries.toList.map Signed.encode.

Sum of absolute values of all entries, bounding every intermediate zeta or Möbius entry.

Word-size envelope covering Signed.encode words, intermediate signed operations, indices, and addresses.

@[reducible, inline]

Width admissibility predicate for IntInstance.

Every entry's magnitude is bounded by I.sumAbs.

Every width satisfying I.FitsWidth w admits the flat input I.encode.

Butterfly index arithmetic #

Memory.Prog butterfly client and Realizes certificates #

Semantic invariant and cost bound for butterflyProg #

Pure Yates intermediate-value bounds #

Lifting to deterministic standard-basis Program .standard #

Public running-time theorems #

Unsigned fast zeta transform on the word RAM (O((n + 1) · 2 ^ n)). There is a uniform width-blind deterministic standard-basis program (Program .standard r, ¬prog.ReadsWidth, prog.IsRandFree) that computes (Yates.zeta I.entries).toList on input I.encode within C * ((I.n + 1) * 2 ^ I.n) instructions (Program.ComputesListInTime) at every word width w satisfying I.FitsWidth w.

Signed fast zeta transform on the word RAM (O((n + 1) · 2 ^ n)). There is a uniform width-blind deterministic standard-basis program (Program .standard r, ¬prog.ReadsWidth, prog.IsRandFree) that computes (Yates.zeta I.entries).toList.map Signed.encode on input I.encode within C * ((I.n + 1) * 2 ^ I.n) instructions (Program.ComputesListInTime) at every word width w satisfying I.FitsWidth w.

Signed fast Möbius transform on the word RAM (O((n + 1) · 2 ^ n)). There is a uniform width-blind deterministic standard-basis program (Program .standard r, ¬prog.ReadsWidth, prog.IsRandFree) that computes (Yates.mobius I.entries).toList.map Signed.encode on input I.encode within C * ((I.n + 1) * 2 ^ I.n) instructions (Program.ComputesListInTime) at every word width w satisfying I.FitsWidth w.