Native Turing-machine certificates for sparse memory #
The association list is encoded as a list of encoded address/value pairs. Equality, first-match
search and filtering are implemented by the existing native multitape-machine calculus. No
memory operation is an oracle. Bounds depend on encoded address lengths, rather than allocating
space up to the numeric address. The cost functions are asymptotic bound expressions for
ComputableTidilyInO, not exact native step counts: one finite machine and a constant factor
work for all inputs, for each fixed choice of address and value encodings.
Main definitions #
SparseMemory.encoding: the binary encoding of a finite sparse store.SparseMemory.scanTime,SparseMemory.scanSpace: parameterized scan bounds.
Main results #
SparseMemory.read_inO,insert_inO: native TM read/write implementations with parameterized time and space, including argument extraction and a uniform read default.SparseMemory.length_encoding_le: stored-cell and word-length bound on the encoding.SparseMemory.read_inO_cube,insert_inO_cube: cubic time and linear workspace in full encoded input length; these conservative bounds are not optimality claims.SparseMemory.read_polytime,insert_polytime: registered polynomial-time corollaries.
References #
Uses Mathlib's association lists and Christian Reitwiessner's encoded native multitape-machine
calculus (ComputableTidilyInO.eq, findWith, and filterWith).
Maximum encoded address length among stored cells, zero for the empty store.
Instances For
Maximum encoded value length among stored cells, zero for the empty store.
Instances For
The encoded store depends on the number and encoded sizes of stored cells.
A bound using entry count, encoded input length, and maximum key/value lengths.
Scan workspace is linear in the retained encoding and the largest encoded words.
Every stored address is bounded by the total encoded store.
Every stored value is bounded by the total encoded store.
In particular, the scan's parameterized time bound is cubic in its encoded input length.
The scan's workspace bound is linear in its encoded input length.
A native multitape machine searches the finite store, with parameterized time and space.
Filtering implements erasure using the same parameterized scan bounds.
Native TM implementation of insertion/replacement, including all argument preparation.
Native TM implementation of total memory reads, uniform also in the default value.
A cubic-time, linear-space specialization of the parameterized write certificate.
A cubic-time, linear-space specialization of the parameterized read certificate.
Polynomial-time writes are a corollary of the native parameterized certificate.
Polynomial-time reads are uniform in the queried address, store, and default value.
Writing preserves maximum key length up to the newly supplied address.
Writing preserves maximum value length up to the newly supplied value.