Depth3SigmoidCircuit
A feedforward circuit structure on n inputs parameterized solely by the input dimension n : ℕ, containing internal fields for the hidden layer sizes m₁, m₂ : ℕ, weight matrices w₁ : Fin m₁ → Fin n → ℝ and w₂ : Fin m₂ → Fin m₁ → ℝ, bias vectors b₁ : Fin m₁ → ℝ and b₂ : Fin m₂ → ℝ, an output weight vector w₃ : Fin m₂ → ℝ, and an output bias scalar b₃ : ℝ.
Statement
structure Depth3SigmoidCircuit (n : ℕ)- Defined in
- scout/2611-21910-new-gate-weight-and-wire-complexity-bounds-for-sigmoid-neur.md:709
- Verified
- 18 Nov 2026
- Axioms
- none listed
- Used by 5
- depth3_sigmoid_circuit_eval_boolEvaluates a depth-3 sigmoidal circuit C on a Boolean input vector x : Fin n → Bool by converting false to 0 and true to 1 and evaluating C.
- depth3_sigmoid_circuit_weights_bounded_byPredicate stating that every weight in w₁, w₂, w₃ and every bias in b₁, b₂, b₃ of a depth-3 circuit C has absolute value at most B.
- depth3_sigmoid_circuit_num_wiresThe total number of wires in a depth-3 sigmoidal circuit C, defined as the sum of the number of nonzero weights in w₁, w₂, and w₃.
- depth3_sigmoid_circuit_evalEvaluates a depth-3 sigmoidal circuit C on a real input vector x : Fin n → ℝ using Real.sigmoid: layer 1 computes Real.sigmoid ((∑ i : Fin…
- symmetric_boolean_func_depth3_sigmoid_circuitFor every symmetric Boolean function f on n ≥ 1 variables, there exists a depth-3 sigmoidal circuit C on n inputs with at most 3n wires…
Read back from the Lean
A structure parameterized by a natural number n representing the input dimension. It bundles:
- natural numbers m₁ and m₂ (the sizes of the first and second hidden layers);
- w₁ : Fin m₁ → Fin n → ℝ, weights from the input layer to the first hidden layer;
- b₁ : Fin m₁ → ℝ, biases for the first hidden layer;
- w₂ : Fin m₂ → Fin m₁ → ℝ, weights from the first hidden layer to the second hidden layer;
- b₂ : Fin m₂ → ℝ, biases for the second hidden layer;
- w₃ : Fin m₂ → ℝ, weights from the second hidden layer to the scalar output;
- b₃ : ℝ, a scalar output bias.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Feedforward depth-3 circuit structure on n inputs storing layer dimensions, weights, and biases. -/ structure Depth3SigmoidCircuit (n : ℕ) where m₁ : ℕ m₂ : ℕ w₁ : Fin m₁ → Fin n → ℝ b₁ : Fin m₁ → ℝ w₂ : Fin m₂ → Fin m₁ → ℝ b₂ : Fin m₂ → ℝ w₃ : Fin m₂ → ℝ b₃ : ℝ