Documentation

Complexitylib.Algebraic.LowerBound.Threshold.Internal.Program

Threshold programs as block decompositions #

theorem Algebraic.Threshold.Program.evalFrom_eq {n s : ℕ} (C : Program n s) (fixed : Finset (Fin s)) (η : Fin s → Bool) (z : Fin s → ℝ) (j : Fin s) :
C.evalFrom fixed η z j = if j ∈ fixed then η j else decide (0 ≤ (z j + ∑ k : Fin s, if k < j then C.gateWeight j k * ↑(C.evalFrom fixed η z k).toNat else 0) + C.bias j)
theorem Algebraic.Threshold.Program.eval_eq_internal {n s : ℕ} (C : Program n s) (x : Fin n → Bool) (j : Fin s) :
C.eval x j = decide (0 ≤ (weightedSum (C.inputWeight j) x + ∑ k : Fin s, if k < j then C.gateWeight j k * ↑(C.eval x k).toNat else 0) + C.bias j)
theorem Algebraic.Threshold.Program.evalFrom_eq_eval {n s : ℕ} (C : Program n s) {fixed : Finset (Fin s)} {η : Fin s → Bool} {z : Fin s → ℝ} {x : Fin n → Bool} (j : Fin s) (hfix : ∀ k ≤ j, k ∈ fixed → η k = C.eval x k) (hz : ∀ k ≤ j, k ∉ fixed → z k = weightedSum (C.inputWeight k) x) :
C.evalFrom fixed η z j = C.eval x j

Overriding gates by their true values and feeding the other gates their true weighted input sums recovers the ordinary evaluation, gate by gate.

noncomputable def Algebraic.Threshold.Program.prefixValues {n s : ℕ} (C : Program n s) (fixed : Finset (Fin s)) (η : Fin s → Bool) (slope : Fin s → ℝ) (d : ℕ) (t : ℝ) :
Fin s → Bool

The values of the first d gates, as functions of the parameter t.

Equations
Instances For
    noncomputable def Algebraic.Threshold.Program.activeCount {s : ℕ} (fixed : Finset (Fin s)) (slope : Fin s → ℝ) (d : ℕ) :

    The number of unfixed gates with a nonzero slope among the first d gates.

    Equations
    Instances For
      theorem Algebraic.Threshold.Program.piecesAtMost_evalFrom_internal {n s : ℕ} (C : Program n s) (fixed : Finset (Fin s)) (η : Fin s → Bool) (slope : Fin s → ℝ) :
      PiecesAtMost (fun (t : ℝ) => C.evalFrom fixed η fun (j : Fin s) => slope j * t) (2 ^ {j : Fin s | j ∉ fixed ∧ slope j ≠ 0}.card)

      Lemma 2 (pieces of a run). If every gate outside fixed receives the input contribution slope j * t, the gate values have at most 2 ^ r pieces as functions of t, where r counts the gates outside fixed with a nonzero slope.

      noncomputable def Algebraic.Threshold.Program.DirectionRuns.slope {n s : ℕ} {C : Program n s} {B : ℕ} (R : C.DirectionRuns B) (i : ℕ) (j : Fin s) :

      The slope of a gate of run i along the direction of the run, and zero elsewhere.

      Equations
      Instances For
        theorem Algebraic.Threshold.Program.weightedSum_smul {n : ℕ} (c : ℝ) (w : Fin n → ℝ) (x : Fin n → Bool) :
        weightedSum (c • w) x = c * weightedSum w x
        theorem Algebraic.Threshold.Program.DirectionRuns.weightedSum_eq {n s : ℕ} {C : Program n s} {B : ℕ} (R : C.DirectionRuns B) {i : ℕ} {j : Fin s} (hj : R.run j = i) (x : Fin n → Bool) :

        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.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For