Chunks of matrix index pairs #
Main definitions #
pairIndex,rankIn: row-major index and rank in a finite set.chunk,numChunks: consecutive chunks and their number.
Main results #
card_chunk_le: each chunk has at most the capacity many pairs.biUnion_chunk: all chunks cover the input finite set.
References #
Adapted from Chunks.lean and the minimal definitions in
PaperStatements.lean at anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5.
There are no graph or weight assumptions.
Ranks #
The position in row-major order determines the pair.
In the full matrix, row-major rank is the row-major index itself. This avoids enumerating all preceding pairs when applying the chunk API to a full matrix.