Documentation

Complexity.Computability.Circuit.Boolean.WeightedThreshold.Components

Input-support components, fan-in-two splits, and block-excess bounds #

This module proves two structural lower bounds for weighted threshold programs from the coordinate-split and median-cut rectangle lemmas in Cut.lean:

Main definitions #

Main results #

References #

Input-support graph and connected components #

The input-support graph of a weighted threshold program: two inputs are adjacent when some gate has nonzero aggregated weight on both.

Instances For

    The inputs belonging to a connected component of supportGraph p.

    Instances For

      The gates with nonempty aggregated input support inside a connected component of supportGraph p.

      Instances For

        The input support of a gate lies in the connected component of any of its inputs.

        The connected components of supportGraph p partition the n inputs.

        The input-reading gates are partitioned by the connected components of supportGraph p.

        When every gate has aggregated input support of size at most 2, every connected component of supportGraph p has at most one more input than active gates.

        C5: Fan-in-two component split and lower bound #

        theorem Cslib.Circuits.Boolean.WeightedThreshold.exists_split_of_inputSupport_card_le_two {n g : โ„•} (p : Program signature n g) (h2 : โˆ€ (j : Fin g), (inputSupport p j).card โ‰ค 2) (L : โ„•) (hL : L + (inputGates p).card โ‰ค n) :
        โˆƒ (U : Finset (Fin n)), (โˆ€ (j : Fin g), inputSupport p j โІ U โˆจ inputSupport p j โІ Uแถœ) โˆง U.card = {j : Fin g | inputSupport p j โІ U โˆง inputSupport p j โ‰  โˆ…}.card + L

        When every gate of p has aggregated input support of size at most 2, for every L โ‰ค n - (inputGates p).card there is a coordinate split U that no gate crosses and whose size exceeds the number of active gates on U by L.

        theorem Cslib.Circuits.Boolean.WeightedThreshold.lt_of_inputSupport_card_le_two {n g : โ„•} (p : Program signature n g) (readout : (Fin g โ†’ Bool) โ†’ Bool) {f : BooleanFunction n} {K : โ„•} (hreadout : โˆ€ (x : Fin n โ†’ Bool), readout (p.eval interpretation x) = f x) (hf : โˆ€ (b : Bool), Frontier.RectangleFree {x : Fin n โ†’ Bool | f x = b} K) (h2 : โˆ€ (j : Fin g), (inputSupport p j).card โ‰ค 2) {L : โ„•} (hK : K โ‰ค 2 ^ L) :
        n < (inputGates p).card + 2 * L

        C5: component bound for input fan-in two. If every gate of p has aggregated input support of size at most 2 and p computes a two-sided K-rectangle-free function f through readout with K โ‰ค 2 ^ L, then n < (inputGates p).card + 2 * L.

        theorem Cslib.Circuits.Boolean.WeightedThreshold.circuit_lt_of_inputSupport_card_le_two {n : โ„•} (c : Circuit signature n 1) (houtput : โˆƒ (gate : Fin c.size), c.outputs 0 = Wire.gate gate) {f : BooleanFunction n} {K : โ„•} (hcomputes : โˆ€ (x : Fin n โ†’ Bool), c.eval interpretation x 0 = f x) (hf : โˆ€ (b : Bool), Frontier.RectangleFree {x : Fin n โ†’ Bool | f x = b} K) (h2 : โˆ€ (j : Fin c.size), (inputSupport c.program j).card โ‰ค 2) {L : โ„•} (hK : K โ‰ค 2 ^ L) :

        The C5 fan-in-two component bound for a single-output weighted threshold circuit whose output selects a gate.

        C6: Block-excess restriction and lower bound #

        theorem Cslib.Circuits.Boolean.WeightedThreshold.exists_subset_sum_ge {ฮน : Type u_1} [DecidableEq ฮน] (๐“‘ : Finset ฮน) (ฯ† : ฮน โ†’ โ„•) (M k : โ„•) (hฯ† : โˆ€ b โˆˆ ๐“‘, ฯ† b โ‰ค M) (htot : 2 * k + M โ‰ค โˆ‘ b โˆˆ ๐“‘, ฯ† b) :
        โˆƒ ๐’ข โІ ๐“‘, k โ‰ค โˆ‘ b โˆˆ ๐’ข, ฯ† b โˆง k โ‰ค โˆ‘ b โˆˆ ๐“‘ \ ๐’ข, ฯ† b

        Subset sum. Items of weight at most M with total weight at least 2 * k + M can be partitioned into ๐’ข โІ ๐“‘ and ๐“‘ \ ๐’ข each of weight at least k.

        The gates of p whose residual input support outside F is nonempty and contained in b.

        Instances For
          theorem Cslib.Circuits.Boolean.WeightedThreshold.sum_card_residualGates_le {n g : โ„•} (p : Program signature n g) (F : Finset (Fin n)) (๐“‘ : Finset (Finset (Fin n))) (hdisj : (โ†‘๐“‘).PairwiseDisjoint id) :
          โˆ‘ b โˆˆ ๐“‘, (residualGates p F b).card โ‰ค (inputGates p).card

          Over pairwise disjoint blocks ๐“‘, the total number of residual gates is at most (inputGates p).card.

          theorem Cslib.Circuits.Boolean.WeightedThreshold.lt_of_blocks {n g : โ„•} (p : Program signature n g) (readout : (Fin g โ†’ Bool) โ†’ Bool) {f : BooleanFunction n} {K : โ„•} (hreadout : โˆ€ (x : Fin n โ†’ Bool), readout (p.eval interpretation x) = f x) (hf : โˆ€ (b : Bool), Frontier.RectangleFree {x : Fin n โ†’ Bool | f x = b} K) (F : Finset (Fin n)) (๐“‘ : Finset (Finset (Fin n))) (hdisj : (โ†‘๐“‘).PairwiseDisjoint id) (hcover : โˆ€ i โˆ‰ F, โˆƒ b โˆˆ ๐“‘, i โˆˆ b) (hF : โˆ€ b โˆˆ ๐“‘, Disjoint b F) (hblocks : โˆ€ (j : Fin g), inputSupport p j โІ F โˆจ โˆƒ b โˆˆ ๐“‘, inputSupport p j \ F โІ b) (M : โ„•) (hM : โˆ€ b โˆˆ ๐“‘, b.card โ‰ค (residualGates p F b).card + M) {k : โ„•} (hK : K โ‰ค 2 ^ k) :
          n < F.card + (inputGates p).card + M + 2 * k

          C6: the block-excess lower bound. Let F be a set of inputs and ๐“‘ a family of pairwise disjoint blocks covering the inputs outside F, such that every gate reads inputs from F only or has its residual support outside F inside a single block of ๐“‘. If every block b has excess |b| - e_b โ‰ค M, where e_b = (residualGates p F b).card, and p computes a two-sided K-rectangle-free function f through readout with K โ‰ค 2 ^ k, then n < F.card + (inputGates p).card + M + 2 * k.

          theorem Cslib.Circuits.Boolean.WeightedThreshold.circuit_lt_of_blocks {n : โ„•} (c : Circuit signature n 1) (houtput : โˆƒ (gate : Fin c.size), c.outputs 0 = Wire.gate gate) {f : BooleanFunction n} {K : โ„•} (hcomputes : โˆ€ (x : Fin n โ†’ Bool), c.eval interpretation x 0 = f x) (hf : โˆ€ (b : Bool), Frontier.RectangleFree {x : Fin n โ†’ Bool | f x = b} K) (F : Finset (Fin n)) (๐“‘ : Finset (Finset (Fin n))) (hdisj : (โ†‘๐“‘).PairwiseDisjoint id) (hcover : โˆ€ i โˆ‰ F, โˆƒ b โˆˆ ๐“‘, i โˆˆ b) (hF : โˆ€ b โˆˆ ๐“‘, Disjoint b F) (hblocks : โˆ€ (j : Fin c.size), inputSupport c.program j โІ F โˆจ โˆƒ b โˆˆ ๐“‘, inputSupport c.program j \ F โІ b) (M : โ„•) (hM : โˆ€ b โˆˆ ๐“‘, b.card โ‰ค (residualGates c.program F b).card + M) {k : โ„•} (hK : K โ‰ค 2 ^ k) :
          n < F.card + (inputGates c.program).card + M + 2 * k

          The C6 block-excess bound for a single-output weighted threshold circuit whose output selects a gate.