Documentation

Complexitylib.Algebraic.LowerBound.Threshold.Internal.Excess

The excess bound for threshold programs #

Fix a set F of inputs and a family ๐“‘ of pairwise disjoint blocks covering the remaining inputs, such that every gate either reads inputs from F only or has its residual support (outside F) inside a single block. Write e_b for the number of gates whose nonempty residual support lies in the block b, and ฯ†_b := |b| - e_b for the excess of the block. If every excess is at most M and the program computes a two-sided K-rectangle-free function with K โ‰ค 2 ^ k, then n < |F| + s_in + M + 2k.

The proof disconnects the inputs of F (Program.restrictInputs), which turns the residual supports into the supports of a program computing the restriction of f with the inputs of F fixed to false. The blocks then split into two groups of excess at least k each (exists_subset_sum_ge_internal), and the split lemma applied to the union U of one group, with the saturated blocks (ฯ†_b = 0) fixed, yields a rectangle P ร— Q for the restricted function. Fixing the coordinates of F โІ Uแถœ to false on the Q side (fixFalseRight) gives a rectangle for f itself, shrinking Q by a factor of at most 2 ^ |F| (card_le_card_image_fixFalseRight), which the count of Uแถœ absorbs. Both sides then have at least 2 ^ k elements.

theorem Algebraic.Threshold.exists_subset_sum_ge_internal {ฮน : 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 value at most M with total value at least 2k + M split into two groups of value at least k each.

theorem Algebraic.Threshold.le_of_two_pow_le_mul_internal {P g d k K : โ„•} (hP : 2 ^ d โ‰ค P * 2 ^ g) (hd : k + g โ‰ค d) (hK : K โ‰ค 2 ^ k) :

The arithmetic closing step of a split: from 2 ^ d โ‰ค P ยท 2 ^ g with k + g โ‰ค d and K โ‰ค 2 ^ k, the side P has at least K elements.

theorem Algebraic.Threshold.le_of_two_pow_le_mul_image_internal {Q Q' g d k K m : โ„•} (hQ : 2 ^ d โ‰ค Q * 2 ^ g) (hQ' : Q โ‰ค 2 ^ m * Q') (hd : k + (m + g) โ‰ค d) (hK : K โ‰ค 2 ^ k) :

The closing step when the side Q is first projected onto Q' with fibers of size at most 2 ^ m.

theorem Algebraic.Threshold.sum_eq_sum_filter_add_sum_tsub_add_sum_internal {ฮน : Type u_1} (๐“— : Finset ฮน) (c e : ฮน โ†’ โ„•) :
โˆ‘ b โˆˆ ๐“—, c b = โˆ‘ b โˆˆ ๐“— with c b โ‰ค e b, c b + โˆ‘ b โˆˆ ๐“—, (c b - e b) + โˆ‘ b โˆˆ ๐“— with ยฌc b โ‰ค e b, e b

Splitting a sum of sizes by saturation: the saturated items (c โ‰ค e) contribute their size, the unsaturated ones their excess c - e plus e.

def Algebraic.Threshold.fixFalse {n : โ„•} (F : Finset (Fin n)) (x : Fin n โ†’ Bool) :
Fin n โ†’ Bool

The input x with the coordinates in F fixed to false.

Equations
Instances For
    def Algebraic.Threshold.fixFalseRight {n : โ„•} (U F : Finset (Fin n)) (q : โ†ฅUแถœ โ†’ Bool) :
    โ†ฅUแถœ โ†’ Bool

    The second side q of a split with the coordinates in F โІ Uแถœ fixed to false.

    Equations
    Instances For
      theorem Algebraic.Threshold.fixFalse_glue {n : โ„•} (U F : Finset (Fin n)) (hFU : Disjoint F U) (p : โ†ฅU โ†’ Bool) (q : โ†ฅUแถœ โ†’ Bool) :
      theorem Algebraic.Threshold.card_le_card_image_fixFalseRight {n : โ„•} (U F : Finset (Fin n)) (hFU : Disjoint F U) (Q : Finset (โ†ฅUแถœ โ†’ Bool)) :

      Fixing the coordinates of F โІ Uแถœ to false has fibers of size at most 2 ^ |F|.

      noncomputable def Algebraic.Threshold.Program.restrictInputs {n s : โ„•} (C : Program n s) (F : Finset (Fin n)) :

      The program C with the inputs of F disconnected: their weights are set to 0 in every gate. On inputs vanishing on F, it evaluates as C.

      Equations
      Instances For
        theorem Algebraic.Threshold.Program.evalFrom_restrictInputs {n s : โ„•} (C : Program n s) (F : Finset (Fin n)) (fixed : Finset (Fin s)) (ฮท : Fin s โ†’ Bool) (z : Fin s โ†’ โ„) :
        (C.restrictInputs F).evalFrom fixed ฮท z = C.evalFrom fixed ฮท z
        theorem Algebraic.Threshold.Program.eval_restrictInputs {n s : โ„•} (C : Program n s) (F : Finset (Fin n)) (x : Fin n โ†’ Bool) :
        noncomputable def Algebraic.Threshold.Program.residualGates {n s : โ„•} (C : Program n s) (F b : Finset (Fin n)) :

        The gates whose residual support outside F is nonempty and lies in b.

        Equations
        Instances For
          theorem Algebraic.Threshold.Program.mem_residualGates {n s : โ„•} (C : Program n s) (F b : Finset (Fin n)) (j : Fin s) :
          j โˆˆ C.residualGates F b โ†” ยฌC.support j โІ F โˆง C.support j \ F โІ b
          theorem Algebraic.Threshold.Program.disjoint_residualGates {n s : โ„•} (C : Program n s) (F : Finset (Fin n)) {b b' : Finset (Fin n)} (hbb' : Disjoint b b') :
          theorem Algebraic.Threshold.Program.sum_card_residualGates_le {n s : โ„•} (C : Program n s) (F : Finset (Fin n)) (๐“‘ : Finset (Finset (Fin n))) (hdisj : (โ†‘๐“‘).PairwiseDisjoint id) :
          โˆ‘ b โˆˆ ๐“‘, (C.residualGates F b).card โ‰ค C.inputGates.card

          Over pairwise disjoint blocks, the residual gates number at most the input gates.

          theorem Algebraic.Threshold.Program.card_filter_le_sum_residualGates {n s : โ„•} (C : Program n s) (F : Finset (Fin n)) (๐“‘ ๐“— : Finset (Finset (Fin n))) (hblocks : โˆ€ (j : Fin s), C.support j โІ F โˆจ โˆƒ b โˆˆ ๐“‘, C.support j \ F โІ b) (W X : Finset (Fin n)) (hW : โˆ€ b โˆˆ ๐“‘, โˆ€ i โˆˆ b, i โˆˆ W โ†’ b โˆˆ ๐“—) (hX : โˆ€ b โˆˆ ๐“—, b.card โ‰ค (C.residualGates F b).card โ†’ b โІ X) :
          {j : Fin s | (C.restrictInputs F).support j โІ W โˆง ยฌ(C.restrictInputs F).support j โІ X}.card โ‰ค โˆ‘ b โˆˆ ๐“— with ยฌb.card โ‰ค (C.residualGates F b).card, (C.residualGates F b).card

          The gates of the disconnected program counted on the side W of a split, with the set X fixed, lie in the unsaturated blocks of the group ๐“— meeting W.

          theorem Algebraic.Threshold.TwoSidedRectangleFree.lt_of_blocks_internal {n s : โ„•} {f : Cslib.BooleanFunction n} {K : โ„•} (hf : TwoSidedRectangleFree f K) {C : Program n s} (hC : C.Computes f) (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 s), C.support j โІ F โˆจ โˆƒ b โˆˆ ๐“‘, C.support j \ F โІ b) (M : โ„•) (hM : โˆ€ b โˆˆ ๐“‘, b.card โ‰ค {j : Fin s | ยฌC.support j โІ F โˆง C.support j \ F โІ b}.card + M) {k : โ„•} (hK : K โ‰ค 2 ^ k) :
          n < F.card + C.inputGates.card + M + 2 * k

          The excess 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. If every block b has excess |b| - e_b โ‰ค M, where e_b counts the gates with nonempty residual support inside b, and the program computes a two-sided K-rectangle-free function with K โ‰ค 2 ^ k, then n < |F| + s_in + M + 2k.