Co-location: the one device the Bit Sum Lemma is built out of #
Every packing of the Bit Sum Lemma has to answer the same question – given the item, where is its field? – and the answer is never “compute the product of the item's number with the field width”, which is exactly what a logic without multiplication cannot do. It is always:
Guess the boundaries, and put each item's field at the item. A set of positions is one element; “the next boundary is
gfurther on” isPLUSon indices, which the index naming makes free; and if the walk over items is the walk over boundaries, no index is ever computed from an item.
This file is that device, once, for the whole construction: the boundary set
(DescriptiveComplexity.BitSum.IsBlockSet) and the reader that takes a field
out of an element (DescriptiveComplexity.BitSum.WindowAt). LogTime/Pow.lean
is the same pattern with a doubling gap, written before it was worth factoring
out; here the gap is constant, and that makes “consecutive boundaries” a plain
addition instead of a “nothing in between” quantifier.
The two notions #
DescriptiveComplexity.BitSum.WindowAt b e x m:mis the number written in the bits ofxfrom the indexb(included) to the indexe(excluded). It isDescriptiveComplexity.FieldAtread in the index naming – a bit-level statement rather than a division with remainder – and its semantics isDescriptiveComplexity.BitSum.windowAt_iff. Every layout in the construction is stated with it, and no bit is touched again.DescriptiveComplexity.BitSum.IsBlockSet g B: the bits ofBare exactly the multiples ofgthat are not the top position. Three local conditions pin it (DescriptiveComplexity.BitSum.bitIx_iff_of_isBlockSet), and the downward one – every non-zero boundary has a boundarygbelow it – is what rules out a set that starts somewhere other than0.
What is not here, and why #
There is no “consecutive boundaries” relation: with a constant gap, b and b'
are consecutive exactly when orank b + orank g = orank b', and that is an atom.
The counter field – a second element carrying, in the field the same
boundaries delimit, the number of the boundary – is the other half of the device
and comes with the level it is first needed at.
Windows, in ℕ #
What a window reads: the bits of x / 2 ^ a % 2 ^ w are those of x
from a up, and nothing from w on.
Dependency graph
Windows of an element #
The window of x between the indices b and e, read as the number
m: the bits of m are those of x shifted down by b, and m has none at
or above the width. Stated bit by bit, so that it is an atom-for-atom formula of
the bit logic (DescriptiveComplexity.BitSum.bitDef_windowAt).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
What a window is worth: at a window of width w, the number read is the
w bits of x above the index b.
Dependency graph
A window is always there to be read: what it reads is at most x, hence
a rank of the universe.
Dependency graph
The boundaries of a packing #
A set of boundaries at a constant gap g: the least position is one,
every boundary is below the top position, a boundary g further on is one, and
every boundary other than the least has one g below it. The last condition is
what pins the set down – without it it could start anywhere.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
What the conditions pin: the boundaries are exactly the multiples of the gap below the top position.
Dependency graph
A boundary set exists: the multiples of the gap below the top position
are a bit vector supported below that position, hence a rank
(DescriptiveComplexity.exists_orank_testBit').
Dependency graph
Definability #
A window is first-order in the bit logic: two quantified indices, an addition, a comparison and two bit reads.
Dependency graph
A boundary set is first-order in the bit logic.