Scalar-block and direction-run capacity of native weighted threshold programs #
A native program gives a block decomposition by revealing its gate values in topological order. The history is its existing gate evaluation, masked to the gates already processed. Each gate with a nonzero effective coefficient on an original input has capacity cost four. Every other gate has cost one, even when its output changes with earlier gate values. Repeated argument wires are counted through their aggregated coefficients, so cancelling input weights do not create an input-reading block.
More generally, when the gates are partitioned into B consecutive runs along single input
directions (DirectionRuns), for each fixed valuation of the gates in preceding runs, run i
with rᵢ input-reading gates has at most 2 ^ rᵢ pieces as a function of its shared directional
projection (piecesAtMost_evalFrom), forming a one-dimensional block with at most 2 ^ rᵢ - 1
changes and cost at most 4 · 2 ^ rᵢ. This yields 2 ^ n < 16 * K ^ 2 * 2 ^ |inputGates| (C2)
and the B-run bound 2 ^ n < 4 * K ^ 2 * 4 ^ B * 2 ^ |inputGates| (C3), alongside the
multilevel threshold transition bound 2 ^ n < 4 * K ^ 2 * max 1 (4 * T) (C2′).
The resulting capacity bounds apply to any fixed Boolean readout of the gate values. The single-output circuit corollaries require that the output wire selects a gate: an original-input wire is not part of this readout.
Main definitions #
Cslib.Circuits.Boolean.WeightedThreshold.blockDecomposition: a native program as scalar blocks.Cslib.Circuits.Boolean.WeightedThreshold.evalFrom: gate evaluation with fixed overrides and parametric input contributions.Cslib.Circuits.Boolean.WeightedThreshold.DirectionRuns: a partition of the gates into consecutive runs along single input directions, withDirectionRuns.toBlockDecomposition.Cslib.Circuits.Boolean.WeightedThreshold.multilevelDecomposition: a multilevel threshold representationF (∑ i, w i * (x i).toNat)as a single scalar block.
Main results #
Cslib.Circuits.Boolean.WeightedThreshold.cost_blockDecomposition: exact cost4 ^ |inputGates|.Cslib.Circuits.Boolean.WeightedThreshold.two_pow_lt_mul_four_pow_inputGates,Cslib.Circuits.Boolean.WeightedThreshold.lt_two_mul_add_two_mul_inputGates: the C1 bounds.Cslib.Circuits.Boolean.WeightedThreshold.piecesAtMost_evalFrom,Cslib.Circuits.Boolean.WeightedThreshold.changesAtMost_evalFrom: Lemma 2 (at most2 ^ rpieces and2 ^ r - 1changes for a directional run ofractive gates with fixed prior gates).Cslib.Circuits.Boolean.WeightedThreshold.two_pow_lt_of_direction,Cslib.Circuits.Boolean.WeightedThreshold.lt_of_direction: the C2 single-direction bounds.Cslib.Circuits.Boolean.WeightedThreshold.two_pow_lt_of_runs,Cslib.Circuits.Boolean.WeightedThreshold.lt_of_runs: the C3 direction-run bounds.Cslib.Circuits.Boolean.WeightedThreshold.two_pow_lt_of_multilevel,Cslib.Circuits.Boolean.WeightedThreshold.two_pow_sub_lt_of_multilevel: the C2′ multilevel threshold bounds.
References #
Revealing the existing gate evaluation one gate at a time gives a scalar block decomposition. The output may be any fixed Boolean readout of the gate values.
Instances For
C1 capacity bound. Any Boolean readout of a weighted program's gate values computing a
function whose two fibers are K-rectangle-free satisfies this input-reading-gate bound.
The C1 bound for a single-output circuit whose output selects a gate.
Parametric gate evaluation and piece bounds (Lemma 2) #
The gate values when every gate in fixed takes the value given by η, and every other
gate gate receives the real input contribution z gate in place of its weighted input sum.
Instances For
Overriding gates by their true values and feeding the other gates their true weighted input sums recovers the ordinary evaluation, gate by gate.
Lemma 2 (pieces of a run). If every gate outside fixed receives the input contribution
slope gate * t, and the gates in fixed are set by η, the gate values have at most 2 ^ r
pieces as functions of t, where r counts the gates outside fixed with a nonzero slope.
Direction runs and block decompositions #
A split of the gates into B consecutive runs, numbered by the monotone map run, such
that every gate of run i reads the inputs along the direction dir i: its input weight
vector is a real multiple of dir i. A gate that reads no input fits every direction.
The run of each gate.
Runs are consecutive in the gate order.
There are at most
Bruns.The direction of each run.
Every gate reads the inputs along the direction of its run.
Instances For
The number of input-reading gates in run i.
Instances For
The split of the gates into single-gate runs, each along its own input weight vector.
Instances For
The single run of a program whose input weight vectors are all multiples of w.
Instances For
The slope of a gate of run i along the direction of the run, and zero elsewhere.
Instances For
The block decomposition of a program along a split into direction runs: the history after
i blocks holds the values of the gates of the first i runs, and the output applies readout
to the complete gate valuation.
Instances For
Capacity and logarithmic corollaries (C1, C2, C3, C2′) #
Theorem U for threshold programs. Split the gates of a threshold program into B
consecutive runs along single directions, with rᵢ input-reading gates in run i. Then
2 ^ n < 4 * K ^ 2 * ∏ i, cᵢ, where cᵢ = 4 * (2 ^ rᵢ - 1) if rᵢ ≥ 1 and cᵢ = 1
otherwise.
C1, logarithmic form. With K ≤ 2 ^ k, every threshold program computing f has
n < 2 * k + 2 + 2 * |inputGates p|.
The logarithmic C1 bound for a single-output circuit whose output selects a gate.
C2: one direction. If every input weight vector of a threshold program computing f is a
real multiple of one vector w, then 2 ^ n < 16 * K ^ 2 * 2 ^ |inputGates p|.
C2, logarithmic form. With K ≤ 2 ^ k, a threshold program computing f whose input
weight vectors are all multiples of one vector has n < 2 * k + 4 + |inputGates p|.
The C2 single-direction bound for a single-output circuit whose output selects a gate.
The logarithmic C2 single-direction bound for a single-output circuit whose output selects a gate.
C3: direction runs. If the gates of a threshold program computing f split into B
consecutive runs along single directions, then 2 ^ n < 4 * K ^ 2 * 4 ^ B * 2 ^ |inputGates p|.
C3, logarithmic form. With K ≤ 2 ^ k and B direction runs,
n < 2 * k + 2 + 2 * B + |inputGates p|.
The C3 direction-run bound for a single-output circuit whose output selects a gate.
The logarithmic C3 direction-run bound for a single-output circuit whose output selects a gate.
The one-block decomposition of a multilevel threshold function F (∑ i, w i * (x i).toNat).
Instances For
C2′: multilevel threshold representations. If f x = F (∑ i, w i * (x i).toNat) for a
function F changing at most T times, then 2 ^ n < 4 * K ^ 2 * max 1 (4 * T).
C2′, logarithmic form. With K ≤ 2 ^ k and 2 * k + 4 ≤ n, a multilevel threshold
representation f x = F (∑ i, w i * (x i).toNat) needs more than 2 ^ (n - (2 * k + 4))
transitions.