Internals: extended-basis circuits as programs with shared gates #
Proof internals for Complexitylib.Algebraic.LowerBound.KarchmerWigderson.Sharing.Extended.
The occurrence counts Formula.occ/SharedProgram.occ, the substitution
SharedProgram.substVar, and the fan-out counts argUses/sharedCount are reused from
Complexitylib.Algebraic.LowerBound.KarchmerWigderson.Sharing.Circuit. This file adds:
- how input leaves change under
substVar(SharedProgram.inputLeaves_substVar) and under the lifting substitutionSharedProgram.liftSubst, which replaces a variable by a formula over two fresh shared values; - the expansion
Extended.expandBinaryGadgetof an XOR or EQUIV gate into two shared values and a zero-input-leaf gadget; - the construction
Extended.exists_sharedProgram_of_program, which tracks the number of shared values and the input leaves while processing an extended-basis program from the last gate down; - the two-parameter superlinearity criterion
isLittleO_of_forall_mul_le_two.
Inserting two values #
With no later entries, insertVal2 appends the two values.
insertVal2 commutes with appending a later entry.
Input leaves of formulas under substitution #
Raising the input threshold from m to m + 1 adds the leaves on variable m.
A formula with no input leaves below m has no leaves on any variable v < m.
The substitution behind SharedProgram.liftSubst: the variable N becomes
ψ : Formula (N + 2), the variables below N are kept, and those above N move up by one to make
room for the two new shared variables N and N + 1.
Equations
- ψ.liftSubstMap d i = if h : ↑i < N then Algebraic.KW.Formula.lit ⟨↑i, ⋯⟩ true else if x : ↑i = N then Algebraic.KW.Formula.mapIndex (Fin.castLE ⋯) ψ else Algebraic.KW.Formula.lit ⟨↑i + 1, ⋯⟩ true
Instances For
Input leaves of programs under substitution #
Extended-basis gates as formulas #
The formula of one De Morgan gate over the earlier wires, numbered by Wire.index. On the
xor and equiv gates it is a placeholder constant: those gates are expanded by
expandBinaryGadget instead.
Equations
- One or more equations did not get rendered due to their size.
- Algebraic.KW.Extended.lineFormula { op := Algebraic.KW.Extended.Op.false, wires := wires } = Algebraic.KW.Formula.const false
- Algebraic.KW.Extended.lineFormula { op := Algebraic.KW.Extended.Op.true, wires := wires } = Algebraic.KW.Formula.const true
- Algebraic.KW.Extended.lineFormula { op := Algebraic.KW.Extended.Op.id, wires := w } = Algebraic.KW.Formula.lit (w ⟨0, Algebraic.KW.Extended.lineFormula._proof_3⟩).index true
- Algebraic.KW.Extended.lineFormula { op := Algebraic.KW.Extended.Op.not, wires := w } = Algebraic.KW.Formula.lit (w ⟨0, Algebraic.KW.Extended.lineFormula._proof_4⟩).index false
- Algebraic.KW.Extended.lineFormula { op := Algebraic.KW.Extended.Op.xor, wires := wires } = Algebraic.KW.Formula.const false
- Algebraic.KW.Extended.lineFormula { op := Algebraic.KW.Extended.Op.equiv, wires := wires } = Algebraic.KW.Formula.const true
Instances For
Expand one binary XOR or EQUIV gate at position N = n + t into two shared wire steps and
substitute ψ (xorGadget or equivGadget) for variable N.
Equations
- One or more equations did not get rendered due to their size.
Instances For
From extended-basis programs to programs with shared gates #
Superlinearity with two sublinear parameters #
Superlinearity when two parameters k n = o(n) and r n = o(n) control the linear factor:
if (a · k n + b · r n + d + 1) · (C + 1) ≤ n forces C · n ≤ s n for every n and C, then
n = o(s n). The one-parameter version is isLittleO_of_forall_mul_le.