Internals of the negation-limited Boolean matrix product bound #
This file reduces De Morgan circuits with few NOT gates computing the Boolean
matrix product to the monotone partial-product bound
Algebraic.Monotone.MatrixProduct.Internal.card_le_andCost. The surface
statements are in
Complexitylib.Algebraic.LowerBound.Monotone.MatrixProduct.NegationLimited.
Circuit surgery #
freezereplaces the line of selected gates by constant gates. When every frozen gate already takes its constant value on an assignment, evaluation on that assignment is unchanged (trace_freeze). Freezing only NOT gates keeps the AND-gate count (andCost_freeze) and removes the frozen NOT gates from the NOT-gate count.restrictInputsfixes the inputs outside a selected set to a constant by instantiating the circuit after a single constant gate.
Few NOT gates (div_mul_div_mul_le_andCost) #
Induction on the bound t on the number of NOT gates. Let G be the first NOT
gate. Every wire before it computes a monotone function (isMonotone_trace),
in particular its argument h. Let F be the left half of the variables:
the rows i < I / 2 of x and the columns j < J / 2 of y, and let c be
the value of h on the indicator of F. If c = 0, every assignment that is
zero outside F lies below that indicator, so h is zero there; if c = 1,
every assignment that is one on F lies above it, so h is one there. Fixing
the variables outside F to 0, respectively those of F to 1, therefore
makes G constant, so it can be frozen, and keeps a product of
(I / 2) × K by K × (J / 2) matrices on the rows and columns whose variables
stay free (the first halves if c = 0, the next halves if c = 1). The new
circuit has one NOT gate fewer and the same AND gates. With no NOT gate left,
the monotone bound gives K * (I / 2 ^ t) * (J / 2 ^ t) AND gates.
NOT gates of few variables (card_le_andCost_of_dependsOnlyOn) #
If every NOT gate computes a function of the variables in S, fixing those
variables to zero makes every NOT gate constant. Freezing them leaves a
circuit without NOT gates computing the partial product over the triples whose
variables avoid S, and at most |S| * max I J triples meet S.
Freezing gates to constants #
The constant gate of value b.
Equations
Instances For
Replace the line of every gate G with sel G = some b by the constant
gate b.
Equations
- One or more equations did not get rendered due to their size.
- Algebraic.Monotone.MatrixProduct.NegationLimited.Internal.freeze Cslib.Circuits.Program.empty x_3 = Cslib.Circuits.Program.empty
Instances For
Freezing gates that already take their constant values does not change the evaluation.
Freezing NOT gates keeps the AND-gate count.
Freezing every NOT gate leaves none.
Freezing one NOT gate removes exactly one NOT gate.
Freeze the selected gates of a circuit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fixing inputs to a constant #
Fix every input v with keep v = false to the constant b, read from a
single constant gate placed before the circuit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Wires below the first NOT gate #
A NOT gate computes the negation of its argument.
Every wire before the first NOT gate computes a monotone function.
Halving #
The left half of the variables: rows i < I / 2 of x and columns
j < J / 2 of y.
Equations
Instances For
The layout of the kept rows and columns.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One NOT gate can be traded for halving the numbers of rows and columns.
Few NOT gates #
Few NOT gates. A De Morgan circuit with at most t NOT gates computing
the product of an I × K matrix and a K × J matrix, laid out injectively among
its inputs, has at least (I / 2 ^ t) * (J / 2 ^ t) * K AND gates.
NOT gates of few variables #
At most |S| * max I J triples have a variable in S.
NOT gates of few variables. If every NOT gate of a De Morgan circuit
computing the product of an I × K matrix and a K × J matrix computes a
function of the variables in S, the circuit has at least
I * J * K - |S| * max I J AND gates.
Non-monotone gates of few variables #
If every gate computing a non-monotone function depends only on the inputs
in S, so does every NOT gate.