OAI/Combinatorics/LowSpaceSubsetSum/Streams/WeightEncoding.lean
27 declarations, 0 contain sorry, 0 declared as axioms
Exact fixed-width keys for weights and top masks
Weights use a sign bit followed by 2u magnitude bits. Representation keys
append the entire indexed mask, using one bit per input index. Every key has
the same width, even on an outcome where its numerical value is not used.
The input magnitude bounds guarantee injectivity for all actual weights.
- def
OAI.LowSpaceSubsetSum.WeightEncoding.natBitsline 19 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.natBits_lengthline 22 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.natBits_injectiveline 25 - def
OAI.LowSpaceSubsetSum.WeightEncoding.signedBitsline 38 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.signedBits_lengthline 41 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.signedBits_injectiveline 44 - def
OAI.LowSpaceSubsetSum.WeightEncoding.maskBitsline 62 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.maskBits_lengthline 65 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.maskBits_injectiveline 68 - def
OAI.LowSpaceSubsetSum.WeightEncoding.weightWidthline 76 - def
OAI.LowSpaceSubsetSum.WeightEncoding.entryWidthline 77 - def
OAI.LowSpaceSubsetSum.WeightEncoding.weightKeyline 79 - def
OAI.LowSpaceSubsetSum.WeightEncoding.entryKeyline 82 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.weightKey_lengthline 85 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.entryKey_lengthline 88 - def
OAI.LowSpaceSubsetSum.WeightEncoding.BoundedWeightline 91 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.boundedWeight_bitsline 94 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.weightKey_injectiveline 99 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.weightKey_eq_iffline 104 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.entryKey_injectiveline 109 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.signed_weight_boundedline 120 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.signed_target_boundedline 124 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.raw_signed_weight_boundedline 128 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.widths_leline 134Source documentation
The exact number of encoded bits is linear in the original input scale.
theorem widths_le {n : ℕ} (I : Instance n) : weightWidth I ≤ 2 * inputScale I + 1 ∧ entryWidth I ≤ 3 * inputScale I + 1 := by …Mentions: OAI.LowSpaceSubsetSum.Instance, OAI.LowSpaceSubsetSum.WeightEncoding.weightWidth, OAI.LowSpaceSubsetSum.inputScale, OAI.LowSpaceSubsetSum.WeightEncoding.entryWidth
- theorem
OAI.LowSpaceSubsetSum.WeightEncoding.weight_lookup_stepsline 139 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.entry_lookup_stepsline 144 - theorem
OAI.LowSpaceSubsetSum.WeightEncoding.entry_insert_nodesline 152