Native access to packed bit-sum trees #
Eight first-order variables represent eight fixed-width bit strings. Their access formula uses a fixed disjunction and fixed chains of PLUS formulas, never a variable multiplication relation. The tree address uses the proved exact shift formula. Node decoding constrains all bits above the node's level to zero.
Main definitions #
Cslib.Logic.FO.Ordered.BitSum.treeAddress: native bit-plane addressing.Cslib.Logic.FO.Ordered.BitSum.packedBit: native access to eight packed words.Cslib.Logic.FO.Ordered.BitSum.nodeValue: decoding a node's entire value.
Main results #
Cslib.Logic.FO.Ordered.BitSum.realize_treeAddress: exact natural-number addresses.Cslib.Logic.FO.Ordered.BitSum.realize_packedBit: exact fixed-width word access.Cslib.Logic.FO.Ordered.BitSum.realize_nodeValue: exact decoding, including high zero bits.Cslib.Logic.FO.Ordered.BitSum.encodesNode_sumTree: constructed witnesses encode every node.
References #
- N. Immerman, Descriptive Complexity, Lemma 1.18, historically due to Barrington, Immerman and Straubing. This module uses the balanced-tree packing variant.
A bit-plane address, using only PLUS, a literal three, and an exact binary shift.
Instances For
Read an address in eight fixed-width words. The eight scales are syntactic literals.
Instances For
Decode the whole node value, explicitly zeroing all bits above its level.
Instances For
A packed node has at most one value, including all its high bits.
The actual packed tree decodes to the actual sum at every valid node.
treeAddress L m j b q a holds exactly when j ≤ m and a is the address
BitString.sumTreeAddress m j b q.
packedBit L h w a holds exactly when position a falls in one of the eight words w, of
width h, at a set bit.
When j ≤ m and eight words of width h fit in the universe, nodeValue L m h w j q z
holds exactly when the words encode the value z at node j (EncodesNode).