Documentation

CslibFrontier.Computability.Circuit.Boolean.Zhegalkin.Decomposition

Internal affine decomposition of {⊕, ∧, 1}-programs #

Internal constant synthesis (constOne, constZero, synth_consts) and causal affine program decomposition (linForm, PaddedDecomp, exists_paddedDecomp) consumed privately by Complexity, StageParts, StageStep, and UpperBound; never re-exported through Zhegalkin.

Main definitions #

Main results #

Constant-true n-variable Boolean function.

Constant-false n-variable Boolean function.

def Cslib.Circuits.Boolean.Zhegalkin.linForm {n k : ℕ} (c₀ : Bool) (cX : Fin n → Bool) (cG : Fin k → Bool) (gFn : Fin k → BooleanFunction n) (x : Fin n → Bool) :

Affine combination over GF(2) of inputs x and conjunction outputs gFn.

M-padded causal affine decomposition of a {⊕, ∧, 1}-circuit computing f.

  • gFn : Fin M → BooleanFunction n

    Padded Boolean functions computed by conjunction gates 0 .. M - 1.

  • cH : Fin (2 * M) → Bool

    Constant bits of the 2 * M padded conjunction input linear forms.

  • aX : Fin (2 * M) → Fin n → Bool

    Input-variable coefficients of the 2 * M padded conjunction input linear forms.

  • aG : Fin (2 * M) → Fin M → Bool

    Prior conjunction-gate coefficients of the 2 * M padded input linear forms.

  • outC : Bool

    Constant bit of the output linear form computing f.

  • outX : Fin n → Bool

    Input-variable coefficients of the output linear form computing f.

  • outG : Fin M → Bool

    Conjunction-gate coefficients of the output linear form computing f.

  • causal (r : Fin (2 * M)) (ℓ : Fin M) : ↑r / 2 ≤ ↑ℓ → self.aG r ℓ = false
  • gFn_lt (i : Fin M) : ↑i < k → ∀ (x : Fin n → Bool), self.gFn i x = (linForm (self.cH ⟨2 * ↑i, ⋯⟩) (self.aX ⟨2 * ↑i, ⋯⟩) (self.aG ⟨2 * ↑i, ⋯⟩) self.gFn x && linForm (self.cH ⟨2 * ↑i + 1, ⋯⟩) (self.aX ⟨2 * ↑i + 1, ⋯⟩) (self.aG ⟨2 * ↑i + 1, ⋯⟩) self.gFn x)
  • gFn_ge (i : Fin M) : k ≤ ↑i → self.gFn i = constZero n
  • out_eq (x : Fin n → Bool) : f x = linForm self.outC self.outX self.outG self.gFn x
def Cslib.Circuits.Boolean.Zhegalkin.padBool {k M : ℕ} (v : Fin k → Bool) (ℓ : Fin M) :

Zero-pads a length-k Boolean vector to length M.

Zero-pads a length-k family of n-ary Boolean functions to length M.

theorem Cslib.Circuits.Boolean.Zhegalkin.linForm_pad {n k M : ℕ} (hkM : k ≤ M) (c₀ : Bool) (cX : Fin n → Bool) (cG : Fin k → Bool) (gFn : Fin k → BooleanFunction n) (x : Fin n → Bool) :
linForm c₀ cX (padBool cG) (padFn gFn) x = linForm c₀ cX cG gFn x