Jump to content

Polyhedral Index Partition

From Metopedia


This article is about Andrew Lehti's coordinate-indexing method. It is related to, but separate from, the Canonical Order of Operations.

Polyhedral Index Partition
Abbreviation PIP
Author Andrew Lehti
Type Deterministic coordinate-to-integer bijection
Primary structure Simplicial polytopic numbers
Purpose Encode finite coordinate tuples into scalar integers without collision
DOI 10.6084/m9.figshare.27642783

Polyhedral Index Partition (PIP) is a deterministic bijection developed by Andrew Lehti for converting a finite coordinate tuple into a single scalar integer and reconstructing the tuple from that integer without loss. The method is described in Lehti's mathematical works as a computation-based mapping built from simplicial polytopic numbers.

PIP is not a hash, because it is not probabilistic and is not designed to approximate. It is presented as an exact mapping: each supported coordinate tuple corresponds to one scalar index, and each scalar index can be decoded back into the original tuple when the dimension is known.

Concept

The method encodes a coordinate tuple by forming cumulative suffix sums and evaluating simplex counts across dimensions. The scalar index is produced by summing those simplex counts.

If the coordinate tuple is:

(x1,x2,,xd)

the suffix sums may be written as:

si=j=idxj

The simplicial count used by the method can be written:

Pd(m)=(m+d1d)

where m is the shell magnitude and d is the dimension.

Encoding

The index is formed by summing simplex counts over the suffix sums:

K=i=1dPdi+1(si)

This construction assigns larger cumulative structures to higher dimensions and smaller cumulative structures to lower dimensions.

Decoding

Decoding reverses the process through shell extraction. Given an index K and dimension d, the algorithm repeatedly finds the largest shell value that does not exceed the remaining index, subtracts the corresponding simplex count, and then recovers the original coordinates by differencing adjacent shells.

The manuscript describes the inverse process as peeling nested simplex layers back from the highest dimension to the lowest.

Significance

PIP is presented as significant for:

  • generalized Cantor-style pairing beyond two dimensions;
  • collision-free indexing of finite coordinate tuples;
  • scalar representation of discrete coordinate systems;
  • structural compression of coordinate records;
  • reconstruction without metadata tables when the dimension is known.

Implementation

The manuscript includes Python implementation material using functions such as:

  • polyHedralIndex;
  • getInverse;
  • partition;
  • approximate;
  • zigzagEncode;
  • zigzagDecode.

The optimized implementation is described as substantially faster than prior versions while preserving exact output and ordering.

Relationship to Canonical Order of Operations

PIP appears in the Canonical Order manuscript as authorial mathematical context. It is not part of the Canonical Order of Operations itself. The two works share an emphasis on deterministic structure, exact reconstruction, and explicit rule systems, but they address different mathematical problems.

See also